]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/scroll16.c
__seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd...
[16.git] / src / lib / scroll16.c
index 12d8991c2ba19698da06b2b0f3b41bd24b51613e..0e73d83b99492fb9eec83d1e8c5d7c8801fa6d82 100755 (executable)
@@ -459,7 +459,7 @@ void ZC_mapScroll(map_view_t *mv, player_t *player, word pn)
 //===========================================================================\r
 //TODO: put player in starting position of assigned spot on map\r
 //default player position on the viewable map\r
-void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw)\r
+void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw)\r
 {\r
        player[pn].enti.tx = x + pip[0].tx;\r
        player[pn].enti.ty = y + pip[0].ty;\r
@@ -502,9 +502,9 @@ sword chkmap(map_t *map, word q)
                //initiate a null map!\r
                map->width=MAPW;///2;\r
                map->height=MAPH;///2;\r
-//             map->layerdata[0].data = malloc(((map->width*map->height)+1)*sizeof(byte));\r
+//             map->layerdata[0].data = fmfaflflfofcf(((map->width*map->height)+1)*sizeof(byte));\r
                map->layerdata[0].data = &x;\r
-               map->tiles = malloc(sizeof(tiles_t));\r
+               //map->tiles = fmfafflflfofc(sizeof(tiles_t));\r
                //fix this to be far~\r
 //             bp = bitmapLoadPcx("data/ed.pcx");\r
 //             map->tiles->data = &bp;\r
@@ -568,8 +568,6 @@ void near
 mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)\r
 {\r
        word rx, ry;\r
-       //word textx=0, texty=0;\r
-       //if(i==0) i=2;\r
 //     printf("%02d ", i); if(x >= page->width - t->tileWidth) printf("\n");\r
        switch(i)\r
        {\r
@@ -578,8 +576,8 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                        modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color!\r
                break;\r
                default:\r
-                       rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth);\r
-                       ry = (((i-1) / ((t->pcximg->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
 #ifndef TILERENDER\r
                        if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
 #else\r
@@ -695,7 +693,7 @@ void shinku(global_game_variables_t *gv)
         // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even\r
         //      though it should be. Instead it's NULL as a neAr pointer but contains a non-null\r
         //      segment value, so testing against NULL doesn't work. It is initialized properly if\r
-        //      you call start_timer() though which uses neAr malloc. Rather than fight with that,\r
+        //      you call start_timer() though which uses neAr mAlloc. Rather than fight with that,\r
         //      I decided it would be better to declare a temp buffer statically and sprintf to that.\r
         //\r
         //      This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit.\r
@@ -743,6 +741,7 @@ void shinku(global_game_variables_t *gv)
                gv->video.dorender =!gv->video.dorender ;\r
                //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;\r
        }\r
+       PM_NextFrame(gv);\r
 }\r
 \r
 void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)\r
@@ -796,13 +795,13 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)
        }\r
        player[pn].enti.dire+=dd;\r
        //setting xy position\r
-       player[pn].enti.spri->x = x;\r
-       player[pn].enti.spri->y = y;\r
+       player[pn].enti.spri.x = x;\r
+       player[pn].enti.spri.y = y;\r
 \r
        if((player[pn].enti.q==1 && player[pn].enti.pred != player[pn].enti.d) || !dd)//when dir changed OR when player change face direction\r
        {\r
                //0000printf("  q=%u    pred=%u d=%u    dd=%u\n", player[pn].enti.q, player[pn].enti.pred, player[pn].enti.d, dd);\r
-               set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);       if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
+               set_anim_by_id(&player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);      if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
                player[pn].enti.pred = player[pn].enti.d;\r
                if(!dd)//changed direction while NOT moving!\r
                {\r