} bitmap_t;\r
\r
typedef struct {\r
- byte huge **data;\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
} tileset_t;\r
\r
typedef struct {\r
- byte huge *plane[4]; /* 4 planes of image data */\r
- word width; /* width of the image (spread across 4 planes) */\r
- word height; /* height of the image (spread across 4 planes) */\r
- word pwidth; /* the number of bytes in each plane */\r
+ byte far *plane[4]; // 4 planes of image data\r
+ word width; // width of the image (spread across 4 planes)\r
+ word height; // height of the image (spread across 4 planes)\r
+ word pwidth; // the number of bytes in each plane\r
byte *palette;\r
} planar_buf_t;\r
\r
+//TODO: 16_mm and 16_ca must handle this\r
typedef struct {\r
- /*nibble*/word id; /* the Identification number of the page~ For layering~ */\r
+ bitmap_t far *btdata; //old\r
+ planar_buf_t far *data; //old\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
+} tiles_t;\r
+\r
+//TODO: 16_mm and 16_ca must handle this\r
+//TODO: add variables from 16_ca\r
+typedef struct {\r
+ //long planestart[3];\r
+ //unsigned planelength[3];\r
+ byte *data; //TODO: 16_mm and 16_ca must handle this\r
+ byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this\r
+ tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this\r
+ tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this\r
+ int width, height; //this has to be signed!\r
+ char name[16];\r
+} map_t;\r
+\r
+// tile info\r
+typedef struct{\r
+ word tw; /* screen width in tiles */\r
+ word th; /* screen height in tiles */\r
+ word tilesw; /* virtual screen width in tiles */\r
+ word tilesh; /* virtual screen height in tiles */\r
+ sword tilemidposscreenx; /* middle tile x position */ /* needed for scroll system to work accordingly */\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
+} ti_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
- word dx; /* col we are viewing on the virtual screen */\r
- word dy; /* row we are viewing on the virtual screen */\r
- word sw; /* screen width */\r
- word sh; /* screen heigth */\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
+ word sh; /* screen heigth */ /* resolution */\r
word tw; /* screen width in tiles */\r
word th; /* screen height in tiles */\r
word width; /* virtual width of the page */\r
word height; /* virtual height of the page */\r
word tilesw; /* virtual screen width in tiles */\r
word tilesh; /* virtual screen height in tiles */\r
- sword tilemidposscreenx; /* middle tile position */\r
- sword tilemidposscreeny; /* middle tile position */\r
- sword tileplayerposscreenx; /* player position on screen */\r
- sword tileplayerposscreeny; /* player position on screen */\r
- word stridew; /*width/4*/\r
+ sword tilemidposscreenx; /* middle tile x position */ /* needed for scroll system to work accordingly */\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
+ word stridew; /* width/4 */ /* VGA */\r
word pagesize; /* page size */\r
- word pi; /* incremention page by this much to preserve location */\r
+ word pi; /* increment page by this much to preserve location */\r
+//newer vars\r
+//TODO: find where they are used\r
sword delta; // How much should we shift the page for smooth scrolling\r
- //enum direction d; // Direction we should shift the page\r
} page_t;\r
+\r
+//TODO: MAKE THIS WWWW\r
typedef struct\r
{\r
//sprite ....\r
boolean wwww;\r
} spri_t;\r
\r
+//TODO: MAKE THIS TO WWWW\r
typedef struct\r
{\r
//vrs with sprite ....\r
\r
typedef struct\r
{\r
- int profilehandle,debughandle,showmemhandle;\r
+ int profilehandle,debughandle,showmemhandle;\r
int heaphandle;\r
} loghandle_t;\r
\r
typedef struct\r
{\r
char old_mode; //old video mode before game!\r
- byte grneeded[NUMCHUNKS];\r
- page_t page[MAXPAGE]; //pointer to root page[0]\r
+ page_t page[MAXPAGE]; //can be used as a pointer to root page[0]\r
word vmem_remain; //remaining video memory\r
byte num_of_pages; //number of actual pages\r
boolean __near p; //render page number\r
boolean __near r; //page flip if true\r
- word pr[MAXPAGE][4]; //render sections of pages\r
+ word pr[MAXPAGE][4]; //render sections of pages (this is supposed to be set up to draw sections of the screen if updated)\r
//0000word startclk; float clk, tickclk; //timer\r
+//newer vars\r
+//TODO: find out how they are used\r
+ byte grneeded[NUMCHUNKS];\r
} video_t;\r
\r
//from 16_mm\r
word blob; //for data larger than 64k\r
unsigned attributes;\r
memptr *useptr; // pointer to the segment start\r
- //huge struct mmblockstruct huge *next;\r
struct mmblockstruct far *next;\r
} mmblocktype;\r
\r
{\r
memptr bufferseg;\r
boolean mmstarted, bombonerror, mmerror;\r
- //huge void huge *farheap;\r
void far *farheap;\r
#ifdef __BORLANDC__\r
void *nearheap;\r
word numUMBs,UMBbase[MAXUMBS];\r
word totalEMSpages, freeEMSpages, EMSpagesmapped, EMSHandle, EMSPageFrame;\r
//dword numUMBs,UMBbase[MAXUMBS];\r
- //huge mmblocktype huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew;\r
mmblocktype far mmblocks[MAXBLOCKS],far *mmhead,far *mmfree,far *mmrover,far *mmnew;\r
} mminfo_t;\r
\r
//==========================================================================\r
\r
//actual global game varables!\r
+typedef enum {\r
+ ENGI_EXIT,\r
+ ENGI_QUIT,\r
+ ENGI_RUN,\r
+ ENGI_INPUT,\r
+ ENGI_PAUSE\r
+} engi_stat_t;\r
+\r
typedef struct\r
{\r
video_t video; // video settings variable\r