]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/scroll16.c
too tired to continue
[16.git] / src / lib / scroll16.c
index 9a4708abedfe2daf0e7ec74287c36db2849cd680..e60a8b97344f55ab64ebd95d3158f4165a1f4c9b 100755 (executable)
@@ -563,42 +563,43 @@ void ZC_mapredraw(map_view_t *mv, int tx, int ty)
 void near\r
 mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)\r
 {\r
-       word rx;\r
-       word ry;\r
+       word rx, ry;\r
        //word textx=0, texty=0;\r
        //if(i==0) i=2;\r
-       if(i==0)\r
+       switch(i)\r
        {\r
+               case 0:\r
                //wwww\r
-               modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color!\r
-       }\r
-       else\r
-       {\r
-               rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth);\r
-               ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight);\r
+                       modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 0); //currently the over scan color!\r
+               break;\r
+               case 1:\r
+                       rx = (((i-1) % ((t->tileset.data->width)/t->tileWidth)) * t->tileWidth);\r
+                       ry = (((i-1) / ((t->tileset.data->height)/t->tileHeight)) * t->tileHeight);\r
+//                     rx = (((i-1) % ((t->spri->sprite_vrl_cont->vrl_header->width)/t->tileWidth)) * t->tileWidth);\r
+//                     ry = (((i-1) / ((t->spri->sprite_vrl_cont->vrl_header->height)/t->tileHeight)) * t->tileHeight);\r
 ////0000printf("i=%d\n", i);\r
-#ifdef __DEBUG_MAP__\r
-               switch(dbg_maptext)\r
-               {\r
-                       case 0:\r
-#endif\r
 #ifndef TILERENDER\r
-                               if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
+                       if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
 #else\r
-                               modexDrawBmpRegion              (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
-                               /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */\r
-                               //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-                               //modexDrawBmpRegion    (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
+                       //modexDrawBmpRegion            (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
+                       /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */\r
+                       //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
+                       //modexDrawBmpRegion    (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
+                       //drawmap here\r
 #endif\r
 #ifdef __DEBUG_MAP__\r
+               switch(dbg_maptext)\r
+               {\r
+                       case 0:\r
+\r
                        break;\r
                        case 1:\r
-                               if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i);\r
                                sprintf(global_temp_status_text2, "%d", i);\r
-                               modexprint(page, x, y, 1, 1, 2, global_temp_status_text2);\r
+                               modexprint(page, x+8, y+8, 1, 1, 2, global_temp_status_text2);\r
                        break;\r
                }\r
 #endif\r
+               break;\r
        }\r
 }\r
 \r