From ee8d91badeddfd72009507e8eb38710532c29901 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 6 Feb 2017 09:02:54 -0600 Subject: [PATCH] fps now is working with scroll wwww --- db.exe | Bin 13186 -> 13186 bytes src/lib/16_tdef.h | 1 + src/lib/doslib | 2 +- src/lib/scroll16.c | 4 ++-- src/zcroll.c | 4 ++++ wcpu.exe | Bin 13328 -> 13312 bytes 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/db.exe b/db.exe index af80cac81c36b2b54df02442584b23793f3cadcb..457a9fa192d31529e39312c63fcfc8b50357625a 100755 GIT binary patch delta 822 zcmZ9KZAep57{|}qZhF0Y^Bw2f-85b0aE&<>Wm=Y-6uq#Cikfeq41y$_A5y_#h#ePW zaIjh+xYRyYa3M^n)+`mI=))k1eF{di+1mn*u&rlW6dm|o{^xL?|9Q^yJY#)heclJ7 z$^wLZKp1#gh)@E^S0SVU?ubL8yFdr%LEr}92lV?9ss}CrVITtJG9l5N8sdR-JVKMe zG_VLf2KqG!eFYwZ-y*OBx{wKRqIoSsQ$+|33DuaeSWA~OY&cWkI0rspU}lXB+3f7@ zYH#aUTgXQ8x@b6ytc(W+FYoQ<>8ONfOpM=5{gNCIvu3&=xwOy3xbw|aFD=J@+9o}Q zYv^t15Pn7TWaW5)uWY*9MZY1?Dhu|oMdj58xaoLbflS$g=tS#zJnbPj2yQ?1UPWX zq|0I$Y`3K}LM}_0)AYy73SRYlUflm)Tr8~H?qqeYGYlIOgr2Nb5q>Tl&Xr`S2R?eq zItea>M4t5|KO_Dv=EUUnMughcy*Qf+>gJp{A^+P$MHzEg2JjVwV0 z?IccC<#7V;c_RY>BpnhXt&rsP0O9|(5<1yrceFeTiFOlr zR~i{NZ=j#F1*HatKrB2iE{|4l-q>1Gst;R@60K9zvF2`+!mYhjU-TKesw!6DkWf{u z7OAFLUo76z+Dsx>HyN@_x^~Ff1bG8LM`?eFHM5rW#=dRDSrS0IOL$V!kcLkQV*Sr_ fB8sU@4bg}4)>fh*frQS zJmc2qBQy@gfVTw*kwS!ufHL4wT7;VfIzjgV4}mG5vIwC@pc{w*2_T0=xTjk1*CEsj z3e}HX+Xj5iqk^d3U;r`0~uGLSe*H%%P~q z_3VM-7LKr7r4diE)5;n=#`=_6JR*%MM=>sB)#?yVur2i~w;%iM0uB4$iHkNKA-do> zS>9U?Z$rdt?muCzb=QhM8&5+kv6UDO4UzjRF{2sbkX@v$d}4LJyWiqvtZvrYuA(XCsgkP%hfs6_6!<^ z8aB~Qx}=H^umN3@S}&&|`Wjvj(eJAGWA<6sj2+CPZ^JHjSFgb%?1{cFRo6N*J8U?M zO{~XIcclvIY$5)R9V(lRaP%_gkKPGV-M_{`-&&fQFTIFxVE0FT$1TJMX783O)BE0) zzS~&;N1x0GuB(A6LLnTD(oI#|$dttga62n2{-z!KN`oylyc=R@{1owg!R925wl7x( z*WO5#2ell&$1ap=aEx6mwFx!+aN@_>I!}YrTxmlFz9^+t{FZ4D%BWX@Lu&7Vw)_EMa}2rw 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 dc69eb74367539890f767ce8868d1d928b5bfdc5..6a5fae4e3fd918f9bbf60ed7c83cc5b9a7215290 100755 GIT binary patch delta 2414 zcmZ9O3v83u702(rcEE9h$vd%=m^_`A?ZlJ?Qi36+F=K-^4*?}82_5Q+L|1KK6K!Qp z7|WE4iDkG*$tXk6OlrqA6iA3nx^^a^2{dB}Ryso%rIT3g7!^jW@V58A4tr>pe&_Rd z?m6e)@7#0G_qn%rY+bgti4Yy>AbBKN6^U3B_)E4ELUMro{e*>>6<3Ry5E~dZ5i$kV zfw%TA)5e5YFAMG8RF)lLM_`+-B4h_}f`cFhx(pcf6}5+0kD8D^a0(oZBZQ?B@-y%$ zIFmuhRgj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