]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/typdefst.h
optimize for XT i did ww
[16.git] / src / lib / typdefst.h
index 8ee28a5ce6a64b981aa6a18a024219f836cc0b03..2f8d7a456f78f006ee95749a225000886f4dd1d7 100755 (executable)
@@ -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
@@ -70,17 +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
-       iword pagesize;                 /* page size */\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
@@ -100,13 +104,21 @@ typedef struct
        boolean fpscap; //cap the fps var\r
 } kurokku_t;\r
 \r
+typedef struct\r
+{\r
+       word    pn;\r
+} pan_t;\r
+\r
 typedef struct\r
 {\r
        char old_mode;          //old video mode before game!\r
-       page_t page[4];         //pointer to root page[0]\r
-       dword   vmem_remain;    //remaining video memory\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 p;                      //render page number\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
+       //0000word startclk; float clk, tickclk;        //timer\r
 } video_t;\r
 \r
 typedef struct\r