X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fscroll16.c;h=55ce2c98de919bfe129cbe0befeb37ee187df0a7;hb=deacca9025d6d70754cc5017fcf46d2f4038e738;hp=f56a7c049a48c143e73a345096db2e6c93327ad4;hpb=2efd862f97629e2bbb52e5f533dde93dfc3729e2;p=16.git diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index f56a7c04..55ce2c98 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -282,7 +282,7 @@ initMap(map_t *map) { } }*/ -void mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) +void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) { word x, y; /* coordinate for drawing */ @@ -310,7 +310,7 @@ void mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) } -void mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) +void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) { word x, y; /* coordinate for drawing */ @@ -339,7 +339,7 @@ void mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) } -void mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) +void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) { word x, y; /* coordinate for drawing */ @@ -366,7 +366,7 @@ void mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) //} } -void mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) +void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) { word x, y; /* coordinate for drawing */ @@ -451,7 +451,7 @@ sword chkmap(map_t *map, word q) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 2, 3, 4 };*/ //check for failed to load map - if((map->width == map->height == 0) || (q>0)) + if((map->width == map->height == 0) && (q>0)) { //initiate a null map! map->width=MAPW;///2; @@ -467,12 +467,9 @@ sword chkmap(map_t *map, word q) map->tiles->tileWidth = 16; map->tiles->rows = 1; map->tiles->cols = 1; -#ifndef TILESPRITE map->tiles->debug_text = true; -#else - map->tiles->debug_text = false; -#endif } + else map->tiles->debug_text = false; return 0; } @@ -502,7 +499,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty) } -void +void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) { word rx; @@ -523,7 +520,12 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) switch(t->debug_text) { case 0: +#ifndef SPRITE + modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)*2); + //cannot print number value du to it being slow as bakapee +#else modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); +#endif break; case 1: modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (t->debug_data[i])+1); @@ -540,7 +542,7 @@ 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, player_t *p, word poopoffset) +void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *p, word poopoffset) { word x; int i; @@ -557,7 +559,7 @@ void mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *p, word poopof } } -void mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word poopoffset) +void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word poopoffset) { int y; int i; @@ -637,7 +639,7 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) //} }*/ -void animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch) +void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch) { sword x = player[playnum].x; sword y = player[playnum].y; @@ -706,6 +708,6 @@ void animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scroll //modexClearRegion(top->page, 66, 66, 2, 40, 0); //modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40); //turn this off if XT - //XTif(detectcpu() > 0) + if(detectcpu() > 0) modexWaitBorder(); }