]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/typdefst.h
wwww
[16.git] / src / lib / typdefst.h
index 3f53cd7f7b437334f2c28ce6787f604fa58d33df..7dbe38a1aa26426f561699dfbc43d5b46ca67ee0 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
 #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
+typedef struct {\r
+       byte huge *data;\r
+       word width;\r
+       word height;\r
+       byte *palette;\r
+       word offset;\r
+} bitmap_t;\r
+\r
+typedef struct {\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
+       byte *palette; /* palette for the tile set */\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 *palette;\r
+} planar_buf_t;\r
+\r
 typedef struct {\r
        word id;        /* the Identification number of the page~ For layering~ */\r
        byte far* data; /* the data for the page */\r
@@ -46,16 +72,19 @@ typedef struct {
        word dy;                /* row we are viewing on the virtual screen */\r
        word sw;                /* screen width */\r
        word sh;                /* screen heigth */\r
-       word tilesw;            /* screen width in tiles */\r
-       word tilesh;            /* screen height in tiles */\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 tw;\r
-       word th;\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
+       word pagesize;                  /* page size */\r
+       word pi;                                /* incremention page by this much to preserve location */\r
 } page_t;\r
 \r
 typedef struct\r
@@ -77,8 +106,19 @@ 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
+       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 startclk; float clk, tickclk;      //timer\r
 } video_t;\r
 \r
 typedef struct\r