]> 4ch.mooo.com Git - 16.git/commitdiff
dang it./wbuild.sh vga_state.vga_graphics_ram = video->omemptr; causes it to not...
authorsparky4 <sparky4@cock.li>
Mon, 23 Jan 2017 17:38:11 +0000 (11:38 -0600)
committersparky4 <sparky4@cock.li>
Mon, 23 Jan 2017 17:38:11 +0000 (11:38 -0600)
src/lib/16_tail.c
src/lib/16_tail.h
src/lib/16_tdef.h
src/lib/scroll16.c

index 675c86803a5b80a9f7469de2c84997815fac4fc0..ece035e2a59980447a6dad7c4d2330e8e3c5a725 100755 (executable)
@@ -372,6 +372,23 @@ void Quit (global_game_variables_t *gvar, char *error)
 \r
 //===========================================================================\r
 \r
+void walktypeinfo(player_t *player, word pn)\r
+{\r
+       switch(player[pn].walktype)\r
+       {\r
+               case 0: //bump\r
+                       sprintf(global_temp_status_text, "%s", "b");\r
+               break;\r
+               case 1: //walk no scroll\r
+                       sprintf(global_temp_status_text, "%s", "w");\r
+               break;\r
+               case 2: //scrolling walk\r
+                       sprintf(global_temp_status_text, "%s", "s");\r
+               break;\r
+       }\r
+\r
+}\r
+\r
 const char *nibble_to_binary(nibble x)\r
 {\r
        static char b[9];\r
index 84364bace16a70fcac83470f5ef59570f980f135..1b4b9914499e4230a59ef396b175e070a5f83fd6 100755 (executable)
@@ -52,6 +52,7 @@ void Shutdown16(global_game_variables_t *gvar);
 void Startup16(global_game_variables_t *gvar);\r
 void ClearMemory (global_game_variables_t *gvar);\r
 void Quit (global_game_variables_t *gvar, char *error);\r
+void walktypeinfo(player_t *player, word pn);\r
 void nibbletest();\r
 void booleantest();\r
 \r
index 7583be8c5fdf326892e2fe5cc8007ae835003570..ffa4e1569e2304f2477f8da0cb5b2cda66dddcca 100755 (executable)
@@ -229,6 +229,7 @@ typedef     struct
        byte near               pdir;   //previous direction~ used in IN_16 in IN_ReadControl()\r
        CursorInfo              info;\r
        ControlType     Controls;\r
+       word walktype;\r
 //newer vars\r
        int dx, dy, delta;      //TODO: what is this? ^^\r
 } player_t;\r
index 8a59918a7e323eac145438372c11a7ff672139e0..8ad0156a0e1cf5baa622efb3fed43462c0c320e4 100755 (executable)
 #define INC_PER_FRAME_PRINT    sprintf(global_temp_status_text, "%u", player[pn].enti.persist_aniframe);\\r
 modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe), player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text);\r
 \r
-#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = 1; INC_PER_FRAME_PRINT\r
+#define WALKTYPE_FRAM_PRINT    walktypeinfo(player, pn);\\r
+modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe)+8, player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text);\\r
+INC_PER_FRAME_PRINT\r
+\r
+#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = 1;\r
 \r
 void ZC_walk(map_view_t *pip, player_t *player, word pn)\r
 {\r
@@ -42,6 +46,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx &&\r
                        !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY))  //collision detection!\r
                        {\r
+                               player[pn].walktype=2;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -55,6 +60,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else if(player[pn].enti.tx < pip[0].map->width && !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
+                               player[pn].walktype=1;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -65,6 +71,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else\r
                        {\r
+                               player[pn].walktype=0;\r
 //#ifdef SPRITE\r
 //modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
                                ANIMATESPRIFUN(pip, player, pn, 0);\r
@@ -75,12 +82,14 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        player[pn].enti.triggerx = player[pn].enti.tx+1;\r
                        player[pn].enti.triggery = player[pn].enti.ty;\r
+                       WALKTYPE_FRAM_PRINT\r
                break;\r
                //left movement\r
                case 1:\r
                        if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx &&\r
                        !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY))        //collision detection!\r
                        {\r
+                               player[pn].walktype=2;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -94,6 +103,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else if(player[pn].enti.tx > 1 && !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
+                               player[pn].walktype=1;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -104,6 +114,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else\r
                        {\r
+                               player[pn].walktype=0;\r
 //#ifdef SPRITE\r
 //modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
                                ANIMATESPRIFUN(pip, player, pn, 0);\r
@@ -114,12 +125,14 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        player[pn].enti.triggerx = player[pn].enti.tx-1;\r
                        player[pn].enti.triggery = player[pn].enti.ty;\r
+                       WALKTYPE_FRAM_PRINT\r
                break;\r
                //down movement\r
                case 4:\r
                        if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny &&\r
                        !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY))  //collision detection!\r
                        {\r
+                               player[pn].walktype=2;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -133,6 +146,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else if(player[pn].enti.ty < pip[0].map->height && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY))\r
                        {\r
+                               player[pn].walktype=1;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -143,6 +157,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else\r
                        {\r
+                               player[pn].walktype=0;\r
 //#ifdef SPRITE\r
 //modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
                                ANIMATESPRIFUN(pip, player, pn, 0);\r
@@ -153,12 +168,14 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        player[pn].enti.triggerx = player[pn].enti.tx;\r
                        player[pn].enti.triggery = player[pn].enti.ty+1;\r
+                       WALKTYPE_FRAM_PRINT\r
                break;\r
                //up movement\r
                case 0:\r
                        if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny &&\r
                        !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty-1 == TRIGGY))        //collision detection!\r
                        {\r
+                               player[pn].walktype=2;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -172,6 +189,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else if(player[pn].enti.ty > 1 && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX &&  player[pn].enti.ty-1 == TRIGGY))\r
                        {\r
+                               player[pn].walktype=1;\r
                                if(player[pn].enti.q<=player[pn].enti.spt)\r
                                {\r
                                        INC_PER_FRAME;\r
@@ -182,6 +200,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        else\r
                        {\r
+                               player[pn].walktype=0;\r
 //#ifdef SPRITE\r
 //modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
                                ANIMATESPRIFUN(pip, player, pn, 0);\r
@@ -192,9 +211,14 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        }\r
                        player[pn].enti.triggerx = player[pn].enti.tx;\r
                        player[pn].enti.triggery = player[pn].enti.ty-1;\r
+                       WALKTYPE_FRAM_PRINT\r
                break;\r
        }\r
-       if(player[pn].enti.d!=2 && pip[0].video->rs) delay(500);\r
+       if(player[pn].enti.d!=2 && pip[0].video->rs)\r
+       {\r
+               IN_UserInput(1,1);\r
+               delay(500);\r
+       }\r
 }\r
 \r
 \r