X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=scroll.c;h=218d0097bcd8f1500e3dc632ba81870ad16e1ec6;hb=5cacff693d47af13d5d4fd12667536a5218a1c98;hp=7327cd0351d82eed2c6df8e8d7a004d3fe0af72e;hpb=c36d889fe024f749c4d44d9fbb114e0642297782;p=16.git diff --git a/scroll.c b/scroll.c index 7327cd03..218d0097 100644 --- a/scroll.c +++ b/scroll.c @@ -1,9 +1,3 @@ -/* - -hey pngwen! draw half of the rows and colums instread of the whole thing at once -or try to optimized it~ - -*/ #include "modex16.h" #include #include @@ -58,7 +52,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty); void mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y); void mapDrawRow(map_view_t *mv, int tx, int ty, word y); void mapDrawCol(map_view_t *mv, int tx, int ty, word x); -void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */word d1, word d2, int x, int y, word ls, word lp, bitmap_t *bmp); +void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */short d1, short d2, int x, int y, int ls, int lp, bitmap_t *bmp); #define TILEWH 16 #define QUADWH (TILEWH/4) @@ -72,7 +66,7 @@ void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */word //#define SWAP(a, b) tmp=a; a=b; b=tmp; void main() { bitmap_t ptmp; // player sprite - word q=1; + int q=1; static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */ page_t screen, screen2, screen3; map_t map; @@ -556,10 +550,10 @@ mapDrawCol(map_view_t *mv, int tx, int ty, word x) { } void -animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */word d1, word d2, int x, int y, word ls, word lp, bitmap_t *bmp) +animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */short d1, short d2, int x, int y, int ls, int lp, bitmap_t *bmp) { - word dire=32*d1; - word qq; + short dire=32*d1; + short qq; if(d2==0) qq = 0; else qq = ((lp)*SPEED);