]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/typdefst.h
^^ yay! i polished exmmtest and the memory reporter
[16.git] / src / lib / typdefst.h
index 8eff787f4a318dab454bb087864ec21b80a250cc..86379ed8d156be97748dc3659a68720549edb9c3 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 &  joncampbell123\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -25,7 +25,6 @@
 \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 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
+       byte *data;\r
        word width;\r
        word height;\r
        byte *palette;\r
@@ -70,23 +71,36 @@ 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
-       sdiword 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
 {\r
-//     int showmemhandle;\r
-       int                     profilehandle,debughandle;\r
+       //sprite ....\r
+       boolean wwww;\r
+} spri_t;\r
+\r
+typedef struct\r
+{\r
+       //vrs with sprite ....\r
+       spri_t *spri;\r
+} vrs_t;\r
+\r
+typedef struct\r
+{\r
+       int                     profilehandle,debughandle,showmemhandle;\r
        int heaphandle;\r
 } handle_t;\r
 \r
@@ -100,24 +114,95 @@ typedef struct
        boolean fpscap; //cap the fps var\r
 } kurokku_t;\r
 \r
-#define MAXPAGE 4\r
+typedef struct\r
+{\r
+       word    pn;\r
+} pan_t;\r
+\r
+//video\r
+#define NUMCHUNKS      3016    //keen\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
-       sdiword vmem_remain;    //remaining video memory\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 mmblockstruct\r
+{\r
+       word    start,length;\r
+       //word  start;  dword length;\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
+//from 16_mm\r
+//==========================================================================\r
+\r
+#define MAXBLOCKS              1024\r
+#define MAXUMBS                12\r
+\r
+typedef struct\r
+{\r
+       dword   nearheap,farheap,EMSmem,XMSmem,mainmem;\r
+} mminfotype;\r
+\r
+typedef struct\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
+#endif\r
+#ifdef __WATCOMC__\r
+       void __near     *nearheap;\r
+#endif\r
+       //byte          EMS_status;\r
+       unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;\r
+       unsigned int EMSVer;\r
+       word numUMBs,UMBbase[MAXUMBS];\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
+//from 16_ca\r
+//==========================================================================\r
+\r
+typedef struct\r
+{\r
+       byte            ca_levelbit,ca_levelnum;\r
+       int             mapon;\r
+       //_seg  *grsegs[NUMCHUNKS];\r
+       //byte          far     grneeded[NUMCHUNKS];\r
+       //huffnode huffnode;\r
+} ca_t;\r
+\r
+//==========================================================================\r
+\r
+//actual global game varables!\r
 typedef struct\r
 {\r
-       video_t video;  // video settings variable\r
+       video_t video;  // video settings variable\r
+       ca_t            ca;     // ca stuff\r
        byte *pee;              // message for fps\r
        handle_t handle;        //handles for file logging\r
        kurokku_t kurokku;      //clock struct\r
+       mminfo_t mm; mminfotype mmi;\r
 } global_game_variables_t;\r
 \r
 #endif /* _TYPEDEFSTRUCT_H_ */\r