From: sparky4 Date: Fri, 17 Feb 2017 21:58:13 +0000 (-0600) Subject: cannot work on this much more i gotta do school project and final X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=09c48b6765cc5c52d81d728a7ada651211268827;p=16.git cannot work on this much more i gotta do school project and final --- diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 9df1eee9..5621be81 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -87,15 +87,52 @@ typedef struct sprite } sprite_t; #endif +//newer structs +typedef struct +{ + int x; //entity exact position on the viewable map + int y; //entity exact position on the viewable map + int tx; //entity tile position on the viewable map + int ty; //entity tile position on the viewable map + int triggerx; //entity's trigger box tile position on the viewable map + int triggery; //entity's trigger box tile position on the viewable map +// int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x +// int sheetsety; //NOT USED YET! entity sprite sheet set on the image y + nibble d; //direction to render sprite!! wwww + 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 spt; //speed per tile +#ifdef __WATCOMC__ + sprite_t spri; // sprite used by entity +#endif + sword hp; //hitpoints of the entity + nibble overdraww, overdrawh; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. + // if the sprite's edge pixels are clear anyway, you can set this to 0. + nibble /*int*/ persist_aniframe; // gonna be increased to 1 before being used, so 0 is ok for default +} entity_t; + +typedef struct +{ + int x; //entity exact position on the viewable map + int y; //entity exact position on the viewable map + int tx; //entity tile position on the viewable map + int ty; //entity tile position on the viewable map + +#ifdef __WATCOMC__ + sprite_t spri; // sprite used by entity +#endif + sword hp; //hitpoints of the entity +} static_map_entity_t; + //===========================================================================// //TODO: 16_mm and 16_ca must handle this typedef struct { -// bitmap_t far *pcximg; // old #ifdef __WATCOMC__ sprite_t *spri; // I will probibaly use this --sparky4 #endif - //planar_buf_t far *pbdata; //old word tileHeight, tileWidth; //defined by mapfile unsigned int rows, cols; byte imgname[8]; //image file of tileset (set to 8 because DOS ^^;) @@ -121,10 +158,10 @@ typedef struct { //===================================// typedef struct{ - word tw; /* screen width in tiles */ - word th; /* screen height in tiles */ - word tilesw; /* virtual screen width in tiles */ - word tilesh; /* virtual screen height in tiles */ + word tw; /* screen width in tiles */ + word th; /* screen height in tiles */ + word tilesw; /* virtual screen width in tiles */ + word tilesh; /* virtual screen height in tiles */ sword tilemidposscreenx; /* middle tile x position */ /* needed for scroll system to work accordingly */ 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 */ @@ -134,7 +171,7 @@ typedef struct{ typedef struct { nibble/*word*/ id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ - pagetileinfo_t ti; + pagetileinfo_t ti; // the tile information of the page 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 */ @@ -150,32 +187,6 @@ typedef struct { sword delta; // How much should we shift the page for smooth scrolling } page_t; -//newer structs -typedef struct -{ - int x; //entity exact position on the viewable map - int y; //entity exact position on the viewable map - int tx; //entity tile position on the viewable map - int ty; //entity tile position on the viewable map - int triggerx; //entity's trigger box tile position on the viewable map - int triggery; //entity's trigger box tile position on the viewable map -// int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x -// int sheetsety; //NOT USED YET! entity sprite sheet set on the image y - nibble d; //direction to render sprite!! wwww - 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 spt; //speed per tile -#ifdef __WATCOMC__ - sprite_t spri; // sprite used by entity -#endif - sword hp; //hitpoints of the entity - nibble overdraww, overdrawh; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. - // if the sprite's edge pixels are clear anyway, you can set this to 0. - nibble /*int*/ persist_aniframe; // gonna be increased to 1 before being used, so 0 is ok for default -} entity_t; - //from 16_in //========================================================================== typedef byte ScanCode; @@ -235,7 +246,7 @@ typedef struct entity_t near enti; #ifdef __WATCOMC__ //struct sprite *spri; //supposively the sprite sheet data - memptr gr; + //memptr gr; #endif // bitmap_t *data; //supposively the sprite sheet data//old format // bitmap_t bmp;