X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftypdefst.h;h=9a2f332020ccf882ee737644ae68fcc1875b5814;hb=43e4f16377fe2d0ed99feaa15d6992df6fa34c7c;hp=2e1cd4883a74617ae1afbde2a0e3a37d0e9e52d8;hpb=406b5fda9569ccdcf5fad9944f442b24ec0662fa;p=16.git diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 2e1cd488..9a2f3320 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -25,7 +25,6 @@ #include "src/lib/types.h" - #define AARED "\x1b[41;31m" #define AABLUE "\x1b[44;34m" #define AAGREEN "\x1b[42;32m" @@ -36,11 +35,13 @@ #define AAMAGENTA "\x1b[45;35m" #define AARESET "\x1b[0m" +#define MAXPAGE 4 + /* * typedefs of the game variables! */ typedef struct { - byte huge *data; + byte *data; word width; word height; byte *palette; @@ -48,7 +49,7 @@ typedef struct { } bitmap_t; typedef struct { - byte **data; + byte huge **data; word ntiles; /* the number of tiles */ word twidth; /* width of the tiles */ word theight; /* height of the tiles */ @@ -70,18 +71,33 @@ typedef struct { word dy; /* row we are viewing on the virtual screen */ word sw; /* screen width */ word sh; /* screen heigth */ - word tilesw; /* screen width in tiles */ - word tilesh; /* screen height in tiles */ + word tw; /* screen width in tiles */ + word th; /* screen height in tiles */ word width; /* virtual width of the page */ word height; /* virtual height of the page */ - word tw; - word th; + word tilesw; /* virtual screen width in tiles */ + word tilesh; /* virtual screen height in tiles */ sword tilemidposscreenx; /* middle tile position */ sword tilemidposscreeny; /* middle tile position */ sword tileplayerposscreenx; /* player position on screen */ sword tileplayerposscreeny; /* player position on screen */ + word stridew; /*width/4*/ + word pagesize; /* page size */ + word pi; /* incremention page by this much to preserve location */ } page_t; +typedef struct +{ + //sprite .... + boolean wwww; +} spri_t; + +typedef struct +{ + //vrs with sprite .... + spri_t *spri; +} vrs_t; + typedef struct { // int showmemhandle; @@ -101,16 +117,93 @@ typedef struct typedef struct { - long old_mode; //old video mode before game! - page_t page[4]; //pointer to root page[0] + word pn; +} pan_t; + +//video +#define NUMCHUNKS 3016 //keen + +typedef struct +{ + char old_mode; //old video mode before game! + byte grneeded[NUMCHUNKS]; + page_t page[MAXPAGE]; //pointer to root page[0] + word vmem_remain; //remaining video memory + byte num_of_pages; //number of actual pages + boolean __near p; //render page number + boolean __near r; //page flip if true + word pr[MAXPAGE][4]; //render sections of pages + //0000word startclk; float clk, tickclk; //timer } video_t; +typedef struct mmblockstruct +{ + word start,length; + //word start; dword length; + word blob; //for data larger than 64k + unsigned attributes; + memptr *useptr; // pointer to the segment start + //huge struct mmblockstruct huge *next; + struct mmblockstruct far *next; +} mmblocktype; + +//from 16_mm +//========================================================================== + +#define MAXBLOCKS 1024 +#define MAXUMBS 12 + +typedef struct +{ + dword nearheap,farheap,EMSmem,XMSmem,mainmem; +} mminfotype; + +typedef struct +{ + memptr bufferseg; + boolean mmstarted, bombonerror, mmerror; + //huge void huge *farheap; + void far *farheap; +#ifdef __BORLANDC__ + void *nearheap; +#endif +#ifdef __WATCOMC__ + void __near *nearheap; +#endif + //byte EMS_status; + unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle; + unsigned int EMSVer; + word numUMBs,UMBbase[MAXUMBS]; + //dword numUMBs,UMBbase[MAXUMBS]; + //huge mmblocktype huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew; + mmblocktype far mmblocks[MAXBLOCKS],far *mmhead,far *mmfree,far *mmrover,far *mmnew; +} mminfo_t; + +//========================================================================== + +//from 16_ca +//========================================================================== + +typedef struct +{ + byte ca_levelbit,ca_levelnum; + int mapon; + _seg *grsegs[NUMCHUNKS]; + byte far grneeded[NUMCHUNKS]; + //huffnode huffnode; +} ca_t; + +//========================================================================== + +//actual global game varables! typedef struct { - video_t video; // video settings variable + video_t video; // video settings variable + ca_t ca; // ca stuff byte *pee; // message for fps handle_t handle; //handles for file logging kurokku_t kurokku; //clock struct + mminfo_t mm; mminfotype mmi; } global_game_variables_t; #endif /* _TYPEDEFSTRUCT_H_ */