From 0d7ae2e7d572e68cae33bc9fc76e0fbbae176379 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 14 Feb 2017 15:35:02 -0600 Subject: [PATCH] hmmm layers in map_t .... --- data/G.PAL | Bin 768 -> 768 bytes src/lib/16_tdef.h | 16 ++++++++-------- src/lib/scroll16.c | 4 ++-- src/zcroll.c | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/data/G.PAL b/data/G.PAL index d5aa70a645f22c209c1d4864b1b074491295094d..8092380af954e11b165eae773d83f03429619756 100755 GIT binary patch literal 768 zcmZQz00UMTMh;abZao=UHCcIkH8p*6HCZ5GuP>`_ZfNx1OMxL+43^`V-PP=Bs}KD5canX6Eh@(OM&U z9LIT{pU)>Vuj_iAXWo}Xgc5zZlL7_rMXOlSy&!c`N!^qNx0vFow^-7>$kdg(Q%_2R zf96r%%B$a5cb0T702a`|067T4h{Cs6(!DUF8^hR)95h_klU8qxf4a>0Z?89h-P{uQr+KBHrm<{7U+{^z^;I_9=cnGu?~+OK;~3 Di(wLF 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 -- 2.39.2