| 1 | /* |
| 2 | * OpenTyrian: A modern cross-platform port of Tyrian |
| 3 | * Copyright (C) 2007-2009 The OpenTyrian Development Team |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (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, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | #ifndef CONFIG_H |
| 20 | #define CONFIG_Hcxx . . $ `src/config.h:20:9`! |
| 21 | |
| 22 | #include "opentyr.h"cxx . . $ `<file>/src/opentyr.h`/ |
| 23 | #include "config_file.h"cxx . . $ `<file>/src/config_file.h`/ |
| 24 | |
| 25 | #include "SDL.h" |
| 26 | |
| 27 | #include <stdio.h> |
| 28 | |
| 29 | #define SAVE_FILES_NUMcxx . . $ `src/config.h:29:9`! (11 * 2) |
| 30 | |
| 31 | /* These are necessary because the size of the structure has changed from the original, but we |
| 32 | need to know the original sizes in order to find things in TYRIAN.SAV */ |
| 33 | #define SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! 2398 |
| 34 | #define SIZEOF_SAVEGAMETEMPcxx . . $ `src/config.h:34:9`! SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! + 4 + 100 |
| 35 | #define SAVE_FILE_SIZEcxx . . $ `src/config.h:35:9`! (SIZEOF_SAVEGAMETEMPcxx . . $ `src/config.h:34:9`! - 4) |
| 36 | |
| 37 | /*#define SAVE_FILES_SIZE (2502 - 4) |
| 38 | #define SAVE_FILE_SIZE (SAVE_FILES_SIZE)*/ |
| 39 | |
| 40 | enumcxx . . $ $anonymous_type_5227559294d527ce_0# |
| 41 | { |
| 42 | DIFFICULTY_WIMPcxx . . $ DIFFICULTY_WIMP. = 0, |
| 43 | DIFFICULTY_EASYcxx . . $ DIFFICULTY_EASY., |
| 44 | DIFFICULTY_NORMALcxx . . $ DIFFICULTY_NORMAL., |
| 45 | DIFFICULTY_HARDcxx . . $ DIFFICULTY_HARD., |
| 46 | DIFFICULTY_IMPOSSIBLEcxx . . $ DIFFICULTY_IMPOSSIBLE., |
| 47 | DIFFICULTY_INSANITYcxx . . $ DIFFICULTY_INSANITY., |
| 48 | DIFFICULTY_SUICIDEcxx . . $ DIFFICULTY_SUICIDE., |
| 49 | DIFFICULTY_MANIACALcxx . . $ DIFFICULTY_MANIACAL., |
| 50 | DIFFICULTY_ZINGLONcxx . . $ DIFFICULTY_ZINGLON., // aka Lord of the Game |
| 51 | DIFFICULTY_NORTANEOUScxx . . $ DIFFICULTY_NORTANEOUS., |
| 52 | DIFFICULTY_10cxx . . $ DIFFICULTY_10., |
| 53 | }; |
| 54 | |
| 55 | // NOTE: Do not reorder. This ordering corresponds to the keyboard |
| 56 | // configuration menu and to the bits stored in demo files. |
| 57 | enumcxx . . $ $anonymous_type_5227559294d527ce_1# |
| 58 | { |
| 59 | KEY_SETTING_UPcxx . . $ KEY_SETTING_UP., |
| 60 | KEY_SETTING_DOWNcxx . . $ KEY_SETTING_DOWN., |
| 61 | KEY_SETTING_LEFTcxx . . $ KEY_SETTING_LEFT., |
| 62 | KEY_SETTING_RIGHTcxx . . $ KEY_SETTING_RIGHT., |
| 63 | KEY_SETTING_FIREcxx . . $ KEY_SETTING_FIRE., |
| 64 | KEY_SETTING_CHANGE_FIREcxx . . $ KEY_SETTING_CHANGE_FIRE., |
| 65 | KEY_SETTING_LEFT_SIDEKICKcxx . . $ KEY_SETTING_LEFT_SIDEKICK., |
| 66 | KEY_SETTING_RIGHT_SIDEKICKcxx . . $ KEY_SETTING_RIGHT_SIDEKICK., |
| 67 | }; |
| 68 | |
| 69 | typedef JE_bytecxx . . $ JE_byte# DosKeySettingscxx . . $ DosKeySettings#[8]; // fka KeySettingType |
| 70 | |
| 71 | typedef SDL_Scancodecxx . . $ SDL_Scancode# KeySettingscxx . . $ KeySettings#[8]; |
| 72 | |
| 73 | typedef JE_bytecxx . . $ JE_byte# JE_PItemsTypecxx . . $ JE_PItemsType#[12]; /* [1..12] */ |
| 74 | |
| 75 | typedef JE_bytecxx . . $ JE_byte# JE_EditorItemAvailTypecxx . . $ JE_EditorItemAvailType#[100]; /* [1..100] */ |
| 76 | |
| 77 | typedef structcxx . . $ $anonymous_type_5227559294d527ce_2# |
| 78 | { |
| 79 | JE_wordcxx . . $ JE_word# encodecxx . . $ $anonymous_type_5227559294d527ce_2#encode.; |
| 80 | JE_wordcxx . . $ JE_word# levelcxx . . $ $anonymous_type_5227559294d527ce_2#level.; |
| 81 | JE_PItemsTypecxx . . $ JE_PItemsType# itemscxx . . $ $anonymous_type_5227559294d527ce_2#items.; |
| 82 | JE_longintcxx . . $ JE_longint# scorecxx . . $ $anonymous_type_5227559294d527ce_2#score.; |
| 83 | JE_longintcxx . . $ JE_longint# score2cxx . . $ $anonymous_type_5227559294d527ce_2#score2.; |
| 84 | char levelNamecxx . . $ $anonymous_type_5227559294d527ce_2#levelName.[11]; /* string [9]; */ /* SYN: Added one more byte to match lastLevelName below */ |
| 85 | JE_charcxx . . $ JE_char# namecxx . . $ $anonymous_type_5227559294d527ce_2#name.[15]; /* [1..14] */ /* SYN: Added extra byte for null */ |
| 86 | JE_bytecxx . . $ JE_byte# cubescxx . . $ $anonymous_type_5227559294d527ce_2#cubes.; |
| 87 | JE_bytecxx . . $ JE_byte# powercxx . . $ $anonymous_type_5227559294d527ce_2#power.[2]; /* [1..2] */ |
| 88 | JE_bytecxx . . $ JE_byte# episodecxx . . $ $anonymous_type_5227559294d527ce_2#episode.; |
| 89 | JE_PItemsTypecxx . . $ JE_PItemsType# lastItemscxx . . $ $anonymous_type_5227559294d527ce_2#lastItems.; |
| 90 | JE_bytecxx . . $ JE_byte# difficultycxx . . $ $anonymous_type_5227559294d527ce_2#difficulty.; |
| 91 | JE_bytecxx . . $ JE_byte# secretHintcxx . . $ $anonymous_type_5227559294d527ce_2#secretHint.; |
| 92 | JE_bytecxx . . $ JE_byte# input1cxx . . $ $anonymous_type_5227559294d527ce_2#input1.; |
| 93 | JE_bytecxx . . $ JE_byte# input2cxx . . $ $anonymous_type_5227559294d527ce_2#input2.; |
| 94 | JE_booleancxx . . $ JE_boolean# gameHasRepeatedcxx . . $ $anonymous_type_5227559294d527ce_2#gameHasRepeated.; /*See if you went from one episode to another*/ |
| 95 | JE_bytecxx . . $ JE_byte# initialDifficultycxx . . $ $anonymous_type_5227559294d527ce_2#initialDifficulty.; |
| 96 | |
| 97 | /* High Scores - Each episode has both sets of 1&2 player selections - with 3 in each */ |
| 98 | JE_longintcxx . . $ JE_longint# highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.; |
| 99 | JE_longintcxx . . $ JE_longint# highScore2cxx . . $ $anonymous_type_5227559294d527ce_2#highScore2.; // unused |
| 100 | char highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName.[30]; /* string [29] */ |
| 101 | JE_bytecxx . . $ JE_byte# highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff.; |
| 102 | } JE_SaveFileTypecxx . . $ JE_SaveFileType#; |
| 103 | |
| 104 | typedef JE_SaveFileTypecxx . . $ JE_SaveFileType# JE_SaveFilesTypecxx . . $ JE_SaveFilesType#[SAVE_FILES_NUMcxx . . $ `src/config.h:29:9`!]; /* [1..savefilesnum] */ |
| 105 | typedef JE_bytecxx . . $ JE_byte# JE_SaveGameTempcxx . . $ JE_SaveGameTemp#[SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! + 4 + 100]; /* [1..sizeof(savefilestype) + 4 + 100] */ |
| 106 | |
| 107 | extern const JE_bytecxx . . $ JE_byte# cryptKeycxx . . $ cryptKey.[10]; |
| 108 | extern const DosKeySettingscxx . . $ DosKeySettings# defaultDosKeySettingscxx . . $ defaultDosKeySettings.; // fka defaultKeySettings |
| 109 | extern const KeySettingscxx . . $ KeySettings# defaultKeySettingscxx . . $ defaultKeySettings.; |
| 110 | extern const char defaultHighScoreNamescxx . . $ defaultHighScoreNames.[34][23]; |
| 111 | extern const char defaultTeamNamescxx . . $ defaultTeamNames.[22][25]; |
| 112 | extern const JE_EditorItemAvailTypecxx . . $ JE_EditorItemAvailType# initialItemAvailcxx . . $ initialItemAvail.; |
| 113 | extern JE_booleancxx . . $ JE_boolean# smoothiescxx . . $ smoothies.[9]; |
| 114 | extern JE_bytecxx . . $ JE_byte# starShowVGASpecialCodecxx . . $ starShowVGASpecialCode.; |
| 115 | extern JE_wordcxx . . $ JE_word# lastCubeMaxcxx . . $ lastCubeMax., cubeMaxcxx . . $ cubeMax.; |
| 116 | extern JE_wordcxx . . $ JE_word# cubeListcxx . . $ cubeList.[4]; |
| 117 | extern JE_booleancxx . . $ JE_boolean# gameHasRepeatedcxx . . $ gameHasRepeated.; |
| 118 | extern JE_shortintcxx . . $ JE_shortint# difficultyLevelcxx . . $ difficultyLevel., oldDifficultyLevelcxx . . $ oldDifficultyLevel., initialDifficultycxx . . $ initialDifficulty.; |
| 119 | extern uintcxx . . $ uint# powercxx . . $ power., lastPowercxx . . $ lastPower., powerAddcxx . . $ powerAdd.; |
| 120 | extern JE_bytecxx . . $ JE_byte# shieldWaitcxx . . $ shieldWait., shieldTcxx . . $ shieldT.; |
| 121 | |
| 122 | enumcxx . . $ $anonymous_type_5227559294d527ce_3# |
| 123 | { |
| 124 | SHOT_FRONTcxx . . $ SHOT_FRONT., |
| 125 | SHOT_REARcxx . . $ SHOT_REAR., |
| 126 | SHOT_LEFT_SIDEKICKcxx . . $ SHOT_LEFT_SIDEKICK., |
| 127 | SHOT_RIGHT_SIDEKICKcxx . . $ SHOT_RIGHT_SIDEKICK., |
| 128 | SHOT_MISCcxx . . $ SHOT_MISC., |
| 129 | SHOT_P2_CHARGEcxx . . $ SHOT_P2_CHARGE., |
| 130 | SHOT_P1_SUPERBOMBcxx . . $ SHOT_P1_SUPERBOMB., |
| 131 | SHOT_P2_SUPERBOMBcxx . . $ SHOT_P2_SUPERBOMB., |
| 132 | SHOT_SPECIALcxx . . $ SHOT_SPECIAL., |
| 133 | SHOT_NORTSPARKScxx . . $ SHOT_NORTSPARKS., |
| 134 | SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2. |
| 135 | }; |
| 136 | |
| 137 | extern JE_bytecxx . . $ JE_byte# shotRepeatcxx . . $ shotRepeat.[11], shotMultiPoscxx . . $ shotMultiPos.[11]; |
| 138 | extern JE_booleancxx . . $ JE_boolean# portConfigChangecxx . . $ portConfigChange., portConfigDonecxx . . $ portConfigDone.; |
| 139 | extern char lastLevelNamecxx . . $ lastLevelName.[11], levelNamecxx . . $ levelName.[11]; |
| 140 | extern JE_bytecxx . . $ JE_byte# mainLevelcxx . . $ mainLevel., nextLevelcxx . . $ nextLevel., saveLevelcxx . . $ saveLevel.; |
| 141 | extern DosKeySettingscxx . . $ DosKeySettings# dosKeySettingscxx . . $ dosKeySettings.; // fka keySettings |
| 142 | extern KeySettingscxx . . $ KeySettings# keySettingscxx . . $ keySettings.; |
| 143 | extern JE_shortintcxx . . $ JE_shortint# levelFiltercxx . . $ levelFilter., levelFilterNewcxx . . $ levelFilterNew., levelBrightnesscxx . . $ levelBrightness., levelBrightnessChgcxx . . $ levelBrightnessChg.; |
| 144 | extern JE_booleancxx . . $ JE_boolean# filtrationAvailcxx . . $ filtrationAvail., filterActivecxx . . $ filterActive., filterFadecxx . . $ filterFade., filterFadeStartcxx . . $ filterFadeStart.; |
| 145 | extern JE_booleancxx . . $ JE_boolean# gameJustLoadedcxx . . $ gameJustLoaded.; |
| 146 | extern JE_booleancxx . . $ JE_boolean# galagaModecxx . . $ galagaMode.; |
| 147 | extern JE_booleancxx . . $ JE_boolean# extraGamecxx . . $ extraGame.; |
| 148 | extern JE_booleancxx . . $ JE_boolean# twoPlayerModecxx . . $ twoPlayerMode., twoPlayerLinkedcxx . . $ twoPlayerLinked., onePlayerActioncxx . . $ onePlayerAction., superTyriancxx . . $ superTyrian., trentWincxx . . $ trentWin.; |
| 149 | extern JE_bytecxx . . $ JE_byte# superArcadeModecxx . . $ superArcadeMode.; |
| 150 | extern JE_bytecxx . . $ JE_byte# superArcadePowerUpcxx . . $ superArcadePowerUp.; |
| 151 | extern JE_realcxx . . $ JE_real# linkGunDireccxx . . $ linkGunDirec.; |
| 152 | extern JE_bytecxx . . $ JE_byte# inputDevicecxx . . $ inputDevice.[2]; |
| 153 | extern JE_bytecxx . . $ JE_byte# secretHintcxx . . $ secretHint.; |
| 154 | extern JE_bytecxx . . $ JE_byte# background3overcxx . . $ background3over.; |
| 155 | extern JE_bytecxx . . $ JE_byte# background2overcxx . . $ background2over.; |
| 156 | extern JE_bytecxx . . $ JE_byte# gammaCorrectioncxx . . $ gammaCorrection.; |
| 157 | extern JE_booleancxx . . $ JE_boolean# superPausecxx . . $ superPause., explosionTransparentcxx . . $ explosionTransparent., youAreCheatingcxx . . $ youAreCheating., displayScorecxx . . $ displayScore., background2cxx . . $ background2., smoothScrollcxx . . $ smoothScroll., wildcxx . . $ wild., superWildcxx . . $ superWild., starActivecxx . . $ starActive., topEnemyOvercxx . . $ topEnemyOver., skyEnemyOverAllcxx . . $ skyEnemyOverAll., background2notTransparentcxx . . $ background2notTransparent.; |
| 158 | extern JE_bytecxx . . $ JE_byte# versionNumcxx . . $ versionNum.; |
| 159 | extern JE_bytecxx . . $ JE_byte# fastPlaycxx . . $ fastPlay.; |
| 160 | extern JE_booleancxx . . $ JE_boolean# pentiumModecxx . . $ pentiumMode.; |
| 161 | extern JE_bytecxx . . $ JE_byte# gameSpeedcxx . . $ gameSpeed.; |
| 162 | extern JE_bytecxx . . $ JE_byte# processorTypecxx . . $ processorType.; |
| 163 | extern JE_SaveFilesTypecxx . . $ JE_SaveFilesType# saveFilescxx . . $ saveFiles.; |
| 164 | extern JE_SaveGameTempcxx . . $ JE_SaveGameTemp# saveTempcxx . . $ saveTemp.; |
| 165 | extern JE_wordcxx . . $ JE_word# editorLevelcxx . . $ editorLevel.; |
| 166 | |
| 167 | extern Configcxx . . $ Config# opentyrian_configcxx . . $ opentyrian_config.; |
| 168 | |
| 169 | void JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(void); |
| 170 | void JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(void); |
| 171 | const char *get_user_directorycxx . . $ get_user_directory(33a1f659e94feb42).(void); |
| 172 | void JE_loadConfigurationcxx . . $ JE_loadConfiguration(49f6e7a06ebc5aa8).(void); |
| 173 | void JE_saveConfigurationcxx . . $ JE_saveConfiguration(49f6e7a06ebc5aa8).(void); |
| 174 | |
| 175 | void JE_saveGamecxx . . $ JE_saveGame(9d0d6db36a0a8a6f).(JE_bytecxx . . $ JE_byte# slot, const char *name); |
| 176 | void JE_loadGamecxx . . $ JE_loadGame(ac50b47256ae7414).(JE_bytecxx . . $ JE_byte# slot); |
| 177 | |
| 178 | void JE_encryptSaveTempcxx . . $ JE_encryptSaveTemp(49f6e7a06ebc5aa8).(void); |
| 179 | void JE_decryptSaveTempcxx . . $ JE_decryptSaveTemp(49f6e7a06ebc5aa8).(void); |
| 180 | |
| 181 | #endif /* CONFIG_H */ |