From 9713a8208566126353061db56faeffeb6014c4bf Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 11 May 2016 09:30:08 -0500 Subject: [PATCH] now i gotta get the background preserved ^^ --- src/lib/scroll16.c | 20 ++++++++++---------- src/scroll.c | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index c863c866..3d5e674b 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -834,20 +834,20 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll // #define FRAME2 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); // #define FRAME3 PBUFSFUN(pip[1].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA); // #define FRAME4 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -#define FRAME1 PBUFSFUN(pip[1].page, x, y, 48, dire, 24, 32, PLAYERBMPDATA); -#define FRAME2 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -#define FRAME3 PBUFSFUN(pip[1].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA); -#define FRAME4 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); +#define FRAME1 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 48, dire, 24, 32, PLAYERBMPDATA); +#define FRAME2 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); +#define FRAME3 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA); +#define FRAME4 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); #else -#define FRAME1 modexClearRegion(pip[1].page, x, y, 24, 32, 2+dire); -#define FRAME2 modexClearRegion(pip[1].page, x, y, 24, 32, 1+dire); -#define FRAME3 modexClearRegion(pip[1].page, x, y, 24, 32, dire); -#define FRAME4 modexClearRegion(pip[1].page, x, y, 24, 32, 1+dire); +#define FRAME1 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 2+dire); +#define FRAME2 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 1+dire); +#define FRAME3 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, dire); +#define FRAME4 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 1+dire); #endif - if(pageflipflop) +// if(pageflipflop) modexCopyPageRegion(pip[pip->video->p].page, pip[!(pip->video->p)].page, x-4, y-4, x-4, y-4, 28, 40); - else modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40); +// else modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40); //modexCopyPageRegion(pip[2].page, pip[1].page, 16, 16, 16, 16, (14*8)+4, 8+4); if(2>ls && ls>=1) { FRAME1 }else if(3>ls && ls>=2) { FRAME2 }else diff --git a/src/scroll.c b/src/scroll.c index 7fd790a6..20001180 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -227,11 +227,10 @@ void main(int argc, char *argv[]) } if(player[0].q == (TILEWH/(player[0].speed))+1 && player[0].info.dir != 2 && (player[0].triggerx == 5 && player[0].triggery == 5)){ player[0].hp--; } //debugging binds! - //if(IN_KeyDown(0x0E)) while(1){ if(xmsmalloc(24)) break; } if(IN_KeyDown(2)){ modexShowPage(mv[0].page); pan.pn=0; } if(IN_KeyDown(3)){ modexShowPage(mv[1].page); pan.pn=1; } - //if(IN_KeyDown(4)){ modexShowPage(mv[2].page); pan.pn=2; } - //if(IN_KeyDown(4+1)){ modexShowPage(mv[3].page); pan.pn=3; } + if(IN_KeyDown(4)){ modexShowPage(mv[2].page); pan.pn=2; } + if(IN_KeyDown(4+1)){ modexShowPage(mv[3].page); pan.pn=3; } if(IN_KeyDown(25)){ modexpdump(mv[0].page); modexpdump(mv[1].page); //IN_Ack(); } //p -- 2.39.5