Rev 1 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | /* |
| 2 | SDLPoP, a port/conversion of the DOS game Prince of Persia. |
||
| 3 | Copyright (C) 2013-2018 Dávid Nagy |
||
| 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 | The authors of this program may be contacted at http://forum.princed.org |
||
| 19 | */ |
||
| 20 | |||
| 21 | #ifndef CONFIG_H |
||
| 22 | #define CONFIG_H |
||
| 23 | |||
| 24 | // WINDOWS overrides |
||
| 25 | #ifdef _MSC_VER |
||
| 26 | #define strncasecmp _strnicmp |
||
| 27 | #define strcasecmp _stricmp |
||
| 28 | #endif |
||
| 29 | |||
| 30 | #define POP_MAX_PATH 256 |
||
| 31 | #define POP_MAX_OPTIONS_SIZE 256 |
||
| 32 | |||
| 33 | #define SDLPOP_VERSION "1.17" |
||
| 34 | #define WINDOW_TITLE "Prince of Persia" |
||
| 35 | |||
| 36 | // Enable or disable fading. |
||
| 37 | // Fading used to be very buggy, but now it works correctly. |
||
| 38 | #define USE_FADE |
||
| 39 | |||
| 40 | // Enable or disable the potions level. (copy protection) |
||
| 41 | #define USE_COPYPROT |
||
| 42 | |||
| 43 | // Enable or disable flashing. |
||
| 44 | #define USE_FLASH |
||
| 45 | |||
| 46 | //#define USE_ALPHA |
||
| 47 | |||
| 48 | // Enable or disable texts. |
||
| 49 | #define USE_TEXT |
||
| 50 | |||
| 51 | // Use timers in a way that is more similar to the original game. |
||
| 52 | // Was needed for the correct fading of cutscenes. |
||
| 53 | // Disabled, because it introduces some timing bugs. |
||
| 54 | //#define USE_COMPAT_TIMER |
||
| 55 | |||
| 56 | // Use mixer and enable music. |
||
| 57 | #define USE_MIXER |
||
| 6 | pmbaty | 58 | #define MIX_VOLUME 1//MIX_MAX_VOLUME //1 |
| 1 | pmbaty | 59 | |
| 60 | // Enable quicksave/load feature. |
||
| 61 | #define USE_QUICKSAVE |
||
| 62 | |||
| 63 | // Try to let time keep running out when quickloading. (similar to Ctrl+A) |
||
| 64 | // Technically, the 'remaining time' is still restored, but with a penalty for elapsed time (up to 1 minute). |
||
| 65 | // The one minute penalty will also be applied when quickloading from e.g. the title screen. |
||
| 66 | #define USE_QUICKLOAD_PENALTY |
||
| 67 | |||
| 68 | // Enable recording/replay feature. |
||
| 69 | #define USE_REPLAY |
||
| 70 | |||
| 71 | // Adds a way to crouch immediately after climbing up: press down and forward simultaneously. |
||
| 72 | // In the original game, this could not be done (pressing down always causes the kid to climb down). |
||
| 73 | #define ALLOW_CROUCH_AFTER_CLIMBING |
||
| 74 | |||
| 75 | // Time runs out while the level ending music plays; however, the music can be skipped by disabling sound. |
||
| 76 | // This option stops time while the ending music is playing (so there is no need to disable sound). |
||
| 77 | #define FREEZE_TIME_DURING_END_MUSIC |
||
| 78 | |||
| 79 | // Enable fake/invisible tiles feature. Tiles may look like one tiletype but behave like another. |
||
| 80 | // Currently works for empty tiles, walls, floors. |
||
| 81 | // Use tile modifier 4 to display a fake floor, 5 to display a fake wall, 6 to display an empty tile |
||
| 82 | // For now, for fake dungeon walls, the wall neighbors must be specified for now using tile modifiers: |
||
| 83 | // 5 or 50 = no neighbors; 51 = wall to the right; 52 = wall to the left; 53 = walls on both sides |
||
| 84 | // For fake palace walls: |
||
| 85 | // 5 = wall including blue line; 50 = no blue |
||
| 86 | #define USE_FAKE_TILES |
||
| 87 | |||
| 88 | // Allow guard hitpoints not resetting to their default (maximum) value when re-entering the room |
||
| 89 | #define REMEMBER_GUARD_HP |
||
| 90 | |||
| 91 | // Enable completely disabling the time limit. To use this feature, set the starting time to -1. |
||
| 92 | // This also disables the in-game messages that report how much time is left every minute. |
||
| 93 | // The elasped time is still kept track of, so that the shortest times will appear in the Hall of Fame. |
||
| 94 | #define ALLOW_INFINITE_TIME |
||
| 95 | |||
| 96 | |||
| 97 | // Bugfixes: |
||
| 98 | |||
| 99 | // The mentioned tricks can be found here: http://www.popot.org/documentation.php?doc=Tricks |
||
| 100 | |||
| 101 | // If a room is linked to itself on the left, the closing sounds of the gates in that room can't be heard. |
||
| 102 | #define FIX_GATE_SOUNDS |
||
| 103 | |||
| 104 | // An open gate or chomper may enable the Kid to go through walls. (Trick 7, 37, 62) |
||
| 105 | #define FIX_TWO_COLL_BUG |
||
| 106 | |||
| 107 | // If a room is linked to itself at the bottom, and the Kid's column has no floors, the game hangs. |
||
| 108 | #define FIX_INFINITE_DOWN_BUG |
||
| 109 | |||
| 110 | // When a gate is under another gate, the top of the bottom gate is not visible. |
||
| 111 | // But this fix causes a drawing bug when a gate opens. |
||
| 112 | #define FIX_GATE_DRAWING_BUG |
||
| 113 | |||
| 114 | // When climbing up to a floor with a big pillar top behind, turned right, Kid sees through floor. |
||
| 115 | #define FIX_BIGPILLAR_CLIMB |
||
| 116 | |||
| 117 | // When climbing up two floors, turning around and jumping upward, the kid falls down. |
||
| 118 | // This fix makes the workaround of Trick 25 unnecessary. |
||
| 119 | #define FIX_JUMP_DISTANCE_AT_EDGE |
||
| 120 | |||
| 121 | // When climbing to a higher floor, the game unnecessarily checks how far away the edge below is; |
||
| 122 | // This contributes to sometimes "teleporting" considerable distances when climbing from firm ground |
||
| 123 | #define FIX_EDGE_DISTANCE_CHECK_WHEN_CLIMBING |
||
| 124 | |||
| 125 | // Falling from a great height directly on top of guards does not hurt. |
||
| 126 | #define FIX_PAINLESS_FALL_ON_GUARD |
||
| 127 | |||
| 128 | // Bumping against a wall may cause a loose floor below to drop, even though it has not been touched. (Trick 18, 34) |
||
| 129 | #define FIX_WALL_BUMP_TRIGGERS_TILE_BELOW |
||
| 130 | |||
| 131 | // When pressing a loose tile, you can temporarily stand on thin air by standing up from crouching. |
||
| 132 | #define FIX_STAND_ON_THIN_AIR |
||
| 133 | |||
| 134 | // Buttons directly to the right of gates can be pressed even though the gate is closed (Trick 1) |
||
| 135 | #define FIX_PRESS_THROUGH_CLOSED_GATES |
||
| 136 | |||
| 137 | // By jumping and bumping into a wall, you can sometimes grab a ledge two stories down (which should not be possible). |
||
| 138 | #define FIX_GRAB_FALLING_SPEED |
||
| 139 | |||
| 140 | // When chomped, skeletons cause the chomper to become bloody even though skeletons do not have blood. |
||
| 141 | #define FIX_SKELETON_CHOMPER_BLOOD |
||
| 142 | |||
| 143 | // Controls do not get released properly when drinking a potion, sometimes causing unintended movements. |
||
| 144 | #define FIX_MOVE_AFTER_DRINK |
||
| 145 | |||
| 146 | // A drawing bug occurs when a loose tile is placed to the left of a potion (or sword). |
||
| 147 | #define FIX_LOOSE_LEFT_OF_POTION |
||
| 148 | |||
| 149 | // Guards may "follow" the kid to the room on the left or right, even though there is a closed gate in between. |
||
| 150 | #define FIX_GUARD_FOLLOWING_THROUGH_CLOSED_GATES |
||
| 151 | |||
| 152 | // When landing on the edge of a spikes tile, it is considered safe. (Trick 65) |
||
| 153 | #define FIX_SAFE_LANDING_ON_SPIKES |
||
| 154 | |||
| 155 | // The kid may glide through walls after turning around while running (especially when weightless). |
||
| 156 | #define FIX_GLIDE_THROUGH_WALL |
||
| 157 | |||
| 158 | // The kid can drop down through a closed gate, when there is a tapestry (doortop) above the gate. |
||
| 159 | #define FIX_DROP_THROUGH_TAPESTRY |
||
| 160 | |||
| 161 | // When dropping down and landing right in front of a wall, the entire landing animation should normally play. |
||
| 162 | // However, when falling against a closed gate or a tapestry(+floor) tile, the animation aborts. |
||
| 163 | // (The game considers these tiles floor tiles; so it mistakenly assumes that no x-position adjustment is needed) |
||
| 164 | #define FIX_LAND_AGAINST_GATE_OR_TAPESTRY |
||
| 165 | |||
| 166 | // Sometimes, the kid may automatically strike immediately after drawing the sword. |
||
| 167 | // This especially happens when dropping down from a higher floor and then turning towards the opponent. |
||
| 168 | #define FIX_UNINTENDED_SWORD_STRIKE |
||
| 169 | |||
| 170 | // By repeatedly pressing 'back' in a swordfight, you can retreat out of a room without the room changing. (Trick 35) |
||
| 171 | #define FIX_RETREAT_WITHOUT_LEAVING_ROOM |
||
| 172 | |||
| 173 | // The kid can jump through a tapestry with a running jump to the left, if there is a floor above it. |
||
| 174 | #define FIX_RUNNING_JUMP_THROUGH_TAPESTRY |
||
| 175 | |||
| 176 | // Guards can be pushed into walls, because the game does not correctly check for walls located behind a guard. |
||
| 177 | #define FIX_PUSH_GUARD_INTO_WALL |
||
| 178 | |||
| 179 | // By doing a running jump into a wall, you can fall behind a closed gate two floors down. (e.g. skip in Level 7) |
||
| 180 | #define FIX_JUMP_THROUGH_WALL_ABOVE_GATE |
||
| 181 | |||
| 182 | // If you grab a ledge that is one or more floors down, the chompers on that row will not start. |
||
| 183 | #define FIX_CHOMPERS_NOT_STARTING |
||
| 184 | |||
| 185 | // As soon as a level door has completely opened, the feather fall effect is interrupted because the sound stops. |
||
| 186 | #define FIX_FEATHER_INTERRUPTED_BY_LEVELDOOR |
||
| 187 | |||
| 188 | // Guards will often not reappear in another room if they have been pushed (partly or entirely) offscreen. |
||
| 189 | #define FIX_OFFSCREEN_GUARDS_DISAPPEARING |
||
| 190 | |||
| 191 | // Controls do not get released properly when putting the sword away, leading to unintended movement. |
||
| 192 | #define FIX_MOVE_AFTER_SHEATHE |
||
| 193 | |||
| 194 | |||
| 195 | // Debug features: |
||
| 196 | |||
| 197 | // When the program starts, check whether the deobfuscated sequence table (seqtbl.c) is correct. |
||
| 198 | //#define CHECK_SEQTABLE_MATCHES_ORIGINAL |
||
| 199 | |||
| 200 | // Enable debug cheats (with command-line argument "debug") |
||
| 201 | // "[" and "]" : nudge x position by one pixel |
||
| 202 | // "T" : display remaining time in minutes, seconds and ticks |
||
| 203 | #define USE_DEBUG_CHEATS |
||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | // Darken those parts of the screen that are not near a torch. |
||
| 208 | #define USE_LIGHTING |
||
| 209 | |||
| 210 | // Enable screenshot features. |
||
| 211 | #define USE_SCREENSHOT |
||
| 212 | |||
| 213 | // Automatically switch to keyboard or joystick/gamepad mode if there is input from that device. |
||
| 214 | // Useful if SDL detected a gamepad but there is none. |
||
| 215 | #define USE_AUTO_INPUT_MODE |
||
| 216 | |||
| 217 | // Default SDL_Joystick button values |
||
| 218 | #define SDL_JOYSTICK_BUTTON_Y 2 |
||
| 219 | #define SDL_JOYSTICK_BUTTON_X 3 |
||
| 220 | #define SDL_JOYSTICK_X_AXIS 0 |
||
| 221 | #define SDL_JOYSTICK_Y_AXIS 1 |
||
| 222 | |||
| 223 | #endif |