1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * Additional copyright for this file: 8 * Copyright (C) 1995 Presto Studios, Inc. 9 * 10 * This program is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU General Public License 12 * as published by the Free Software Foundation; either version 2 13 * of the License, or (at your option) any later version. 14 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 23 * 24 */ 25 26 #ifndef BURIED_GLOBAL_FLAGS_H 27 #define BURIED_GLOBAL_FLAGS_H 28 29 #include "common/scummsys.h" 30 31 namespace Buried { 32 33 // This is the struct that holds all the global variables for the game 34 // Originally, it was just a 1024 byte block of data with offsets into it 35 // (There clearly aren't enough variables) 36 // For double-fun, they still need to be accessed by index for AI support 37 // -> It therefore needs to be packed (Yes, this is totally evil) 38 // This is all horrible, really. Avert your eyes. 39 40 #include "common/pack-start.h" 41 42 struct GlobalFlags { 43 byte cgWallExploded; // 0 44 byte cgHookPresent; // 1 45 byte cgArrowPresent; // 2 46 byte cgHammerPresent; // 3 47 byte cgSmithyStatus; // 4 48 byte cgSmithyGuard; // 5 49 byte cgBaileyOneWayGuard; // 6 50 byte cgBaileyTwoWayGuards; // 7 51 byte cgTapestryFlag; // 8 52 byte cgBurnedLetterPresent; // 9 53 byte cgGoldCoinsPresent; // 10 54 byte cgStorageRoomVisit; // 11 55 byte bcTranslateEnabled; // 12 56 byte bcCloakingEnabled; // 13 57 byte bcLocateEnabled; // 14 58 byte myPickedUpCeramicBowl; // 15 59 byte myTPCodeWheelStatus; // 16 60 byte myTPCodeWheelLeftIndex; // 17 61 byte myTPCodeWheelRightIndex; // 18 62 byte myMCPickedUpSkull; // 19 63 byte myMCDeathGodOfferings; // 20 64 byte myWGPlacedRope; // 21 65 byte myWGRetrievedJadeBlock; // 22 66 byte myWTRetrievedLimestoneBlock; // 23 67 byte myWTCurrentBridgeStatus; // 24 68 byte myAGRetrievedEntrySkull; // 25 69 byte myAGRetrievedSpearSkull; // 26 70 byte myAGRetrievedCopperMedal; // 27 71 byte myAGRetrievedObsidianBlock; // 28 72 byte myAGHeadAStatus; // 29 73 byte myAGHeadBStatus; // 30 74 byte myAGHeadCStatus; // 31 75 byte myAGHeadDStatus; // 32 76 byte myAGHeadAStatusSkullID; // 33 77 byte myAGHeadBStatusSkullID; // 34 78 byte myAGHeadCStatusSkullID; // 35 79 byte myAGHeadDStatusSkullID; // 36 80 byte myAGTimerHeadID; // 37 81 uint32 myAGTimerStartTime; // 38-41 82 byte myDGOfferedHeart; // 42 83 byte takenEnvironCart; // 43 84 byte alRDTakenLiveCore; // 44 85 byte alRDTakenDeadCore; // 45 86 byte alNMWrongAlienPrefixCode; // 46 87 byte faKIOvenStatus; // 47 88 byte faKIPostBoxSlotA; // 48 89 byte faKIPostBoxSlotB; // 49 90 byte faKIPostBoxSlotC; // 50 91 byte faERCurrentCartridge; // 51 92 byte faERTakenRemoteControl; // 52 93 byte myMCStingerID; // 53 94 byte myMCStingerChannelID; // 54 95 byte faStingerID; // 55 96 byte faStingerChannelID; // 56 97 byte unused0[3]; // 57-59 98 uint32 cgMWCatapultData; // 60-63 99 uint32 cgMWCatapultOffset; // 64-67 100 byte cgTSTriedDoor; // 68 101 byte cgMBCrossedMoat; // 69 102 byte cgKSSmithyEntryRead; // 70 103 byte cgKSSmithyEntryTranslated; // 71 104 byte cgBSFoundMold; // 72 105 byte readBurnedLetter; // 73 106 byte evcapNumCaptured; // 74 107 byte evcapBaseID[12]; // 75-86 108 byte unused1[3]; // 87-89 109 byte faMNEnvironDoor; // 90 110 byte faMNClockClicked; // 91 111 byte faMNBooksClicked; // 92 112 byte faMNTazClicked; // 93 113 byte faMNPongClicked; // 94 114 byte faKIBirdsBobbed; // 95 115 byte faKICoffeeSpilled; // 96 116 byte cgViewedKeepPlans; // 97 117 byte cgFoundChestPanel; // 98 118 byte cgTRFoundSword; // 99 119 byte faHeardAgentFigure; // 100 120 byte jumpBCNoInfoMessageCycle; // 101 121 byte myTPCalendarTopTranslated; // 102 122 byte myTPCalendarListTranslated; // 103 123 byte myTPTextTranslated; // 104 124 byte myMCTransDoor; // 105 125 byte myMCTransAGOffering; // 106 126 byte myMCTransWGOffering; // 107 127 byte myMCTransWTOffering; // 108 128 byte myMCTransDGOffering; // 109 129 byte myMCTransMadeAnOffering; // 110 130 byte myWGTransDoorTop; // 111 131 byte myWGSeenLowerPassage; // 112 132 byte myWGCrossedRopeBridge; // 113 133 byte myMCViewedDeathGodDoor; // 114 134 byte myTPTransBreathOfItzamna; // 115 135 uint32 myAGHeadAOpenedTime; // 116-119 136 uint32 myAGHeadBOpenedTime; // 120-123 137 uint32 myAGHeadCOpenedTime; // 124-127 138 uint32 myAGHeadDOpenedTime; // 128-131 139 byte myAGHeadATouched; // 132 140 byte myAGHeadBTouched; // 133 141 byte myAGHeadCTouched; // 134 142 byte myAGHeadDTouched; // 135 143 byte lensFilterActivated; // 136 144 byte dsPTElevatorPresent; // 137 145 byte dsPTElevatorLeverA; // 138 146 byte dsPTElevatorLeverB; // 139 147 byte dsPTDoorLocked; // 140 148 byte dsWSPickedUpWheelAssembly; // 141 149 byte dsWSPickedUpGearAssembly; // 142 150 byte dsWSPickedUpPegs; // 143 151 byte dsWSSiegeCycleStatus; // 144 152 byte dsWSGrabbedSiegeCycle; // 145 153 byte dsPTUseElevatorControls; // 146 154 byte dsPTTransElevatorControls; // 147 155 byte dsGDTakenCoilOfRope; // 148 156 byte dsCTUnlockedDoor; // 149 157 byte dsCTViewedAgent3; // 150 158 byte dsPTViewedAgent3; // 151 159 byte dsCTRetrievedLens; // 152 160 byte dsCTTakenHeart; // 153 161 byte dsCYFiredCannon; // 154 162 byte dsCYBallistaStatus; // 155 163 byte dsCYPlacedSiegeCycle; // 156 164 byte dsCYBallistaXPos; // 157 165 byte dsCYBallistaYPos; // 158 166 byte aiHWStingerID; // 159 167 byte aiHWStingerChannelID; // 160 168 byte aiCRStingerID; // 161 169 byte aiCRStingerChannelID; // 162 170 byte aiDBStingerID; // 163 171 byte aiDBStingerChannelID; // 164 172 byte aiCRGrabbedMetalBar; // 165 173 byte aiICGrabbedWaterCanister; // 166 174 byte aiOxygenTimer; // 167 175 byte aiCRPressurized; // 168 176 byte aiCRPressurizedAttempted; // 169 177 byte aiMRPressurized; // 170 178 byte aiIceMined; // 171 179 byte aiOxygenReserves; // 172 180 byte aiSCHeardInitialSpeech; // 173 181 byte aiSCInitialAudioChannel; // 174 182 byte aiSCDBDoorWarning; // 175 183 byte aiSCMoveCenterWarning; // 176 184 byte aiSCConversationStatus; // 177 185 byte aiHWIceDoorUnlocked; // 178 186 byte aiICWaterInFillHandle; // 179 187 byte aiICTakenWaterCanister; // 180 188 byte aiSWStingerID; // 181 189 byte aiSWStingerChannelID; // 182 190 byte aiMRCorrectFreqSet; // 183 191 byte aiSCHeardNexusDoorComment; // 184 192 byte aiSCHeardNexusDoorCode; // 185 193 byte asInitialGuardsPass; // 186 194 byte asRBPodAStatus; // 187 195 byte asRBPodBStatus; // 188 196 byte asRBPodCStatus; // 189 197 byte asRBPodDStatus; // 190 198 byte asRBPodEStatus; // 191 199 byte asRBPodFStatus; // 192 200 byte asRBPodATakenEnvironCart; // 193 201 byte asRBPodBTakenPuzzleBox; // 194 202 byte asRBPodCTakenCodex; // 195 203 byte asRBPodDTakenSculpture; // 196 204 byte asRBPodETakenSword; // 197 205 byte asTakenEvidenceThisTrip; // 198 206 byte asDangerDoorASealed; // 199 207 byte asDoorBGuardsSeen; // 200 208 byte asAmbassadorEncounter; // 201 209 byte dsCTTriedLockedDoor; // 202 210 byte dsCTCodexTranslateAttempted; // 203 211 byte dsCTCodexFormulaeFound; // 204 212 byte dsCTCodexAtlanticusPage2; // 205 213 byte dsCTTriedElevatorControls; // 206 214 byte aiDBPlayedMomComment; // 207 215 byte aiDBPlayedFirstArthur; // 208 216 byte aiDBPlayedSecondArthur; // 209 217 byte aiDBPlayedThirdArthur; // 210 218 byte aiDBPlayedFourthArthur; // 211 219 byte aiSCPlayedNoStinger; // 212 220 byte faKITakenPostboxItem; // 213 221 byte cgMBVisited; // 214 222 byte cgKCVisited; // 215 223 byte cgTRVisited; // 216 224 byte cgKSReadJournal; // 217 225 byte cgSRClickedOnLockedChest; // 218 226 byte cgSROpenedChest; // 219 227 byte dsVisitedCodexTower; // 220 228 byte dsPTRaisedPlatform; // 221 229 byte dsPTWalkedDownElevator; // 222 230 byte dsPTBeenOnBalcony; // 223 231 byte dsGDClickedOnCodexDoor; // 224 232 byte dsWSSeenCycleSketch; // 225 233 byte dsWSSeenBallistaSketch; // 226 234 byte genHadSiegeCycle; // 227 235 byte genHadDriveAssembly; // 228 236 byte genHadWheelAssembly; // 229 237 byte dsCYNeverConnectedHook; // 230 238 byte dsCYNeverShotBallista; // 231 239 byte dsCYNeverUsedCrank; // 232 240 byte dsCYNeverOpenedBalconyDoor; // 233 241 byte dsCYTranslatedCodex; // 234 242 byte dsCYTriedOpeningDoor; // 235 243 byte dsCYTriedElevator; // 236 244 byte dsCYFoundCodexes; // 237 245 byte myVisitedMainCavern; // 238 246 byte myVisitedArrowGod; // 239 247 byte myVisitedWaterGod; // 240 248 byte myVisitedWealthGod; // 241 249 byte myVisitedDeathGod; // 242 250 byte myVisitedSpecRooms; // 243 251 byte myWTSteppedOnSwings; // 244 252 byte myWTSteppedOnFarLedge; // 245 253 byte myDGOpenedPuzzleBox; // 246 254 byte myAGVisitedAltar; // 247 255 byte dsCTPlayedBallistaFalling; // 248 256 byte cgTSTriedDoorA; // 249 257 byte cgTSTriedDoorB; // 250 258 byte aiHWLastCommentPlayed; // 251 259 byte aiNXPlayedBrainComment; // 252 260 byte asRBLastStingerID; // 253 261 byte asRBStingerID; // 254 262 byte aiICProcessedOxygen; // 255 263 byte dsCYWeebleClicked; // 256 264 byte aiICUsedMiningControls; // 257 265 byte aiSWAttemptedPresMR; // 258 266 byte aiICRefilledOxygen; // 259 267 byte aiMRUsedHarmonicsInterface; // 260 268 byte alRestoreSkipAgent3Initial; // 261 269 byte unused2[38]; // 262-299 270 byte scoreGotTranslateBioChip; // 300 271 byte scoreEnteredSpaceStation; // 301 272 byte scoreDownloadedArthur; // 302 273 byte scoreFoundSculptureDiagram; // 303 274 byte scoreEnteredKeep; // 304 275 byte scoreGotKeyFromSmithy; // 305 276 byte scoreEnteredTreasureRoom; // 306 277 byte scoreFoundSwordDiamond; // 307 278 byte scoreMadeSiegeCycle; // 308 279 byte scoreEnteredCodexTower; // 309 280 byte scoreLoggedCodexEvidence; // 310 281 byte scoreEnteredMainCavern; // 311 282 byte scoreGotWealthGodPiece; // 312 283 byte scoreGotRainGodPiece; // 313 284 byte scoreGotWarGodPiece; // 314 285 byte scoreCompletedDeathGod; // 315 286 byte scoreEliminatedAgent3; // 316 287 byte scoreTransportToKrynn; // 317 288 byte scoreGotKrynnArtifacts; // 318 289 byte scoreDefeatedIcarus; // 319 290 291 // This data was modified between 1.01 and 1.03, without changing 292 // the saved game version field just to add the Louvre research 293 // boolean. The 1.01 offsets are in parentheses. 294 byte scoreResearchINNLouvreReport; // 320 (---) 295 byte scoreResearchINNHighBidder; // 321 (320) 296 byte scoreResearchINNAppeal; // 322 (321) 297 byte scoreResearchINNUpdate; // 323 (322) 298 byte scoreResearchINNJumpsuit; // 324 (323) 299 byte scoreResearchBCJumpsuit; // 325 (324) 300 byte scoreResearchMichelle; // 326 (325) 301 byte scoreResearchMichelleBkg; // 327 (326) 302 byte scoreResearchLensFilter; // 328 (327) 303 byte scoreResearchCastleFootprint; // 329 (328) 304 byte scoreResearchDaVinciFootprint; // 330 (329) 305 byte scoreResearchMorphSculpture; // 331 (330) 306 byte scoreResearchEnvironCart; // 332 (331) 307 byte scoreResearchAgent3Note; // 333 (332) 308 byte scoreResearchAgent3DaVinci; // 334 (333) 309 uint16 scoreHintsTotal; // 335-336 (334-335) 310 byte unused3[53]; // 337-389 (336-389) 311 312 byte genJumpCastleBriefing; // 390 313 byte genJumpMayanBriefing; // 391 314 byte genJumpDaVinciBriefing; // 392 315 byte genJumpStationBriefing; // 393 316 byte unused4[106]; // 394-499 317 byte generalWalkthroughMode; // 500 318 byte unused5[11]; // 501-511 319 byte aiData[512]; // 512-1023 320 } PACKED_STRUCT; 321 322 #include "common/pack-end.h" 323 324 enum { 325 kAIHWStartingValue = 100, 326 kAIICStartingValue = 100, 327 kAIOTWalkDecrement = 2, 328 kAIOTTurnDecrement = 1, 329 kAIOTWaitDecrement = 1, 330 kAIOTWaitTimePeriod = 10000 331 }; 332 333 } // End of namespace Buried 334 335 #endif 336