1 /*
2 * IceBreaker
3 * Copyright (c) 2000-2002 Matthew Miller <mattdm@mattdm.org>
4 *
5 * <http://www.mattdm.org/icebreaker/>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 * for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc., 59
19 * Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22 
23 // fix -- move most of this to be config.h, and make the current globals.h
24 // be icebreaker.h
25 
26 #ifndef ICEBREAKER_H
27 #define ICEBREAKER_H
28 
29 /************************************************************************/
30 /* Versions and so forth -- you probably shouldn't change this. */
31 
32 #define VERSION 1.9.8
33 #define VERMAJOR 1
34 #define VERMINOR 9
35 #define VERSUB 8
36 
37 #ifndef DEVELRELEASE
38 	#define DEVELRELEASE VERMINOR & 1
39 #endif
40 
41 /************************************************************************/
42 /* Platform-specific stuff */
43 
44 
45 #ifdef __MINGW32__
46   #ifndef WIN32
47     #define WIN32
48   #endif
49 #endif
50 
51 
52 #ifdef WIN32
53 
54   #include "win32_compatibility.h"
55 
56   #ifndef OPTIONFILE
57     #define OPTIONFILE "icebreaker.cfg"
58   #endif
59 
60   #define PENGUINICONFILE "penguinicon_32.bmp"
61 
62   #define HISCORELOCKFILE "./lockhelper.lck"
63 
64   // HISCOREPREFIX and DATAPREFIX should probably be ".". Set in Makefile.w32
65 #endif
66 
67 
68 #ifdef __BEOS__
69 
70   #define NEEDCHANGETOARGV0PATH
71 
72   #ifndef OPTIONFILE
73     #define OPTIONFILE "config/settings/icebreaker.cfg"
74   #endif
75 
76   // HISCOREPREFIX and DATAPREFIX should probably be ".". Set in Makefile.beos
77 #endif
78 
79 
80 #ifdef __MACOSX__
81 
82   #error "Mac OS probably doesn't actually work yet -- help wanted."
83 
84   #define ONEBUTTONMICEARESILLY
85 
86   // HISCOREPREFIX and DATAPREFIX should probably be ".". Set in Makefile.osx
87 #endif
88 
89 
90 /************************************************************************/
91 /* and here's the defaults */
92 
93 
94 #ifndef HISCOREPREFIX
95   #define HISCOREPREFIX "/var/lib/games"
96 #endif
97 
98 #ifndef HISCOREFILE
99   #define HISCOREFILE "icebreaker.scores"
100 #endif
101 
102 #ifndef HISCORELOCKFILE
103   #define HISCORELOCKFILE HISCOREPREFIX "/" HISCOREFILE
104 #endif
105 
106 
107 
108 #ifndef DATAPREFIX
109   #define DATAPREFIX "/usr/local/share/icebreaker"
110 #endif
111 
112 #ifndef OPTIONFILE
113   #define OPTIONFILE ".icebreaker"
114 #endif
115 
116 #ifndef PENGUINICONFILE
117   #define PENGUINICONFILE "icebreaker_48.bmp"
118 #endif
119 
120 /************************************************************************/
121 /* themes stuff */
122 
123 #define THEMEFILEEXTENSION ".ibt"
124 // this isn't because of filesystem restrictions, although it might help
125 // with portability. It's because of display space in the options menu.
126 #define MAXTHEMENAMELENGTH 7
127 
128 // these are used if no themes are found -- probably could remove this
129 // completely now that themes are working well.
130 #define SNDFILEOUCH "ouch.wav"
131 #define SNDFILEBREAK "crash.wav"
132 #define PENGUINBMPFILE "penguin.bmp"
133 
134 
135 /************************************************************************/
136 /* Changing these will significantly affect game play. */
137 
138 #define BLOCKWIDTH 14
139 #define BLOCKHEIGHT 14
140 
141 #define COLS 32
142 #define ROWS 20
143 
144 #define PLAYWIDTH (COLS*BLOCKWIDTH)
145 #define PLAYHEIGHT (ROWS*BLOCKHEIGHT)
146 
147 #define MARGINTOP 39
148 #define MARGINBOTTOM 38
149 #define MARGINLEFT 26
150 #define MARGINRIGHT 26
151 
152 #define FULLWIDTH 640
153 #define FULLHEIGHT 480
154 #define FULLTOPMARGIN 80
155 #define FULLLEFTMARGIN ( (FULLWIDTH - WIDTH)/2 )
156 
157 #define WIDTH (MARGINLEFT+PLAYWIDTH+MARGINRIGHT)
158 #define HEIGHT (MARGINTOP+PLAYHEIGHT+MARGINBOTTOM)
159 
160 #define BORDERTOP    MARGINTOP
161 #define BORDERBOTTOM (MARGINTOP+PLAYHEIGHT)
162 #define BORDERLEFT   MARGINLEFT
163 #define BORDERRIGHT  (MARGINLEFT+PLAYWIDTH)
164 
165 #define VIDEODEPTH 16
166 
167 #define MAXPENGUINS 100
168 
169 #define PENGUINSPEED 2
170 
171 #define LINESPEED 2
172 
173 #define LINEMAXSTUCK 750
174 
175 // fps = 1000/MSECPERFRAME (not counting fuzziness, which will round this
176 // down to the nearest 10)
177 #define MSECPERFRAME 11
178 
179 #define FUZZYFPS
180 
181 #define PERCENTREQUIRED 80
182 #define PERCENTBONUS 80
183 #define PERCENTEXTRABONUS 85
184 
185 
186 #define KEYBOARDARROWTHROTTLER 5
187 #define KEYBOARDARROWACCELPOINT 5
188 
189 /************************************************************************/
190 /* and, always useful: */
191 #ifndef true
192 #define true -1
193 #endif
194 
195 #ifndef false
196 #define false 0
197 #endif
198 
199 
200 
201 
202 #endif /* ICEBREAKER_H */
203