X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftypdefst.h;h=7dbe38a1aa26426f561699dfbc43d5b46ca67ee0;hb=26ce854d2ae9675acd7c91f30f281759d78ebfef;hp=3f53cd7f7b437334f2c28ce6787f604fa58d33df;hpb=74929b07c8b45a20eb5079444f4df21c9898e605;p=16.git diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 3f53cd7f..7dbe38a1 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. * @@ -36,9 +36,35 @@ #define AAMAGENTA "\x1b[45;35m" #define AARESET "\x1b[0m" +#define MAXPAGE 4 + /* * 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 */ @@ -46,16 +72,19 @@ 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 @@ -77,8 +106,19 @@ 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; + +typedef struct +{ + char old_mode; //old video mode before game! + 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 + word startclk; float clk, tickclk; //timer } video_t; typedef struct