X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tdef.h;h=fb905910af6e3aa7ab23386a3c405f73f91c48a6;hb=e62d9fad29bbc049320ec69914aefd43c0f62f78;hp=ffa22c0183a4ea1a70b9ce23265e65a36ebfeed2;hpb=9dceac8c26077833f033c86e39d916b112c9d025;p=16.git diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index ffa22c01..fb905910 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2022 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -46,6 +46,14 @@ /* * typedefs of the game variables! */ +typedef struct { + byte far *plane[4]; // 4 planes of image data + word width; // width of the image (spread across 4 planes) + word height; // height of the image (spread across 4 planes) + word pwidth; // the number of bytes in each plane + byte *palette; +} planar_buf_t; + typedef struct { byte *data; word width; @@ -62,14 +70,6 @@ typedef struct { byte *palette; // palette for the tile set } tileset_t; -typedef struct { - byte far *plane[4]; // 4 planes of image data - word width; // width of the image (spread across 4 planes) - word height; // height of the image (spread across 4 planes) - word pwidth; // the number of bytes in each plane - byte *palette; -} planar_buf_t; - //from 16_sprit.h #ifdef __WATCOMC__ #include @@ -138,7 +138,7 @@ typedef struct nibble pred; //prev. direction for animation changing word dire; //sprite in use nibble q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www - word speed; //entity speed! +// word speed; //entity speed! word spt; //speed per tile #ifdef __WATCOMC__ sprite_t spri; // sprite used by entity @@ -332,8 +332,8 @@ typedef struct //struct sprite *spri; //supposively the sprite sheet data //memptr gr; #endif -// bitmap_t *data; //supposively the sprite sheet data//old format -// bitmap_t bmp; + bitmap_t *data; //supposively the sprite sheet data//old format + bitmap_t bmp; //input byte near pdir; //previous direction~ used in IN_16 in IN_ReadControl() @@ -350,6 +350,8 @@ typedef struct { int profilehandle,debughandle,showmemhandle; int heaphandle; + byte datadumpfilename[12]; + byte heapdumpfilename[12]; } loghandle_t; typedef struct @@ -400,7 +402,7 @@ typedef struct word quadwh; //preproccessed quad size of tilewidth and tileheight } tile_dimention_t; -#define MAXSCROLLEDGES 6 +#define MAXSCROLLEDGES 2 typedef struct { unsigned panx,pany; // panning adjustments inside port in pixels @@ -410,6 +412,16 @@ typedef struct int hscrolledge[MAXSCROLLEDGES],vscrolledge[MAXSCROLLEDGES]; } pan_t; +typedef struct +{ + sword x; + sword y; + word t; + boolean tlsw; + word color; + word bgcolor; +} modexprint_t; + typedef struct { //---- ylookup[MAXSCANLINES], @@ -450,6 +462,7 @@ typedef struct nibble sfip; //shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible. ofs_t ofs; //offset vars used for doslib word vh; //video combined height + modexprint_t print; //modexprint variables tile_dimention_t td; //0000word startclk; float clk, tickclk; //timer //wolf3d vars @@ -497,11 +510,12 @@ typedef struct //from 16_mm //========================================================================== -#define MAXBLOCKS 800 //kd=1300 wolf3d=700 cata=600 +#define MAXBLOCKS 1024 //kd=1300 wolf3d=700 cata=600 typedef struct mmblockstruct { - unsigned start,length; + //word start,length, blob; //for data larger than 64k + word start; dword length; unsigned attributes; memptr *useptr; // pointer to the segment start struct mmblockstruct far *next; @@ -509,7 +523,7 @@ typedef struct mmblockstruct typedef struct mmshowmemoryinfo { - word x,y; +// unsigned x,y; mmblocktype far *scan; } mmshowmemoryinfo_t; @@ -653,6 +667,49 @@ typedef struct //for 16_sd //========================================================================== + +///////////////////////////////////////////////// +// +// MUSE Header for .WL6 +// Created Tue Jul 14 15:04:53 1992 +// +///////////////////////////////////////////////// + +#define NUMSOUNDS 87 +//--#define NUMSNDCHUNKS 288 + +// +// Sound names & indexes +// +typedef enum { + HITWALLSND, // 0 + SELECTWPNSND, // 1 + SELECTITEMSND, // 2 + LASTSOUND + } soundnames; + +// +// Base offsets +// +#define STARTPCSOUNDS 0 +#define STARTADLIBSOUNDS 87 +#define STARTDIGISOUNDS 174 +#define STARTMUSIC 0//++++261 + +// +// Music names & indexes +// +typedef enum { + CORNER_MUS, // 0 + LASTMUSIC + } musicnames; + +///////////////////////////////////////////////// +// +// Thanks for playing with MUSE! +// +///////////////////////////////////////////////// + #pragma pack(push,1) typedef struct imf_entry { @@ -669,6 +726,7 @@ typedef struct imf_entry_t* imf_play_ptr;//=NULL; imf_entry_t* imf_music_end;//=NULL; word imf_delay_countdown;//=0; + dword ptick,tickrate; } sd_t; //========================================================================== @@ -744,7 +802,7 @@ typedef struct //TODO: USE THIS!!!! byte _seg *tinf;//?? where in the id engine is this used and what is it? --sparky4 int mapon, mapnum; -// maptype _seg *mapheaderseg[NUMMAPS]; + maptype _seg *mapheaderseg[NUMMAPS]; unsigned _seg *mapsegs[MAPPLANES]; void _seg *grsegs[NUMCHUNKS]; byte far grneeded[NUMCHUNKS]; @@ -769,6 +827,7 @@ typedef struct //TODO: USE THIS!!!! sd_t sd; //TODO: extend! and learn from keen/wolf/catacomb's code wwww + memptr spribuff[64]; //temp } ca_t; //========================================================================== @@ -798,6 +857,7 @@ typedef struct glob_game_vars in_info_t in; // 16_in info player_t player[MaxPlayers]; // player vars map_view_t mv[4]; + map_t map; // sw_t sw; boolean DLStarted; } global_game_variables_t;