From: sparky4 Date: Mon, 24 Nov 2014 07:26:01 +0000 (-0600) Subject: modified: BITMAP.C X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b738b6cacaafec867ffa0b7966ee45d9c1debe0d;p=16.git modified: BITMAP.C modified: pcxtest.exe modified: scroll.c modified: scroll.exe modified: test.exe modified: test2.exe --- diff --git a/BITMAP.C b/BITMAP.C index 191b460b..8287e57d 100644 --- a/BITMAP.C +++ b/BITMAP.C @@ -79,10 +79,10 @@ bitmapLoadPcx(char *filename) { /* open the PCX file for reading */ file = fopen(filename, "rb"); - /*if(!file) { + if(!file) { printf("Could not open %s for reading.\n", filename); exit(-2); - }*/ + } /* load the first part of the pcx file */ loadPcxStage1(file, &result); diff --git a/pcxtest.exe b/pcxtest.exe index d1d39402..de765ece 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.c b/scroll.c index 057a5ee5..4ce0eca0 100644 --- a/scroll.c +++ b/scroll.c @@ -479,7 +479,7 @@ animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int short loo = (ls + lo); if(d2==0) qq = 0; - else qq = ((ls+1)*SPEED); + else qq = ((ls)*SPEED); switch (d1) { case 0: @@ -503,14 +503,11 @@ animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int y=y-TILEWH; break; } - //TODO: make flexible animation thingy - if(2>ls && ls>=1) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else - if(3>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else - if(4>ls && ls>=3) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else - if(5>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); } + //TODO: make flexible animation thingy + modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40); + if(2>ls && ls>=1) { modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else + if(3>ls && ls>=2) { modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else + if(4>ls && ls>=3) { modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else + if(5>ls && ls>=4) { modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); } modexWaitBorder(); } diff --git a/scroll.exe b/scroll.exe index 98e9290d..110d9abd 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/test.exe b/test.exe index b417dca2..99404b1a 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index b061884d..2b870eff 100644 Binary files a/test2.exe and b/test2.exe differ