X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftypdefst.h;h=8eff787f4a318dab454bb087864ec21b80a250cc;hb=726f47f73e27e6969af9f726db349883b751dcc2;hp=b7dc2fa9a7a3ae89462434b47b216b761cc7203a;hpb=f31e09e4be70ced5efbf4394d7ee5eb66d3bae47;p=16.git diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index b7dc2fa9..8eff787f 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 * * This file is part of Project 16. * @@ -25,9 +25,44 @@ #include "src/lib/types.h" + +#define AARED "\x1b[41;31m" +#define AABLUE "\x1b[44;34m" +#define AAGREEN "\x1b[42;32m" +#define AAYELLOW "\x1b[43;33m" +#define AAGREY "\x1b[47;37m" +#define AABLACK "\x1b[40;30m" +#define AAWHITE "\x1b[47;37m" +#define AAMAGENTA "\x1b[45;35m" +#define AARESET "\x1b[0m" + /* * typedefs of the game variables! */ +typedef struct { + byte huge *data; + word width; + word height; + byte *palette; + word offset; +} bitmap_t; + +typedef struct { + byte huge **data; + word ntiles; /* the number of tiles */ + word twidth; /* width of the tiles */ + word theight; /* height of the tiles */ + byte *palette; /* palette for the tile set */ +} tileset_t; + +typedef struct { + byte huge *plane[4]; /* 4 planes of image data */ + word width; /* width of the image (spread across 4 planes) */ + word height; /* height of the image (spread across 4 planes) */ + word pwidth; /* the number of bytes in each plane */ + byte *palette; +} planar_buf_t; + typedef struct { word id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ @@ -45,6 +80,7 @@ typedef struct { sword tilemidposscreeny; /* middle tile position */ sword tileplayerposscreenx; /* player position on screen */ sword tileplayerposscreeny; /* player position on screen */ + sdiword pagesize; /* page size */ } page_t; typedef struct @@ -64,10 +100,16 @@ typedef struct boolean fpscap; //cap the fps var } kurokku_t; +#define MAXPAGE 4 + typedef struct { - long old_mode; //old video mode before game! - page_t page[4]; //pointer to root page[0] + char old_mode; //old video mode before game! + page_t page[MAXPAGE]; //pointer to root page[0] + sdiword vmem_remain; //remaining video memory + byte num_of_pages; //number of actual pages + boolean p; //render page number + word pr[MAXPAGE][4]; //render sections of pages } video_t; typedef struct