1 // BlinkenSisters - Hunt for the Lost Pixels 2 // Bringing back the fun of the 80s 3 // 4 // (C) 2005-07 Rene Schickbauer, Wolfgang Dautermann 5 // 6 // See LICENSE for licensing information 7 8 // This file defines the globals as external variables 9 // The globals are declared and initialized in their respective program parts 10 // 11 12 13 #ifndef GLOBALS_H 14 #define GLOBALS_H 15 16 17 /* Version number *must* include the '"' (since we use version 'numbers' like "0.5.2" it is not really a number) */ 18 19 #define VERSION "0.5.3" 20 21 /* What is the name of the Blinkensisters/Lostpixels directory? */ 22 #ifdef __WIN32__ 23 #define PROGRAMDIRECTORY "BlinkenSisters" 24 #else 25 #ifdef OLPCBUILD 26 #define PROGRAMDIRECTORY "lostpixels" 27 #else 28 #define PROGRAMDIRECTORY ".lostpixels" 29 #endif 30 #endif 31 32 // Special CD Edition? 33 #define CDEDITION 34 35 // Running on Blink-O-Mat 36 //#define BLINKOMATEDITION 37 38 // RELEASEMODE = less debug info, show intro 39 #define CAVAC_RELEASEMODE 40 41 // FULLSCREEN? 42 #ifndef CODEBLOCKS_DEBUG 43 #define ENABLE_FULLSCREEN 44 #endif // CODEBLOCKS_DEBUG 45 #define START_WITH_FULLSCREEN 46 47 // SHOW FPS? 48 #define SHOWFRAMERATE 49 50 // Allow cheats? 51 #define ALLOW_CHEATCODES 52 #define CHEATCODECHARS "abcdefghijklmnopqrstuvwxyz0123456789 " 53 54 #define NAMECODECHARS "abcdefghijklmnopqrstuvwxyz0123456789 " 55 56 // Display player coordinates? 57 #define DISPLAY_PLAYERCOORDS 58 59 // Allow ActionCapture 60 //#define ALLOW_ACTIONCAPTURE 61 #ifdef ALLOW_ACTIONCAPTURE 62 #define ACTIONCAPTURE_MAX 200 63 #define ACTIONCAPTURE_DELAY 100 64 #define ACTIONCAPTURE_HEIGHT 192 65 #define ACTIONCAPTURE_WIDTH 256 66 #endif 67 68 // Allow Position-capturing for Attrack-mode 69 //#define ALLOW_POSITIONCAPTURE 70 71 // Allow Bosskey (ESC is instant quit) 72 #define ALLOW_BOSSKEY 73 74 // Select USB JOYPAD 75 #define STD_USB_JOY_PAD 76 //#define TRUSTMASTER_FIRESTORM_JOY_PAD 77 //#define TRUSTMASTER_WIRELESS_JOY_PAD 78 //#define TRUST_USB_STEERING_WHEEL 79 80 // New colission detection? 81 //#define USE_NEWCOLDETECT 82 83 // Disable sound? 84 //#define DISABLE_SOUND 85 86 // Disable networking? 87 //#define DISABLE_NETWORK 88 89 // Include SDL and helpers 90 #include <stdlib.h> 91 #include <math.h> 92 #include "osdef.h" 93 #include "config.h" 94 95 // PATH TO RESOURCES 96 #ifndef RESPATH 97 #ifdef CAVAC_RELEASEMODE 98 #define RESPATH "" 99 #else // NO RELEASE 100 #define RESPATH "/Users/cavac/src/xcode/BlinkGame/LostPixels/lostpixels/game/software/build/Development/LostPixels.app/Contents/Resources/" 101 #endif // RELEASEMODE 102 #endif // RESPATH 103 104 // Webserver Paths 105 #ifdef ADDONTEST 106 #define HTTPSERVER "localhost" 107 #endif 108 109 #ifndef HTTPSERVER 110 #define HTTPSERVER "addon.blinkensisters.org" 111 #define HTTPBASEDIR "/V" VERSION "/" 112 #endif // NO HTTPSERVER 113 #define HTTPPORT 80 114 #define HTTPTOCFILE "toc" 115 #define HTTPDEBUG true 116 117 extern char * proxyurl ; 118 119 // Screen 120 #ifndef __OGGPLAYER 121 #ifndef OLPCBUILD 122 #define SCR_WIDTH 640 123 #define SCR_HEIGHT 480 124 #else // OLPCBUILD 125 #define SCR_WIDTH 600 126 #define SCR_HEIGHT 450 127 #endif // OLPCBUILD 128 #else // OGGPLAYER 129 #define SCR_WIDTH 400 130 #define SCR_HEIGHT 240 131 #endif 132 #define TILESIZE 32 // a tile is TILESIZE pixels wide and high 133 134 // Physics iterations per second 135 #define PHYSICSFPS 100 136 #define BLINKSPEED 2 137 #define SPECIALTILEDELAY 50 138 139 // Player movements 140 #define SPRITE_SWITCHWAIT 100 141 #define SPRITE_MAXSPEED 5 142 #define SPRITE_ACCEL 0.1 143 #define SPRITE_JUMPSPEED -4 144 #define SPRITE_GRAVITY 0.09 145 #define SPRITE_FALLSILENTTHRESHOLD 1.0 146 147 // Scores 148 #define PIXEL_SCORE 20 149 #define EXTRAPOINTS_VALUE 150 150 151 // Max. Players 152 #define MAX_PLAYERS 1 153 154 //main.cpp 155 extern SDL_Surface *gScreen; 156 157 // Last iteration's tick value 158 extern Uint32 gLastTick; 159 160 // Show info inlays? 161 //#define SHOW_INLAY 162 163 // Maximum length of RESPATH+filenames 164 #define MAX_FNAME_LENGTH 500 165 166 // Max. legth of all-purpose strings 167 #define MAX_STRING_LENGTH 1000 168 169 // Number of monster bitmaps 170 #define MAX_MONSTER_TYPES 5 171 172 // Speed dying monsters vanish 173 #define MONSTER_DIESPEED 5 174 175 // Sticky-pixels range for elevators (when standing on top) 176 #define ELEVATOR_STICKYRANGE 7 177 178 // Move-types for player and monsters 179 typedef enum _MOVE_TYPE { 180 MOVE_LEFT, 181 MOVE_RIGHT, 182 JUMP_LEFT, 183 JUMP_RIGHT, 184 NO_MOVE 185 } MOVE_TYPE; 186 187 // Input timeout for cheatcodes - in miliseconds 188 #define CHEATTIMEOUT 10000 189 extern char cheatCode[MAX_STRING_LENGTH]; 190 extern bool enteringCheat; 191 192 #ifdef ENABLE_FULLSCREEN 193 extern bool isFullscreen; 194 #endif 195 196 extern bool enableColor3D; 197 198 // Smooth panning 199 #define ALLOW_SMOOTHPANNING 200 #define SMOOTHPANNING_FACTOR 24.0 201 202 // Foreground objects 203 // Maximum number of objects 204 #define MAX_FGOBJECTS 1000 205 // Maximum number of GRAPHICS for the objects 206 #define MAX_FGOBJECTGFX 2000 207 #define PSEUDO_FGOBJECTGFXNUM 99000000 208 209 // Sound effects (FX) 210 // Maximum number of effects 211 #define MAX_FX_SAMPLES 100 212 213 // Audio buffer size 214 #ifndef AUDIOBUFFERSIZE 215 #define AUDIOBUFFERSIZE 1024 216 #endif // AUDIOBUFFERSIZE 217 218 // Maximum number of triggers 219 #define MAX_TRIGGERS 1000 220 221 // BLP (BlinkenLights) Streaming 222 extern char blphost[255] ; 223 extern short unsigned blpport ; 224 extern char mcufhost[255] ; 225 extern short unsigned mcufport ; 226 // For using BLP-Viewer in local host 227 #define BLPRANDOM_SOURCEPORT 228 #define MCUFRANDOM_SOURCEPORT 229 230 // Modern g++ wants some - in our case - completly useless constructors 231 // with are impossible to make and - as said - useless 232 // define this if you want to shut up this stupid the warnings 233 //#define SATISFY_CPP_WITH_USELESS_CONSTRUCTORS 234 235 // Include OGG/Theora support 236 //#define HASOGGSUPPORT 237 238 #endif // GLOBALS_H 239