]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/typdefst.h
joncambell321 please help test.exe creates garbage if the 2nd rendering page is written
[16.git] / src / lib / typdefst.h
index 9f4936b96cc951548f0da81797c5bc17acb61262..732053c139af36acafbff2089e6b6a6da6957b61 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 &  joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -36,6 +36,8 @@
 #define AAMAGENTA      "\x1b[45;35m"\r
 #define AARESET        "\x1b[0m"\r
 \r
+#define MAXPAGE 4\r
+\r
 /*\r
  * typedefs of the game variables!\r
  */\r
@@ -48,7 +50,7 @@ typedef struct {
 } bitmap_t;\r
 \r
 typedef struct {\r
-       byte **data;\r
+       byte huge **data;\r
        word ntiles;   /* the number of tiles */\r
        word twidth;   /* width of the tiles */\r
        word theight;  /* height of the tiles */\r
@@ -56,7 +58,7 @@ typedef struct {
 } tileset_t;\r
 \r
 typedef struct {\r
-       byte far *plane[4];     /* 4 planes of image data */\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
@@ -80,6 +82,7 @@ typedef struct {
        sword tilemidposscreeny;        /* middle tile position */\r
        sword tileplayerposscreenx;     /* player position on screen */\r
        sword tileplayerposscreeny;     /* player position on screen */\r
+       sdiword pagesize;                       /* page size */\r
 } page_t;\r
 \r
 typedef struct\r
@@ -101,8 +104,17 @@ typedef struct
 \r
 typedef struct\r
 {\r
-       long old_mode;  //old video mode before game!\r
-       page_t page[4]; //pointer to root page[0]\r
+       word    pn;\r
+} pan_t;\r
+\r
+typedef struct\r
+{\r
+       char old_mode;          //old video mode before game!\r
+       page_t page[MAXPAGE];           //pointer to root page[0]\r
+       sdiword vmem_remain;    //remaining video memory\r
+       byte num_of_pages;      //number of actual pages\r
+       boolean __near p;                       //render page number\r
+       word pr[MAXPAGE][4];    //render sections of pages\r
 } video_t;\r
 \r
 typedef struct\r