]> 4ch.mooo.com Git - 16.git/commitdiff
made a new function modexMVSetup() and made scroller use dx and dy on page[0].dx...
authorsparky4 <sparky4@cock.li>
Tue, 10 Jan 2017 19:36:58 +0000 (13:36 -0600)
committersparky4 <sparky4@cock.li>
Tue, 10 Jan 2017 19:36:58 +0000 (13:36 -0600)
btget.bat [moved from b4get.bat with 100% similarity]
src/0.c
src/lib/16_in.h
src/lib/scroll16.c
src/lib/scroll16.h

similarity index 100%
rename from b4get.bat
rename to btget.bat
diff --git a/src/0.c b/src/0.c
index d7fc2fda8969de24a8f9c6125300a5a1bddce50d..b80510f9a09664fe684fb4a5094d20cb9e3c24a3 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -28,6 +28,7 @@ int main(int argc,char **argv)
        unsigned char *buffer;\r
        unsigned int bufsz;\r
        int fd;\r
+       //nibble i;\r
        char *bakapee1,*bakapee2;\r
 \r
        boolean anim=1,noanim=0;\r
@@ -103,6 +104,14 @@ int main(int argc,char **argv)
        modexHiganbanaPageSetup(&gvar.video);\r
        modexMVSetup(&mv, &map, &pan, &gvar);\r
        modexShowPage(&(gvar.video.page[pan.pn]));\r
+//     for(i=0;i<gvar.video.num_of_pages;i++)\r
+//     {\r
+//             mv[i].page = &gvar.video.page[i];\r
+//             mv[i].video = &gvar.video;\r
+//             mv[i].pan       = &pan;\r
+//             mv[0].tx        = INITTNUM;\r
+//             mv[0].ty        = INITTNUM;\r
+//     }\r
        //player[0].tx = INITTNUM; player[0].ty = INITTNUM;\r
        //mapinitmapview(mv, player[0].tx, player[0].tx);\r
 \r
index 67a98f6175e0443261c0451a908e48c2dafe7bba..7e8207ad979901da79c4d0560a2597b30db54080 100755 (executable)
@@ -232,6 +232,7 @@ typedef     struct
        int persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
        CursorInfo      info;\r
        ControlType     Controls;\r
+//newer vars\r
        int dx, dy, delta;      //TODO: what is this? ^^\r
 } player_t;\r
 \r
index f338372bd674786231c196ef9724e85da99e89f3..f0945ee27f304a3f2e95600ef2cfb6800cf6405d 100755 (executable)
@@ -336,24 +336,33 @@ void panVmemManual(map_view_t *pip, player_t *player, word pn)
 /*\r
  * modex mv setup\r
 */\r
-void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv)\r
+void modexMVSetup(map_view_t *pip, map_t *map, pan_t *pan, global_game_variables_t *gv)\r
 {\r
        nibble i;\r
        // 1st page\r
-       mv[0].page = &gv->video.page[0];\r
-       mv[0].map = map;\r
-       mv[0].video = &gv->video;\r
-       mv[0].pan       = pan;\r
+       pip[0].page = &gv->video.page[0];\r
+       pip[0].map = map;\r
+       pip[0].video = &gv->video;\r
+       pip[0].pan      = pan;\r
+       modexMVInit(pip, 1, 1);\r
 \r
        for(i=1;i<gv->video.num_of_pages;i++)\r
        {\r
-               mv[i].page      =       &gv->video.page[i];\r
-               mv[i].map       =       mv[0].map;\r
-               mv[i].video     =       mv[0].video;\r
-               mv[i].pan       =       mv[0].pan;\r
+               pip[i].page     =       &gv->video.page[i];\r
+               pip[i].map      =       pip[0].map;\r
+               pip[i].video    =       pip[0].video;\r
+               pip[i].pan      =       pip[0].pan;\r
+               pip[i].tx       =       1;\r
+               pip[i].ty       =       1;\r
        }\r
 }\r
 \r
+void modexMVInit(map_view_t *pip, int tx, int ty)\r
+{\r
+       pip[0].tx = tx;\r
+       pip[0].ty = ty;\r
+}\r
+\r
 /*map_t\r
 allocMap(int w, int h) {\r
        map_t result;\r
index 8d79d213bb02579773fa97d831ae47933914b2e1..74a9408b9464eef8b65ce94c7ce7ca524a8ddd26 100755 (executable)
@@ -60,6 +60,7 @@ typedef struct {
        word dyThresh; //Threshold for physical tile switch\r
        video_t *video; //pointer to game variables of the video\r
        pan_t *pan;             //pointer the the page panning debug system\r
+//newer vars!\r
        int dx, dy, delta, d;\r
 } map_view_t;\r
 /* Map is presumed to:\r
@@ -123,7 +124,8 @@ extern char global_temp_status_text[512];
 void walk(map_view_t *pip, player_t *player, word pn);\r
 void panPageManual(map_view_t *pip,  player_t *player, word pn);\r
 void panVmemManual(map_view_t *pip, player_t *player, word pn);\r
-void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv);\r
+void modexMVSetup(map_view_t *pip, map_t *map, pan_t *pan, global_game_variables_t *gv);\r
+void modexMVInit(map_view_t *pip, int tx, int ty);\r
 void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid);\r
 void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid);\r
 void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid);\r