defs.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#include "defines.h"
00023
00024 #define min(a, b) ((a) < (b) ? (a) : (b))
00025 #define max(a, b) ((a) > (b) ? (a) : (b))
00026
00027 #define PI 3.14159265359
00028
00029
00030
00031 #define ERR_FILE "A required file (%s) was not found in PAK file"
00032 #define ERR_LOCALE "Locale information missing for section '%s' (contains only partial translation)"
00033
00034
00035
00036 #define MAX_SOUNDS 50
00037 #define MAX_TILES 256
00038 #define MAX_WEAPONS 25
00039 #define MAX_ITEMS 25
00040 #define MAX_ENEMIES 25
00041
00042 #define MAX_HEALTH 10
00043
00044
00045
00046 #define DEAD_ALIVE 0
00047 #define DEAD_DYING 1
00048 #define DEAD_DEAD 2
00049
00050
00051
00052 #define SECTION_INTRO 0
00053 #define SECTION_TITLE 1
00054 #define SECTION_HUB 2
00055 #define SECTION_GAME 3
00056 #define SECTION_GAMEOVER 4
00057 #define SECTION_CREDITS 5
00058 #define SECTION_EASYOVER 6
00059
00060
00061
00062
00063
00064
enum {
00065
00066
SND_WATERIN,
00067
SND_WATEROUT,
00068
SND_ITEM,
00069
SND_PISTOL,
00070
SND_RICO1,
00071
SND_RICO2,
00072
SND_MACHINEGUN,
00073
SND_DEATH1,
00074
SND_DEATH2,
00075
SND_DEATH3,
00076
SND_GRENADE,
00077
SND_ROCKET,
00078
SND_FIREBALL,
00079
SND_HIT,
00080
SND_SPLAT,
00081
SND_TELEPORT1,
00082
SND_TELEPORT2,
00083
SND_TELEPORT3,
00084
SND_GETWEAPON,
00085
SND_LASER,
00086
SND_ELECDEATH1,
00087
SND_ELECDEATH2,
00088
SND_ELECDEATH3,
00089
SND_LOCKEDDOOR,
00090
SND_OPENDOOR,
00091
SND_SWITCH1,
00092
SND_SWITCH2,
00093
SND_DROWNING,
00094
SND_AMBIANCE,
00095
SND_GULP,
00096
SND_EAT,
00097
SND_THROW,
00098
SND_GRBOUNCE,
00099
SND_DOOROPENED,
00100
SND_SPREADGUN,
00101
SND_ELECTRICITY1,
00102
SND_ELECTRICITY2,
00103
SND_ELECTRICITY3,
00104
SND_CLANG,
00105
SND_FIRECRACKLE,
00106
SND_CLOCK,
00107
SND_BOSSCUSTOM1,
00108
SND_BOSSCUSTOM2,
00109
SND_BOSSCUSTOM3,
00110
SND_BOSSCUSTOM4,
00111
SND_BOSSCUSTOM5,
00112
SND_POP,
00113
SND_STONEBREAK,
00114
SND_CHEAT =
MAX_SOUNDS - 3,
00115
SND_HIGHLIGHT =
MAX_SOUNDS - 2,
00116
SND_SELECT =
MAX_SOUNDS - 1
00117
00118 };
00119
00120
00121
00122 #define CH_ANY -1
00123 #define CH_WEAPON 0
00124 #define CH_ITEM 1
00125 #define CH_EXPLODE 3
00126 #define CH_DEATH 4
00127 #define CH_TOUCH 5
00128 #define CH_AMBIANCE 6
00129 #define CH_SPAWN 7
00130
00131
00132
00133 #define KEY_UP 0
00134 #define KEY_DOWN 1
00135 #define KEY_LEFT 2
00136 #define KEY_RIGHT 3
00137 #define KEY_FIRE 4
00138 #define KEY_MAP 5
00139 #define KEY_PAUSE 6
00140 #define KEY_JETPACK 7
00141
00142
00143
00144
00145 const char widgetName[][25] = {
00146
00147
"BUTTON",
00148
"RADIO",
00149
"SMOOTH_SLIDER",
00150
"SLIDER",
00151
"LABEL",
00152
"KEYBOARD",
00153
"JOYPAD",
00154
"-1"
00155
00156 };
00157
00158 #define WG_BUTTON 0
00159 #define WG_RADIO 1
00160 #define WG_SMOOTH_SLIDER 2
00161 #define WG_SLIDER 3
00162 #define WG_LABEL 4
00163 #define WG_KEYBOARD 5
00164 #define WG_JOYPAD 6
00165
00166
00167
00168 const char skill[][10] = {
00169
00170
"Easy",
00171
"Normal",
00172
"Hard",
00173
"Extreme"
00174
00175 };
00176
00177
00178
00179 #define TXT_LEFT 0
00180 #define TXT_CENTERED 1
00181 #define TXT_RIGHT 2
00182
00183 #define INFO_NORMAL 0
00184 #define INFO_OBJECTIVE 1
00185 #define INFO_HINT 2
00186 #define INFO_ACTIVATE 3
00187 #define INFO_BAD 4
00188
00189
00190
00191 #define WP_PISTOL 0
00192 #define WP_MACHINEGUN 1
00193 #define WP_LASER 2
00194 #define WP_GRENADES 3
00195 #define WP_SPREAD 4
00196
00197 #define WP_ROCKETS 5
00198 #define WP_PLASMARIFLE 6
00199 #define WP_FLAMETHROWER 7
00200 #define WP_ICEGUN 8
00201 #define WP_LAVABALL1 9
00202 #define WP_LAVABALL2 10
00203 #define WP_AIMEDPISTOL 11
00204 #define WP_ALIENSPREAD 12
00205 #define WP_SHELLS 13
00206 #define WP_ROCK1 14
00207 #define WP_STALAGTITE 15
00208 #define WP_BOMB 16
00209 #define WP_ALIENLASER 17
00210 #define WP_ALIENGRENADE 18
00211 #define WP_AIMEDMACHINE 19
00212
00213
00214
00215 #define OBJ_UP 0
00216 #define OBJ_DOWN 1
00217 #define OBJ_LEFT 2
00218 #define OBJ_RIGHT 3
00219
00220 #define ENV_AIR 0
00221 #define ENV_WATER 1
00222 #define ENV_SLIME 2
00223 #define ENV_LAVA 3
00224
00225 #define PLAYER_WALK_SPEED 2.5
00226 #define PLAYER_FLY_SPEED 6
00227 #define PLAYER_JUMP_SPEED -10.25
00228
00229
00230
00231 #define PAR_WEIGHTLESS 1
00232 #define PAR_COLLIDES 2
00233
00234
00235
00236 #define EFF_BLEEDS 1
00237 #define EFF_TRAILSFIRE 2
00238 #define EFF_SMOKES 4
00239 #define EFF_WEIGHTLESS 8
00240 #define EFF_COLORED 16
00241
00242
00243
00244
enum {
00245
00246
ITEM_PISTOL,
00247
ITEM_MACHINEGUN,
00248
ITEM_LASER,
00249
ITEM_GRENADES,
00250
ITEM_SPREAD,
00251
ITEM_CHERRY,
00252
ITEM_DOUBLECHERRY,
00253
ITEM_TRIPLECHERRY,
00254
ITEM_POINTS,
00255
ITEM_POINTS2,
00256
ITEM_POINTS3,
00257
ITEM_POINTS4,
00258
ITEM_POINTS5,
00259
ITEM_POINTS6,
00260
ITEM_POINTS7,
00261
ITEM_MISC = 100,
00262
ITEM_MISC_NOSHOW,
00263
ITEM_MISC_INVISIBLE
00264
00265 };
00266
00267
00268
00269 #define MAPWIDTH 400
00270 #define MAPHEIGHT 300
00271 #define BRICKSIZE 32
00272 #define BRICKSHIFT 5
00273
00274 #define OFFSETX 320
00275 #define OFFSETY 240
00276
00277 #define MAP_AIR 0
00278 #define MAP_WATER 1
00279 #define MAP_SLIME 2
00280 #define MAP_LAVA 3
00281 #define MAP_BREAKABLE 4
00282 #define MAP_BREAKABLE2 8
00283 #define MAP_SOLID 9
00284 #define MAP_NORESET 115
00285 #define MAP_DECORATION 120
00286 #define MAP_EXITSIGN 196
00287 #define MAP_WATERANIM 200
00288 #define MAP_SLIMEANIM 207
00289 #define MAP_LAVAANIM 214
00290 #define MAP_TOPLAYER 221
00291
00292 #define MAP_SHAKEAMOUNT 2
00293
00294
00295
00296 #define MIAPERCENT 0.70
00297
00298
00299
00300 #define MIS_INPROGRESS 0
00301 #define MIS_COMPLETE 1
00302 #define MIS_PLAYEROUT 2
00303 #define MIS_PLAYERDEAD 3
00304 #define MIS_PLAYERQUIT 4
00305 #define MIS_PLAYERESCAPE 5
00306 #define MIS_GAMECOMPLETE 6
00307 #define MIS_TIMEUP 7
00308 #define MIS_PLAYERRESTART 8
00309
00310
00311
00312
#ifndef USEPAK
00313 #define USEPAK 1
00314
#endif
00315
#ifndef PAKLOCATION
00316 #define PAKLOCATION ""
00317
#endif
00318
#ifndef PAKNAME
00319 #define PAKNAME "blobwars.pak"
00320
#endif
00321
#ifndef PAKFULLPATH
00322 #define PAKFULLPATH PAKLOCATION PAKNAME
00323
#endif
00324
#ifndef PATH_MAX
00325 #define PATH_MAX 4096
00326
#endif
00327
#ifndef GAMEPLAYMANUAL
00328 #define GAMEPLAYMANUAL "manual.html"
00329
#endif
00330
00331
enum {
00332
00333
PAK_IMG,
00334
PAK_SOUND,
00335
PAK_MUSIC,
00336
PAK_DATA,
00337
PAK_FONT
00338 };
00339
00340
00341
00342
#if USEPAK
00343 #define debug(x) {printf("*** DEBUG: "); printf x;}
00344
#else
00345
#define debug(x) {printf("*** DEBUG: "); printf x;}
00346
#endif
00347
00348
#ifndef IGNORE_FLAGTOKEN_ERRORS
00349 #define IGNORE_FLAGTOKEN_ERRORS 0
00350
#endif
00351
Generated on Thu Dec 2 20:26:02 2004 for Blob Wars : Metal Blob Solid by
1.3.7