X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tdef.h;h=0b6de0bf73f449ae6d7a92afe8d22a35caab0be8;hb=2a225a70d77b2323a29bc78539cd50c5997bca1e;hp=e386f1fb981de6ee0f8400dc60237189c72568fe;hpb=86619c6a50b07c52481161da4b549ffb5e403e66;p=16.git diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index e386f1fb..0b6de0bf 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -171,11 +171,11 @@ typedef struct { byte *data; //TODO: 16_mm and 16_ca must handle this } mapl_t; //map layer array type def -#define MAP_LAYERS 3 +#define MAPPLANES 3 typedef struct { //long planestart[3]; //unsigned planelength[3]; - mapl_t layerdata[MAP_LAYERS]; // mapdata for multilayer (map index values for rendering which image on the tile) + mapl_t layerdata[MAPPLANES]; // mapdata for multilayer (map index values for rendering which image on the tile) tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this // tilesets for layers (currently ony 4 can be loaded wwww) int width, height; //this has to be signed! byte name[16]; @@ -287,26 +287,31 @@ typedef struct { joyMultXH,joyMultYH; } JoystickDef; +typedef struct instat { + boolean CapsLock; + ScanCode CurCode,LastCode; + + boolean Keyboard[NumCodes]; + boolean Paused; + char LastASCII; + ScanCode LastScan; +} inst_t; + typedef struct// inconfig { boolean IN_Started; - boolean CapsLock; - ScanCode CurCode,LastCode; // // configuration variables // - boolean Keyboard[NumCodes], - JoysPresent[MaxJoys], + boolean JoysPresent[MaxJoys], MousePresent, JoyPadPresent; // Global variables - boolean Paused; - char LastASCII; - ScanCode LastScan; - KeyboardDef KbdDefs[MaxKbds]; JoystickDef JoyDefs[MaxJoys]; + //struct instat *inst; + inst_t *inst; } in_info_t; //========================================================================== @@ -385,7 +390,7 @@ typedef struct //0000word startclk; float clk, tickclk; //timer //newer vars //TODO: find out how they are used - byte grneeded[NUMCHUNKS]; +// byte grneeded[NUMCHUNKS]; } video_t; //from scroll16 @@ -576,7 +581,6 @@ typedef struct //========================================================================== #define NUMMAPS 4//39 -#define MAPPLANES 3 #define NUMSNDCHUNKS 84 typedef struct @@ -584,10 +588,18 @@ typedef struct word bit0,bit1; // 0-255 is a character, > is a pointer to a node } huffnode; +typedef struct +{ + long planestart[3]; + unsigned planelength[3]; + unsigned width,height; + char name[16]; +} maptype; + typedef struct { int mapon, mapnum; - //maptype _seg *mapheaderseg[NUMMAPS]; + maptype _seg *mapheaderseg[NUMMAPS]; } ca_mapinfo_t; typedef struct @@ -597,27 +609,22 @@ typedef struct int audiohandle[4]; // handle to AUDIOT / AUDIO } ca_handle_t; /* - 16/wf3d8086/id_ca.c:byte _seg *tinf; -16/wf3d8086/id_ca.c:unsigned _seg *mapsegs[MAPPLANES]; -16/wf3d8086/id_ca.c:maptype _seg *mapheaderseg[NUMMAPS]; -16/wf3d8086/id_ca.c:byte _seg *audiosegs[NUMSNDCHUNKS]; -16/wf3d8086/id_ca.c:void _seg *grsegs[NUMCHUNKS]; -16/wf3d8086/id_ca.c:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse -16/wf3d8086/id_ca.c:long _seg *audiostarts; // array of offsets in audio / audiot 16/wf3d8086/id_ca.c: grstarts = (long _seg *)FP_SEG(&EGAhead); 16/wf3d8086/id_ca.c: tinf = (byte _seg *)FP_SEG(&maphead); 16/wf3d8086/id_ca.c: pos = ((mapfiletype _seg *)tinf)->headeroffsets[i]; 16/wf3d8086/id_ca.c: audiostarts = (long _seg *)FP_SEG(&audiohead); 16/wf3d8086/id_ca.c: ((mapfiletype _seg *)tinf)->RLEWtag); 16/wf3d8086/id_ca.c: ((mapfiletype _seg *)tinf)->RLEWtag); -16/wf3d8086/id_ca.c: source = (byte _seg *)bufferseg+(pos-bufferstart);*/ +16/wf3d8086/id_ca.c: source = (byte _seg *)bufferseg+(pos-bufferstart); +*/ typedef struct //TODO: USE THIS!!!! { byte ca_levelbit,ca_levelnum; ca_handle_t file; //files to open ca_mapinfo_t camap; - unsigned _seg *mapsegs[MAP_LAYERS]; + byte _seg *tinf[4];//?? where in the id engine is this used and what is it? --sparky4 + unsigned _seg *mapsegs[MAPPLANES]; void _seg *grsegs[NUMCHUNKS]; byte far grneeded[NUMCHUNKS]; word _seg *audiosegs[NUMSNDCHUNKS];//long @@ -625,9 +632,6 @@ typedef struct //TODO: USE THIS!!!! word _seg *grstarts; // array of offsets in egagraph, -1 for sparse//long word _seg *audiostarts; // array of offsets in audio / audiot//long - //misc memptr - byte _seg *tinf[4]; - huffnode huffnode; //TODO: extend! and learn from keen/wolf/catacomb's code wwww @@ -637,17 +641,17 @@ typedef struct //TODO: USE THIS!!!! //========================================================================== //actual global game varables! -typedef enum { +/*typedef enum { ENGI_QUIT, ENGI_RUN, ENGI_MENU, ENGI_PAUSE -} engi_stat_t; +} engi_stat_t;*/ //ENGI_INPUT, typedef struct { - engi_stat_t engi_stat; +//---- engi_stat_t engi_stat; video_t video; // video settings variable ca_t ca; // ca stuff pm_t pm; // pm stuff