From 3f4d45faacd27ffe5300df2ee843702834ceb29d Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 10 Jan 2017 13:36:58 -0600 Subject: [PATCH] made a new function modexMVSetup() and made scroller use dx and dy on page[0].dx wwww i will mess with mv[0]dx and mv[0].dy later --- b4get.bat => btget.bat | 0 src/0.c | 9 +++++++++ src/lib/16_in.h | 1 + src/lib/scroll16.c | 27 ++++++++++++++++++--------- src/lib/scroll16.h | 4 +++- 5 files changed, 31 insertions(+), 10 deletions(-) rename b4get.bat => btget.bat (100%) diff --git a/b4get.bat b/btget.bat similarity index 100% rename from b4get.bat rename to btget.bat diff --git a/src/0.c b/src/0.c index d7fc2fda..b80510f9 100755 --- a/src/0.c +++ b/src/0.c @@ -28,6 +28,7 @@ int main(int argc,char **argv) unsigned char *buffer; unsigned int bufsz; int fd; + //nibble i; char *bakapee1,*bakapee2; boolean anim=1,noanim=0; @@ -103,6 +104,14 @@ int main(int argc,char **argv) modexHiganbanaPageSetup(&gvar.video); modexMVSetup(&mv, &map, &pan, &gvar); modexShowPage(&(gvar.video.page[pan.pn])); +// for(i=0;ivideo.page[0]; - mv[0].map = map; - mv[0].video = &gv->video; - mv[0].pan = pan; + pip[0].page = &gv->video.page[0]; + pip[0].map = map; + pip[0].video = &gv->video; + pip[0].pan = pan; + modexMVInit(pip, 1, 1); for(i=1;ivideo.num_of_pages;i++) { - mv[i].page = &gv->video.page[i]; - mv[i].map = mv[0].map; - mv[i].video = mv[0].video; - mv[i].pan = mv[0].pan; + pip[i].page = &gv->video.page[i]; + pip[i].map = pip[0].map; + pip[i].video = pip[0].video; + pip[i].pan = pip[0].pan; + pip[i].tx = 1; + pip[i].ty = 1; } } +void modexMVInit(map_view_t *pip, int tx, int ty) +{ + pip[0].tx = tx; + pip[0].ty = ty; +} + /*map_t allocMap(int w, int h) { map_t result; diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 8d79d213..74a9408b 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -60,6 +60,7 @@ typedef struct { word dyThresh; //Threshold for physical tile switch video_t *video; //pointer to game variables of the video pan_t *pan; //pointer the the page panning debug system +//newer vars! int dx, dy, delta, d; } map_view_t; /* Map is presumed to: @@ -123,7 +124,8 @@ extern char global_temp_status_text[512]; void walk(map_view_t *pip, player_t *player, word pn); void panPageManual(map_view_t *pip, player_t *player, word pn); void panVmemManual(map_view_t *pip, player_t *player, word pn); -void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv); +void modexMVSetup(map_view_t *pip, map_t *map, pan_t *pan, global_game_variables_t *gv); +void modexMVInit(map_view_t *pip, int tx, int ty); void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid); -- 2.39.5