]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/typdefst.h
made major changes in code for the future of scroll ^^
[16.git] / src / lib / typdefst.h
index b7dc2fa9a7a3ae89462434b47b216b761cc7203a..8eff787f4a318dab454bb087864ec21b80a250cc 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
 \r
 #include "src/lib/types.h"\r
 \r
+\r
+#define AARED          "\x1b[41;31m"\r
+#define AABLUE         "\x1b[44;34m"\r
+#define AAGREEN        "\x1b[42;32m"\r
+#define AAYELLOW       "\x1b[43;33m"\r
+#define AAGREY         "\x1b[47;37m"\r
+#define AABLACK        "\x1b[40;30m"\r
+#define AAWHITE                "\x1b[47;37m"\r
+#define AAMAGENTA      "\x1b[45;35m"\r
+#define AARESET        "\x1b[0m"\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
@@ -45,6 +80,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
@@ -64,10 +100,16 @@ typedef struct
        boolean fpscap; //cap the fps var\r
 } kurokku_t;\r
 \r
+#define MAXPAGE 4\r
+\r
 typedef struct\r
 {\r
-       long old_mode;  //old video mode before game!\r
-       page_t page[4]; //pointer to root page[0]\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 p;                      //render page number\r
+       word pr[MAXPAGE][4];    //render sections of pages\r
 } video_t;\r
 \r
 typedef struct\r