From: sparky4 Date: Tue, 14 Feb 2017 21:35:02 +0000 (-0600) Subject: hmmm layers in map_t .... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0d7ae2e7d572e68cae33bc9fc76e0fbbae176379;p=16.git hmmm layers in map_t .... --- diff --git a/data/G.PAL b/data/G.PAL index d5aa70a6..8092380a 100755 Binary files a/data/G.PAL and b/data/G.PAL differ diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 52435a91..54ec8b9c 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -50,10 +50,10 @@ typedef struct { typedef struct { byte far **data; - word ntiles; /* the number of tiles */ - word twidth; /* width of the tiles */ - word theight; /* height of the tiles */ - byte *palette; /* palette for the tile set */ + word ntiles; // the number of tiles + word twidth; // width of the tiles + word theight; // height of the tiles + byte *palette; // palette for the tile set } tileset_t; typedef struct { @@ -66,9 +66,9 @@ typedef struct { //TODO: 16_mm and 16_ca must handle this typedef struct { - bitmap_t far *data; //old + bitmap_t far *pcximg; //old //planar_buf_t far *data; //old - word tileHeight, tileWidth; + word tileHeight, tileWidth; //defined by mapfile unsigned int rows, cols; // #ifdef __DEBUG__ // boolean debug_text; //show the value of the tile! wwww @@ -115,12 +115,12 @@ typedef struct{ sword tilemidposscreeny; /* middle tile y position */ /* needed for scroll system to work accordingly */ sword tileplayerposscreenx; /* player position on screen */ /* needed for scroll and map system to work accordingly */ sword tileplayerposscreeny; /* player position on screen */ /* needed for scroll and map system to work accordingly */ -} tileinfo_t; +} pagetileinfo_t; typedef struct { nibble/*word*/ id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ - tileinfo_t ti; + pagetileinfo_t ti; word dx; /* col we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the left size */ word dy; /* row we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the top size */ word sw; /* screen width */ /* resolution */ diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 9a4708ab..6f5665ec 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -574,8 +574,8 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) } else { - rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth); - ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight); + rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth); + ry = (((i-1) / ((t->pcximg->height)/t->tileHeight)) * t->tileHeight); ////0000printf("i=%d\n", i); #ifdef __DEBUG_MAP__ switch(dbg_maptext) diff --git a/src/zcroll.c b/src/zcroll.c index e1f92fad..b398a8e8 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -112,7 +112,7 @@ void main(int argc, char *argv[]) map.tiles->data->offset=(paloffset/3); modexPalUpdate(map.tiles->data, &paloffset, 0, 0);*/ VL_LoadPalFile(bakapee1p, &gvar.video.palette); - VL_LoadPalFile("data/default.pal", &gvar.video.palette); + //VL_LoadPalFile("data/default.pal", &gvar.video.palette); #ifdef FADE gpal = modexNewPal(); @@ -147,6 +147,7 @@ void main(int argc, char *argv[]) gvar.video.page[0].tlx=mv[0].tx*TILEWH; gvar.video.page[0].tly=mv[0].ty*TILEWH; shinku(&gvar); + modexpdump(mv[0].page); #ifdef FADE modexFadeOn(4, gpal); #endif