From 10ea364bfa2876441b440871b226afb51be0665b Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 2 May 2016 16:07:21 -0500 Subject: [PATCH] panning updated and stuff wwww --- src/lib/scroll16.c | 2 +- src/scroll.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 6aec0827..9d372375 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -583,7 +583,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty) mv->dyThresh = mv->map->tiles->tileHeight * 2; /* draw the tiles */ - modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0); + modexClearRegion(mv->page, 0, 0, mv->page->width+mv->map->tiles->tileWidth, mv->page->height+mv->map->tiles->tileHeight, 0); py=0; i=mv->ty * mv->map->width + mv->tx; for(ty=mv->ty-1; py < mv->page->sh+mv->dyThresh && ty < mv->map->height; ty++, py+=mv->map->tiles->tileHeight) { diff --git a/src/scroll.c b/src/scroll.c index b41f7b14..d262a24e 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -168,10 +168,12 @@ void main(int argc, char *argv[]) mv[i].pan = &pan; /* set up paging */ //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen - mapGoTo(&mv[i], -1, -1); + mapGoTo(&mv[i], 0, 0); //TODO: put player in starting position of spot } + //modexClearRegion(mv[0].page, 0, 0, mv[0].page->width+TILEWH, mv[0].page->height+TILEWH, 15); + //default player position on the viewable map player[panswitch].tx = mv[0].tx + mv[0].page->tilemidposscreenx; player[panswitch].ty = mv[0].ty + mv[0].page->tilemidposscreeny; -- 2.39.5