Ejemplo n.º 1
0
    def test3(self):
        #logging.basicConfig(level = logging.DEBUG)
        
        worldMap=[
                [1,1,2,2,2,3,2,1,4,1,3,1,1,1,1,1,1],
                [1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
                ]
        
        
        lay = MatrixSceneLayer(None,worldMap)
        
        
        # load Texture 
        lay.texmapping[1] = StrechedTexture("wolfenscii/asset/test/tex2")

        line = 34
        cols = 41
        canvas = [ [Pixel() for i in range(cols)] for j in range(line)]

        res = lay.update(canvas)
        printCanvas(canvas)
Ejemplo n.º 2
0
    def test3(self):
        #logging.basicConfig(level = logging.DEBUG)

        worldMap = [
            [1, 1, 2, 2, 2, 3, 2, 1, 4, 1, 3, 1, 1, 1, 1, 1, 1],
            [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        ]

        lay = MatrixSceneLayer(None, worldMap)

        # load Texture
        lay.texmapping[1] = StrechedTexture("wolfenscii/asset/test/tex2")

        line = 34
        cols = 41
        canvas = [[Pixel() for i in range(cols)] for j in range(line)]

        res = lay.update(canvas)
        printCanvas(canvas)
Ejemplo n.º 3
0
    def test2(self):
        logging.basicConfig(level = logging.DEBUG)
        
        worldMap=[
                [1,1,1,1,1,3,2,1,4,1,3,1,1,1,1,1,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
                ]

        lay = MatrixSceneLayer(None,worldMap)

        line = 34
        cols = 41
        canvas = [ [Pixel() for i in range(cols)] for j in range(line)]

        res = lay.update(canvas)
Ejemplo n.º 4
0
    def test2(self):
        logging.basicConfig(level=logging.DEBUG)

        worldMap = [
            [1, 1, 1, 1, 1, 3, 2, 1, 4, 1, 3, 1, 1, 1, 1, 1, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
            [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        ]

        lay = MatrixSceneLayer(None, worldMap)

        line = 34
        cols = 41
        canvas = [[Pixel() for i in range(cols)] for j in range(line)]

        res = lay.update(canvas)