1 /*
2 
3 Copyright (C) 2015-2018 Night Dive Studios, LLC.
4 
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 /*
20  * $Source: r:/prj/cit/src/RCS/statics.c $
21  * $Revision: 1.8 $
22  * $Author: xemu $
23  * $Date: 1994/11/01 09:18:31 $
24  *
25  * static variables and the people who love them
26  */
27 
28 // the idea is you can take just obj mem, tmap and obj, or both
29 // + either big buffer or the frame buffer or both
30 
31 // still need to have static.h for people to use this stuff...
32 
33 // how do we get this aligned right.
34 // perhaps do this file in asm for real?
35 // if we did it in asm, and had these point, then we could use
36 // labels for top and bottom, which would be good...
37 // sadly, this alphabetizes, since it is so cool
38 
39 // put big buffer here? and have a define after it
40 
41 #include "textmaps.h"
42 uchar tmap_static_mem[NUM_STATIC_TMAPS * SIZE_STATIC_TMAP];
43 #ifdef SVGA_CUTSCENES
44 uchar tmap_big_buffer[NUM_STATIC_TMAPS * SIZE_BIG_TMAP];
45 #endif
46 
47 #include "objects.h"
48 #include "objapp.h"
49 Obj objs[NUM_OBJECTS];
50 ObjRef objRefs[NUM_REF_OBJECTS];
51 uchar objsDealt[NUM_OBJECTS / 8];
52 
53 // put rest of obj system here, define after it
54 
55 #include "mfddims.h"
56 #define FRAME_BUFFER_SIZE (320 * 200) + 4096
57 uchar frameBuffer[FRAME_BUFFER_SIZE];
58 #define WACKY_SVGA_MFD_SIZE 52744
59 uchar frameBuffer2[WACKY_SVGA_MFD_SIZE];
60 
61 uchar *mfd_canvas_bits = NULL;
62 
63 #define ALTERNATE_BUFFER_SIZE ((MFD_VIEW_HGT * MFD_VIEW_WID) + FRAME_BUFFER_SIZE)
64 
65 #include "map.h"
66 #define STATIC_MAP_SIZE 16 << (DEFAULT_XSHF + DEFAULT_YSHF)
67 
68 uchar static_map[STATIC_MAP_SIZE];
69 
70 #include "objprop.h"
71 
72 #define OBJ_BITMAP_POOL_SIZE ((NUM_OBJECT * 2) + 230)
73 grs_bitmap obj_bitmap_pool[OBJ_BITMAP_POOL_SIZE];
74 
75 #include "svgacurs.h"
76 uchar svga_cursor_bits[SVGA_CURSOR_WIDTH * SVGA_CURSOR_HEIGHT];
77 grs_bitmap svga_cursor_bmp;
78 
79 #define MAX_OPT_WID 154
80 #define MAX_OPT_HT 58
81 uchar svga_options_cursor_bits[MAX_OPT_WID * MAX_OPT_HT];
82