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