]> 4ch.mooo.com Git - 16.git/commitdiff
== taking break still not working ==
authorsparky4 <sparky4@cock.li>
Thu, 16 Feb 2017 00:49:27 +0000 (18:49 -0600)
committersparky4 <sparky4@cock.li>
Thu, 16 Feb 2017 00:49:27 +0000 (18:49 -0600)
src/lib/16_map.c
src/lib/16_tdef.h
src/lib/scroll16.c
src/lib/scroll16.h

index 3bd1dbe1cab35e7c185329b1c231a8fa5b2e04e9..864d0b160f41a21208a382c44c0f059d10cc4bc2 100755 (executable)
@@ -327,29 +327,29 @@ void extract_map(const char *js, jsmntok_t *t, size_t count, map_t *map) {
                        k = 0;\r
                        while(t[i].start < inner_end) {\r
                                if(jsoneq(js, &(t[i]), "image") == 0) {\r
-                                       map->MAPTILESPTK = malloc(sizeof(tiles_t));\r
+                                       map->tiles = malloc(sizeof(tiles_t));\r
                                        s = remove_ext((char *)js+t[i+1].start, '.', '/');\r
-                                       strcpy(map->MAPTILESPTK->imgname, s);\r
+                                       strcpy(map->tiles->imgname, s);\r
                                        //And move to vrs, probably\r
 //                                     bp = bitmapLoadPcx("data/ed.pcx");\r
-//                                     map->MAPTILESPTK->btdata = &bp;\r
-                                       //map->MAPTILESPTK->btdata = malloc(sizeof(bitmap_t));\r
-                                       map->MAPTILESPTK->rows = 1;\r
-                                       map->MAPTILESPTK->cols = 1;\r
+//                                     map->tiles->btdata = &bp;\r
+                                       //map->tiles->btdata = malloc(sizeof(bitmap_t));\r
+                                       map->tiles->rows = 1;\r
+                                       map->tiles->cols = 1;\r
 #ifdef __DEBUG_MAP__\r
                                        dbg_maptext=false;\r
 #endif\r
                                        i++;\r
                                }else if(jsoneq(js, &(t[i]), "tileheight") == 0) {\r
-                                       map->MAPTILESPTK->tileHeight = atoi(js + t[i+1].start);\r
+                                       map->tiles->tileHeight = atoi(js + t[i+1].start);\r
 #ifdef DEBUG_MAPVAR\r
-                                       printf("Tile Height: %d\n", map->MAPTILESPTK->tileHeight);\r
+                                       printf("Tile Height: %d\n", map->tiles->tileHeight);\r
 #endif\r
                                        i++;\r
                                }else if(jsoneq(js, &(t[i]), "tilewidth") == 0) {\r
-                                       map->MAPTILESPTK->tileWidth = atoi(js + t[i+1].start);\r
+                                       map->tiles->tileWidth = atoi(js + t[i+1].start);\r
 #ifdef DEBUG_MAPVAR\r
-                                       printf("Tile Width: %d\n", map->MAPTILESPTK->tileWidth);\r
+                                       printf("Tile Width: %d\n", map->tiles->tileWidth);\r
 #endif\r
                                        i++;\r
                                }\r
index 58b4e01a379d773b38fb4d4d5fe4447d0b9bf47a..af4b0d7e1c4616043370285606731fc2b09e11e0 100755 (executable)
@@ -109,9 +109,6 @@ typedef struct {
 } mapl_t;      //map layer array type def\r
 \r
 #define MAPLAYERS 3\r
-\r
-#define MAPTILESPTR            tiles//layertile[0]\r
-#define MAPTILESPTK            tiles//layertile[k]\r
 typedef struct {\r
        //long          planestart[3];\r
        //unsigned      planelength[3];\r
index 469ed1f710051551cdeaceddf20d51a13130ac92..95996534a670668bfc13c9a958837594a6ad6ded 100755 (executable)
@@ -337,17 +337,17 @@ void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid)
        ScrollRight(mv, player, id, plid);\r
 \r
        /* draw the next column */\r
-       x= mv[0].page->sw + mv[0].map->MAPTILESPTR->tileWidth;\r
+       x= mv[0].page->sw + mv[0].map->tiles->tileWidth;\r
 #ifndef FULLRCREND\r
        if(player[plid].enti.q%4)\r
 #else\r
        if(player[plid].enti.q==4)\r
 #endif\r
 //             if(id==0)\r
-                       mapDrawCol(mv, id, mv[0].tx + mv[0].page->ti.tw, mv[0].ty-1, x, player, DRAWCOLNUM);\r
+                       mapDrawCol(&mv[id], mv[0].tx + mv[0].page->ti.tw, mv[0].ty-1, x, player, DRAWCOLNUM);\r
 //             else\r
 //                     if(mv[0].video->bgps)\r
-//                             modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[0].map->MAPTILESPTR->tileWidth, mv[0].page->height);\r
+//                             modexCopyPageRegion(mv->page, mv[0].page, x, 0, x, 0, mv[0].map->tiles->tileWidth, mv[0].page->height);\r
        //mv[0].video->dorender=1;//ScrollRight\r
 }\r
 \r
@@ -366,10 +366,10 @@ void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid)
        if(player[plid].enti.q==4)\r
 #endif\r
 //             if(id==0)\r
-                       mapDrawCol(mv, id, mv[0].tx - 1, mv[0].ty-1, x, player, DRAWCOLNUM);\r
+                       mapDrawCol(&mv[id], mv[0].tx - 1, mv[0].ty-1, x, player, DRAWCOLNUM);\r
 //             else\r
 //                     if(mv[0].video->bgps)\r
-//                             modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[0].map->MAPTILESPTR->tileWidth, mv[0].page->height);\r
+//                             modexCopyPageRegion(mv->page, mv[0].page, x, 0, x, 0, mv[0].map->tiles->tileWidth, mv[0].page->height);\r
        //mv[0].video->dorender=1;//ScrollLeft\r
 }\r
 \r
@@ -388,10 +388,10 @@ void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid)
        if(player[plid].enti.q==4)\r
 #endif\r
 //             if(id==0)\r
-                       mapDrawRow(mv, id, mv[0].tx - 1, mv[0].ty-1, y, player, DRAWROWNUM);\r
+                       mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty-1, y, player, DRAWROWNUM);\r
 //             else\r
 //                     if(mv[0].video->bgps)\r
-//                             modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->MAPTILESPTR->tileHeight);\r
+//                             modexCopyPageRegion(mv->page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->tiles->tileHeight);\r
        //mv[0].video->dorender=1;//ScrollUp\r
 }\r
 \r
@@ -403,17 +403,17 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid)
        ScrollDown(mv, player, id, plid);\r
 \r
        /* draw the next row */\r
-       y= mv[0].page->sh + mv[0].map->MAPTILESPTR->tileHeight;\r
+       y= mv[0].page->sh + mv[0].map->tiles->tileHeight;\r
 #ifndef FULLRCREND\r
        if(player[plid].enti.q%3)\r
 #else\r
        if(player[plid].enti.q==4)\r
 #endif\r
 //             if(id==0)\r
-                       mapDrawRow(mv, id, mv[0].tx - 1, mv[0].ty+mv[0].page->ti.th, y, player, DRAWROWNUM);\r
+                       mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty+mv[0].page->ti.th, y, player, DRAWROWNUM);\r
 //             else\r
 //                     if(mv[0].video->bgps)\r
-//                             modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->MAPTILESPTR->tileHeight);\r
+//                             modexCopyPageRegion(mv->page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->tiles->tileHeight);\r
        //mv[0].video->dorender=1;//ScrollDown\r
 }\r
 \r
@@ -500,14 +500,14 @@ sword chkmap(map_t *map, word q)
                map->height=MAPH;///2;\r
 //             map->layerdata[0].data = malloc(((map->width*map->height)+1)*sizeof(byte));\r
                map->layerdata[0].data = &x;\r
-               map->MAPTILESPTR = malloc(sizeof(tiles_t));\r
+               map->tiles = malloc(sizeof(tiles_t));\r
                //fix this to be far~\r
 //             bp = bitmapLoadPcx("data/ed.pcx");\r
-//             map->MAPTILESPTR->data = &bp;\r
-               map->MAPTILESPTR->tileHeight = 16;\r
-               map->MAPTILESPTR->tileWidth = 16;\r
-               map->MAPTILESPTR->rows = 1;\r
-               map->MAPTILESPTR->cols = 1;\r
+//             map->tiles->data = &bp;\r
+               map->tiles->tileHeight = 16;\r
+               map->tiles->tileWidth = 16;\r
+               map->tiles->rows = 1;\r
+               map->tiles->cols = 1;\r
 #ifdef __DEBUG_MAP__\r
                dbg_maptext = true;\r
 #endif\r
@@ -538,12 +538,12 @@ void ZC_mapinitMV(map_view_t *mv, int tx, int ty)
        /* set up the coordinates */\r
        mv[0].tx = mv[1].tx = tx;\r
        mv[0].ty = mv[1].ty = ty;\r
-       mv[0].page->dx = mv[1].page->dx = mv[2].page->dx = mv[3].page->dx = mv->map->MAPTILESPTR->tileWidth;\r
-       mv[0].page->dy = mv[1].page->dy = mv[2].page->dy = mv[3].page->dy = mv->map->MAPTILESPTR->tileHeight;\r
+       mv[0].page->dx = mv[1].page->dx = mv[2].page->dx = mv[3].page->dx = mv->map->tiles->tileWidth;\r
+       mv[0].page->dy = mv[1].page->dy = mv[2].page->dy = mv[3].page->dy = mv->map->tiles->tileHeight;\r
 \r
        /* set up the thresholds */\r
-       mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->MAPTILESPTR->tileWidth * 2;\r
-       mv[0].dyThresh = mv[1].dyThresh = mv[2].dyThresh = mv[3].dyThresh = mv->map->MAPTILESPTR->tileHeight * 2;\r
+       mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileWidth * 2;\r
+       mv[0].dyThresh = mv[1].dyThresh = mv[2].dyThresh = mv[3].dyThresh = mv->map->tiles->tileHeight * 2;\r
 }\r
 \r
 void ZC_mapredraw(map_view_t *mv, int tx, int ty)\r
@@ -553,7 +553,7 @@ void ZC_mapredraw(map_view_t *mv, int tx, int ty)
 \r
        py=0;\r
        i=mv[0].ty * mv[0].map->width + mv[0].tx;\r
-       for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->MAPTILESPTR->tileHeight) {\r
+       for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) {\r
                mapDrawWRow(&mv[0], tx-1, ty, py);\r
                mapDrawWRow(&mv[1], tx-1, ty, py);\r
                i+=mv->map->width - tx;\r
@@ -590,22 +590,22 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
        }\r
 }\r
 #define PALMAPDRAWW 13\r
-void near mapDrawRow(map_view_t *mv, nibble id, int tx, int ty, word y, player_t *player, word poopoffset)\r
+void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset)\r
 {\r
        int i; nibble z;\r
 if(pagedelayrendermap)         if(!y)  y+=TILEWH;      else    y-=TILEWH;\r
        poopoffset%=player[0].enti.speed;\r
 //printf("y: %d\n", poopoffset);\r
-if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv[id].dx); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 1, 2, 1, global_temp_status_text); }\r
+if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
        /* the position within the map array */\r
-       i=ty * mv[id].map->width + tx;\r
-       for(    mv[id].dx=poopoffset;   mv[id].dx<(mv[id].page->sw+mv[id].dxThresh)/(poopoffset+1) && tx < mv[id].map->width;   mv[id].dx+=mv[id].map->MAPTILESPTR->tileWidth, tx++) {\r
+       i=ty * mv->map->width + tx;\r
+       for(    mv->dx=poopoffset;      mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width;       mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
                if(i>=0){\r
-                       mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[0].data[i], mv[id].page, mv[id].dx, y);\r
+                       mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, mv->dx, y);\r
                        for(z=1;z<=2;z++){\r
-                               if(mv[id].map->layerdata[z].data[i]){\r
-                                       sprintf(global_temp_status_text2, "%u", mv[id].map->layerdata[z].data[i]); modexprint(mv[id].page, mv[id].dx, (y+((z-1)*4))>>2, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
-                                       //mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[z].data[i], mv[id].page, mv[id].dx, y);\r
+                               if(mv->map->layerdata[z].data[i]){\r
+                                       sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, mv->dx, y, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
+                                       //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, mv->dx, y);\r
                                }\r
                        }\r
                }\r
@@ -614,28 +614,28 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv[id].dx); mod
 if(pagedelayrendermap) delay(200);\r
 }\r
 \r
-void near mapDrawCol(map_view_t *mv, nibble id, int tx, int ty, word x, player_t *player, word poopoffset)\r
+void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset)\r
 {\r
        int i; nibble z;\r
 if(pagedelayrendermap)         if(!x)  x+=TILEWH;              else    x-=TILEWH;\r
        poopoffset%=player[0].enti.speed;\r
 //printf("x: %d\n", poopoffset);\r
-if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv[id].dy); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 1, 2, 1, global_temp_status_text); }\r
+if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
        /* location in the map array */\r
-       i=ty * mv[id].map->width + tx;\r
+       i=ty * mv->map->width + tx;\r
        /* We'll copy all of the columns in the screen,\r
           i + 1 row above and one below */\r
-       for(    mv[id].dy=poopoffset;   mv[id].dy<(mv[id].page->sh+mv[id].dyThresh)/(poopoffset+1) && ty < mv[id].map->height;  mv[id].dy+=mv[id].map->MAPTILESPTR->tileHeight, ty++) {\r
+       for(    mv->dy=poopoffset;      mv->dy<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height;      mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
                if(i>=0){\r
-                       mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[0].data[i], mv[id].page, x, mv[id].dy);\r
+                       mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, x, mv->dy);\r
                        for(z=1;z<=2;z++){\r
-                               if(mv[id].map->layerdata[z].data[i]){\r
-                                       sprintf(global_temp_status_text2, "%u", mv[id].map->layerdata[z].data[i]); modexprint(mv[id].page, (x+((z-1)*4))>>2, mv[id].dy, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
-                                       //mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[z].data[i], mv[id].page, x, mv[id].dy);\r
+                               if(mv->map->layerdata[z].data[i]){\r
+                                       sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, x, mv->dy, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
+                                       //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, x, mv->dy);\r
                                }\r
                        }\r
                }\r
-               i += mv[id].map->width;\r
+               i += mv->map->width;\r
        }\r
 if(pagedelayrendermap) delay(200);\r
 }\r
@@ -646,13 +646,13 @@ void mapDrawWRow(map_view_t *mv, int tx, int ty, word y)
 \r
        /* the position within the map array */\r
        i=ty * mv->map->width + tx;\r
-       for(mv->dx=0; mv->dx<mv->page->sw+mv->dxThresh && tx < mv->map->width; mv->dx+=mv->map->MAPTILESPTR->tileWidth, tx++) {\r
+       for(mv->dx=0; mv->dx<mv->page->sw+mv->dxThresh && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
                if(i>=0){       /* we are in the map, so copy! */\r
-                       mapDrawTile(mv->map->MAPTILESPTR, mv->map->layerdata[0].data[i], mv->page, mv->dx, y);\r
+                       mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, mv->dx, y);\r
                        for(z=1;z<=2;z++){\r
                                if(mv->map->layerdata[z].data[i]){\r
                                        sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, mv->dx, y, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
-                                       //mapDrawTile(mv->map->MAPTILESPTR, mv->map->layerdata[z].data[i], mv->page, mv->dx, y);\r
+                                       //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, mv->dx, y);\r
                                }\r
                        }\r
                }\r
@@ -669,13 +669,13 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x)
 \r
        /* We'll copy all of the columns in the screen,\r
           i + 1 row above and one below */\r
-       for(mv->dy=0; mv->dy<mv->page->sh+mv->dyThresh && ty < mv->map->height; mv->dy+=mv->map->MAPTILESPTR->tileHeight, ty++) {\r
+       for(mv->dy=0; mv->dy<mv->page->sh+mv->dyThresh && ty < mv->map->height; mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
                if(i>=0){       /* we are in the map, so copy away! */\r
-                       mapDrawTile(mv->map->MAPTILESPTR, mv->map->layerdata[0].data[i], mv->page, x, mv->dy);\r
+                       mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, x, mv->dy);\r
                        for(z=1;z<=2;z++){\r
                                if(mv->map->layerdata[z].data[i]){\r
                                        sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, x, mv->dy, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2);\r
-                                       //mapDrawTile(mv->map->MAPTILESPTR, mv->map->layerdata[z].data[i], mv->page, x, mv->dy);\r
+                                       //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, x, mv->dy);\r
                                }\r
                        }\r
                }\r
@@ -770,7 +770,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)
                break;\r
        }\r
        x-=4;\r
-       y-=pip[0].map->MAPTILESPTR->tileHeight;\r
+       y-=pip[0].map->tiles->tileHeight;\r
        switch (player[pn].enti.d)\r
        {\r
                case 0:\r
index 2e490b49fc690bdc67e304a3e13ba113246e16b2..cefda677b307f10672bf6a5dd84aedfd5c68d33d 100755 (executable)
@@ -115,8 +115,8 @@ void mapGoTo(map_view_t *mv, int tx, int ty);
 void ZC_mapinitMV(map_view_t *mv, int tx, int ty);\r
 void ZC_mapredraw(map_view_t *mv, int tx, int ty);\r
 void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
-void near mapDrawRow(map_view_t *mv, nibble id, int tx, int ty, word y, player_t *player, word poopoffset);\r
-void near mapDrawCol(map_view_t *mv, nibble id, int tx, int ty, word x, player_t *player, word poopoffset);\r
+void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset);\r
+void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset);\r
 void mapDrawWRow(map_view_t *mv, int tx, int ty, word y);\r
 void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);\r
 inline void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid)\r
@@ -132,7 +132,7 @@ inline void near ScrollRight(map_view_t *mv, player_t *player, word id, word pli
                /* Snap the origin forward */\r
                mv[id].page->data += 4;\r
 \r
-               mv[id].page->dx = mv[id].map->MAPTILESPTR->tileWidth;\r
+               mv[id].page->dx = mv[id].map->tiles->tileWidth;\r
        }\r
 }\r
 \r
@@ -149,7 +149,7 @@ inline void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid
                /* Snap the origin backward */\r
                mv[id].page->data -= 4;\r
 \r
-               mv[id].page->dx = mv[id].map->MAPTILESPTR->tileWidth;\r
+               mv[id].page->dx = mv[id].map->tiles->tileWidth;\r
        }\r
 }\r
 \r
@@ -166,7 +166,7 @@ inline void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid)
                /* Snap the origin upward */\r
                mv[id].page->data -= mv[id].page->pi;\r
 \r
-               mv[id].page->dy = mv[id].map->MAPTILESPTR->tileHeight;\r
+               mv[id].page->dy = mv[id].map->tiles->tileHeight;\r
        }\r
 }\r
 \r
@@ -183,7 +183,7 @@ inline void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid
                /* Snap the origin downward */\r
                mv[id].page->data += mv[id].page->pi;\r
 \r
-               mv[id].page->dy = mv[id].map->MAPTILESPTR->tileHeight;\r
+               mv[id].page->dy = mv[id].map->tiles->tileHeight;\r
        }\r
 }\r
 \r