From: sparky4 Date: Mon, 6 Feb 2017 15:02:54 +0000 (-0600) Subject: fps now is working with scroll wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=ee8d91badeddfd72009507e8eb38710532c29901;p=16.git fps now is working with scroll wwww --- diff --git a/db.exe b/db.exe index af80cac8..457a9fa1 100755 Binary files a/db.exe and b/db.exe differ diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index b9889a25..ec6caf5b 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -113,6 +113,7 @@ typedef struct { word stridew; /* width/4 */ /* VGA */ word pagesize; /* page size */ word pi; /* increment page by this much to preserve location */ + int tlx,tly; //newer vars //TODO: find where they are used sword delta; // How much should we shift the page for smooth scrolling diff --git a/src/lib/doslib b/src/lib/doslib index 667d7190..757ace2b 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 667d71906b174472d4a2432c5c5c0d7167187be8 +Subproject commit 757ace2b7f7887731a0b7aaf00306b6682fe5fac diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index a353ccd8..53be2543 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -685,8 +685,8 @@ boolean pagedelayrendermap = 0; /* sync */ void shinku(global_game_variables_t *gv) { - word x = (0) + gv->video.page[/*!*/(gv->video.p)].dx; // follow the screen - word y = (0) + gv->video.page[/*!*/(gv->video.p)].dy; // follow the screen + word x = gv->video.page[/*!*/(gv->video.p)].dx - (gv->video.page[(gv->video.p)].tlx); // follow the screen + word y = gv->video.page[/*!*/(gv->video.p)].dy - (gv->video.page[(gv->video.p)].tly); // follow the screen word col = 2, bgcol = 1, type = 1;//w = 64, h = 8, if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) { diff --git a/src/zcroll.c b/src/zcroll.c index c0bd1079..c5688601 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -141,12 +141,16 @@ void main(int argc, char *argv[]) } // while(!IN_KeyDown(sc_Escape) && !IN_KeyDown(sc_Space) && !IN_KeyDown(sc_Enter)){ FUNCTIONKEYSHOWMV } + gvar.video.page[0].tlx=mv[0].tx*TILEWH; + gvar.video.page[0].tly=mv[0].ty*TILEWH; shinku(&gvar); #ifdef FADE modexFadeOn(4, gpal); #endif while(!IN_KeyDown(sc_Escape) && player[0].enti.hp>0) { + gvar.video.page[0].tlx=mv[0].tx*TILEWH; + gvar.video.page[0].tly=mv[0].ty*TILEWH; shinku(&gvar); //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square //to stop scrolling and have the player position data move to the edge of the screen with respect to the direction diff --git a/wcpu.exe b/wcpu.exe index dc69eb74..6a5fae4e 100755 Binary files a/wcpu.exe and b/wcpu.exe differ