]> 4ch.mooo.com Git - 16.git/blob - src/lib/typdefst.h
b7dc2fa9a7a3ae89462434b47b216b761cc7203a
[16.git] / src / lib / typdefst.h
1 /* Project 16 Source Code~\r
2  * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
3  *\r
4  * This file is part of Project 16.\r
5  *\r
6  * Project 16 is free software; you can redistribute it and/or modify\r
7  * it under the terms of the GNU General Public License as published by\r
8  * the Free Software Foundation; either version 3 of the License, or\r
9  * (at your option) any later version.\r
10  *\r
11  * Project 16 is distributed in the hope that it will be useful,\r
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14  * GNU General Public License for more details.\r
15  *\r
16  * You should have received a copy of the GNU General Public License\r
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
18  * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
19  * Fifth Floor, Boston, MA 02110-1301 USA.\r
20  *\r
21  */\r
22 \r
23 #ifndef _TYPEDEFSTRUCT_H_\r
24 #define _TYPEDEFSTRUCT_H_\r
25 \r
26 #include "src/lib/types.h"\r
27 \r
28 /*\r
29  * typedefs of the game variables!\r
30  */\r
31 typedef struct {\r
32         word id;        /* the Identification number of the page~ For layering~ */\r
33         byte far* data; /* the data for the page */\r
34         word dx;                /* col we are viewing on the virtual screen */\r
35         word dy;                /* row we are viewing on the virtual screen */\r
36         word sw;                /* screen width */\r
37         word sh;                /* screen heigth */\r
38         word tilesw;            /* screen width in tiles */\r
39         word tilesh;            /* screen height in tiles */\r
40         word width;             /* virtual width of the page */\r
41         word height;    /* virtual height of the page */\r
42         word tw;\r
43         word th;\r
44         sword tilemidposscreenx;        /* middle tile position */\r
45         sword tilemidposscreeny;        /* middle tile position */\r
46         sword tileplayerposscreenx;     /* player position on screen */\r
47         sword tileplayerposscreeny;     /* player position on screen */\r
48 } page_t;\r
49 \r
50 typedef struct\r
51 {\r
52 //      int showmemhandle;\r
53         int                     profilehandle,debughandle;\r
54         int heaphandle;\r
55 } handle_t;\r
56 \r
57 typedef struct\r
58 {\r
59         word frames_per_second;\r
60         clock_t t;\r
61         dword tiku;             //frames passed\r
62         word clock_start;       //timer start\r
63         word *clock;    //current time on clock\r
64         boolean fpscap; //cap the fps var\r
65 } kurokku_t;\r
66 \r
67 typedef struct\r
68 {\r
69         long old_mode;  //old video mode before game!\r
70         page_t page[4]; //pointer to root page[0]\r
71 } video_t;\r
72 \r
73 typedef struct\r
74 {\r
75         video_t video;  // video settings variable\r
76         byte *pee;              // message for fps\r
77         handle_t handle;        //handles for file logging\r
78         kurokku_t kurokku;      //clock struct\r
79 } global_game_variables_t;\r
80 \r
81 #endif /* _TYPEDEFSTRUCT_H_ */\r