From 9676e77f1f4ed81097fa84609c6cf6611913e9ce Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 8 Sep 2016 11:08:15 -0500 Subject: [PATCH] bloody typedefstruct merging is going to be tricky --- src/lib/16_ca.c | 6 +++--- src/lib/16_ca.h | 7 +++++++ src/lib/16_map.h | 18 ++++++++++++------ src/lib/typdefst.h | 13 +++++++++---- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 725e9321..537a2f0f 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -46,10 +46,10 @@ loaded into the data segment ============================================================================= */ -typedef struct +/*typedef struct { word bit0,bit1; // 0-255 is a character, > is a pointer to a node -} huffnode; +} huffnode;*/ /*typedef struct @@ -1229,7 +1229,7 @@ void CA_Startup(global_game_variables_t *gvar) CAL_SetupMapFile (gvar); - gvar->ca.map.mapon = -1; + gvar->ca.camap.mapon = -1; gvar->ca.ca_levelbit = 1; gvar->ca.ca_levelnum = 0; diff --git a/src/lib/16_ca.h b/src/lib/16_ca.h index 5d8675ca..41649dbf 100755 --- a/src/lib/16_ca.h +++ b/src/lib/16_ca.h @@ -41,6 +41,13 @@ //=========================================================================== +/*typedef struct +{ + unsigned RLEWtag; + long headeroffsets[100]; + byte tileinfo[]; +} mapfiletype;*/ + /*typedef struct { long planestart[3]; diff --git a/src/lib/16_map.h b/src/lib/16_map.h index 28c048c0..7130e3bc 100755 --- a/src/lib/16_map.h +++ b/src/lib/16_map.h @@ -31,22 +31,28 @@ #include "src/lib/16_ca.h" #include "src/lib/16_mm.h" +//TODO: 16_mm and 16_ca must handle this typedef struct { - bitmap_t huge *btdata; - planar_buf_t huge *data; + bitmap_t huge *btdata; //old + planar_buf_t huge *data; //old word tileHeight; word tileWidth; unsigned int rows; unsigned int cols; +#ifdef __DEBUG__ boolean debug_text; //show the value of the tile! wwww byte *debug_data; +#endif } tiles_t; +//TODO: 16_mm and 16_ca must handle this typedef struct { - byte * huge *data; - tiles_t **tiles; - int width; //this has to be signed! - int height; //this has to be signed! + //long planestart[3]; + unsigned planelength[3]; + byte * huge *data; //TODO: 16_mm and 16_ca must handle this + tiles_t **tiles; //TODO: 16_mm and 16_ca must handle this + int width, height; //this has to be signed! + char name[16]; } map_t; int loadmap(char *mn, map_t *map); diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 70012de8..5323222e 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -186,24 +186,29 @@ typedef struct #define NUMMAPS 4//39 #define MAPPLANES 3 +typedef struct +{ + word bit0,bit1; // 0-255 is a character, > is a pointer to a node +} huffnode; + typedef struct { int mapon, mapnum; __segment *mapsegs[4]; __segment *mapheaderseg[NUMMAPS]; __segment *tinf; -} mapinfo_t; +} ca_mapinfo_t; typedef struct { int maphandle[4]; // handle to MAPTEMP / GAMEMAPS -} handle_t; +} ca_handle_t; typedef struct { byte ca_levelbit,ca_levelnum; - handle_t file; //files to open - mapinfo_t map; + ca_handle_t file; //files to open + ca_mapinfo_t camap; //_seg *grsegs[NUMCHUNKS]; //byte far grneeded[NUMCHUNKS]; //huffnode huffnode; -- 2.39.5