word offset;\r
} bitmap_t;\r
\r
+//from 16_sprit.h\r
+#ifdef __WATCOMC__\r
+typedef struct sprite\r
+{\r
+ // VRS container from which we will extract animation and image data\r
+ struct vrs_container *spritesheet;\r
+ // Container for a vrl sprite\r
+ struct vrl_container *sprite_vrl_cont;\r
+ // Current sprite id\r
+ int curr_spri_id;\r
+ // Index of a current sprite in an animation sequence\r
+ int curr_anim_spri;\r
+ // Current animation sequence\r
+ struct vrs_animation_list_entry_t *curr_anim_list;\r
+ // Index of current animation in relevant VRS offsets table\r
+ int curr_anim;\r
+ // Delay in time units untill we should change sprite\r
+ int delay;\r
+ // Position of sprite on screen\r
+ int x, y;\r
+} sprite_t;\r
+#endif\r
+\r
typedef struct {\r
- byte far **data;\r
- word ntiles; /* the number of tiles */\r
- word twidth; /* width of the tiles */\r
- word theight; /* height of the tiles */\r
- byte *palette; /* palette for the tile set */\r
+ //byte far **data;\r
+//#ifdef __WATCOMC__\r
+ //sprite_t *spri;\r
+//#endif\r
+ bitmap_t far *data; // actual tileset info\r
+//in the bitmap_t\r
+// byte *palette; // palette for the tile set\r
+ word ntiles; // the number of tiles\r
+ word twidth; // width of the tiles\r
+ word theight; // height of the tiles\r
+ byte imgname[8]; // image filename of tileset\r
} tileset_t;\r
\r
+//not currently using\r
typedef struct {\r
byte far *plane[4]; // 4 planes of image data\r
word width; // width of the image (spread across 4 planes)\r
byte *palette;\r
} planar_buf_t;\r
\r
-//TODO: 16_mm and 16_ca must handle this\r
+//tile properties\r
typedef struct {\r
- bitmap_t far *data; //old\r
- //planar_buf_t far *data; //old\r
+ //bitmap_t far *btdata; //old\r
+ tileset_t tileset; //new\r
word tileHeight, tileWidth;\r
- unsigned int rows, cols;\r
-// #ifdef __DEBUG__\r
-// boolean debug_text; //show the value of the tile! wwww\r
-// byte *debug_data;\r
-// #endif\r
- byte imgname[8]; //image file of tileset\r
+ word rows, cols;\r
} tiles_t;\r
\r
//TODO: 16_mm and 16_ca must handle this\r
//TODO: add variables from 16_ca\r
+#define MAPLAYERS 4\r
//#define __NEWMAPTILEDATAVARS__\r
\r
#ifdef __NEWMAPTILEDATAVARS__\r
-#define MAPLAYERS 4\r
#define MAPTILESPTR layertile[0]\r
#define MAPTILESPTK layertile[k]\r
#define MAPDATAPTR layerdata[0]\r
//long planestart[3];\r
//unsigned planelength[3];\r
#ifndef __NEWMAPTILEDATAVARS__\r
- byte *data; //TODO: 16_mm and 16_ca must handle this\r
- tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this\r
+ byte *data; //TODO: 16_mm and 16_ca must handle this\r
+ tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this\r
#else\r
- byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this\r
- tiles_t far *layertile[MAPLAYERS]; //TODO: 16_mm and 16_ca must handle this\r
+ byte far *layerdata[MAPLAYERS]; //mapindex for specific layer\r
+ tiles_t far *layertile[MAPLAYERS];\r
#endif\r
int width, height; //this has to be signed!\r
- byte name[16];\r
+ byte name[16]; //mapname/maptitle\r
} map_t;\r
\r
typedef struct{\r
sword tilemidposscreeny; /* middle tile y position */ /* needed for scroll system to work accordingly */\r
sword tileplayerposscreenx; /* player position on screen */ /* needed for scroll and map system to work accordingly */\r
sword tileplayerposscreeny; /* player position on screen */ /* needed for scroll and map system to work accordingly */\r
-} tileinfo_t;\r
+} pagetileinfo_t;\r
\r
typedef struct {\r
nibble/*word*/ id; /* the Identification number of the page~ For layering~ */\r
byte far* data; /* the data for the page */\r
- tileinfo_t ti;\r
+ pagetileinfo_t ti;\r
word dx; /* col we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the left size */\r
word dy; /* row we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the top size */\r
word sw; /* screen width */ /* resolution */\r
sword delta; // How much should we shift the page for smooth scrolling\r
} page_t;\r
\r
-//from 16_sprit.h\r
-#ifdef __WATCOMC__\r
-typedef struct sprite\r
-{\r
- // VRS container from which we will extract animation and image data\r
- struct vrs_container *spritesheet;\r
- // Container for a vrl sprite\r
- struct vrl_container *sprite_vrl_cont;\r
- // Current sprite id\r
- int curr_spri_id;\r
- // Index of a current sprite in an animation sequence\r
- int curr_anim_spri;\r
- // Current animation sequence\r
- struct vrs_animation_list_entry_t *curr_anim_list;\r
- // Index of current animation in relevant VRS offsets table\r
- int curr_anim;\r
- // Delay in time units untill we should change sprite\r
- int delay;\r
- // Position of sprite on screen\r
- int x, y;\r
-} sprite_t;\r
-#endif\r
-\r
//newer structs\r
typedef struct\r
{\r