From e16ea59fa8337085d64af7f22577887a334b79a2 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 16 Jun 2016 11:57:41 -0500 Subject: [PATCH] optimize for XT i did ww --- src/lib/scroll16.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index c36c5f3f..057ecf06 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -896,10 +896,25 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll /*modexCopyPageRegion(pip[pip->video->p].page, pip[!(pip->video->p)].page, x-4, y-4, x-4, y-4, 28, 36);*/ // else modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40); - if(2>ls && ls>=1) { FRAME1 }else - if(3>ls && ls>=2) { FRAME2 }else - if(4>ls && ls>=3) { FRAME3 }else - if(5>ls && ls>=4) { FRAME4 } + switch(ls) + { + case 1: + FRAME1 + break; + case 2: + FRAME2 + break; + case 3: + FRAME3 + break; + case 4: + FRAME4 + break; + } +// if(2>ls && ls>=1) { FRAME1 }else +// if(3>ls && ls>=2) { FRAME2 }else +// if(4>ls && ls>=3) { FRAME3 }else +// if(5>ls && ls>=4) { FRAME4 } pip->video->r=1; //TODO: mask copy //modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40); //modexClearRegion(top->page, 66, 66, 2, 40, 0); -- 2.39.5