diff options
author | Matthew Hoops | 2011-09-02 00:27:13 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-02 00:27:13 -0400 |
commit | e642906cdda1d943bcbc875c752bb7ba69c2b81e (patch) | |
tree | 492bd4dfd1b78201da7b38ad36d9db86eb17d3d8 /engines/pegasus | |
parent | 3239002dae193fa92cceb973d0cae1ffe9fef8a4 (diff) | |
download | scummvm-rg350-e642906cdda1d943bcbc875c752bb7ba69c2b81e.tar.gz scummvm-rg350-e642906cdda1d943bcbc875c752bb7ba69c2b81e.tar.bz2 scummvm-rg350-e642906cdda1d943bcbc875c752bb7ba69c2b81e.zip |
PEGASUS: Begin restructuring the game state classes
The entire game state should now be functional
Diffstat (limited to 'engines/pegasus')
34 files changed, 4095 insertions, 653 deletions
diff --git a/engines/pegasus/Game_Shell/CGameState.cpp b/engines/pegasus/Game_Shell/CGameState.cpp deleted file mode 100755 index 70a55450dd..0000000000 --- a/engines/pegasus/Game_Shell/CGameState.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "common/error.h" -#include "common/stream.h" - -#include "pegasus/Game_Shell/CGameState.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" - -namespace Pegasus { - -tNeighborhoodID CGameState::gCurrentNeighborhood = kNoNeighborhoodID; -tRoomID CGameState::gCurrentRoom = kNoRoomID; -tDirectionConstant CGameState::gCurrentDirection = kNoDirection; -tNeighborhoodID CGameState::gNextNeighborhoodID = kNoNeighborhoodID; -tRoomID CGameState::gNextRoomID = kNoRoomID; -tDirectionConstant CGameState::gNextDirection = kNoDirection; -tNeighborhoodID CGameState::gLastNeighborhood = kNoNeighborhoodID; -tRoomID CGameState::gLastRoom = kNoRoomID; -tDirectionConstant CGameState::gLastDirection = kNoDirection; -tRoomID CGameState::gOpenDoorRoom = kNoRoomID; -tDirectionConstant CGameState::gOpenDoorDirection = kNoDirection; - -Common::Error CGameState::WriteGameState(Common::WriteStream *stream) { - stream->writeUint16BE(gCurrentNeighborhood); - stream->writeUint16BE(gCurrentRoom); - stream->writeByte(gCurrentDirection); - stream->writeUint16BE(gNextNeighborhoodID); - stream->writeUint16BE(gNextRoomID); - stream->writeByte(gNextDirection); - stream->writeUint16BE(gLastNeighborhood); - stream->writeUint16BE(gLastRoom); - stream->writeUint16BE(gOpenDoorRoom); - stream->writeByte(gOpenDoorDirection); - - if (stream->err()) - return Common::kWritingFailed; - - return Common::kNoError; -} - -Common::Error CGameState::ReadGameState(Common::ReadStream *stream) { - gCurrentNeighborhood = stream->readUint16BE(); - gCurrentRoom = stream->readUint16BE(); - gCurrentDirection = stream->readByte(); - gNextNeighborhoodID = stream->readUint16BE(); - gNextRoomID = stream->readUint16BE(); - gNextDirection = stream->readByte(); - gLastNeighborhood = stream->readUint16BE(); - gLastRoom = stream->readUint16BE(); - gOpenDoorRoom = stream->readUint16BE(); - gOpenDoorDirection = stream->readByte(); - - if (stream->err()) - return Common::kReadingFailed; - - return Common::kNoError; -} - -void CGameState::ResetGameState() { - gCurrentNeighborhood = kNoNeighborhoodID; - gCurrentRoom = kNoRoomID; - gCurrentDirection = kNoDirection; - gNextNeighborhoodID = kNoNeighborhoodID; - gNextRoomID = kNoRoomID; - gNextDirection = kNoDirection; - gLastNeighborhood = kNoNeighborhoodID; - gLastRoom = kNoRoomID; - gLastDirection = kNoDirection; - gOpenDoorRoom = kNoRoomID; - gOpenDoorDirection = kNoDirection; -} - -void CGameState::GetCurrentLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { - neighborhood = gCurrentNeighborhood; - room = gCurrentRoom; - direction = gCurrentDirection; -} - -void CGameState::SetCurrentLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { - gLastNeighborhood = gCurrentNeighborhood; - gLastRoom = gCurrentRoom; - gLastDirection = gCurrentDirection; - gCurrentNeighborhood = neighborhood; - gCurrentRoom = room; - gCurrentDirection = direction; -} - -tNeighborhoodID CGameState::GetCurrentNeighborhood() { - return gCurrentNeighborhood; -} - -void CGameState::SetCurrentNeighborhood(const tNeighborhoodID neighborhood) { - gLastNeighborhood = gCurrentNeighborhood; - gCurrentNeighborhood = neighborhood; -} - -tRoomID CGameState::GetCurrentRoom() { - return gCurrentRoom; -} - -void CGameState::SetCurrentRoom(const tRoomID room) { - gLastRoom = gCurrentRoom; - gCurrentRoom = room; -} - -tDirectionConstant CGameState::GetCurrentDirection() { - return gCurrentDirection; -} - -void CGameState::SetCurrentDirection(const tDirectionConstant direction) { - gLastDirection = gCurrentDirection; - gCurrentDirection = direction; -} - -tRoomViewID CGameState::GetCurrentRoomAndView() { - return MakeRoomView(gCurrentRoom, gCurrentDirection); -} - -void CGameState::GetNextLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { - neighborhood = gNextNeighborhoodID; - room = gNextRoomID; - direction = gNextDirection; -} - -void CGameState::SetNextLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { - gNextNeighborhoodID = neighborhood; - gNextRoomID = room; - gNextDirection = direction; -} - -tNeighborhoodID CGameState::GetNextNeighborhood() { - return gNextNeighborhoodID; -} - -void CGameState::SetNextNeighborhood(const tNeighborhoodID neighborhood) { - gNextNeighborhoodID = neighborhood; -} - -tRoomID CGameState::GetNextRoom() { - return gNextRoomID; -} - -void CGameState::SetNextRoom(const tRoomID room) { - gNextRoomID = room; -} - -tDirectionConstant CGameState::GetNextDirection() { - return gNextDirection; -} - -void CGameState::SetNextDirection(const tDirectionConstant direction) { - gNextDirection = direction; -} - -void CGameState::GetLastLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { - neighborhood = gCurrentNeighborhood; - room = gCurrentRoom; - direction = gCurrentDirection; -} - -void CGameState::SetLastLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { - gCurrentNeighborhood = neighborhood; - gCurrentRoom = room; - gCurrentDirection = direction; -} - -tNeighborhoodID CGameState::GetLastNeighborhood() { - return gLastNeighborhood; -} - -void CGameState::SetLastNeighborhood(const tNeighborhoodID neighborhood) { - gLastNeighborhood = neighborhood; -} - -tRoomID CGameState::GetLastRoom() { - return gLastRoom; -} - -void CGameState::SetLastRoom(const tRoomID room) { - gLastRoom = room; -} - -tDirectionConstant CGameState::GetLastDirection() { - return gLastDirection; -} - -void CGameState::SetLastDirection(const tDirectionConstant direction) { - gLastDirection = direction; -} - -tRoomViewID CGameState::GetLastRoomAndView() { - return MakeRoomView(gLastRoom, gLastDirection); -} - -void CGameState::GetOpenDoorLocation(tRoomID &room, tDirectionConstant &direction) { - room = gOpenDoorRoom; - direction = gOpenDoorDirection; -} - -void CGameState::SetOpenDoorLocation(const tRoomID room, const tDirectionConstant direction) { - gOpenDoorRoom = room; - gOpenDoorDirection = direction; -} - -tRoomID CGameState::GetOpenDoorRoom() { - return gOpenDoorRoom; -} - -void CGameState::SetOpenDoorRoom(const tRoomID room) { - gOpenDoorRoom = room; -} - -tDirectionConstant CGameState::GetOpenDoorDirection() { - return gOpenDoorDirection; -} - -void CGameState::SetOpenDoorDirection(const tDirectionConstant direction) { - gOpenDoorDirection = direction; -} - -tRoomViewID CGameState::GetDoorOpenRoomAndView() { - return MakeRoomView(gOpenDoorRoom, gOpenDoorDirection); -} - -bool CGameState::IsCurrentDoorOpen() { - return gOpenDoorRoom == gCurrentRoom && gOpenDoorDirection == gCurrentDirection; -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/Game_Shell/CGameState.h b/engines/pegasus/Game_Shell/CGameState.h deleted file mode 100755 index b7ad71bb50..0000000000 --- a/engines/pegasus/Game_Shell/CGameState.h +++ /dev/null @@ -1,107 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef PEGASUS_GAMESHELL_CGAMESTATE_H -#define PEGASUS_GAMESHELL_CGAMESTATE_H - -#include "pegasus/Game_Shell/Headers/Game_Shell_Types.h" - -namespace Common { - class Error; - class ReadStream; - class WriteStream; -} - -namespace Pegasus { - -class CGameState { -public: - static Common::Error WriteGameState(Common::WriteStream *stream); - static Common::Error ReadGameState(Common::ReadStream *stream); - - static void ResetGameState(); - - static void GetCurrentLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); - static void SetCurrentLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); - - static tNeighborhoodID GetCurrentNeighborhood(); - static void SetCurrentNeighborhood(const tNeighborhoodID neighborhood); - static tRoomID GetCurrentRoom(); - static void SetCurrentRoom(const tRoomID room); - static tDirectionConstant GetCurrentDirection(); - static void SetCurrentDirection(const tDirectionConstant direction); - - static tRoomViewID GetCurrentRoomAndView(); - - static void GetNextLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); - static void SetNextLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); - - static tNeighborhoodID GetNextNeighborhood(); - static void SetNextNeighborhood(const tNeighborhoodID neighborhood); - static tRoomID GetNextRoom(); - static void SetNextRoom(const tRoomID room); - static tDirectionConstant GetNextDirection(); - static void SetNextDirection(const tDirectionConstant direction); - - static void GetLastLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); - static void SetLastLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); - - static tNeighborhoodID GetLastNeighborhood(); - static void SetLastNeighborhood(const tNeighborhoodID neighborhood); - static tRoomID GetLastRoom(); - static void SetLastRoom(const tRoomID room); - static tDirectionConstant GetLastDirection(); - static void SetLastDirection(const tDirectionConstant direction); - - static tRoomViewID GetLastRoomAndView(); - - static void GetOpenDoorLocation(tRoomID &room, tDirectionConstant &direction); - static void SetOpenDoorLocation(const tRoomID room, const tDirectionConstant direction); - static tRoomID GetOpenDoorRoom(); - static void SetOpenDoorRoom(const tRoomID room); - static tDirectionConstant GetOpenDoorDirection(); - static void SetOpenDoorDirection(const tDirectionConstant direction); - - static tRoomViewID GetDoorOpenRoomAndView(); - - static bool IsCurrentDoorOpen(); - -protected: - static tNeighborhoodID gCurrentNeighborhood; - static tRoomID gCurrentRoom; - static tDirectionConstant gCurrentDirection; - static tNeighborhoodID gNextNeighborhoodID; - static tRoomID gNextRoomID; - static tDirectionConstant gNextDirection; - static tNeighborhoodID gLastNeighborhood; - static tRoomID gLastRoom; - static tDirectionConstant gLastDirection; - static tRoomID gOpenDoorRoom; - static tDirectionConstant gOpenDoorDirection; -}; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/Game_Shell/CInventory.cpp b/engines/pegasus/Game_Shell/CInventory.cpp index 3747beda89..64e62b4406 100755 --- a/engines/pegasus/Game_Shell/CInventory.cpp +++ b/engines/pegasus/Game_Shell/CInventory.cpp @@ -23,9 +23,9 @@ * */ +#include "pegasus/constants.h" #include "pegasus/Game_Shell/CItem.h" #include "pegasus/Game_Shell/CInventory.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" namespace Pegasus { diff --git a/engines/pegasus/Game_Shell/CInventory.h b/engines/pegasus/Game_Shell/CInventory.h index 57ea1c99cc..45af5c379c 100755 --- a/engines/pegasus/Game_Shell/CInventory.h +++ b/engines/pegasus/Game_Shell/CInventory.h @@ -26,8 +26,8 @@ #ifndef PEGASUS_GAMESHELL_CINVENTORY_H #define PEGASUS_GAMESHELL_CINVENTORY_H +#include "pegasus/types.h" #include "pegasus/Game_Shell/CItemList.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Types.h" namespace Pegasus { diff --git a/engines/pegasus/Game_Shell/CItem.cpp b/engines/pegasus/Game_Shell/CItem.cpp index af0bff42e3..b96c24ce49 100755 --- a/engines/pegasus/Game_Shell/CItem.cpp +++ b/engines/pegasus/Game_Shell/CItem.cpp @@ -26,9 +26,9 @@ #include "common/error.h" #include "common/stream.h" +#include "pegasus/constants.h" #include "pegasus/Game_Shell/CItem.h" #include "pegasus/Game_Shell/CItemList.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" namespace Pegasus { diff --git a/engines/pegasus/Game_Shell/CItem.h b/engines/pegasus/Game_Shell/CItem.h index cb0931c8bd..c923e1c69c 100755 --- a/engines/pegasus/Game_Shell/CItem.h +++ b/engines/pegasus/Game_Shell/CItem.h @@ -27,7 +27,7 @@ #define PEGASUS_GAMESHELL_CITEM_H #include "pegasus/MMShell/Utilities/MMIDObject.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Types.h" +#include "pegasus/types.h" namespace Common { class Error; @@ -48,6 +48,177 @@ namespace Pegasus { */ +// Item IDs. + +const tItemID kAirMask = 7; +const tItemID kAntidote = 8; +const tItemID kArgonCanister = 9; +const tItemID kCardBomb = 10; +const tItemID kCrowbar = 11; +const tItemID kGasCanister = 12; +const tItemID kHistoricalLog = 13; +const tItemID kJourneymanKey = 14; +const tItemID kKeyCard = 15; +const tItemID kMachineGun = 16; +const tItemID kMarsCard = 17; +const tItemID kNitrogenCanister = 18; +const tItemID kOrangeJuiceGlassFull = 19; +const tItemID kOrangeJuiceGlassEmpty = 20; +const tItemID kPoisonDart = 21; +const tItemID kSinclairKey = 22; +const tItemID kStunGun = 23; +const tItemID kArgonPickup = 24; + +// Biochips. + +const tItemID kAIBiochip = 0; +const tItemID kInterfaceBiochip = 1; +const tItemID kMapBiochip = 2; +const tItemID kOpticalBiochip = 3; +const tItemID kPegasusBiochip = 4; +const tItemID kRetinalScanBiochip = 5; +const tItemID kShieldBiochip = 6; + +const tItemID kNumItems = 25; + +// Item States. + +const tItemState kAI000 = 0; +const tItemState kAI005 = 1; +const tItemState kAI006 = 2; +const tItemState kAI010 = 3; +const tItemState kAI015 = 4; +const tItemState kAI016 = 5; +const tItemState kAI020 = 6; +const tItemState kAI024 = 7; +const tItemState kAI100 = 8; +const tItemState kAI101 = 9; +const tItemState kAI105 = 10; +const tItemState kAI106 = 11; +const tItemState kAI110 = 12; +const tItemState kAI111 = 13; +const tItemState kAI115 = 14; +const tItemState kAI116 = 15; +const tItemState kAI120 = 16; +const tItemState kAI121 = 17; +const tItemState kAI124 = 18; +const tItemState kAI125 = 19; +const tItemState kAI126 = 20; +const tItemState kAI200 = 21; +const tItemState kAI201 = 22; +const tItemState kAI202 = 23; +const tItemState kAI205 = 24; +const tItemState kAI206 = 25; +const tItemState kAI210 = 26; +const tItemState kAI211 = 27; +const tItemState kAI212 = 28; +const tItemState kAI215 = 29; +const tItemState kAI216 = 30; +const tItemState kAI220 = 31; +const tItemState kAI221 = 32; +const tItemState kAI222 = 33; +const tItemState kAI224 = 34; +const tItemState kAI225 = 35; +const tItemState kAI226 = 36; +const tItemState kAI300 = 37; +const tItemState kAI301 = 38; +const tItemState kAI302 = 39; +const tItemState kAI303 = 40; +const tItemState kAI305 = 41; +const tItemState kAI306 = 42; +const tItemState kAI310 = 43; +const tItemState kAI311 = 44; +const tItemState kAI312 = 45; +const tItemState kAI313 = 46; +const tItemState kAI315 = 47; +const tItemState kAI316 = 48; +const tItemState kAI320 = 49; +const tItemState kAI321 = 50; +const tItemState kAI322 = 51; +const tItemState kAI323 = 52; +const tItemState kAI324 = 53; +const tItemState kAI325 = 54; +const tItemState kAI326 = 55; +const tItemState kNormalItem = 56; +const tItemState kMapUnavailable = 57; +const tItemState kMapEngaged = 58; +const tItemState kOptical000 = 59; +const tItemState kOptical001 = 60; +const tItemState kOptical002 = 61; +const tItemState kOptical010 = 62; +const tItemState kOptical011 = 63; +const tItemState kOptical012 = 64; +const tItemState kOptical020 = 65; +const tItemState kOptical021 = 66; +const tItemState kOptical100 = 67; +const tItemState kOptical101 = 68; +const tItemState kOptical102 = 69; +const tItemState kOptical110 = 70; +const tItemState kOptical111 = 71; +const tItemState kOptical112 = 72; +const tItemState kOptical120 = 73; +const tItemState kOptical121 = 74; +const tItemState kOptical200 = 75; +const tItemState kOptical201 = 76; +const tItemState kOptical210 = 77; +const tItemState kOptical211 = 78; +const tItemState kPegasusTSA00 = 79; +const tItemState kPegasusTSA10 = 80; +const tItemState kPegasusPrehistoric00 = 81; +const tItemState kPegasusPrehistoric01 = 82; +const tItemState kPegasusPrehistoric10 = 83; +const tItemState kPegasusPrehistoric11 = 84; +const tItemState kPegasusMars00 = 85; +const tItemState kPegasusMars01 = 86; +const tItemState kPegasusMars10 = 87; +const tItemState kPegasusMars11 = 88; +const tItemState kPegasusNorad00 = 89; +const tItemState kPegasusNorad01 = 90; +const tItemState kPegasusNorad10 = 91; +const tItemState kPegasusNorad11 = 92; +const tItemState kPegasusWSC00 = 93; +const tItemState kPegasusWSC01 = 94; +const tItemState kPegasusWSC10 = 95; +const tItemState kPegasusWSC11 = 96; +const tItemState kPegasusCaldoria = 97; +const tItemState kRetinalSimulating = 98; +const tItemState kShieldNormal = 99; +const tItemState kShieldRadiation = 100; +const tItemState kShieldPlasma = 101; +const tItemState kShieldCardBomb = 102; +const tItemState kShieldDraining = 103; +const tItemState kAirMaskEmptyOff = 104; +const tItemState kAirMaskEmptyFilter = 105; +const tItemState kAirMaskLowOff = 106; +const tItemState kAirMaskLowFilter = 107; +const tItemState kAirMaskLowOn = 108; +const tItemState kAirMaskFullOff = 109; +const tItemState kAirMaskFullFilter = 110; +const tItemState kAirMaskFullOn = 111; +const tItemState kArgonEmpty = 112; +const tItemState kArgonFull = 113; +const tItemState kFlashlightOff = 114; +const tItemState kFlashlightOn = 115; +const tItemState kNitrogenEmpty = 116; +const tItemState kNitrogenFull = 117; +const tItemState kFullGlass = 118; + +// Extra IDs. + +const uint32 kRetinalScanSearching = 0; +const uint32 kRetinalScanActivated = 1; +const uint32 kShieldIntro = 2; +const uint32 kRemoveAirMask = 3; +const uint32 kRemoveArgon = 4; +const uint32 kRemoveCrowbar = 5; +const uint32 kGasCanLoop = 6; +const uint32 kRemoveJourneymanKey = 7; +const uint32 kRemoveMarsCard = 8; +const uint32 kRemoveNitrogen = 9; +const uint32 kRemoveGlass = 10; +const uint32 kRemoveDart = 11; +const uint32 kRemoveSinclairKey = 12; + class CItem : public MMIDObject { public: CItem(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); diff --git a/engines/pegasus/Game_Shell/CItemList.h b/engines/pegasus/Game_Shell/CItemList.h index 75a34a0213..d4c0d56272 100755 --- a/engines/pegasus/Game_Shell/CItemList.h +++ b/engines/pegasus/Game_Shell/CItemList.h @@ -28,7 +28,7 @@ #include "common/list.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Types.h" +#include "pegasus/types.h" namespace Common { class ReadStream; diff --git a/engines/pegasus/Game_Shell/Headers/Game_Shell_Constants.h b/engines/pegasus/Game_Shell/Headers/Game_Shell_Constants.h deleted file mode 100755 index 5d64629d95..0000000000 --- a/engines/pegasus/Game_Shell/Headers/Game_Shell_Constants.h +++ /dev/null @@ -1,81 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef PEGASUS_GAMESHELL_HEADERS_GAMESHELLCONSTANTS -#define PEGASUS_GAMESHELL_HEADERS_GAMESHELLCONSTANTS - -#include "engines/pegasus/MMShell/MMConstants.h" -#include "engines/pegasus/Game_Shell/Headers/Game_Shell_Types.h" - -namespace Pegasus { - -const tGameID kGameIDNothing = -1; - -const tActorID kNoActorID = kGameIDNothing; -const tActorID kPlayerID = 0; -const tItemID kNoItemID = kGameIDNothing; -const tRoomID kNoRoomID = kGameIDNothing; -const tExtraID kNoExtraID = 0xFFFFFFFF; -const tNeighborhoodID kNoNeighborhoodID = kGameIDNothing; -const tAlternateID kNoAlternateID = 0; -const tGameMenuCommand kMenuCmdNoCommand = 0; - -const tHotSpotActivationID kActivateHotSpotAlways = 0; -const tHotSpotActivationID kActivateHotSpotNever = -1; - -const tItemState kNoItemState = -1; - -const tDirectionConstant kNoDirection = 0xFF; - -const tTurnDirection kNoTurn = 0xFF; -const tTurnDirection kTurnLeft = 0; -const tTurnDirection kTurnRight = 1; -const tTurnDirection kTurnUp = 2; -const tTurnDirection kTurnDown = 3; -const tTurnDirection kMaxTurns = 4; - -const tGameMode kNoMode = -1; -const tGameMode kModeNavigation = 0; -const tGameMode kLastGameShellMode = kModeNavigation; - -const tCanMoveForwardReason kCanMoveForward = 0; -const tCanMoveForwardReason kCantMoveBlocked = kCanMoveForward + 1; -const tCanMoveForwardReason kCantMoveDoorClosed = kCantMoveBlocked + 1; -const tCanMoveForwardReason kCantMoveDoorLocked = kCantMoveDoorClosed + 1; -const tCanMoveForwardReason kCantMoveLastReason = kCantMoveDoorLocked; - -const tCanTurnReason kCanTurn = 0; -const tCanTurnReason kCantTurnNoTurn = kCanTurn + 1; -const tCanTurnReason kCantTurnLastReason = kCantTurnNoTurn; - -const tCanOpenDoorReason kCanOpenDoor = 0; -const tCanOpenDoorReason kCantOpenNoDoor = kCanOpenDoor + 1; -const tCanOpenDoorReason kCantOpenLocked = kCantOpenNoDoor + 1; -const tCanOpenDoorReason kCantOpenAlreadyOpen = kCantOpenLocked + 1; -const tCanOpenDoorReason kCantOpenLastReason = kCantOpenAlreadyOpen; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/Game_Shell/Headers/Game_Shell_Types.h b/engines/pegasus/Game_Shell/Headers/Game_Shell_Types.h deleted file mode 100755 index 923f7a72dd..0000000000 --- a/engines/pegasus/Game_Shell/Headers/Game_Shell_Types.h +++ /dev/null @@ -1,80 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef PEGASUS_GAMESHELL_HEADERS_GAMESHELLTYPES -#define PEGASUS_GAMESHELL_HEADERS_GAMESHELLTYPES - -#include "pegasus/MMShell/MMTypes.h" - -namespace Pegasus { - -typedef tMM16BitID tGameID; - -typedef tGameID tItemID; -typedef tGameID tActorID; -typedef tGameID tRoomID; -typedef tGameID tNeighborhoodID; -typedef tMM8BitU tAlternateID; -typedef tMM8BitS tHotSpotActivationID; - -typedef tMM16BitS tWeightType; - -typedef tMM8BitU tDirectionConstant; -typedef tMM8BitU tTurnDirection; - -// Meant to be room in low 16 bits and direction in high 16 bits. -typedef tMM32BitU tRoomViewID; - -#define MakeRoomView(room, direction) (((tRoomViewID) (room)) | (((tRoomViewID) (direction)) << 16)) - -typedef tMM32BitU tExtraID; - -typedef tMM16BitS tGameMode; - -typedef tMM16BitS tWeightType; - -typedef tMM16BitS tItemState; - -typedef tMM8BitS tDeathReason; - -typedef tMM32BitS tGameMenuCommand; - -typedef tMM32BitS tGameScoreType; - -typedef long tCanMoveForwardReason; - -typedef long tCanTurnReason; - -typedef long tCanOpenDoorReason; - -enum tInventoryResult { - kInventoryOK, - kTooMuchWeight, - kItemNotInInventory -}; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/MMShell/MMConstants.h b/engines/pegasus/MMShell/MMConstants.h deleted file mode 100755 index 1b36c81cea..0000000000 --- a/engines/pegasus/MMShell/MMConstants.h +++ /dev/null @@ -1,63 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef PEGASUS_MMSHELL_MMCONSTANTS_H -#define PEGASUS_MMSHELL_MMCONSTANTS_H - -#include "pegasus/MMShell/MMTypes.h" - -namespace Pegasus { - -const tDisplayElementID kNoDisplayElement = -1; -const tDisplayElementID kHighestReservedElementID = -2; - -const tDisplayElementID kCursorID = kHighestReservedElementID; -const tDisplayElementID kLoadScreenID = kCursorID - 1; - -const tDisplayOrder kMinAvailableOrder = 0; -const tDisplayOrder kMaxAvailableOrder = 999998; -const tDisplayOrder kLoadScreenOrder = 900000; -const tDisplayOrder kCursorOrder = 1000000; - -const tHotSpotID kNoHotSpotID = -1; -const tHotSpotFlags kNoHotSpotFlags = 0; -const tHotSpotFlags kAllHotSpotFlags = ~kNoHotSpotFlags; - -const tNotificationFlags kNoNotificationFlags = 0; - -const tDisplayElementID kCurrentDragSpriteID = 1000; - -// TODO -//const Fixed kFixed1 = 1 << 16; -//const Fixed kFixedMinus1 = -1 << 16; - -const TimeScale kDefaultTimeScale = 600; - -// TODO -//const RGBColor kWhiteRGB = {0xFFFF, 0xFFFF, 0xFFFF}; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/MMShell/Notification/MMNotification.cpp b/engines/pegasus/MMShell/Notification/MMNotification.cpp index 8b8d694358..e91417a292 100755 --- a/engines/pegasus/MMShell/Notification/MMNotification.cpp +++ b/engines/pegasus/MMShell/Notification/MMNotification.cpp @@ -23,7 +23,7 @@ * */ -#include "pegasus/MMShell/MMConstants.h" +#include "pegasus/constants.h" #include "pegasus/MMShell/Notification/MMNotification.h" #include "pegasus/MMShell/Notification/MMNotificationManager.h" #include "pegasus/MMShell/Notification/MMNotificationReceiver.h" diff --git a/engines/pegasus/MMShell/Notification/MMNotification.h b/engines/pegasus/MMShell/Notification/MMNotification.h index 8ad7f733fd..2c6ddddcd2 100755 --- a/engines/pegasus/MMShell/Notification/MMNotification.h +++ b/engines/pegasus/MMShell/Notification/MMNotification.h @@ -28,7 +28,7 @@ #include "common/list.h" -#include "pegasus/MMShell/MMTypes.h" +#include "pegasus/types.h" #include "pegasus/MMShell/Utilities/MMIDObject.h" namespace Pegasus { diff --git a/engines/pegasus/MMShell/Notification/MMNotificationManager.cpp b/engines/pegasus/MMShell/Notification/MMNotificationManager.cpp index 2a1f1bedd5..4bcaa794e8 100755 --- a/engines/pegasus/MMShell/Notification/MMNotificationManager.cpp +++ b/engines/pegasus/MMShell/Notification/MMNotificationManager.cpp @@ -23,7 +23,7 @@ * */ -#include "pegasus/MMShell/MMConstants.h" +#include "pegasus/constants.h" #include "pegasus/MMShell/Notification/MMNotificationManager.h" namespace Pegasus { diff --git a/engines/pegasus/MMShell/Utilities/MMIDObject.h b/engines/pegasus/MMShell/Utilities/MMIDObject.h index 4cca1c056e..b45c7544b3 100755 --- a/engines/pegasus/MMShell/Utilities/MMIDObject.h +++ b/engines/pegasus/MMShell/Utilities/MMIDObject.h @@ -26,7 +26,7 @@ #ifndef PEGASUS_MMSHELL_MMIDOBJECT_H #define PEGASUS_MMSHELL_MMIDOBJECT_H -#include "pegasus/MMShell/MMTypes.h" +#include "pegasus/types.h" namespace Pegasus { diff --git a/engines/pegasus/MMShell/Utilities/MMResourceFile.h b/engines/pegasus/MMShell/Utilities/MMResourceFile.h index 47c82fd909..9bd0cd9e41 100755 --- a/engines/pegasus/MMShell/Utilities/MMResourceFile.h +++ b/engines/pegasus/MMShell/Utilities/MMResourceFile.h @@ -28,7 +28,7 @@ #include "common/str.h" -#include "pegasus/MMShell/MMTypes.h" +#include "pegasus/types.h" namespace Common { class Error; diff --git a/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp b/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp index c3bf85b993..92971a6636 100755 --- a/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp +++ b/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp @@ -23,7 +23,7 @@ * */ -#include "pegasus/MMShell/MMConstants.h" +#include "pegasus/constants.h" #include "pegasus/MMShell/Utilities/MMTimeValue.h" namespace Pegasus { diff --git a/engines/pegasus/MMShell/Utilities/MMTimeValue.h b/engines/pegasus/MMShell/Utilities/MMTimeValue.h index 4060322f8e..a112f9c233 100755 --- a/engines/pegasus/MMShell/Utilities/MMTimeValue.h +++ b/engines/pegasus/MMShell/Utilities/MMTimeValue.h @@ -26,7 +26,7 @@ #ifndef PEGASUS_MMSHELL_MMTIMEVALUE_H #define PEGASUS_MMSHELL_MMTIMEVALUE_H -#include "pegasus/MMShell/MMTypes.h" +#include "pegasus/types.h" namespace Pegasus { diff --git a/engines/pegasus/constants.h b/engines/pegasus/constants.h new file mode 100755 index 0000000000..7a63cfc9db --- /dev/null +++ b/engines/pegasus/constants.h @@ -0,0 +1,226 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * Additional copyright for this file: + * Copyright (C) 1995-1997 Presto Studios, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef PEGASUS_CONSTANTS_H +#define PEGASUS_CONSTANTS_H + +#include "pegasus/types.h" + +namespace Pegasus { + +const tGameID kGameIDNothing = -1; + +const tActorID kNoActorID = kGameIDNothing; +const tActorID kPlayerID = 0; +const tItemID kNoItemID = kGameIDNothing; +const tRoomID kNoRoomID = kGameIDNothing; +const tExtraID kNoExtraID = 0xFFFFFFFF; +const tNeighborhoodID kNoNeighborhoodID = kGameIDNothing; +const tAlternateID kNoAlternateID = 0; +const tGameMenuCommand kMenuCmdNoCommand = 0; + +const tHotSpotActivationID kActivateHotSpotAlways = 0; +const tHotSpotActivationID kActivateHotSpotNever = -1; + +const tItemState kNoItemState = -1; + +const tDirectionConstant kNoDirection = 0xFF; + +const tTurnDirection kNoTurn = 0xFF; +const tTurnDirection kTurnLeft = 0; +const tTurnDirection kTurnRight = 1; +const tTurnDirection kTurnUp = 2; +const tTurnDirection kTurnDown = 3; +const tTurnDirection kMaxTurns = 4; + +const tGameMode kNoMode = -1; +const tGameMode kModeNavigation = 0; +const tGameMode kLastGameShellMode = kModeNavigation; + +const tCanMoveForwardReason kCanMoveForward = 0; +const tCanMoveForwardReason kCantMoveBlocked = kCanMoveForward + 1; +const tCanMoveForwardReason kCantMoveDoorClosed = kCantMoveBlocked + 1; +const tCanMoveForwardReason kCantMoveDoorLocked = kCantMoveDoorClosed + 1; +const tCanMoveForwardReason kCantMoveLastReason = kCantMoveDoorLocked; + +const tCanTurnReason kCanTurn = 0; +const tCanTurnReason kCantTurnNoTurn = kCanTurn + 1; +const tCanTurnReason kCantTurnLastReason = kCantTurnNoTurn; + +const tCanOpenDoorReason kCanOpenDoor = 0; +const tCanOpenDoorReason kCantOpenNoDoor = kCanOpenDoor + 1; +const tCanOpenDoorReason kCantOpenLocked = kCantOpenNoDoor + 1; +const tCanOpenDoorReason kCantOpenAlreadyOpen = kCantOpenLocked + 1; +const tCanOpenDoorReason kCantOpenLastReason = kCantOpenAlreadyOpen; + +const tDisplayElementID kNoDisplayElement = -1; +const tDisplayElementID kHighestReservedElementID = -2; + +const tDisplayElementID kCursorID = kHighestReservedElementID; +const tDisplayElementID kLoadScreenID = kCursorID - 1; + +const tDisplayOrder kMinAvailableOrder = 0; +const tDisplayOrder kMaxAvailableOrder = 999998; +const tDisplayOrder kLoadScreenOrder = 900000; +const tDisplayOrder kCursorOrder = 1000000; + +const tHotSpotID kNoHotSpotID = -1; +const tHotSpotFlags kNoHotSpotFlags = 0; +const tHotSpotFlags kAllHotSpotFlags = ~kNoHotSpotFlags; + +const tNotificationFlags kNoNotificationFlags = 0; + +const tDisplayElementID kCurrentDragSpriteID = 1000; + +// TODO +//const Fixed kFixed1 = 1 << 16; +//const Fixed kFixedMinus1 = -1 << 16; + +const TimeScale kDefaultTimeScale = 600; + +// TODO +//const RGBColor kWhiteRGB = {0xFFFF, 0xFFFF, 0xFFFF}; + +// Ticks per second. + +const TimeScale kOneTickPerSecond = 1; +const TimeScale kTwoTicksPerSecond = 2; +const TimeScale kFifteenTicksPerSecond = 15; +const TimeScale kThirtyTicksPerSecond = 30; +const TimeScale kSixtyTicksPerSecond = 60; +const TimeScale kMovieTicksPerSecond = 600; + +// These times are in seconds. + +const TimeValue kOneSecond = 1; +const TimeValue kTwoSeconds = 2; +const TimeValue kThreeSeconds = 3; +const TimeValue kFourSeconds = 4; +const TimeValue kFiveSeconds = 5; +const TimeValue kSixSeconds = 6; +const TimeValue kSevenSeconds = 7; +const TimeValue kEightSeconds = 8; +const TimeValue kNineSeconds = 9; +const TimeValue kTenSeconds = 10; +const TimeValue kElevenSeconds = 11; +const TimeValue kTwelveSeconds = 12; +const TimeValue kThirteenSeconds = 13; +const TimeValue kFourteenSeconds = 14; +const TimeValue kFifteenSeconds = 15; +const TimeValue kSixteenSeconds = 16; +const TimeValue kSeventeenSeconds = 17; +const TimeValue kEighteenSeconds = 18; +const TimeValue kNineteenSeconds = 19; +const TimeValue kTwentySeconds = 20; +const TimeValue kThirtySeconds = 30; +const TimeValue kFortySeconds = 40; +const TimeValue kFiftySeconds = 50; +const TimeValue kSixtySeconds = 60; +const TimeValue kOneMinute = 60; +const TimeValue kTwoMinutes = kOneMinute * 2; +const TimeValue kThreeMinutes = kOneMinute * 3; +const TimeValue kFourMinutes = kOneMinute * 4; +const TimeValue kFiveMinutes = kOneMinute * 5; +const TimeValue kSixMinutes = kOneMinute * 6; +const TimeValue kSevenMinutes = kOneMinute * 7; +const TimeValue kEightMinutes = kOneMinute * 8; +const TimeValue kNineMinutes = kOneMinute * 9; +const TimeValue kTenMinutes = kOneMinute * 10; +const TimeValue kElevenMinutes = kOneMinute * 11; +const TimeValue kTwelveMinutes = kOneMinute * 12; +const TimeValue kThirteenMinutes = kOneMinute * 13; +const TimeValue kFourteenMinutes = kOneMinute * 14; +const TimeValue kFifteenMinutes = kOneMinute * 15; +const TimeValue kSixteenMinutes = kOneMinute * 16; +const TimeValue kSeventeenMinutes = kOneMinute * 17; +const TimeValue kEighteenMinutes = kOneMinute * 18; +const TimeValue kNineteenMinutes = kOneMinute * 19; +const TimeValue kTwentyMinutes = kOneMinute * 20; +const TimeValue kThirtyMinutes = kOneMinute * 30; +const TimeValue kFortyMinutes = kOneMinute * 40; +const TimeValue kFiftyMinutes = kOneMinute * 50; +const TimeValue kOneHour = kOneMinute * 60; +const TimeValue kTwoHours = kOneHour * 2; + +// Common times. + +const TimeValue kHalfSecondPerTwoTicks = kTwoTicksPerSecond / 2; +const TimeValue kHalfSecondPerThirtyTicks = kThirtyTicksPerSecond / 2; +const TimeValue kHalfSecondPerSixtyTicks = kSixtyTicksPerSecond / 2; + +const TimeValue kOneSecondPerTwoTicks = kTwoTicksPerSecond; +const TimeValue kOneSecondPerThirtyTicks = kThirtyTicksPerSecond; +const TimeValue kOneSecondPerSixtyTicks = kSixtyTicksPerSecond; + +const TimeValue kOneMinutePerFifteenTicks = kOneMinute * kFifteenTicksPerSecond; +const TimeValue kFiveMinutesPerFifteenTicks = kFiveMinutes * kFifteenTicksPerSecond; +const TimeValue kTenMinutesPerFifteenTicks = kTenMinutes * kFifteenTicksPerSecond; + +const TimeValue kOneMinutePerThirtyTicks = kOneMinute * kThirtyTicksPerSecond; +const TimeValue kFiveMinutesPerThirtyTicks = kFiveMinutes * kThirtyTicksPerSecond; +const TimeValue kTenMinutesPerThirtyTicks = kTenMinutes * kThirtyTicksPerSecond; + +const TimeValue kOneMinutePerSixtyTicks = kOneMinute * kSixtyTicksPerSecond; +const TimeValue kFiveMinutesPerSixtyTicks = kFiveMinutes * kSixtyTicksPerSecond; +const TimeValue kTenMinutesPerSixtyTicks = kTenMinutes * kSixtyTicksPerSecond; + +// Time in seconds you can hang around Caldoria without going to work... +//const TimeValue kCaldoriaUncreatedTimeLimit = kFifteenMinutes; +//const TimeValue kCaldoriaUncreatedTimeLimit = kTwentyMinutes; +const TimeValue kLateWarning2TimeLimit = kFiveMinutes; +const TimeValue kLateWarning3TimeLimit = kTenMinutes; + +const TimeValue kSinclairShootsTimeLimit = kThreeMinutes; +const TimeValue kCardBombCountDownTime = kTwelveSeconds; + +const TimeValue kOxyMaskFullTime = kThirtyMinutes; + +const TimeValue kTSAUncreatedTimeLimit = kFiveMinutes; +const TimeValue kRipTimeLimit = kTenMinutesPerFifteenTicks; +const TimeScale kRipTimeScale = kFifteenTicksPerSecond; + +const TimeValue kIntroTimeOut = kThirtySeconds; + +const TimeValue kMarsRobotPatienceLimit = kFifteenSeconds; +const TimeValue kLockFreezeTimeLmit = kFifteenSeconds; +const TimeValue kSpaceChaseTimeLimit = kTenMinutes; +const TimeValue kVacuumSurvivalTimeLimit = kThirtySeconds; +const TimeValue kColorMatchingTimeLimit = kFourMinutes; +const TimeScale kJunkTimeScale = kFifteenTicksPerSecond; +const TimeValue kJunkDropBaseTime = kFiveSeconds; +const TimeValue kJunkDropSlopTime = kThreeSeconds; +const TimeValue kJunkTravelTime = kTenSeconds * kJunkTimeScale; +const TimeValue kCollisionReboundTime = kOneSecond * kJunkTimeScale; +const TimeValue kWeaponReboundTime = kTwoSeconds * kJunkTimeScale; + +const TimeValue kGawkAtRobotTime = kTenSeconds; +const TimeValue kGawkAtRobotTime2 = kThirteenSeconds; +const TimeValue kPlasmaImpactTime = kTwoSeconds; + +const TimeValue kNoradAirMaskTimeLimit = kOneMinute + kFifteenSeconds; + +} // End of namespace Pegasus + +#endif diff --git a/engines/pegasus/gamestate.cpp b/engines/pegasus/gamestate.cpp new file mode 100755 index 0000000000..2f4aed6188 --- /dev/null +++ b/engines/pegasus/gamestate.cpp @@ -0,0 +1,2357 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * Additional copyright for this file: + * Copyright (C) 1995-1997 Presto Studios, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/error.h" +#include "common/stream.h" + +#include "pegasus/constants.h" +#include "pegasus/gamestate.h" +#include "pegasus/scoring.h" + +namespace Common { +DECLARE_SINGLETON(Pegasus::GameStateManager); +} + +namespace Pegasus { + +Common::Error GameStateManager::writeGameState(Common::WriteStream *stream) { + stream->writeUint16BE(_currentNeighborhood); + stream->writeUint16BE(_currentRoom); + stream->writeByte(_currentDirection); + stream->writeUint16BE(_nextNeighborhoodID); + stream->writeUint16BE(_nextRoomID); + stream->writeByte(_nextDirection); + stream->writeUint16BE(_lastNeighborhood); + stream->writeUint16BE(_lastRoom); + stream->writeUint16BE(_openDoorRoom); + stream->writeByte(_openDoorDirection); + + _globalFlags.writeToStream(stream); + _scoringFlags.writeToStream(stream); + _itemTakenFlags.writeToStream(stream); + + writeCaldoriaState(stream); + writeTSAState(stream); + writePrehistoricState(stream); + writeNoradState(stream); + writeMarsState(stream); + writeWSCState(stream); + + if (stream->err()) + return Common::kWritingFailed; + + return Common::kNoError; +} + +Common::Error GameStateManager::readGameState(Common::ReadStream *stream) { + _currentNeighborhood = stream->readUint16BE(); + _currentRoom = stream->readUint16BE(); + _currentDirection = stream->readByte(); + _nextNeighborhoodID = stream->readUint16BE(); + _nextRoomID = stream->readUint16BE(); + _nextDirection = stream->readByte(); + _lastNeighborhood = stream->readUint16BE(); + _lastRoom = stream->readUint16BE(); + _openDoorRoom = stream->readUint16BE(); + _openDoorDirection = stream->readByte(); + + _globalFlags.readFromStream(stream); + _scoringFlags.readFromStream(stream); + _itemTakenFlags.readFromStream(stream); + + readCaldoriaState(stream); + readTSAState(stream); + readPrehistoricState(stream); + readNoradState(stream); + readMarsState(stream); + readWSCState(stream); + + if (stream->err()) + return Common::kReadingFailed; + + return Common::kNoError; +} + +void GameStateManager::resetGameState() { + _currentNeighborhood = kNoNeighborhoodID; + _currentRoom = kNoRoomID; + _currentDirection = kNoDirection; + _nextNeighborhoodID = kNoNeighborhoodID; + _nextRoomID = kNoRoomID; + _nextDirection = kNoDirection; + _lastNeighborhood = kNoNeighborhoodID; + _lastRoom = kNoRoomID; + _lastDirection = kNoDirection; + _openDoorRoom = kNoRoomID; + _openDoorDirection = kNoDirection; + + _globalFlags.clearAllFlags(); + _scoringFlags.clearAllFlags(); + _itemTakenFlags.clearAllFlags(); + + resetCaldoriaState(); + resetTSAState(); + resetPrehistoricState(); + resetNoradState(); + resetMarsState(); + resetWSCState(); +} + +void GameStateManager::getCurrentLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { + neighborhood = _currentNeighborhood; + room = _currentRoom; + direction = _currentDirection; +} + +void GameStateManager::setCurrentLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { + _lastNeighborhood = _currentNeighborhood; + _lastRoom = _currentRoom; + _lastDirection = _currentDirection; + _currentNeighborhood = neighborhood; + _currentRoom = room; + _currentDirection = direction; +} + +tNeighborhoodID GameStateManager::getCurrentNeighborhood() { + return _currentNeighborhood; +} + +void GameStateManager::setCurrentNeighborhood(const tNeighborhoodID neighborhood) { + _lastNeighborhood = _currentNeighborhood; + _currentNeighborhood = neighborhood; +} + +tRoomID GameStateManager::getCurrentRoom() { + return _currentRoom; +} + +void GameStateManager::setCurrentRoom(const tRoomID room) { + _lastRoom = _currentRoom; + _currentRoom = room; +} + +tDirectionConstant GameStateManager::getCurrentDirection() { + return _currentDirection; +} + +void GameStateManager::setCurrentDirection(const tDirectionConstant direction) { + _lastDirection = _currentDirection; + _currentDirection = direction; +} + +tRoomViewID GameStateManager::getCurrentRoomAndView() { + return MakeRoomView(_currentRoom, _currentDirection); +} + +void GameStateManager::getNextLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { + neighborhood = _nextNeighborhoodID; + room = _nextRoomID; + direction = _nextDirection; +} + +void GameStateManager::setNextLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { + _nextNeighborhoodID = neighborhood; + _nextRoomID = room; + _nextDirection = direction; +} + +tNeighborhoodID GameStateManager::getNextNeighborhood() { + return _nextNeighborhoodID; +} + +void GameStateManager::setNextNeighborhood(const tNeighborhoodID neighborhood) { + _nextNeighborhoodID = neighborhood; +} + +tRoomID GameStateManager::getNextRoom() { + return _nextRoomID; +} + +void GameStateManager::setNextRoom(const tRoomID room) { + _nextRoomID = room; +} + +tDirectionConstant GameStateManager::getNextDirection() { + return _nextDirection; +} + +void GameStateManager::setNextDirection(const tDirectionConstant direction) { + _nextDirection = direction; +} + +void GameStateManager::getLastLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) { + neighborhood = _currentNeighborhood; + room = _currentRoom; + direction = _currentDirection; +} + +void GameStateManager::setLastLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) { + _currentNeighborhood = neighborhood; + _currentRoom = room; + _currentDirection = direction; +} + +tNeighborhoodID GameStateManager::getLastNeighborhood() { + return _lastNeighborhood; +} + +void GameStateManager::setLastNeighborhood(const tNeighborhoodID neighborhood) { + _lastNeighborhood = neighborhood; +} + +tRoomID GameStateManager::getLastRoom() { + return _lastRoom; +} + +void GameStateManager::setLastRoom(const tRoomID room) { + _lastRoom = room; +} + +tDirectionConstant GameStateManager::getLastDirection() { + return _lastDirection; +} + +void GameStateManager::setLastDirection(const tDirectionConstant direction) { + _lastDirection = direction; +} + +tRoomViewID GameStateManager::getLastRoomAndView() { + return MakeRoomView(_lastRoom, _lastDirection); +} + +void GameStateManager::getOpenDoorLocation(tRoomID &room, tDirectionConstant &direction) { + room = _openDoorRoom; + direction = _openDoorDirection; +} + +void GameStateManager::setOpenDoorLocation(const tRoomID room, const tDirectionConstant direction) { + _openDoorRoom = room; + _openDoorDirection = direction; +} + +tRoomID GameStateManager::getOpenDoorRoom() { + return _openDoorRoom; +} + +void GameStateManager::setOpenDoorRoom(const tRoomID room) { + _openDoorRoom = room; +} + +tDirectionConstant GameStateManager::getOpenDoorDirection() { + return _openDoorDirection; +} + +void GameStateManager::setOpenDoorDirection(const tDirectionConstant direction) { + _openDoorDirection = direction; +} + +tRoomViewID GameStateManager::getDoorOpenRoomAndView() { + return MakeRoomView(_openDoorRoom, _openDoorDirection); +} + +bool GameStateManager::isCurrentDoorOpen() { + return _openDoorRoom == _currentRoom && _openDoorDirection == _currentDirection; +} + +tGameScoreType GameStateManager::getCaldoriaTSAScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringSawINNFlag)) + result += kSawINNScore; + if (_scoringFlags.getFlag(kScoringTookShowerFlag)) + result += kTookShowerScore; + if (_scoringFlags.getFlag(kScoringFixedHairFlag)) + result += kFixedHairScore; + if (_scoringFlags.getFlag(kScoringGotKeyCardFlag)) + result += kGotKeyCardScore; + if (_scoringFlags.getFlag(kScoringReadPaperFlag)) + result += kReadPaperScore; + if (_scoringFlags.getFlag(kScoringLookThroughTelescopeFlag)) + result += kLookThroughTelescopeScore; + if (_scoringFlags.getFlag(kScoringSawCaldoriaKioskFlag)) + result += kSawCaldoriaKioskScore; + if (_scoringFlags.getFlag(kScoringGoToTSAFlag)) + result += kGoToTSAScore; + if (_scoringFlags.getFlag(kScoringEnterTSAFlag)) + result += kEnterTSAScore; + if (_scoringFlags.getFlag(kScoringSawBust1Flag)) + result += kSawBust1Score; + if (_scoringFlags.getFlag(kScoringSawBust2Flag)) + result += kSawBust2Score; + if (_scoringFlags.getFlag(kScoringSawBust3Flag)) + result += kSawBust3Score; + if (_scoringFlags.getFlag(kScoringSawBust4Flag)) + result += kSawBust4Score; + if (_scoringFlags.getFlag(kScoringSawBust5Flag)) + result += kSawBust5Score; + if (_scoringFlags.getFlag(kScoringSawBust6Flag)) + result += kSawBust6Score; + if (_scoringFlags.getFlag(kScoringSawTheoryFlag)) + result += kSawTheoryScore; + if (_scoringFlags.getFlag(kScoringSawBackgroundFlag)) + result += kSawBackgroundScore; + if (_scoringFlags.getFlag(kScoringSawProcedureFlag)) + result += kSawProcedureScore; + if (_scoringFlags.getFlag(kScoringGotJourneymanKeyFlag)) + result += kGotJourneymanKeyScore; + if (_scoringFlags.getFlag(kScoringGotPegasusBiochipFlag)) + result += kGotPegasusBiochipScore; + if (_scoringFlags.getFlag(kScoringGotBiosuitFlag)) + result += kGotBiosuitScore; + if (_scoringFlags.getFlag(kScoringGoToPrehistoricFlag)) + result += kGoToPrehistoricScore; + if (_scoringFlags.getFlag(kScoringPutLogInReaderFlag)) + result += kPutLogInReaderScore; + if (_scoringFlags.getFlag(kScoringSawCaldoriaNormalFlag)) + result += kSawCaldoriaNormalScore; + if (_scoringFlags.getFlag(kScoringSawCaldoriaAlteredFlag)) + result += kSawCaldoriaAlteredScore; + if (_scoringFlags.getFlag(kScoringSawNoradNormalFlag)) + result += kSawNoradNormalScore; + if (_scoringFlags.getFlag(kScoringSawNoradAlteredFlag)) + result += kSawNoradAlteredScore; + if (_scoringFlags.getFlag(kScoringSawMarsNormalFlag)) + result += kSawMarsNormalScore; + if (_scoringFlags.getFlag(kScoringSawMarsAlteredFlag)) + result += kSawMarsAlteredScore; + if (_scoringFlags.getFlag(kScoringSawWSCNormalFlag)) + result += kSawWSCNormalScore; + if (_scoringFlags.getFlag(kScoringSawWSCAlteredFlag)) + result += kSawWSCAlteredScore; + if (_scoringFlags.getFlag(kScoringWentToReadyRoom2Flag)) + result += kWentToReadyRoom2Score; + if (_scoringFlags.getFlag(kScoringWentAfterSinclairFlag)) + result += kWentAfterSinclairScore; + if (_scoringFlags.getFlag(kScoringUsedCardBombFlag)) + result += kUsedCardBombScore; + if (_scoringFlags.getFlag(kScoringShieldedCardBombFlag)) + result += kShieldedCardBombScore; + if (_scoringFlags.getFlag(kScoringStunnedSinclairFlag)) + result += kStunnedSinclairScore; + if (_scoringFlags.getFlag(kScoringDisarmedNukeFlag)) + result += kDisarmedNukeScore; + + return result; +} + +tGameScoreType GameStateManager::getPrehistoricScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringThrewBreakerFlag)) + result += kThrewBreakerScore; + if (_scoringFlags.getFlag(kScoringExtendedBridgeFlag)) + result += kExtendedBridgeScore; + if (_scoringFlags.getFlag(kScoringGotHistoricalLogFlag)) + result += kGotHistoricalLogScore; + if (_scoringFlags.getFlag(kScoringFinishedPrehistoricFlag)) + result += kFinishedPrehistoricScore; + + return result; +} + +tGameScoreType GameStateManager::getMarsScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringThrownByRobotFlag)) + result += kThrownByRobotScore; + if (_scoringFlags.getFlag(kScoringGotMarsCardFlag)) + result += kGotMarsCardScore; + if (_scoringFlags.getFlag(kScoringSawMarsKioskFlag)) + result += kSawMarsKioskScore; + if (_scoringFlags.getFlag(kScoringSawTransportMapFlag)) + result += kSawTransportMapScore; + if (_scoringFlags.getFlag(kScoringGotCrowBarFlag)) + result += kGotCrowBarScore; + if (_scoringFlags.getFlag(kScoringTurnedOnTransportFlag)) + result += kTurnedOnTransportScore; + if (_scoringFlags.getFlag(kScoringGotOxygenMaskFlag)) + result += kGotOxygenMaskScore; + if (_scoringFlags.getFlag(kScoringAvoidedRobotFlag)) + result += kAvoidedRobotScore; + if (_scoringFlags.getFlag(kScoringActivatedPlatformFlag)) + result += kActivatedPlatformScore; + if (_scoringFlags.getFlag(kScoringUsedLiquidNitrogenFlag)) + result += kUsedLiquidNitrogenScore; + if (_scoringFlags.getFlag(kScoringUsedCrowBarFlag)) + result += kUsedCrowBarScore; + if (_scoringFlags.getFlag(kScoringFoundCardBombFlag)) + result += kFoundCardBombScore; + if (_scoringFlags.getFlag(kScoringDisarmedCardBombFlag)) + result += kDisarmedCardBombScore; + if (_scoringFlags.getFlag(kScoringGotCardBombFlag)) + result += kGotCardBombScore; + if (_scoringFlags.getFlag(kScoringThreadedMazeFlag)) + result += kThreadedMazeScore; + if (_scoringFlags.getFlag(kScoringThreadedGearRoomFlag)) + result += kThreadedGearRoomScore; + if (_scoringFlags.getFlag(kScoringEnteredShuttleFlag)) + result += kEnteredShuttleScore; + if (_scoringFlags.getFlag(kScoringEnteredLaunchTubeFlag)) + result += kEnteredLaunchTubeScore; + if (_scoringFlags.getFlag(kScoringStoppedRobotsShuttleFlag)) + result += kStoppedRobotsShuttleScore; + if (_scoringFlags.getFlag(kScoringGotMarsOpMemChipFlag)) + result += kGotMarsOpMemChipScore; + if (_scoringFlags.getFlag(kScoringFinishedMarsFlag)) + result += kFinishedMarsScore; + + return result; +} + +tGameScoreType GameStateManager::getNoradScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringSawSecurityMonitorFlag)) + result += kSawSecurityMonitorScore; + if (_scoringFlags.getFlag(kScoringFilledOxygenCanisterFlag)) + result += kFilledOxygenCanisterScore; + if (_scoringFlags.getFlag(kScoringFilledArgonCanisterFlag)) + result += kFilledArgonCanisterScore; + if (_scoringFlags.getFlag(kScoringSawUnconsciousOperatorFlag)) + result += kSawUnconsciousOperatorScore; + if (_scoringFlags.getFlag(kScoringWentThroughPressureDoorFlag)) + result += kWentThroughPressureDoorScore; + if (_scoringFlags.getFlag(kScoringPreppedSubFlag)) + result += kPreppedSubScore; + if (_scoringFlags.getFlag(kScoringEnteredSubFlag)) + result += kEnteredSubScore; + if (_scoringFlags.getFlag(kScoringExitedSubFlag)) + result += kExitedSubScore; + if (_scoringFlags.getFlag(kScoringSawRobotAt54NorthFlag)) + result += kSawRobotAt54NorthScore; + if (_scoringFlags.getFlag(kScoringPlayedWithClawFlag)) + result += kPlayedWithClawScore; + if (_scoringFlags.getFlag(kScoringUsedRetinalChipFlag)) + result += kUsedRetinalChipScore; + if (_scoringFlags.getFlag(kScoringFinishedGlobeGameFlag)) + result += kFinishedGlobeGameScore; + if (_scoringFlags.getFlag(kScoringStoppedNoradRobotFlag)) + result += kStoppedNoradRobotScore; + if (_scoringFlags.getFlag(kScoringGotNoradOpMemChipFlag)) + result += kGotNoradOpMemChipScore; + if (_scoringFlags.getFlag(kScoringFinishedNoradFlag)) + result += kFinishedNoradScore; + + return result; +} + +tGameScoreType GameStateManager::getWSCScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringRemovedDartFlag)) + result += kRemovedDartScore; + if (_scoringFlags.getFlag(kScoringAnalyzedDartFlag)) + result += kAnalyzedDartScore; + if (_scoringFlags.getFlag(kScoringBuiltAntidoteFlag)) + result += kBuiltAntidoteScore; + if (_scoringFlags.getFlag(kScoringGotSinclairKeyFlag)) + result += kGotSinclairKeyScore; + if (_scoringFlags.getFlag(kScoringGotArgonCanisterFlag)) + result += kGotArgonCanisterScore; + if (_scoringFlags.getFlag(kScoringGotNitrogenCanisterFlag)) + result += kGotNitrogenCanisterScore; + if (_scoringFlags.getFlag(kScoringPlayedWithMessagesFlag)) + result += kPlayedWithMessagesScore; + if (_scoringFlags.getFlag(kScoringSawMorphExperimentFlag)) + result += kSawMorphExperimentScore; + if (_scoringFlags.getFlag(kScoringEnteredSinclairOfficeFlag)) + result += kEnteredSinclairOfficeScore; + if (_scoringFlags.getFlag(kScoringSawBrochureFlag)) + result += kSawBrochureScore; + if (_scoringFlags.getFlag(kScoringSawSinclairEntry1Flag)) + result += kSawSinclairEntry1Score; + if (_scoringFlags.getFlag(kScoringSawSinclairEntry2Flag)) + result += kSawSinclairEntry2Score; + if (_scoringFlags.getFlag(kScoringSawSinclairEntry3Flag)) + result += kSawSinclairEntry3Score; + if (_scoringFlags.getFlag(kScoringSawWSCDirectoryFlag)) + result += kSawWSCDirectoryScore; + if (_scoringFlags.getFlag(kScoringUsedCrowBarInWSCFlag)) + result += kUsedCrowBarInWSCScore; + if (_scoringFlags.getFlag(kScoringFinishedPlasmaDodgeFlag)) + result += kFinishedPlasmaDodgeScore; + if (_scoringFlags.getFlag(kScoringOpenedCatwalkFlag)) + result += kOpenedCatwalkScore; + if (_scoringFlags.getFlag(kScoringStoppedWSCRobotFlag)) + result += kStoppedWSCRobotScore; + if (_scoringFlags.getFlag(kScoringGotWSCOpMemChipFlag)) + result += kGotWSCOpMemChipScore; + if (_scoringFlags.getFlag(kScoringFinishedWSCFlag)) + result += kFinishedWSCScore; + + return result; +} + +tGameScoreType GameStateManager::getGandhiScore() { + tGameScoreType result = 0; + + if (_scoringFlags.getFlag(kScoringMarsGandhiFlag)) + result += kMarsGandhiScore; + if (_scoringFlags.getFlag(kScoringNoradGandhiFlag)) + result += kNoradGandhiScore; + if (_scoringFlags.getFlag(kScoringWSCGandhiFlag)) + result += kWSCGandhiScore; + + return result; +} + +tGameScoreType GameStateManager::getTotalScore() { + return getCaldoriaTSAScore() + + getPrehistoricScore() + + getMarsScore() + + getNoradScore() + + getWSCScore() + + getGandhiScore(); +} + +///////////////////////////////////////////// +// +// Caldoria data + +void GameStateManager::writeCaldoriaState(Common::WriteStream *stream) { + _caldoriaFlags.writeToStream(stream); + stream->writeUint32BE(_caldoriaFuseTimeLimit); +} + +void GameStateManager::readCaldoriaState(Common::ReadStream *stream) { + _caldoriaFlags.readFromStream(stream); + _caldoriaFuseTimeLimit = stream->readUint32BE(); +} + +void GameStateManager::resetCaldoriaState() { + _caldoriaFlags.clearAllFlags(); + _caldoriaFuseTimeLimit = 0; +} + +///////////////////////////////////////////// +// +// TSA data + +void GameStateManager::writeTSAState(Common::WriteStream *stream) { + _TSAFlags.writeToStream(stream); + stream->writeUint32BE(_TSARipTimerTime); + stream->writeUint32BE(_TSAFuseTimeLimit); + stream->writeByte(_TSAState); + stream->writeByte(_T0BMonitorMode); + stream->writeUint32BE(_T0BMonitorStart); +} + +void GameStateManager::readTSAState(Common::ReadStream *stream) { + _TSAFlags.readFromStream(stream); + _TSARipTimerTime = stream->readUint32BE(); + _TSAFuseTimeLimit = stream->readUint32BE(); + _TSAState = stream->readByte(); + _T0BMonitorMode = stream->readByte(); + _T0BMonitorStart = stream->readUint32BE(); +} + +void GameStateManager::resetTSAState() { + _TSAFlags.clearAllFlags(); + _TSAState = 0; + _T0BMonitorMode = 0; + _T0BMonitorStart = 0; + _TSARipTimerTime = 0; + _TSAFuseTimeLimit = kTSAUncreatedTimeLimit; +} + +///////////////////////////////////////////// +// +// Prehistoric data + +void GameStateManager::writePrehistoricState(Common::WriteStream *stream) { + _prehistoricFlags.writeToStream(stream); +} + +void GameStateManager::readPrehistoricState(Common::ReadStream *stream) { + _prehistoricFlags.readFromStream(stream); +} + +void GameStateManager::resetPrehistoricState() { + _prehistoricFlags.clearAllFlags(); +} + +///////////////////////////////////////////// +// +// Norad data + +void GameStateManager::writeNoradState(Common::WriteStream *stream) { + _noradFlags.writeToStream(stream); + stream->writeUint16BE(_noradSubRoomPressure); + stream->writeUint32BE(_noradSubPrepState); // FIXME: sizeof(enum)! +} + +void GameStateManager::readNoradState(Common::ReadStream *stream) { + _noradFlags.readFromStream(stream); + _noradSubRoomPressure = stream->readUint16BE(); + _noradSubPrepState = (tNoradSubPrepState)stream->readUint32BE(); // FIXME: sizeof(enum)! +} + +void GameStateManager::resetNoradState() { + _noradFlags.clearAllFlags(); + _noradSubRoomPressure = 9; + _noradSubPrepState = kSubNotPrepped; +} + +///////////////////////////////////////////// +// +// Mars data + +void GameStateManager::writeMarsState(Common::WriteStream *stream) { + _marsFlags.writeToStream(stream); +} + +void GameStateManager::readMarsState(Common::ReadStream *stream) { + _marsFlags.readFromStream(stream); +} + +void GameStateManager::resetMarsState() { + _marsFlags.clearAllFlags(); +} + +///////////////////////////////////////////// +// +// WSC data + +void GameStateManager::writeWSCState(Common::WriteStream *stream) { + _WSCFlags.writeToStream(stream); +} + +void GameStateManager::readWSCState(Common::ReadStream *stream) { + _WSCFlags.readFromStream(stream); +} + +void GameStateManager::resetWSCState() { + _WSCFlags.clearAllFlags(); +} + +void GameStateManager::setScoringSawINN(const bool flag) { + _scoringFlags.setFlag(kScoringSawINNFlag, flag); +} + +void GameStateManager::setScoringTookShower(const bool flag) { + _scoringFlags.setFlag(kScoringTookShowerFlag, flag); +} + +void GameStateManager::setScoringFixedHair(const bool flag) { + _scoringFlags.setFlag(kScoringFixedHairFlag, flag); +} + +void GameStateManager::setScoringGotKeyCard(const bool flag) { + _scoringFlags.setFlag(kScoringGotKeyCardFlag, flag); +} + +void GameStateManager::setScoringReadPaper(const bool flag) { + _scoringFlags.setFlag(kScoringReadPaperFlag, flag); +} + +void GameStateManager::setScoringLookThroughTelescope(const bool flag) { + _scoringFlags.setFlag(kScoringLookThroughTelescopeFlag, flag); +} + +void GameStateManager::setScoringSawCaldoriaKiosk(const bool flag) { + _scoringFlags.setFlag(kScoringSawCaldoriaKioskFlag, flag); +} + +void GameStateManager::setScoringGoToTSA(const bool flag) { + _scoringFlags.setFlag(kScoringGoToTSAFlag, flag); +} + +void GameStateManager::setScoringEnterTSA(const bool flag) { + _scoringFlags.setFlag(kScoringEnterTSAFlag, flag); +} + +void GameStateManager::setScoringSawBust1(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust1Flag, flag); +} + +void GameStateManager::setScoringSawBust2(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust2Flag, flag); +} + +void GameStateManager::setScoringSawBust3(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust3Flag, flag); +} + +void GameStateManager::setScoringSawBust4(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust4Flag, flag); +} + +void GameStateManager::setScoringSawBust5(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust5Flag, flag); +} + +void GameStateManager::setScoringSawBust6(const bool flag) { + _scoringFlags.setFlag(kScoringSawBust6Flag, flag); +} + +void GameStateManager::setScoringSawTheory(const bool flag) { + _scoringFlags.setFlag(kScoringSawTheoryFlag, flag); +} + +void GameStateManager::setScoringSawBackground(const bool flag) { + _scoringFlags.setFlag(kScoringSawBackgroundFlag, flag); +} + +void GameStateManager::setScoringSawProcedure(const bool flag) { + _scoringFlags.setFlag(kScoringSawProcedureFlag, flag); +} + +void GameStateManager::setScoringGotJourneymanKey(const bool flag) { + _scoringFlags.setFlag(kScoringGotJourneymanKeyFlag, flag); +} + +void GameStateManager::setScoringGotPegasusBiochip(const bool flag) { + _scoringFlags.setFlag(kScoringGotPegasusBiochipFlag, flag); +} + +void GameStateManager::setScoringGotBiosuit(const bool flag) { + _scoringFlags.setFlag(kScoringGotBiosuitFlag, flag); +} + +void GameStateManager::setScoringGoToPrehistoric(const bool flag) { + _scoringFlags.setFlag(kScoringGoToPrehistoricFlag, flag); +} + +void GameStateManager::setScoringPutLogInReader(const bool flag) { + _scoringFlags.setFlag(kScoringPutLogInReaderFlag, flag); +} + +void GameStateManager::setScoringSawCaldoriaNormal(const bool flag) { + _scoringFlags.setFlag(kScoringSawCaldoriaNormalFlag, flag); +} + +void GameStateManager::setScoringSawCaldoriaAltered(const bool flag) { + _scoringFlags.setFlag(kScoringSawCaldoriaAlteredFlag, flag); +} + +void GameStateManager::setScoringSawNoradNormal(const bool flag) { + _scoringFlags.setFlag(kScoringSawNoradNormalFlag, flag); +} + +void GameStateManager::setScoringSawNoradAltered(const bool flag) { + _scoringFlags.setFlag(kScoringSawNoradAlteredFlag, flag); +} + +void GameStateManager::setScoringSawMarsNormal(const bool flag) { + _scoringFlags.setFlag(kScoringSawMarsNormalFlag, flag); +} + +void GameStateManager::setScoringSawMarsAltered(const bool flag) { + _scoringFlags.setFlag(kScoringSawMarsAlteredFlag, flag); +} + +void GameStateManager::setScoringSawWSCNormal(const bool flag) { + _scoringFlags.setFlag(kScoringSawWSCNormalFlag, flag); +} + +void GameStateManager::setScoringSawWSCAltered(const bool flag) { + _scoringFlags.setFlag(kScoringSawWSCAlteredFlag, flag); +} + +void GameStateManager::setScoringWentToReadyRoom2(const bool flag) { + _scoringFlags.setFlag(kScoringWentToReadyRoom2Flag, flag); +} + +void GameStateManager::setScoringWentAfterSinclair(const bool flag) { + _scoringFlags.setFlag(kScoringWentAfterSinclairFlag, flag); +} + +void GameStateManager::setScoringUsedCardBomb(const bool flag) { + _scoringFlags.setFlag(kScoringUsedCardBombFlag, flag); +} + +void GameStateManager::setScoringShieldedCardBomb(const bool flag) { + _scoringFlags.setFlag(kScoringShieldedCardBombFlag, flag); +} + +void GameStateManager::setScoringStunnedSinclair(const bool flag) { + _scoringFlags.setFlag(kScoringStunnedSinclairFlag, flag); +} + +void GameStateManager::setScoringDisarmedNuke(const bool flag) { + _scoringFlags.setFlag(kScoringDisarmedNukeFlag, flag); +} + +void GameStateManager::setScoringThrewBreaker(const bool flag) { + _scoringFlags.setFlag(kScoringThrewBreakerFlag, flag); +} + +void GameStateManager::setScoringExtendedBridge(const bool flag) { + _scoringFlags.setFlag(kScoringExtendedBridgeFlag, flag); +} + +void GameStateManager::setScoringGotHistoricalLog(const bool flag) { + _scoringFlags.setFlag(kScoringGotHistoricalLogFlag, flag); +} + +void GameStateManager::setScoringFinishedPrehistoric(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedPrehistoricFlag, flag); +} + +void GameStateManager::setScoringThrownByRobot(const bool flag) { + _scoringFlags.setFlag(kScoringThrownByRobotFlag, flag); +} + +void GameStateManager::setScoringGotMarsCard(const bool flag) { + _scoringFlags.setFlag(kScoringGotMarsCardFlag, flag); +} + +void GameStateManager::setScoringSawMarsKiosk(const bool flag) { + _scoringFlags.setFlag(kScoringSawMarsKioskFlag, flag); +} + +void GameStateManager::setScoringSawTransportMap(const bool flag) { + _scoringFlags.setFlag(kScoringSawTransportMapFlag, flag); +} + +void GameStateManager::setScoringGotCrowBar(const bool flag) { + _scoringFlags.setFlag(kScoringGotCrowBarFlag, flag); +} + +void GameStateManager::setScoringTurnedOnTransport(const bool flag) { + _scoringFlags.setFlag(kScoringTurnedOnTransportFlag, flag); +} + +void GameStateManager::setScoringGotOxygenMask(const bool flag) { + _scoringFlags.setFlag(kScoringGotOxygenMaskFlag, flag); +} + +void GameStateManager::setScoringAvoidedRobot(const bool flag) { + _scoringFlags.setFlag(kScoringAvoidedRobotFlag, flag); +} + +void GameStateManager::setScoringActivatedPlatform(const bool flag) { + _scoringFlags.setFlag(kScoringActivatedPlatformFlag, flag); +} + +void GameStateManager::setScoringUsedLiquidNitrogen(const bool flag) { + _scoringFlags.setFlag(kScoringUsedLiquidNitrogenFlag, flag); +} + +void GameStateManager::setScoringUsedCrowBar(const bool flag) { + _scoringFlags.setFlag(kScoringUsedCrowBarFlag, flag); +} + +void GameStateManager::setScoringFoundCardBomb(const bool flag) { + _scoringFlags.setFlag(kScoringFoundCardBombFlag, flag); +} + +void GameStateManager::setScoringDisarmedCardBomb(const bool flag) { + _scoringFlags.setFlag(kScoringDisarmedCardBombFlag, flag); +} + +void GameStateManager::setScoringGotCardBomb(const bool flag) { + _scoringFlags.setFlag(kScoringGotCardBombFlag, flag); +} + +void GameStateManager::setScoringThreadedMaze(const bool flag) { + _scoringFlags.setFlag(kScoringThreadedMazeFlag, flag); +} + +void GameStateManager::setScoringThreadedGearRoom(const bool flag) { + _scoringFlags.setFlag(kScoringThreadedGearRoomFlag, flag); +} + +void GameStateManager::setScoringEnteredShuttle(const bool flag) { + _scoringFlags.setFlag(kScoringEnteredShuttleFlag, flag); +} + +void GameStateManager::setScoringEnteredLaunchTube(const bool flag) { + _scoringFlags.setFlag(kScoringEnteredLaunchTubeFlag, flag); +} + +void GameStateManager::setScoringStoppedRobotsShuttle(const bool flag) { + _scoringFlags.setFlag(kScoringStoppedRobotsShuttleFlag, flag); +} + +void GameStateManager::setScoringGotMarsOpMemChip(const bool flag) { + _scoringFlags.setFlag(kScoringGotMarsOpMemChipFlag, flag); +} + +void GameStateManager::setScoringFinishedMars(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedMarsFlag, flag); +} + +void GameStateManager::setScoringSawSecurityMonitor(const bool flag) { + _scoringFlags.setFlag(kScoringSawSecurityMonitorFlag, flag); +} + +void GameStateManager::setScoringFilledOxygenCanister(const bool flag) { + _scoringFlags.setFlag(kScoringFilledOxygenCanisterFlag, flag); +} + +void GameStateManager::setScoringFilledArgonCanister(const bool flag) { + _scoringFlags.setFlag(kScoringFilledArgonCanisterFlag, flag); +} + +void GameStateManager::setScoringSawUnconsciousOperator(const bool flag) { + _scoringFlags.setFlag(kScoringSawUnconsciousOperatorFlag, flag); +} + +void GameStateManager::setScoringWentThroughPressureDoor(const bool flag) { + _scoringFlags.setFlag(kScoringWentThroughPressureDoorFlag, flag); +} + +void GameStateManager::setScoringPreppedSub(const bool flag) { + _scoringFlags.setFlag(kScoringPreppedSubFlag, flag); +} + +void GameStateManager::setScoringEnteredSub(const bool flag) { + _scoringFlags.setFlag(kScoringEnteredSubFlag, flag); +} + +void GameStateManager::setScoringExitedSub(const bool flag) { + _scoringFlags.setFlag(kScoringExitedSubFlag, flag); +} + +void GameStateManager::setScoringSawRobotAt54North(const bool flag) { + _scoringFlags.setFlag(kScoringSawRobotAt54NorthFlag, flag); +} + +void GameStateManager::setScoringPlayedWithClaw(const bool flag) { + _scoringFlags.setFlag(kScoringPlayedWithClawFlag, flag); +} + +void GameStateManager::setScoringUsedRetinalChip(const bool flag) { + _scoringFlags.setFlag(kScoringUsedRetinalChipFlag, flag); +} + +void GameStateManager::setScoringFinishedGlobeGame(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedGlobeGameFlag, flag); +} + +void GameStateManager::setScoringStoppedNoradRobot(const bool flag) { + _scoringFlags.setFlag(kScoringStoppedNoradRobotFlag, flag); +} + +void GameStateManager::setScoringGotNoradOpMemChip(const bool flag) { + _scoringFlags.setFlag(kScoringGotNoradOpMemChipFlag, flag); +} + +void GameStateManager::setScoringFinishedNorad(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedNoradFlag, flag); +} + +void GameStateManager::setScoringRemovedDart(const bool flag) { + _scoringFlags.setFlag(kScoringRemovedDartFlag, flag); +} + +void GameStateManager::setScoringAnalyzedDart(const bool flag) { + _scoringFlags.setFlag(kScoringAnalyzedDartFlag, flag); +} + +void GameStateManager::setScoringBuiltAntidote(const bool flag) { + _scoringFlags.setFlag(kScoringBuiltAntidoteFlag, flag); +} + +void GameStateManager::setScoringGotSinclairKey(const bool flag) { + _scoringFlags.setFlag(kScoringGotSinclairKeyFlag, flag); +} + +void GameStateManager::setScoringGotArgonCanister(const bool flag) { + _scoringFlags.setFlag(kScoringGotArgonCanisterFlag, flag); +} + +void GameStateManager::setScoringGotNitrogenCanister(const bool flag) { + _scoringFlags.setFlag(kScoringGotNitrogenCanisterFlag, flag); +} + +void GameStateManager::setScoringPlayedWithMessages(const bool flag) { + _scoringFlags.setFlag(kScoringPlayedWithMessagesFlag, flag); +} + +void GameStateManager::setScoringSawMorphExperiment(const bool flag) { + _scoringFlags.setFlag(kScoringSawMorphExperimentFlag, flag); +} + +void GameStateManager::setScoringEnteredSinclairOffice(const bool flag) { + _scoringFlags.setFlag(kScoringEnteredSinclairOfficeFlag, flag); +} + +void GameStateManager::setScoringSawBrochure(const bool flag) { + _scoringFlags.setFlag(kScoringSawBrochureFlag, flag); +} + +void GameStateManager::setScoringSawSinclairEntry1(const bool flag) { + _scoringFlags.setFlag(kScoringSawSinclairEntry1Flag, flag); +} + +void GameStateManager::setScoringSawSinclairEntry2(const bool flag) { + _scoringFlags.setFlag(kScoringSawSinclairEntry2Flag, flag); +} + +void GameStateManager::setScoringSawSinclairEntry3(const bool flag) { + _scoringFlags.setFlag(kScoringSawSinclairEntry3Flag, flag); +} + +void GameStateManager::setScoringSawWSCDirectory(const bool flag) { + _scoringFlags.setFlag(kScoringSawWSCDirectoryFlag, flag); +} + +void GameStateManager::setScoringUsedCrowBarInWSC(const bool flag) { + _scoringFlags.setFlag(kScoringUsedCrowBarInWSCFlag, flag); +} + +void GameStateManager::setScoringFinishedPlasmaDodge(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedPlasmaDodgeFlag, flag); +} + +void GameStateManager::setScoringOpenedCatwalk(const bool flag) { + _scoringFlags.setFlag(kScoringOpenedCatwalkFlag, flag); +} + +void GameStateManager::setScoringStoppedWSCRobot(const bool flag) { + _scoringFlags.setFlag(kScoringStoppedWSCRobotFlag, flag); +} + +void GameStateManager::setScoringGotWSCOpMemChip(const bool flag) { + _scoringFlags.setFlag(kScoringGotWSCOpMemChipFlag, flag); +} + +void GameStateManager::setScoringFinishedWSC(const bool flag) { + _scoringFlags.setFlag(kScoringFinishedWSCFlag, flag); +} + +void GameStateManager::setScoringMarsGandhi(const bool flag) { + _scoringFlags.setFlag(kScoringMarsGandhiFlag, flag); +} + +void GameStateManager::setScoringNoradGandhi(const bool flag) { + _scoringFlags.setFlag(kScoringNoradGandhiFlag, flag); +} + +void GameStateManager::setScoringWSCGandhi(const bool flag) { + _scoringFlags.setFlag(kScoringWSCGandhiFlag, flag); +} + +bool GameStateManager::getScoringSawINN() { + return _scoringFlags.getFlag(kScoringSawINNFlag); +} + +bool GameStateManager::getScoringTookShower() { + return _scoringFlags.getFlag(kScoringTookShowerFlag); +} + +bool GameStateManager::getScoringFixedHair() { + return _scoringFlags.getFlag(kScoringFixedHairFlag); +} + +bool GameStateManager::getScoringGotKeyCard() { + return _scoringFlags.getFlag(kScoringGotKeyCardFlag); +} + +bool GameStateManager::getScoringReadPaper() { + return _scoringFlags.getFlag(kScoringReadPaperFlag); +} + +bool GameStateManager::getScoringLookThroughTelescope() { + return _scoringFlags.getFlag(kScoringLookThroughTelescopeFlag); +} + +bool GameStateManager::getScoringSawCaldoriaKiosk() { + return _scoringFlags.getFlag(kScoringSawCaldoriaKioskFlag); +} + +bool GameStateManager::getScoringGoToTSA() { + return _scoringFlags.getFlag(kScoringGoToTSAFlag); +} + +bool GameStateManager::getScoringEnterTSA() { + return _scoringFlags.getFlag(kScoringEnterTSAFlag); +} + +bool GameStateManager::getScoringSawBust1() { + return _scoringFlags.getFlag(kScoringSawBust1Flag); +} + +bool GameStateManager::getScoringSawBust2() { + return _scoringFlags.getFlag(kScoringSawBust2Flag); +} + +bool GameStateManager::getScoringSawBust3() { + return _scoringFlags.getFlag(kScoringSawBust3Flag); +} + +bool GameStateManager::getScoringSawBust4() { + return _scoringFlags.getFlag(kScoringSawBust4Flag); +} + +bool GameStateManager::getScoringSawBust5() { + return _scoringFlags.getFlag(kScoringSawBust5Flag); +} + +bool GameStateManager::getScoringSawBust6() { + return _scoringFlags.getFlag(kScoringSawBust6Flag); +} + +bool GameStateManager::getScoringSawTheory() { + return _scoringFlags.getFlag(kScoringSawTheoryFlag); +} + +bool GameStateManager::getScoringSawBackground() { + return _scoringFlags.getFlag(kScoringSawBackgroundFlag); +} + +bool GameStateManager::getScoringSawProcedure() { + return _scoringFlags.getFlag(kScoringSawProcedureFlag); +} + +bool GameStateManager::getScoringGotJourneymanKey() { + return _scoringFlags.getFlag(kScoringGotJourneymanKeyFlag); +} + +bool GameStateManager::getScoringGotPegasusBiochip() { + return _scoringFlags.getFlag(kScoringGotPegasusBiochipFlag); +} + +bool GameStateManager::getScoringGotBiosuit() { + return _scoringFlags.getFlag(kScoringGotBiosuitFlag); +} + +bool GameStateManager::getScoringGoToPrehistoric() { + return _scoringFlags.getFlag(kScoringGoToPrehistoricFlag); +} + +bool GameStateManager::getScoringPutLogInReader() { + return _scoringFlags.getFlag(kScoringPutLogInReaderFlag); +} + +bool GameStateManager::getScoringSawCaldoriaNormal() { + return _scoringFlags.getFlag(kScoringSawCaldoriaNormalFlag); +} + +bool GameStateManager::getScoringSawCaldoriaAltered() { + return _scoringFlags.getFlag(kScoringSawCaldoriaAlteredFlag); +} + +bool GameStateManager::getScoringSawNoradNormal() { + return _scoringFlags.getFlag(kScoringSawNoradNormalFlag); +} + +bool GameStateManager::getScoringSawNoradAltered() { + return _scoringFlags.getFlag(kScoringSawNoradAlteredFlag); +} + +bool GameStateManager::getScoringSawMarsNormal() { + return _scoringFlags.getFlag(kScoringSawMarsNormalFlag); +} + +bool GameStateManager::getScoringSawMarsAltered() { + return _scoringFlags.getFlag(kScoringSawMarsAlteredFlag); +} + +bool GameStateManager::getScoringSawWSCNormal() { + return _scoringFlags.getFlag(kScoringSawWSCNormalFlag); +} + +bool GameStateManager::getScoringSawWSCAltered() { + return _scoringFlags.getFlag(kScoringSawWSCAlteredFlag); +} + +bool GameStateManager::getScoringWentToReadyRoom2() { + return _scoringFlags.getFlag(kScoringWentToReadyRoom2Flag); +} + +bool GameStateManager::getScoringWentAfterSinclair() { + return _scoringFlags.getFlag(kScoringWentAfterSinclairFlag); +} + +bool GameStateManager::getScoringUsedCardBomb() { + return _scoringFlags.getFlag(kScoringUsedCardBombFlag); +} + +bool GameStateManager::getScoringShieldedCardBomb() { + return _scoringFlags.getFlag(kScoringShieldedCardBombFlag); +} + +bool GameStateManager::getScoringStunnedSinclair() { + return _scoringFlags.getFlag(kScoringStunnedSinclairFlag); +} + +bool GameStateManager::getScoringDisarmedNuke() { + return _scoringFlags.getFlag(kScoringDisarmedNukeFlag); +} + +bool GameStateManager::getScoringThrewBreaker() { + return _scoringFlags.getFlag(kScoringThrewBreakerFlag); +} + +bool GameStateManager::getScoringExtendedBridge() { + return _scoringFlags.getFlag(kScoringExtendedBridgeFlag); +} + +bool GameStateManager::getScoringGotHistoricalLog() { + return _scoringFlags.getFlag(kScoringGotHistoricalLogFlag); +} + +bool GameStateManager::getScoringFinishedPrehistoric() { + return _scoringFlags.getFlag(kScoringFinishedPrehistoricFlag); +} + +bool GameStateManager::getScoringThrownByRobot() { + return _scoringFlags.getFlag(kScoringThrownByRobotFlag); +} + +bool GameStateManager::getScoringGotMarsCard() { + return _scoringFlags.getFlag(kScoringGotMarsCardFlag); +} + +bool GameStateManager::getScoringSawMarsKiosk() { + return _scoringFlags.getFlag(kScoringSawMarsKioskFlag); +} + +bool GameStateManager::getScoringSawTransportMap() { + return _scoringFlags.getFlag(kScoringSawTransportMapFlag); +} + +bool GameStateManager::getScoringGotCrowBar() { + return _scoringFlags.getFlag(kScoringGotCrowBarFlag); +} + +bool GameStateManager::getScoringTurnedOnTransport() { + return _scoringFlags.getFlag(kScoringTurnedOnTransportFlag); +} + +bool GameStateManager::getScoringGotOxygenMask() { + return _scoringFlags.getFlag(kScoringGotOxygenMaskFlag); +} + +bool GameStateManager::getScoringAvoidedRobot() { + return _scoringFlags.getFlag(kScoringAvoidedRobotFlag); +} + +bool GameStateManager::getScoringActivatedPlatform() { + return _scoringFlags.getFlag(kScoringActivatedPlatformFlag); +} + +bool GameStateManager::getScoringUsedLiquidNitrogen() { + return _scoringFlags.getFlag(kScoringUsedLiquidNitrogenFlag); +} + +bool GameStateManager::getScoringUsedCrowBar() { + return _scoringFlags.getFlag(kScoringUsedCrowBarFlag); +} + +bool GameStateManager::getScoringFoundCardBomb() { + return _scoringFlags.getFlag(kScoringFoundCardBombFlag); +} + +bool GameStateManager::getScoringDisarmedCardBomb() { + return _scoringFlags.getFlag(kScoringDisarmedCardBombFlag); +} + +bool GameStateManager::getScoringGotCardBomb() { + return _scoringFlags.getFlag(kScoringGotCardBombFlag); +} + +bool GameStateManager::getScoringThreadedMaze() { + return _scoringFlags.getFlag(kScoringThreadedMazeFlag); +} + +bool GameStateManager::getScoringThreadedGearRoom() { + return _scoringFlags.getFlag(kScoringThreadedGearRoomFlag); +} + +bool GameStateManager::getScoringEnteredShuttle() { + return _scoringFlags.getFlag(kScoringEnteredShuttleFlag); +} + +bool GameStateManager::getScoringEnteredLaunchTube() { + return _scoringFlags.getFlag(kScoringEnteredLaunchTubeFlag); +} + +bool GameStateManager::getScoringStoppedRobotsShuttle() { + return _scoringFlags.getFlag(kScoringStoppedRobotsShuttleFlag); +} + +bool GameStateManager::getScoringGotMarsOpMemChip() { + return _scoringFlags.getFlag(kScoringGotMarsOpMemChipFlag); +} + +bool GameStateManager::getScoringFinishedMars() { + return _scoringFlags.getFlag(kScoringFinishedMarsFlag); +} + +bool GameStateManager::getScoringSawSecurityMonitor() { + return _scoringFlags.getFlag(kScoringSawSecurityMonitorFlag); +} + +bool GameStateManager::getScoringFilledOxygenCanister() { + return _scoringFlags.getFlag(kScoringFilledOxygenCanisterFlag); +} + +bool GameStateManager::getScoringFilledArgonCanister() { + return _scoringFlags.getFlag(kScoringFilledArgonCanisterFlag); +} + +bool GameStateManager::getScoringSawUnconsciousOperator() { + return _scoringFlags.getFlag(kScoringSawUnconsciousOperatorFlag); +} + +bool GameStateManager::getScoringWentThroughPressureDoor() { + return _scoringFlags.getFlag(kScoringWentThroughPressureDoorFlag); +} + +bool GameStateManager::getScoringPreppedSub() { + return _scoringFlags.getFlag(kScoringPreppedSubFlag); +} + +bool GameStateManager::getScoringEnteredSub() { + return _scoringFlags.getFlag(kScoringEnteredSubFlag); +} + +bool GameStateManager::getScoringExitedSub() { + return _scoringFlags.getFlag(kScoringExitedSubFlag); +} + +bool GameStateManager::getScoringSawRobotAt54North() { + return _scoringFlags.getFlag(kScoringSawRobotAt54NorthFlag); +} + +bool GameStateManager::getScoringPlayedWithClaw() { + return _scoringFlags.getFlag(kScoringPlayedWithClawFlag); +} + +bool GameStateManager::getScoringUsedRetinalChip() { + return _scoringFlags.getFlag(kScoringUsedRetinalChipFlag); +} + +bool GameStateManager::getScoringFinishedGlobeGame() { + return _scoringFlags.getFlag(kScoringFinishedGlobeGameFlag); +} + +bool GameStateManager::getScoringStoppedNoradRobot() { + return _scoringFlags.getFlag(kScoringStoppedNoradRobotFlag); +} + +bool GameStateManager::getScoringGotNoradOpMemChip() { + return _scoringFlags.getFlag(kScoringGotNoradOpMemChipFlag); +} + +bool GameStateManager::getScoringFinishedNorad() { + return _scoringFlags.getFlag(kScoringFinishedNoradFlag); +} + +bool GameStateManager::getScoringRemovedDart() { + return _scoringFlags.getFlag(kScoringRemovedDartFlag); +} + +bool GameStateManager::getScoringAnalyzedDart() { + return _scoringFlags.getFlag(kScoringAnalyzedDartFlag); +} + +bool GameStateManager::getScoringBuiltAntidote() { + return _scoringFlags.getFlag(kScoringBuiltAntidoteFlag); +} + +bool GameStateManager::getScoringGotSinclairKey() { + return _scoringFlags.getFlag(kScoringGotSinclairKeyFlag); +} + +bool GameStateManager::getScoringGotArgonCanister() { + return _scoringFlags.getFlag(kScoringGotArgonCanisterFlag); +} + +bool GameStateManager::getScoringGotNitrogenCanister() { + return _scoringFlags.getFlag(kScoringGotNitrogenCanisterFlag); +} + +bool GameStateManager::getScoringPlayedWithMessages() { + return _scoringFlags.getFlag(kScoringPlayedWithMessagesFlag); +} + +bool GameStateManager::getScoringSawMorphExperiment() { + return _scoringFlags.getFlag(kScoringSawMorphExperimentFlag); +} + +bool GameStateManager::getScoringEnteredSinclairOffice() { + return _scoringFlags.getFlag(kScoringEnteredSinclairOfficeFlag); +} + +bool GameStateManager::getScoringSawBrochure() { + return _scoringFlags.getFlag(kScoringSawBrochureFlag); +} + +bool GameStateManager::getScoringSawSinclairEntry1() { + return _scoringFlags.getFlag(kScoringSawSinclairEntry1Flag); +} + +bool GameStateManager::getScoringSawSinclairEntry2() { + return _scoringFlags.getFlag(kScoringSawSinclairEntry2Flag); +} + +bool GameStateManager::getScoringSawSinclairEntry3() { + return _scoringFlags.getFlag(kScoringSawSinclairEntry3Flag); +} + +bool GameStateManager::getScoringSawWSCDirectory() { + return _scoringFlags.getFlag(kScoringSawWSCDirectoryFlag); +} + +bool GameStateManager::getScoringUsedCrowBarInWSC() { + return _scoringFlags.getFlag(kScoringUsedCrowBarInWSCFlag); +} + +bool GameStateManager::getScoringFinishedPlasmaDodge() { + return _scoringFlags.getFlag(kScoringFinishedPlasmaDodgeFlag); +} + +bool GameStateManager::getScoringOpenedCatwalk() { + return _scoringFlags.getFlag(kScoringOpenedCatwalkFlag); +} + +bool GameStateManager::getScoringStoppedWSCRobot() { + return _scoringFlags.getFlag(kScoringStoppedWSCRobotFlag); +} + +bool GameStateManager::getScoringGotWSCOpMemChip() { + return _scoringFlags.getFlag(kScoringGotWSCOpMemChipFlag); +} + +bool GameStateManager::getScoringFinishedWSC() { + return _scoringFlags.getFlag(kScoringFinishedWSCFlag); +} + +bool GameStateManager::getScoringMarsGandhi() { + return _scoringFlags.getFlag(kScoringMarsGandhiFlag); +} + +bool GameStateManager::getScoringNoradGandhi() { + return _scoringFlags.getFlag(kScoringNoradGandhiFlag); +} + +bool GameStateManager::getScoringWSCGandhi() { + return _scoringFlags.getFlag(kScoringWSCGandhiFlag); +} + +void GameStateManager::setWalkthroughMode(bool value) { + _globalFlags.setFlag(kGlobalWalkthroughFlag, value); +} + +bool GameStateManager::getWalkthroughMode() { + return _globalFlags.getFlag(kGlobalWalkthroughFlag); +} + +void GameStateManager::setShieldOn(bool value) { + _globalFlags.setFlag(kGlobalShieldOnFlag, value); +} + +bool GameStateManager::getShieldOn() { + return _globalFlags.getFlag(kGlobalShieldOnFlag); +} + +void GameStateManager::setEasterEgg(bool value) { + _globalFlags.setFlag(kGlobalEasterEggFlag, value); +} + +bool GameStateManager::getEasterEgg() { + return _globalFlags.getFlag(kGlobalEasterEggFlag); +} + +void GameStateManager::setBeenToWSC(bool value) { + _globalFlags.setFlag(kGlobalBeenToWSCFlag, value); +} + +bool GameStateManager::getBeenToWSC() { + return _globalFlags.getFlag(kGlobalBeenToWSCFlag); +} + +void GameStateManager::setBeenToMars(bool value) { + _globalFlags.setFlag(kGlobalBeenToMarsFlag, value); +} + +bool GameStateManager::getBeenToMars() { + return _globalFlags.getFlag(kGlobalBeenToMarsFlag); +} + +void GameStateManager::setBeenToNorad(bool value) { + _globalFlags.setFlag(kGlobalBeenToNoradFlag, value); +} + +bool GameStateManager::getBeenToNorad() { + return _globalFlags.getFlag(kGlobalBeenToNoradFlag); +} + +void GameStateManager::setWSCFinished(bool value) { + _globalFlags.setFlag(kGlobalWSCFinishedFlag, value); +} + +bool GameStateManager::getWSCFinished() { + return _globalFlags.getFlag(kGlobalWSCFinishedFlag); +} + +void GameStateManager::setMarsFinished(bool value) { + _globalFlags.setFlag(kGlobalMarsFinishedFlag, value); +} + +bool GameStateManager::getMarsFinished() { + return _globalFlags.getFlag(kGlobalMarsFinishedFlag); +} + +void GameStateManager::setNoradFinished(bool value) { + _globalFlags.setFlag(kGlobalNoradFinishedFlag, value); +} + +bool GameStateManager::getNoradFinished() { + return _globalFlags.getFlag(kGlobalNoradFinishedFlag); +} + +bool GameStateManager::allTimeZonesFinished() { + return getWSCFinished() && getMarsFinished() && getNoradFinished(); +} + +void GameStateManager::setTakenItemID(tItemID id, bool value) { + _itemTakenFlags.setFlag(id, value); +} + +bool GameStateManager::isTakenItemID(tItemID id) { + return _itemTakenFlags.getFlag(id); +} + +void GameStateManager::setTakenItem(CItem *item, bool value) { + setTakenItemID(item->GetObjectID(), value); +} + +bool GameStateManager::isTakenItem(CItem *item) { + return isTakenItemID(item->GetObjectID()); +} + +void GameStateManager::setCaldoriaFuseTimeLimit(const TimeValue timeLimit) { + _caldoriaFuseTimeLimit = timeLimit; +} + +TimeValue GameStateManager::getCaldoriaFuseTimeLimit() { + return _caldoriaFuseTimeLimit; +} + +void GameStateManager::setCaldoriaSeenPullback(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSeenPullbackFlag, value); +} + +bool GameStateManager::getCaldoriaSeenPullback() { + return _caldoriaFlags.getFlag(kCaldoriaSeenPullbackFlag); +} + +void GameStateManager::setCaldoriaMadeOJ(bool value) { + _caldoriaFlags.setFlag(kCaldoriaMadeOJFlag, value); +} + +bool GameStateManager::getCaldoriaMadeOJ() { + return _caldoriaFlags.getFlag(kCaldoriaMadeOJFlag); +} + +void GameStateManager::setCaldoriaWokenUp(bool value) { + _caldoriaFlags.setFlag(kCaldoriaWokenUpFlag, value); +} + +bool GameStateManager::getCaldoriaWokenUp() { + return _caldoriaFlags.getFlag(kCaldoriaWokenUpFlag); +} + +void GameStateManager::setCaldoriaDidRecalibration(bool value) { + _caldoriaFlags.setFlag(kCaldoriaDidRecalibrationFlag, value); +} + +bool GameStateManager::getCaldoriaDidRecalibration() { + return _caldoriaFlags.getFlag(kCaldoriaDidRecalibrationFlag); +} + +void GameStateManager::setCaldoriaSeenSinclairInElevator(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSeenSinclairInElevatorFlag, value); +} + +bool GameStateManager::getCaldoriaSeenSinclairInElevator() { + return _caldoriaFlags.getFlag(kCaldoriaSeenSinclairInElevatorFlag); +} + +void GameStateManager::setCaldoriaINNAnnouncing(bool value) { + _caldoriaFlags.setFlag(kCaldoriaINNAnnouncingFlag, value); +} + +bool GameStateManager::getCaldoriaINNAnnouncing() { + return _caldoriaFlags.getFlag(kCaldoriaINNAnnouncingFlag); +} + +void GameStateManager::setCaldoriaSeenINN(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSeenINNFlag, value); +} + +bool GameStateManager::getCaldoriaSeenINN() { + return _caldoriaFlags.getFlag(kCaldoriaSeenINNFlag); +} + +void GameStateManager::setCaldoriaSeenMessages(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSeenMessagesFlag, value); +} + +bool GameStateManager::getCaldoriaSeenMessages() { + return _caldoriaFlags.getFlag(kCaldoriaSeenMessagesFlag); +} + +void GameStateManager::setCaldoriaSinclairShot(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSinclairShotFlag, value); +} + +bool GameStateManager::getCaldoriaSinclairShot() { + return _caldoriaFlags.getFlag(kCaldoriaSinclairShotFlag); +} + +void GameStateManager::setCaldoriaBombDisarmed(bool value) { + _caldoriaFlags.setFlag(kCaldoriaBombDisarmedFlag, value); +} + +bool GameStateManager::getCaldoriaBombDisarmed() { + return _caldoriaFlags.getFlag(kCaldoriaBombDisarmedFlag); +} + +void GameStateManager::setCaldoriaRoofDoorOpen(bool value) { + _caldoriaFlags.setFlag(kCaldoriaRoofDoorOpenFlag, value); +} + +bool GameStateManager::getCaldoriaRoofDoorOpen() { + return _caldoriaFlags.getFlag(kCaldoriaRoofDoorOpenFlag); +} + +void GameStateManager::setCaldoriaDoneHygiene(bool value) { + _caldoriaFlags.setFlag(kCaldoriaDoneHygieneFlag, value); +} + +bool GameStateManager::getCaldoriaDoneHygiene() { + return _caldoriaFlags.getFlag(kCaldoriaDoneHygieneFlag); +} + +void GameStateManager::setCaldoriaSawVoiceAnalysis(bool value) { + _caldoriaFlags.setFlag(kCaldoriaSawVoiceAnalysisFlag, value); +} + +bool GameStateManager::getCaldoriaSawVoiceAnalysis() { + return _caldoriaFlags.getFlag(kCaldoriaSawVoiceAnalysisFlag); +} + +void GameStateManager::setCaldoriaDoorBombed(bool value) { + _caldoriaFlags.setFlag(kCaldoriaDoorBombedFlag, value); +} + +bool GameStateManager::getCaldoriaDoorBombed() { + return _caldoriaFlags.getFlag(kCaldoriaDoorBombedFlag); +} + +void GameStateManager::setCaldoriaGunAimed(bool value) { + _caldoriaFlags.setFlag(kCaldoriaGunAimedFlag, value); +} + +bool GameStateManager::getCaldoriaGunAimed() { + return _caldoriaFlags.getFlag(kCaldoriaGunAimedFlag); +} + +void GameStateManager::setRipTimerTime(TimeValue limit) { + _TSARipTimerTime = limit; +} + +TimeValue GameStateManager::getRipTimerTime() { + return _TSARipTimerTime; +} + +void GameStateManager::setTSAFuseTimeLimit(TimeValue limit) { + _TSAFuseTimeLimit = limit; +} + +TimeValue GameStateManager::getTSAFuseTimeLimit() { + return _TSAFuseTimeLimit; +} + +void GameStateManager::setTSAState(byte state) { + _TSAState = state; +} + +byte GameStateManager::getTSAState() { + return _TSAState; +} + +void GameStateManager::setT0BMonitorMode(byte mode) { + _T0BMonitorMode = mode; +} + +byte GameStateManager::getT0BMonitorMode() { + return _T0BMonitorMode; +} + +void GameStateManager::setT0BMonitorStart(TimeValue start) { + _T0BMonitorStart = start; +} + +TimeValue GameStateManager::getT0BMonitorStart() { + return _T0BMonitorStart; +} + +void GameStateManager::setTSAIDedAtDoor(bool value) { + _TSAFlags.setFlag(kTSAIDedAtDoorFlag, value); +} + +bool GameStateManager::getTSAIDedAtDoor() { + return _TSAFlags.getFlag(kTSAIDedAtDoorFlag); +} + +void GameStateManager::setTSA0BZoomedIn(bool value) { + _TSAFlags.setFlag(kTSA0BZoomedInFlag, value); +} + +bool GameStateManager::getTSA0BZoomedIn() { + return _TSAFlags.getFlag(kTSA0BZoomedInFlag); +} + +void GameStateManager::setTSAFrontDoorUnlockedOutside(bool value) { + _TSAFlags.setFlag(kTSAFrontDoorUnlockedOutsideFlag, value); +} + +bool GameStateManager::getTSAFrontDoorUnlockedOutside() { + return _TSAFlags.getFlag(kTSAFrontDoorUnlockedOutsideFlag); +} + +void GameStateManager::setTSAFrontDoorUnlockedInside(bool value) { + _TSAFlags.setFlag(kTSAFrontDoorUnlockedInsideFlag, value); +} + +bool GameStateManager::getTSAFrontDoorUnlockedInside() { + return _TSAFlags.getFlag(kTSAFrontDoorUnlockedInsideFlag); +} + +void GameStateManager::setTSASeenRobotGreeting(bool value) { + _TSAFlags.setFlag(kTSASeenRobotGreetingFlag, value); +} + +bool GameStateManager::getTSASeenRobotGreeting() { + return _TSAFlags.getFlag(kTSASeenRobotGreetingFlag); +} + +void GameStateManager::setTSASeenTheory(bool value) { + _TSAFlags.setFlag(kTSASeenTheoryFlag, value); +} + +bool GameStateManager::getTSASeenTheory() { + return _TSAFlags.getFlag(kTSASeenTheoryFlag); +} + +void GameStateManager::setTSASeenBackground(bool value) { + _TSAFlags.setFlag(kTSASeenBackgroundFlag, value); +} + +bool GameStateManager::getTSASeenBackground() { + return _TSAFlags.getFlag(kTSASeenBackgroundFlag); +} + +void GameStateManager::setTSASeenProcedure(bool value) { + _TSAFlags.setFlag(kTSASeenProcedureFlag, value); +} + +bool GameStateManager::getTSASeenProcedure() { + return _TSAFlags.getFlag(kTSASeenProcedureFlag); +} + +void GameStateManager::setTSASeenAgent3AtDoor(bool value) { + _TSAFlags.setFlag(kTSASeenAgent3AtDoorFlag, value); +} + +bool GameStateManager::getTSASeenAgent3AtDoor() { + return _TSAFlags.getFlag(kTSASeenAgent3AtDoorFlag); +} + +void GameStateManager::setTSACommandCenterLocked(bool value) { + _TSAFlags.setFlag(kTSACommandCenterLockedFlag, value); +} + +bool GameStateManager::getTSACommandCenterLocked() { + return _TSAFlags.getFlag(kTSACommandCenterLockedFlag); +} + +void GameStateManager::setTSASeenCaldoriaNormal(bool value) { + _TSAFlags.setFlag(kTSASeenCaldoriaNormalFlag, value); +} + +bool GameStateManager::getTSASeenCaldoriaNormal() { + return _TSAFlags.getFlag(kTSASeenCaldoriaNormalFlag); +} + +void GameStateManager::setTSASeenCaldoriaAltered(bool value) { + _TSAFlags.setFlag(kTSASeenCaldoriaAlteredFlag, value); +} + +bool GameStateManager::getTSASeenCaldoriaAltered() { + return _TSAFlags.getFlag(kTSASeenCaldoriaAlteredFlag); +} + +void GameStateManager::setTSASeenNoradNormal(bool value) { + _TSAFlags.setFlag(kTSASeenNoradNormalFlag, value); +} + +bool GameStateManager::getTSASeenNoradNormal() { + return _TSAFlags.getFlag(kTSASeenNoradNormalFlag); +} + +void GameStateManager::setTSASeenNoradAltered(bool value) { + _TSAFlags.setFlag(kTSASeenNoradAlteredFlag, value); +} + +bool GameStateManager::getTSASeenNoradAltered() { + return _TSAFlags.getFlag(kTSASeenNoradAlteredFlag); +} + +void GameStateManager::setTSASeenMarsNormal(bool value) { + _TSAFlags.setFlag(kTSASeenMarsNormalFlag, value); +} + +bool GameStateManager::getTSASeenMarsNormal() { + return _TSAFlags.getFlag(kTSASeenMarsNormalFlag); +} + +void GameStateManager::setTSASeenMarsAltered(bool value) { + _TSAFlags.setFlag(kTSASeenMarsAlteredFlag, value); +} + +bool GameStateManager::getTSASeenMarsAltered() { + return _TSAFlags.getFlag(kTSASeenMarsAlteredFlag); +} + +void GameStateManager::setTSASeenWSCNormal(bool value) { + _TSAFlags.setFlag(kTSASeenWSCNormalFlag, value); +} + +bool GameStateManager::getTSASeenWSCNormal() { + return _TSAFlags.getFlag(kTSASeenWSCNormalFlag); +} + +void GameStateManager::setTSASeenWSCAltered(bool value) { + _TSAFlags.setFlag(kTSASeenWSCAlteredFlag, value); +} + +bool GameStateManager::getTSASeenWSCAltered() { + return _TSAFlags.getFlag(kTSASeenWSCAlteredFlag); +} + +void GameStateManager::setTSABiosuitOn(bool value) { + _TSAFlags.setFlag(kTSABiosuitOnFlag, value); +} + +bool GameStateManager::getTSABiosuitOn() { + return _TSAFlags.getFlag(kTSABiosuitOnFlag); +} + +void GameStateManager::setPrehistoricTriedToExtendBridge(bool value) { + _prehistoricFlags.setFlag(kPrehistoricTriedToExtendBridgeFlag, value); +} + +bool GameStateManager::getPrehistoricTriedToExtendBridge() { + return _prehistoricFlags.getFlag(kPrehistoricTriedToExtendBridgeFlag); +} + +void GameStateManager::setPrehistoricSeenTimeStream(bool value) { + _prehistoricFlags.setFlag(kPrehistoricSeenTimeStreamFlag, value); +} + +bool GameStateManager::getPrehistoricSeenTimeStream() { + return _prehistoricFlags.getFlag(kPrehistoricSeenTimeStreamFlag); +} + +void GameStateManager::setPrehistoricSeenFlyer1(bool value) { + _prehistoricFlags.setFlag(kPrehistoricSeenFlyer1Flag, value); +} + +bool GameStateManager::getPrehistoricSeenFlyer1() { + return _prehistoricFlags.getFlag(kPrehistoricSeenFlyer1Flag); +} + +void GameStateManager::setPrehistoricSeenFlyer2(bool value) { + _prehistoricFlags.setFlag(kPrehistoricSeenFlyer2Flag, value); +} + +bool GameStateManager::getPrehistoricSeenFlyer2() { + return _prehistoricFlags.getFlag(kPrehistoricSeenFlyer2Flag); +} + +void GameStateManager::setPrehistoricSeenBridgeZoom(bool value) { + _prehistoricFlags.setFlag(kPrehistoricSeenBridgeZoomFlag, value); +} + +bool GameStateManager::getPrehistoricSeenBridgeZoom() { + return _prehistoricFlags.getFlag(kPrehistoricSeenBridgeZoomFlag); +} + +void GameStateManager::setPrehistoricBreakerThrown(bool value) { + _prehistoricFlags.setFlag(kPrehistoricBreakerThrownFlag, value); +} + +bool GameStateManager::getPrehistoricBreakerThrown() { + return _prehistoricFlags.getFlag(kPrehistoricBreakerThrownFlag); +} + +void GameStateManager::setNoradSeenTimeStream(bool value) { + _noradFlags.setFlag(kNoradSeenTimeStreamFlag, value); +} + +bool GameStateManager::getNoradSeenTimeStream() { + return _noradFlags.getFlag(kNoradSeenTimeStreamFlag); +} + +void GameStateManager::setNoradGassed(bool value) { + _noradFlags.setFlag(kNoradGassedFlag, value); +} + +bool GameStateManager::getNoradGassed() { + return _noradFlags.getFlag(kNoradGassedFlag); +} + +void GameStateManager::setNoradFillingStationOn(bool value) { + _noradFlags.setFlag(kNoradFillingStationOnFlag, value); +} + +bool GameStateManager::getNoradFillingStationOn() { + return _noradFlags.getFlag(kNoradFillingStationOnFlag); +} + +void GameStateManager::setNoradN22MessagePlayed(bool value) { + _noradFlags.setFlag(kNoradN22MessagePlayedFlag, value); +} + +bool GameStateManager::getNoradN22MessagePlayed() { + return _noradFlags.getFlag(kNoradN22MessagePlayedFlag); +} + +void GameStateManager::setNoradPlayedGlobeGame(bool value) { + _noradFlags.setFlag(kNoradPlayedGlobeGameFlag, value); +} + +bool GameStateManager::getNoradPlayedGlobeGame() { + return _noradFlags.getFlag(kNoradPlayedGlobeGameFlag); +} + +void GameStateManager::setNoradBeatRobotWithClaw(bool value) { + _noradFlags.setFlag(kNoradBeatRobotWithClawFlag, value); +} + +bool GameStateManager::getNoradBeatRobotWithClaw() { + return _noradFlags.getFlag(kNoradBeatRobotWithClawFlag); +} + +void GameStateManager::setNoradBeatRobotWithDoor(bool value) { + _noradFlags.setFlag(kNoradBeatRobotWithDoorFlag, value); +} + +bool GameStateManager::getNoradBeatRobotWithDoor() { + return _noradFlags.getFlag(kNoradBeatRobotWithDoorFlag); +} + +void GameStateManager::setNoradRetScanGood(bool value) { + _noradFlags.setFlag(kNoradRetScanGoodFlag, value); +} + +bool GameStateManager::getNoradRetScanGood() { + return _noradFlags.getFlag(kNoradRetScanGoodFlag); +} + +void GameStateManager::setNoradWaitingForLaser(bool value) { + _noradFlags.setFlag(kNoradWaitingForLaserFlag, value); +} + +bool GameStateManager::getNoradWaitingForLaser() { + return _noradFlags.getFlag(kNoradWaitingForLaserFlag); +} + +void GameStateManager::setNoradSubRoomPressure(uint16 pressure) { + _noradSubRoomPressure = pressure; +} + +uint16 GameStateManager::getNoradSubRoomPressure() { + return _noradSubRoomPressure; +} + +void GameStateManager::setNoradSubPrepState(tNoradSubPrepState state) { + _noradSubPrepState = state; +} + +tNoradSubPrepState GameStateManager::getNoradSubPrepState() { + return _noradSubPrepState; +} + +void GameStateManager::setNoradArrivedFromSub(bool value) { + _noradFlags.setFlag(kNoradArrivedFromSubFlag, value); +} + +bool GameStateManager::getNoradArrivedFromSub() { + return _noradFlags.getFlag(kNoradArrivedFromSubFlag); +} + +void GameStateManager::setMarsSeenTimeStream(bool value) { + _marsFlags.setFlag(kMarsSeenTimeStreamFlag, value); +} + +bool GameStateManager::getMarsSeenTimeStream() { + return _marsFlags.getFlag(kMarsSeenTimeStreamFlag); +} + +void GameStateManager::setMarsHeardUpperPodMessage(bool value) { + _marsFlags.setFlag(kMarsHeardUpperPodMessageFlag, value); +} + +bool GameStateManager::getMarsHeardUpperPodMessage() { + return _marsFlags.getFlag(kMarsHeardUpperPodMessageFlag); +} + +void GameStateManager::setMarsRobotThrownPlayer(bool value) { + _marsFlags.setFlag(kMarsRobotThrownPlayerFlag, value); +} + +bool GameStateManager::getMarsRobotThrownPlayer() { + return _marsFlags.getFlag(kMarsRobotThrownPlayerFlag); +} + +void GameStateManager::setMarsHeardCheckInMessage(bool value) { + _marsFlags.setFlag(kMarsHeardCheckInMessageFlag, value); +} + +bool GameStateManager::getMarsHeardCheckInMessage() { + return _marsFlags.getFlag(kMarsHeardCheckInMessageFlag); +} + +void GameStateManager::setMarsPodAtUpperPlatform(bool value) { + _marsFlags.setFlag(kMarsPodAtUpperPlatformFlag, value); +} + +bool GameStateManager::getMarsPodAtUpperPlatform() { + return _marsFlags.getFlag(kMarsPodAtUpperPlatformFlag); +} + +void GameStateManager::setMarsSeenThermalScan(bool value) { + _marsFlags.setFlag(kMarsSeenThermalScanFlag, value); +} + +bool GameStateManager::getMarsSeenThermalScan() { + return _marsFlags.getFlag(kMarsSeenThermalScanFlag); +} + +void GameStateManager::setMarsArrivedBelow(bool value) { + _marsFlags.setFlag(kMarsArrivedBelowFlag, value); +} + +bool GameStateManager::getMarsArrivedBelow() { + return _marsFlags.getFlag(kMarsArrivedBelowFlag); +} + +void GameStateManager::setMarsSeenRobotAtReactor(bool value) { + _marsFlags.setFlag(kMarsSeenRobotAtReactorFlag, value); +} + +bool GameStateManager::getMarsSeenRobotAtReactor() { + return _marsFlags.getFlag(kMarsSeenRobotAtReactorFlag); +} + +void GameStateManager::setMarsAvoidedReactorRobot(bool value) { + _marsFlags.setFlag(kMarsAvoidedReactorRobotFlag, value); +} + +bool GameStateManager::getMarsAvoidedReactorRobot() { + return _marsFlags.getFlag(kMarsAvoidedReactorRobotFlag); +} + +void GameStateManager::setMarsSecurityDown(bool value) { + _marsFlags.setFlag(kMarsSecurityDownFlag, value); +} + +bool GameStateManager::getMarsSecurityDown() { + return _marsFlags.getFlag(kMarsSecurityDownFlag); +} + +void GameStateManager::setMarsInAirlock(bool value) { + _marsFlags.setFlag(kMarsInAirlockFlag, value); +} + +bool GameStateManager::getMarsInAirlock() { + return _marsFlags.getFlag(kMarsInAirlockFlag); +} + +void GameStateManager::setMarsAirlockOpen(bool value) { + _marsFlags.setFlag(kMarsAirlockOpenFlag, value); +} + +bool GameStateManager::getMarsAirlockOpen() { + return _marsFlags.getFlag(kMarsAirlockOpenFlag); +} + +void GameStateManager::setMarsMaskOnFiller(bool value) { + _marsFlags.setFlag(kMarsMaskOnFillerFlag, value); +} + +bool GameStateManager::getMarsMaskOnFiller() { + return _marsFlags.getFlag(kMarsMaskOnFillerFlag); +} + +void GameStateManager::setMarsLockFrozen(bool value) { + _marsFlags.setFlag(kMarsLockFrozenFlag, value); +} + +bool GameStateManager::getMarsLockFrozen() { + return _marsFlags.getFlag(kMarsLockFrozenFlag); +} + +void GameStateManager::setMarsLockBroken(bool value) { + _marsFlags.setFlag(kMarsLockBrokenFlag, value); +} + +bool GameStateManager::getMarsLockBroken() { + return _marsFlags.getFlag(kMarsLockBrokenFlag); +} + +void GameStateManager::setMarsMazeDoorPair1(bool value) { + _marsFlags.setFlag(kMarsMazeDoorPair1Flag, value); +} + +bool GameStateManager::getMarsMazeDoorPair1() { + return _marsFlags.getFlag(kMarsMazeDoorPair1Flag); +} + +void GameStateManager::setMarsMazeDoorPair2(bool value) { + _marsFlags.setFlag(kMarsMazeDoorPair2Flag, value); +} + +bool GameStateManager::getMarsMazeDoorPair2() { + return _marsFlags.getFlag(kMarsMazeDoorPair2Flag); +} + +void GameStateManager::setMarsMazeDoorPair3(bool value) { + _marsFlags.setFlag(kMarsMazeDoorPair3Flag, value); +} + +bool GameStateManager::getMarsMazeDoorPair3() { + return _marsFlags.getFlag(kMarsMazeDoorPair3Flag); +} + +void GameStateManager::setMarsSawRobotLeave(bool value) { + _marsFlags.setFlag(kMarsSawRobotLeaveFlag, value); +} + +bool GameStateManager::getMarsSawRobotLeave() { + return _marsFlags.getFlag(kMarsSawRobotLeaveFlag); +} + +void GameStateManager::setMarsHitRobotWithCannon(bool flag) { + _marsFlags.setFlag(kMarsHitRobotWithCannonFlag, flag); +} + +bool GameStateManager::getMarsHitRobotWithCannon() { + return _marsFlags.getFlag(kMarsHitRobotWithCannonFlag); +} + +void GameStateManager::setMarsReadyForShuttleTransport(bool value) { + _marsFlags.setFlag(kMarsReadyForShuttleTransportFlag, value); +} + +bool GameStateManager::getMarsReadyForShuttleTransport() { + return _marsFlags.getFlag(kMarsReadyForShuttleTransportFlag); +} + +void GameStateManager::setMarsFinishedCanyonChase(bool flag) { + _marsFlags.setFlag(kMarsFinishedCanyonChaseFlag, flag); +} + +bool GameStateManager::getMarsFinishedCanyonChase() { + return _marsFlags.getFlag(kMarsFinishedCanyonChaseFlag); +} + +void GameStateManager::setMarsThreadedMaze(bool flag) { + _marsFlags.setFlag(kMarsThreadedMazeFlag, flag); +} + +bool GameStateManager::getMarsThreadedMaze() { + return _marsFlags.getFlag(kMarsThreadedMazeFlag); +} + +void GameStateManager::setWSCSeenTimeStream(bool value) { + _WSCFlags.setFlag(kWSCSeenTimeStreamFlag, value); +} + +bool GameStateManager::getWSCSeenTimeStream() { + return _WSCFlags.getFlag(kWSCSeenTimeStreamFlag); +} + +void GameStateManager::setWSCPoisoned(bool value) { + _WSCFlags.setFlag(kWSCPoisonedFlag, value); +} + +bool GameStateManager::getWSCPoisoned() { + return _WSCFlags.getFlag(kWSCPoisonedFlag); +} + +void GameStateManager::setWSCAnsweredAboutDart(bool value) { + _WSCFlags.setFlag(kWSCAnsweredAboutDartFlag, value); +} + +bool GameStateManager::getWSCAnsweredAboutDart() { + return _WSCFlags.getFlag(kWSCAnsweredAboutDartFlag); +} + +void GameStateManager::setWSCRemovedDart(bool value) { + _WSCFlags.setFlag(kWSCRemovedDartFlag, value); +} + +bool GameStateManager::getWSCRemovedDart() { + return _WSCFlags.getFlag(kWSCRemovedDartFlag); +} + +void GameStateManager::setWSCAnalyzerOn(bool value) { + _WSCFlags.setFlag(kWSCAnalyzerOnFlag, value); +} + +bool GameStateManager::getWSCAnalyzerOn() { + return _WSCFlags.getFlag(kWSCAnalyzerOnFlag); +} + +void GameStateManager::setWSCDartInAnalyzer(bool value) { + _WSCFlags.setFlag(kWSCDartInAnalyzerFlag, value); +} + +bool GameStateManager::getWSCDartInAnalyzer() { + return _WSCFlags.getFlag(kWSCDartInAnalyzerFlag); +} + +void GameStateManager::setWSCAnalyzedDart(bool value) { + _WSCFlags.setFlag(kWSCAnalyzedDartFlag, value); +} + +bool GameStateManager::getWSCAnalyzedDart() { + return _WSCFlags.getFlag(kWSCAnalyzedDartFlag); +} + +void GameStateManager::setWSCSawMorph(bool value) { + _WSCFlags.setFlag(kWSCSawMorphFlag, value); +} + +bool GameStateManager::getWSCSawMorph() { + return _WSCFlags.getFlag(kWSCSawMorphFlag); +} + +void GameStateManager::setWSCDesignedAntidote(bool value) { + _WSCFlags.setFlag(kWSCDesignedAntidoteFlag, value); +} + +bool GameStateManager::getWSCDesignedAntidote() { + return _WSCFlags.getFlag(kWSCDesignedAntidoteFlag); +} + +void GameStateManager::setWSCPickedUpAntidote(bool value) { + _WSCFlags.setFlag(kWSCPickedUpAntidoteFlag, value); +} + +bool GameStateManager::getWSCPickedUpAntidote() { + return _WSCFlags.getFlag(kWSCPickedUpAntidoteFlag); +} + +void GameStateManager::setWSCOfficeMessagesOpen(bool value) { + _WSCFlags.setFlag(kWSCOfficeMessagesOpenFlag, value); +} + +bool GameStateManager::getWSCOfficeMessagesOpen() { + return _WSCFlags.getFlag(kWSCOfficeMessagesOpenFlag); +} + +void GameStateManager::setWSCSeenNerd(bool value) { + _WSCFlags.setFlag(kWSCSeenNerdFlag, value); +} + +bool GameStateManager::getWSCSeenNerd() { + return _WSCFlags.getFlag(kWSCSeenNerdFlag); +} + +void GameStateManager::setWSCHeardPage1(bool value) { + _WSCFlags.setFlag(kWSCHeardPage1Flag, value); +} + +bool GameStateManager::getWSCHeardPage1() { + return _WSCFlags.getFlag(kWSCHeardPage1Flag); +} + +void GameStateManager::setWSCHeardPage2(bool value) { + _WSCFlags.setFlag(kWSCHeardPage2Flag, value); +} + +bool GameStateManager::getWSCHeardPage2() { + return _WSCFlags.getFlag(kWSCHeardPage2Flag); +} + +void GameStateManager::setWSCHeardCheckIn(bool value) { + _WSCFlags.setFlag(kWSCHeardCheckInFlag, value); +} + +bool GameStateManager::getWSCHeardCheckIn() { + return _WSCFlags.getFlag(kWSCHeardCheckInFlag); +} + +void GameStateManager::setWSCDidPlasmaDodge(bool value) { + _WSCFlags.setFlag(kWSCDidPlasmaDodgeFlag, value); +} + +bool GameStateManager::getWSCDidPlasmaDodge() { + return _WSCFlags.getFlag(kWSCDidPlasmaDodgeFlag); +} + +void GameStateManager::setWSCSeenSinclairLecture(bool value) { + _WSCFlags.setFlag(kWSCSeenSinclairLectureFlag, value); +} + +bool GameStateManager::getWSCSeenSinclairLecture() { + return _WSCFlags.getFlag(kWSCSeenSinclairLectureFlag); +} + +void GameStateManager::setWSCBeenAtWSC93(bool value) { + _WSCFlags.setFlag(kWSCBeenAtWSC93Flag, value); +} + +bool GameStateManager::getWSCBeenAtWSC93() { + return _WSCFlags.getFlag(kWSCBeenAtWSC93Flag); +} + +void GameStateManager::setWSCCatwalkDark(bool value) { + _WSCFlags.setFlag(kWSCCatwalkDarkFlag, value); +} + +bool GameStateManager::getWSCCatwalkDark() { + return _WSCFlags.getFlag(kWSCCatwalkDarkFlag); +} + +void GameStateManager::setWSCRobotDead(bool value) { + _WSCFlags.setFlag(kWSCRobotDeadFlag, value); +} + +bool GameStateManager::getWSCRobotDead() { + return _WSCFlags.getFlag(kWSCRobotDeadFlag); +} + +void GameStateManager::setWSCRobotGone(bool value) { + _WSCFlags.setFlag(kWSCRobotGoneFlag, value); +} + +bool GameStateManager::getWSCRobotGone() { + return _WSCFlags.getFlag(kWSCRobotGoneFlag); +} + +} // End of namespace Pegasus diff --git a/engines/pegasus/gamestate.h b/engines/pegasus/gamestate.h new file mode 100755 index 0000000000..af790ce283 --- /dev/null +++ b/engines/pegasus/gamestate.h @@ -0,0 +1,938 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * Additional copyright for this file: + * Copyright (C) 1995-1997 Presto Studios, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef PEGASUS_GAMESTATE_H +#define PEGASUS_GAMESTATE_H + +#include "common/singleton.h" + +#include "pegasus/types.h" +#include "pegasus/Game_Shell/CItem.h" + +namespace Common { + class Error; + class ReadStream; + class WriteStream; +} + +namespace Pegasus { + +// The only things saved in here are things which get written out to a saved game file... + +enum { + kGlobalWalkthroughFlag, + kGlobalShieldOnFlag, + kGlobalEasterEggFlag, + kGlobalBeenToWSCFlag, + kGlobalBeenToMarsFlag, + kGlobalBeenToNoradFlag, + kGlobalWSCFinishedFlag, + kGlobalMarsFinishedFlag, + kGlobalNoradFinishedFlag, + kNumGlobalFlags +}; + +enum { + kScoringSawINNFlag, + kScoringTookShowerFlag, + kScoringFixedHairFlag, + kScoringGotKeyCardFlag, + kScoringReadPaperFlag, + kScoringLookThroughTelescopeFlag, + kScoringSawCaldoriaKioskFlag, + kScoringGoToTSAFlag, + kScoringEnterTSAFlag, + kScoringSawBust1Flag, + kScoringSawBust2Flag, + kScoringSawBust3Flag, + kScoringSawBust4Flag, + kScoringSawBust5Flag, + kScoringSawBust6Flag, + kScoringSawTheoryFlag, + kScoringSawBackgroundFlag, + kScoringSawProcedureFlag, + kScoringGotJourneymanKeyFlag, + kScoringGotPegasusBiochipFlag, + kScoringGotBiosuitFlag, + kScoringGoToPrehistoricFlag, + kScoringPutLogInReaderFlag, + kScoringSawCaldoriaNormalFlag, + kScoringSawCaldoriaAlteredFlag, + kScoringSawNoradNormalFlag, + kScoringSawNoradAlteredFlag, + kScoringSawMarsNormalFlag, + kScoringSawMarsAlteredFlag, + kScoringSawWSCNormalFlag, + kScoringSawWSCAlteredFlag, + kScoringWentToReadyRoom2Flag, + kScoringWentAfterSinclairFlag, + kScoringUsedCardBombFlag, + kScoringShieldedCardBombFlag, + kScoringStunnedSinclairFlag, + kScoringDisarmedNukeFlag, + + kScoringThrewBreakerFlag, + kScoringExtendedBridgeFlag, + kScoringGotHistoricalLogFlag, + kScoringFinishedPrehistoricFlag, + + kScoringThrownByRobotFlag, + kScoringGotMarsCardFlag, + kScoringSawMarsKioskFlag, + kScoringSawTransportMapFlag, + kScoringGotCrowBarFlag, + kScoringTurnedOnTransportFlag, + kScoringGotOxygenMaskFlag, + kScoringAvoidedRobotFlag, + kScoringActivatedPlatformFlag, + kScoringUsedLiquidNitrogenFlag, + kScoringUsedCrowBarFlag, + kScoringFoundCardBombFlag, + kScoringDisarmedCardBombFlag, + kScoringGotCardBombFlag, + kScoringThreadedMazeFlag, + kScoringThreadedGearRoomFlag, + kScoringEnteredShuttleFlag, + kScoringEnteredLaunchTubeFlag, + kScoringStoppedRobotsShuttleFlag, + kScoringGotMarsOpMemChipFlag, + kScoringFinishedMarsFlag, + + kScoringSawSecurityMonitorFlag, + kScoringFilledOxygenCanisterFlag, + kScoringFilledArgonCanisterFlag, + kScoringSawUnconsciousOperatorFlag, + kScoringWentThroughPressureDoorFlag, + kScoringPreppedSubFlag, + kScoringEnteredSubFlag, + kScoringExitedSubFlag, + kScoringSawRobotAt54NorthFlag, + kScoringPlayedWithClawFlag, + kScoringUsedRetinalChipFlag, + kScoringFinishedGlobeGameFlag, + kScoringStoppedNoradRobotFlag, + kScoringGotNoradOpMemChipFlag, + kScoringFinishedNoradFlag, + + kScoringRemovedDartFlag, + kScoringAnalyzedDartFlag, + kScoringBuiltAntidoteFlag, + kScoringGotSinclairKeyFlag, + kScoringGotArgonCanisterFlag, + kScoringGotNitrogenCanisterFlag, + kScoringPlayedWithMessagesFlag, + kScoringSawMorphExperimentFlag, + kScoringEnteredSinclairOfficeFlag, + kScoringSawBrochureFlag, + kScoringSawSinclairEntry1Flag, + kScoringSawSinclairEntry2Flag, + kScoringSawSinclairEntry3Flag, + kScoringSawWSCDirectoryFlag, + kScoringUsedCrowBarInWSCFlag, + kScoringFinishedPlasmaDodgeFlag, + kScoringOpenedCatwalkFlag, + kScoringStoppedWSCRobotFlag, + kScoringGotWSCOpMemChipFlag, + kScoringFinishedWSCFlag, + + kScoringMarsGandhiFlag, + kScoringNoradGandhiFlag, + kScoringWSCGandhiFlag, + + kNumScoringFlags +}; + +enum { + kCaldoriaSeenPullbackFlag, + kCaldoriaMadeOJFlag, + kCaldoriaWokenUpFlag, + kCaldoriaDidRecalibrationFlag, + kCaldoriaSeenSinclairInElevatorFlag, + kCaldoriaINNAnnouncingFlag, + kCaldoriaSeenINNFlag, + kCaldoriaSeenMessagesFlag, + kCaldoriaSinclairShotFlag, + kCaldoriaBombDisarmedFlag, + kCaldoriaRoofDoorOpenFlag, + kCaldoriaDoneHygieneFlag, + kCaldoriaSawVoiceAnalysisFlag, + kCaldoriaDoorBombedFlag, + kCaldoriaGunAimedFlag, + kNumCaldoriaFlags +}; + +enum { + kCaldoriaNoFuseRunning, + kCaldoriaDoorBombFuseRunning, + kCaldoriaSinclairFuseRunning +}; + +enum { + kTSAIDedAtDoorFlag, + kTSA0BZoomedInFlag, + kTSAFrontDoorUnlockedOutsideFlag, + kTSAFrontDoorUnlockedInsideFlag, + kTSASeenRobotGreetingFlag, + kTSASeenTheoryFlag, + kTSASeenBackgroundFlag, + kTSASeenProcedureFlag, + kTSASeenAgent3AtDoorFlag, + kTSACommandCenterLockedFlag, + kTSASeenCaldoriaNormalFlag, + kTSASeenCaldoriaAlteredFlag, + kTSASeenNoradNormalFlag, + kTSASeenNoradAlteredFlag, + kTSASeenMarsNormalFlag, + kTSASeenMarsAlteredFlag, + kTSASeenWSCNormalFlag, + kTSASeenWSCAlteredFlag, + kTSABiosuitOnFlag, + kNumTSAFlags +}; + +enum { + kPrehistoricTriedToExtendBridgeFlag, + kPrehistoricSeenTimeStreamFlag, + kPrehistoricSeenFlyer1Flag, + kPrehistoricSeenFlyer2Flag, + kPrehistoricSeenBridgeZoomFlag, + kPrehistoricBreakerThrownFlag, + kNumPrehistoricFlags +}; + +enum { + kNoradSeenTimeStreamFlag, + kNoradGassedFlag, + kNoradFillingStationOnFlag, + kNoradN22MessagePlayedFlag, + kNoradArrivedFromSubFlag, + kNoradWaitingForLaserFlag, + kNoradRetScanGoodFlag, + kNoradPlayedGlobeGameFlag, + kNoradBeatRobotWithClawFlag, + kNoradBeatRobotWithDoorFlag, + kNumNoradFlags +}; + +enum { + kMarsSeenTimeStreamFlag, + kMarsHeardUpperPodMessageFlag, + kMarsRobotThrownPlayerFlag, + kMarsHeardCheckInMessageFlag, + kMarsPodAtUpperPlatformFlag, + kMarsSeenThermalScanFlag, + kMarsArrivedBelowFlag, + kMarsSeenRobotAtReactorFlag, + kMarsAvoidedReactorRobotFlag, + kMarsInAirlockFlag, + kMarsAirlockOpenFlag, + kMarsMaskOnFillerFlag, + kMarsLockFrozenFlag, + kMarsLockBrokenFlag, + kMarsMazeDoorPair1Flag, + kMarsMazeDoorPair2Flag, + kMarsMazeDoorPair3Flag, + kMarsSawRobotLeaveFlag, + kMarsSecurityDownFlag, + kMarsHitRobotWithCannonFlag, + kMarsReadyForShuttleTransportFlag, + kMarsFinishedCanyonChaseFlag, + kMarsThreadedMazeFlag, + kNumMarsFlags +}; + +enum { + kWSCSeenTimeStreamFlag, + kWSCPoisonedFlag, + kWSCAnsweredAboutDartFlag, + kWSCRemovedDartFlag, + kWSCAnalyzerOnFlag, + kWSCDartInAnalyzerFlag, + kWSCAnalyzedDartFlag, + kWSCSawMorphFlag, + kWSCDesignedAntidoteFlag, + kWSCPickedUpAntidoteFlag, + kWSCOfficeMessagesOpenFlag, + kWSCSeenNerdFlag, + kWSCHeardPage1Flag, + kWSCHeardPage2Flag, + kWSCHeardCheckInFlag, + kWSCDidPlasmaDodgeFlag, + kWSCSeenSinclairLectureFlag, + kWSCBeenAtWSC93Flag, + kWSCCatwalkDarkFlag, + kWSCRobotDeadFlag, + kWSCRobotGoneFlag, + kNumWSCFlags +}; + +class GameStateManager : public Common::Singleton<GameStateManager> { +public: + GameStateManager() { resetGameState(); } + + // Base game state + Common::Error writeGameState(Common::WriteStream *stream); + Common::Error readGameState(Common::ReadStream *stream); + + void resetGameState(); + + void getCurrentLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); + void setCurrentLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); + + tNeighborhoodID getCurrentNeighborhood(); + void setCurrentNeighborhood(const tNeighborhoodID neighborhood); + tRoomID getCurrentRoom(); + void setCurrentRoom(const tRoomID room); + tDirectionConstant getCurrentDirection(); + void setCurrentDirection(const tDirectionConstant direction); + + tRoomViewID getCurrentRoomAndView(); + + void getNextLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); + void setNextLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); + + tNeighborhoodID getNextNeighborhood(); + void setNextNeighborhood(const tNeighborhoodID neighborhood); + tRoomID getNextRoom(); + void setNextRoom(const tRoomID room); + tDirectionConstant getNextDirection(); + void setNextDirection(const tDirectionConstant direction); + + void getLastLocation(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction); + void setLastLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction); + + tNeighborhoodID getLastNeighborhood(); + void setLastNeighborhood(const tNeighborhoodID neighborhood); + tRoomID getLastRoom(); + void setLastRoom(const tRoomID room); + tDirectionConstant getLastDirection(); + void setLastDirection(const tDirectionConstant direction); + + tRoomViewID getLastRoomAndView(); + + void getOpenDoorLocation(tRoomID &room, tDirectionConstant &direction); + void setOpenDoorLocation(const tRoomID room, const tDirectionConstant direction); + tRoomID getOpenDoorRoom(); + void setOpenDoorRoom(const tRoomID room); + tDirectionConstant getOpenDoorDirection(); + void setOpenDoorDirection(const tDirectionConstant direction); + + tRoomViewID getDoorOpenRoomAndView(); + + bool isCurrentDoorOpen(); + + // Pegasus Prime + + // Scoring... + // Scoring "Set" functions. + // Caldoria/TSA scoring + void setScoringSawINN(const bool = true); + void setScoringTookShower(const bool = true); + void setScoringFixedHair(const bool = true); + void setScoringGotKeyCard(const bool = true); + void setScoringReadPaper(const bool = true); + void setScoringLookThroughTelescope(const bool = true); + void setScoringSawCaldoriaKiosk(const bool = true); + void setScoringGoToTSA(const bool = true); + void setScoringEnterTSA(const bool = true); + void setScoringSawBust1(const bool = true); + void setScoringSawBust2(const bool = true); + void setScoringSawBust3(const bool = true); + void setScoringSawBust4(const bool = true); + void setScoringSawBust5(const bool = true); + void setScoringSawBust6(const bool = true); + void setScoringSawTheory(const bool = true); + void setScoringSawBackground(const bool = true); + void setScoringSawProcedure(const bool = true); + void setScoringGotJourneymanKey(const bool = true); + void setScoringGotPegasusBiochip(const bool = true); + void setScoringGotBiosuit(const bool = true); + void setScoringGoToPrehistoric(const bool = true); + void setScoringPutLogInReader(const bool = true); + void setScoringSawCaldoriaNormal(const bool = true); + void setScoringSawCaldoriaAltered(const bool = true); + void setScoringSawNoradNormal(const bool = true); + void setScoringSawNoradAltered(const bool = true); + void setScoringSawMarsNormal(const bool = true); + void setScoringSawMarsAltered(const bool = true); + void setScoringSawWSCNormal(const bool = true); + void setScoringSawWSCAltered(const bool = true); + void setScoringWentToReadyRoom2(const bool = true); + void setScoringWentAfterSinclair(const bool = true); + void setScoringUsedCardBomb(const bool = true); + void setScoringShieldedCardBomb(const bool = true); + void setScoringStunnedSinclair(const bool = true); + void setScoringDisarmedNuke(const bool = true); + + // Prehistoric scoring + void setScoringThrewBreaker(const bool = true); + void setScoringExtendedBridge(const bool = true); + void setScoringGotHistoricalLog(const bool = true); + void setScoringFinishedPrehistoric(const bool = true); + + // Mars scoring + void setScoringThrownByRobot(const bool = true); + void setScoringGotMarsCard(const bool = true); + void setScoringSawMarsKiosk(const bool = true); + void setScoringSawTransportMap(const bool = true); + void setScoringGotCrowBar(const bool = true); + void setScoringTurnedOnTransport(const bool = true); + void setScoringGotOxygenMask(const bool = true); + void setScoringAvoidedRobot(const bool = true); + void setScoringActivatedPlatform(const bool = true); + void setScoringUsedLiquidNitrogen(const bool = true); + void setScoringUsedCrowBar(const bool = true); + void setScoringFoundCardBomb(const bool = true); + void setScoringDisarmedCardBomb(const bool = true); + void setScoringGotCardBomb(const bool = true); + void setScoringThreadedMaze(const bool = true); + void setScoringThreadedGearRoom(const bool = true); + void setScoringEnteredShuttle(const bool = true); + void setScoringEnteredLaunchTube(const bool = true); + void setScoringStoppedRobotsShuttle(const bool = true); + void setScoringGotMarsOpMemChip(const bool = true); + void setScoringFinishedMars(const bool = true); + + // Norad scoring + void setScoringSawSecurityMonitor(const bool = true); + void setScoringFilledOxygenCanister(const bool = true); + void setScoringFilledArgonCanister(const bool = true); + void setScoringSawUnconsciousOperator(const bool = true); + void setScoringWentThroughPressureDoor(const bool = true); + void setScoringPreppedSub(const bool = true); + void setScoringEnteredSub(const bool = true); + void setScoringExitedSub(const bool = true); + void setScoringSawRobotAt54North(const bool = true); + void setScoringPlayedWithClaw(const bool = true); + void setScoringUsedRetinalChip(const bool = true); + void setScoringFinishedGlobeGame(const bool = true); + void setScoringStoppedNoradRobot(const bool = true); + void setScoringGotNoradOpMemChip(const bool = true); + void setScoringFinishedNorad(const bool = true); + + // WSC scoring + void setScoringRemovedDart(const bool = true); + void setScoringAnalyzedDart(const bool = true); + void setScoringBuiltAntidote(const bool = true); + void setScoringGotSinclairKey(const bool = true); + void setScoringGotArgonCanister(const bool = true); + void setScoringGotNitrogenCanister(const bool = true); + void setScoringPlayedWithMessages(const bool = true); + void setScoringSawMorphExperiment(const bool = true); + void setScoringEnteredSinclairOffice(const bool = true); + void setScoringSawBrochure(const bool = true); + void setScoringSawSinclairEntry1(const bool = true); + void setScoringSawSinclairEntry2(const bool = true); + void setScoringSawSinclairEntry3(const bool = true); + void setScoringSawWSCDirectory(const bool = true); + void setScoringUsedCrowBarInWSC(const bool = true); + void setScoringFinishedPlasmaDodge(const bool = true); + void setScoringOpenedCatwalk(const bool = true); + void setScoringStoppedWSCRobot(const bool = true); + void setScoringGotWSCOpMemChip(const bool = true); + void setScoringFinishedWSC(const bool = true); + + // Gandhi scoring + void setScoringMarsGandhi(const bool = true); + void setScoringNoradGandhi(const bool = true); + void setScoringWSCGandhi(const bool = true); + + // Scoring "Get" functions. + bool getScoringSawINN(); + bool getScoringTookShower(); + bool getScoringFixedHair(); + bool getScoringGotKeyCard(); + bool getScoringReadPaper(); + bool getScoringLookThroughTelescope(); + bool getScoringSawCaldoriaKiosk(); + bool getScoringGoToTSA(); + bool getScoringEnterTSA(); + bool getScoringSawBust1(); + bool getScoringSawBust2(); + bool getScoringSawBust3(); + bool getScoringSawBust4(); + bool getScoringSawBust5(); + bool getScoringSawBust6(); + bool getScoringSawTheory(); + bool getScoringSawBackground(); + bool getScoringSawProcedure(); + bool getScoringGotJourneymanKey(); + bool getScoringGotPegasusBiochip(); + bool getScoringGotBiosuit(); + bool getScoringGoToPrehistoric(); + bool getScoringPutLogInReader(); + bool getScoringSawCaldoriaNormal(); + bool getScoringSawCaldoriaAltered(); + bool getScoringSawNoradNormal(); + bool getScoringSawNoradAltered(); + bool getScoringSawMarsNormal(); + bool getScoringSawMarsAltered(); + bool getScoringSawWSCNormal(); + bool getScoringSawWSCAltered(); + bool getScoringWentToReadyRoom2(); + bool getScoringWentAfterSinclair(); + bool getScoringUsedCardBomb(); + bool getScoringShieldedCardBomb(); + bool getScoringStunnedSinclair(); + bool getScoringDisarmedNuke(); + bool getScoringThrewBreaker(); + bool getScoringExtendedBridge(); + bool getScoringGotHistoricalLog(); + bool getScoringFinishedPrehistoric(); + bool getScoringThrownByRobot(); + bool getScoringGotMarsCard(); + bool getScoringSawMarsKiosk(); + bool getScoringSawTransportMap(); + bool getScoringGotCrowBar(); + bool getScoringTurnedOnTransport(); + bool getScoringGotOxygenMask(); + bool getScoringAvoidedRobot(); + bool getScoringActivatedPlatform(); + bool getScoringUsedLiquidNitrogen(); + bool getScoringUsedCrowBar(); + bool getScoringFoundCardBomb(); + bool getScoringDisarmedCardBomb(); + bool getScoringGotCardBomb(); + bool getScoringThreadedMaze(); + bool getScoringThreadedGearRoom(); + bool getScoringEnteredShuttle(); + bool getScoringEnteredLaunchTube(); + bool getScoringStoppedRobotsShuttle(); + bool getScoringGotMarsOpMemChip(); + bool getScoringFinishedMars(); + bool getScoringSawSecurityMonitor(); + bool getScoringFilledOxygenCanister(); + bool getScoringFilledArgonCanister(); + bool getScoringSawUnconsciousOperator(); + bool getScoringWentThroughPressureDoor(); + bool getScoringPreppedSub(); + bool getScoringEnteredSub(); + bool getScoringExitedSub(); + bool getScoringSawRobotAt54North(); + bool getScoringPlayedWithClaw(); + bool getScoringUsedRetinalChip(); + bool getScoringFinishedGlobeGame(); + bool getScoringStoppedNoradRobot(); + bool getScoringGotNoradOpMemChip(); + bool getScoringFinishedNorad(); + bool getScoringRemovedDart(); + bool getScoringAnalyzedDart(); + bool getScoringBuiltAntidote(); + bool getScoringGotSinclairKey(); + bool getScoringGotArgonCanister(); + bool getScoringGotNitrogenCanister(); + bool getScoringPlayedWithMessages(); + bool getScoringSawMorphExperiment(); + bool getScoringEnteredSinclairOffice(); + bool getScoringSawBrochure(); + bool getScoringSawSinclairEntry1(); + bool getScoringSawSinclairEntry2(); + bool getScoringSawSinclairEntry3(); + bool getScoringSawWSCDirectory(); + bool getScoringUsedCrowBarInWSC(); + bool getScoringFinishedPlasmaDodge(); + bool getScoringOpenedCatwalk(); + bool getScoringStoppedWSCRobot(); + bool getScoringGotWSCOpMemChip(); + bool getScoringFinishedWSC(); + bool getScoringMarsGandhi(); + bool getScoringNoradGandhi(); + bool getScoringWSCGandhi(); + + tGameScoreType getCaldoriaTSAScore(); + tGameScoreType getPrehistoricScore(); + tGameScoreType getMarsScore(); + tGameScoreType getNoradScore(); + tGameScoreType getWSCScore(); + tGameScoreType getGandhiScore(); + tGameScoreType getTotalScore(); + + void writeCaldoriaState(Common::WriteStream *stream); + void readCaldoriaState(Common::ReadStream *stream); + void resetCaldoriaState(); + + void writeTSAState(Common::WriteStream *stream); + void readTSAState(Common::ReadStream *stream); + void resetTSAState(); + + void writePrehistoricState(Common::WriteStream *stream); + void readPrehistoricState(Common::ReadStream *stream); + void resetPrehistoricState(); + + void writeNoradState(Common::WriteStream *stream); + void readNoradState(Common::ReadStream *stream); + void resetNoradState(); + + void writeMarsState(Common::WriteStream *stream); + void readMarsState(Common::ReadStream *stream); + void resetMarsState(); + + void writeWSCState(Common::WriteStream *stream); + void readWSCState(Common::ReadStream *stream); + void resetWSCState(); + + // Globals. + void setWalkthroughMode(bool); + bool getWalkthroughMode(); + void setShieldOn(bool); + bool getShieldOn(); + void setEasterEgg(bool); + bool getEasterEgg(); + void setBeenToWSC(bool value); + bool getBeenToWSC(); + void setBeenToMars(bool value); + bool getBeenToMars(); + void setBeenToNorad(bool value); + bool getBeenToNorad(); + void setWSCFinished(bool); + bool getWSCFinished(); + void setMarsFinished(bool); + bool getMarsFinished(); + void setNoradFinished(bool); + bool getNoradFinished(); + bool allTimeZonesFinished(); + void setTakenItemID(tItemID, bool); + bool isTakenItemID(tItemID); + void setTakenItem(CItem*, bool); + bool isTakenItem(CItem*); + + // Caldoria + void setCaldoriaFuseTimeLimit(const TimeValue); + TimeValue getCaldoriaFuseTimeLimit(); + void setCaldoriaSeenPullback(bool); + bool getCaldoriaSeenPullback(); + void setCaldoriaMadeOJ(bool); + bool getCaldoriaMadeOJ(); + void setCaldoriaWokenUp(bool); + bool getCaldoriaWokenUp(); + void setCaldoriaDidRecalibration(bool); + bool getCaldoriaDidRecalibration(); + void setCaldoriaSeenSinclairInElevator(bool); + bool getCaldoriaSeenSinclairInElevator(); + void setCaldoriaINNAnnouncing(bool); + bool getCaldoriaINNAnnouncing(); + void setCaldoriaSeenINN(bool); + bool getCaldoriaSeenINN(); + void setCaldoriaSeenMessages(bool); + bool getCaldoriaSeenMessages(); + void setCaldoriaSinclairShot(bool); + bool getCaldoriaSinclairShot(); + void setCaldoriaBombDisarmed(bool); + bool getCaldoriaBombDisarmed(); + void setCaldoriaRoofDoorOpen(bool); + bool getCaldoriaRoofDoorOpen(); + void setCaldoriaDoneHygiene(bool); + bool getCaldoriaDoneHygiene(); + void setCaldoriaSawVoiceAnalysis(bool); + bool getCaldoriaSawVoiceAnalysis(); + void setCaldoriaDoorBombed(bool); + bool getCaldoriaDoorBombed(); + void setCaldoriaGunAimed(bool); + bool getCaldoriaGunAimed(); + + // TSA + void setRipTimerTime(TimeValue); + TimeValue getRipTimerTime(); + void setTSAFuseTimeLimit(TimeValue); + TimeValue getTSAFuseTimeLimit(); + void setT0BMonitorMode(byte); + byte getT0BMonitorMode(); + void setTSAState(byte); + byte getTSAState(); + void setT0BMonitorStart(TimeValue); + TimeValue getT0BMonitorStart(); + void setTSAIDedAtDoor(bool); + bool getTSAIDedAtDoor(); + void setTSA0BZoomedIn(bool); + bool getTSA0BZoomedIn(); + void setTSAFrontDoorUnlockedOutside(bool); + bool getTSAFrontDoorUnlockedOutside(); + void setTSAFrontDoorUnlockedInside(bool); + bool getTSAFrontDoorUnlockedInside(); + void setTSASeenRobotGreeting(bool); + bool getTSASeenRobotGreeting(); + void setTSASeenTheory(bool); + bool getTSASeenTheory(); + void setTSASeenBackground(bool); + bool getTSASeenBackground(); + void setTSASeenProcedure(bool); + bool getTSASeenProcedure(); + void setTSASeenAgent3AtDoor(bool); + bool getTSASeenAgent3AtDoor(); + void setTSACommandCenterLocked(bool); + bool getTSACommandCenterLocked(); + void setTSASeenCaldoriaNormal(bool); + bool getTSASeenCaldoriaNormal(); + void setTSASeenCaldoriaAltered(bool); + bool getTSASeenCaldoriaAltered(); + void setTSASeenNoradNormal(bool); + bool getTSASeenNoradNormal(); + void setTSASeenNoradAltered(bool); + bool getTSASeenNoradAltered(); + void setTSASeenMarsNormal(bool); + bool getTSASeenMarsNormal(); + void setTSASeenMarsAltered(bool); + bool getTSASeenMarsAltered(); + void setTSASeenWSCNormal(bool); + bool getTSASeenWSCNormal(); + void setTSASeenWSCAltered(bool); + bool getTSASeenWSCAltered(); + void setTSABiosuitOn(bool); + bool getTSABiosuitOn(); + + // Prehistoric + void setPrehistoricTriedToExtendBridge(bool); + bool getPrehistoricTriedToExtendBridge(); + void setPrehistoricSeenTimeStream(bool); + bool getPrehistoricSeenTimeStream(); + void setPrehistoricSeenFlyer1(bool); + bool getPrehistoricSeenFlyer1(); + void setPrehistoricSeenFlyer2(bool); + bool getPrehistoricSeenFlyer2(); + void setPrehistoricSeenBridgeZoom(bool); + bool getPrehistoricSeenBridgeZoom(); + void setPrehistoricBreakerThrown(bool); + bool getPrehistoricBreakerThrown(); + + // Norad + void setNoradSeenTimeStream(bool); + bool getNoradSeenTimeStream(); + void setNoradGassed(bool); + bool getNoradGassed(); + void setNoradFillingStationOn(bool); + bool getNoradFillingStationOn(); + void setNoradN22MessagePlayed(bool); + bool getNoradN22MessagePlayed(); + void setNoradPlayedGlobeGame(bool); + bool getNoradPlayedGlobeGame(); + void setNoradBeatRobotWithClaw(bool); + bool getNoradBeatRobotWithClaw(); + void setNoradBeatRobotWithDoor(bool); + bool getNoradBeatRobotWithDoor(); + void setNoradRetScanGood(bool); + bool getNoradRetScanGood(); + void setNoradWaitingForLaser(bool); + bool getNoradWaitingForLaser(); + void setNoradSubRoomPressure(uint16); + uint16 getNoradSubRoomPressure(); + void setNoradSubPrepState(tNoradSubPrepState); + tNoradSubPrepState getNoradSubPrepState(); + void setNoradArrivedFromSub(bool); + bool getNoradArrivedFromSub(); + + // Mars + void setMarsSeenTimeStream(bool); + bool getMarsSeenTimeStream(); + void setMarsHeardUpperPodMessage(bool); + bool getMarsHeardUpperPodMessage(); + void setMarsRobotThrownPlayer(bool); + bool getMarsRobotThrownPlayer(); + void setMarsHeardCheckInMessage(bool); + bool getMarsHeardCheckInMessage(); + void setMarsPodAtUpperPlatform(bool); + bool getMarsPodAtUpperPlatform(); + void setMarsSeenThermalScan(bool); + bool getMarsSeenThermalScan(); + void setMarsArrivedBelow(bool); + bool getMarsArrivedBelow(); + void setMarsSeenRobotAtReactor(bool); + bool getMarsSeenRobotAtReactor(); + void setMarsAvoidedReactorRobot(bool); + bool getMarsAvoidedReactorRobot(); + void setMarsInAirlock(bool); + bool getMarsInAirlock(); + void setMarsAirlockOpen(bool); + bool getMarsAirlockOpen(); + void setMarsMaskOnFiller(bool); + bool getMarsMaskOnFiller(); + void setMarsLockFrozen(bool); + bool getMarsLockFrozen(); + void setMarsLockBroken(bool); + bool getMarsLockBroken(); + void setMarsMazeDoorPair1(bool); + bool getMarsMazeDoorPair1(); + void setMarsMazeDoorPair2(bool); + bool getMarsMazeDoorPair2(); + void setMarsMazeDoorPair3(bool); + bool getMarsMazeDoorPair3(); + void setMarsSawRobotLeave(bool); + bool getMarsSawRobotLeave(); + void setMarsSecurityDown(bool); + bool getMarsSecurityDown(); + void setMarsFinishedCanyonChase(bool); + bool getMarsFinishedCanyonChase(); + void setMarsThreadedMaze(bool); + bool getMarsThreadedMaze(); + void setMarsHitRobotWithCannon(bool); + bool getMarsHitRobotWithCannon(); + void setMarsReadyForShuttleTransport(bool); + bool getMarsReadyForShuttleTransport(); + + // WSC + void setWSCSeenTimeStream(bool); + bool getWSCSeenTimeStream(); + void setWSCPoisoned(bool); + bool getWSCPoisoned(); + void setWSCAnsweredAboutDart(bool); + bool getWSCAnsweredAboutDart(); + void setWSCRemovedDart(bool); + bool getWSCRemovedDart(); + void setWSCAnalyzerOn(bool); + bool getWSCAnalyzerOn(); + void setWSCDartInAnalyzer(bool); + bool getWSCDartInAnalyzer(); + void setWSCAnalyzedDart(bool); + bool getWSCAnalyzedDart(); + void setWSCSawMorph(bool); + bool getWSCSawMorph(); + void setWSCDesignedAntidote(bool); + bool getWSCDesignedAntidote(); + void setWSCPickedUpAntidote(bool); + bool getWSCPickedUpAntidote(); + void setWSCOfficeMessagesOpen(bool); + bool getWSCOfficeMessagesOpen(); + void setWSCSeenNerd(bool); + bool getWSCSeenNerd(); + void setWSCHeardPage1(bool); + bool getWSCHeardPage1(); + void setWSCHeardPage2(bool); + bool getWSCHeardPage2(); + void setWSCHeardCheckIn(bool); + bool getWSCHeardCheckIn(); + void setWSCDidPlasmaDodge(bool); + bool getWSCDidPlasmaDodge(); + void setWSCSeenSinclairLecture(bool); + bool getWSCSeenSinclairLecture(); + void setWSCBeenAtWSC93(bool); + bool getWSCBeenAtWSC93(); + void setWSCCatwalkDark(bool); + bool getWSCCatwalkDark(); + void setWSCRobotDead(bool); + bool getWSCRobotDead(); + void setWSCRobotGone(bool); + bool getWSCRobotGone(); + +protected: + friend class Common::Singleton<SingletonBaseType>; + +private: + // Base + tNeighborhoodID _currentNeighborhood; + tRoomID _currentRoom; + tDirectionConstant _currentDirection; + tNeighborhoodID _nextNeighborhoodID; + tRoomID _nextRoomID; + tDirectionConstant _nextDirection; + tNeighborhoodID _lastNeighborhood; + tRoomID _lastRoom; + tDirectionConstant _lastDirection; + tRoomID _openDoorRoom; + tDirectionConstant _openDoorDirection; + + // Pegasus Prime + #define NUM_FLAGS (sizeof(Unit) * 8) + #define BIT_INDEX_SHIFT (sizeof(Unit) + 2 - (sizeof(Unit)) / 3) + #define BIT_INDEX_MASK (NUM_FLAGS - 1) + template <typename Unit, uint32 kNumFlags> + class FlagsArray { + public: + FlagsArray() { clearAllFlags(); } + void clearAllFlags() { memset(_flags, 0, sizeof(_flags)); } + void setAllFlags() { memset(_flags, ~((Unit)0), sizeof(_flags)); } + void setFlag(uint32 flag) { _flags[flag >> BIT_INDEX_SHIFT] |= 1 << (flag & BIT_INDEX_MASK); } + void clearFlag(uint32 flag) { _flags[flag >> BIT_INDEX_SHIFT] &= ~(1 << (flag & BIT_INDEX_MASK)); } + void setFlag(uint32 flag, bool val) { if (val) setFlag(flag); else clearFlag(flag); } + bool getFlag(uint32 flag) { return (_flags[flag >> BIT_INDEX_SHIFT] & (1 << (flag & BIT_INDEX_MASK))) != 0; } + bool anyFlagSet() { + for (uint32 i = 0; i < sizeof(_flags); i++) + if (_flags[i] != 0) + return true; + return false; + } + + void readFromStream(Common::ReadStream *stream) { + // Shortcut + if (sizeof(Unit) == 1) { + stream->read(_flags, sizeof(_flags)); + return; + } + + for (uint32 i = 0; i < sizeof(_flags); i++) { + if (sizeof(Unit) == 2) + _flags[i] = stream->readUint16BE(); + else /* if (sizeof(Unit) == 4) */ + _flags[i] = stream->readUint32BE(); + } + } + + void writeToStream(Common::WriteStream *stream) { + // Shortcut + if (sizeof(Unit) == 1) { + stream->write(_flags, sizeof(_flags)); + return; + } + + for (uint32 i = 0; i < sizeof(_flags); i++) { + if (sizeof(Unit) == 2) + stream->writeUint16BE(_flags[i]); + else /* if (sizeof(Unit) == 4) */ + stream->writeUint32BE(_flags[i]); + } + } + + private: + Unit _flags[(kNumFlags - 1) / NUM_FLAGS + 1]; + }; + + FlagsArray<byte, kNumGlobalFlags> _globalFlags; + FlagsArray<byte, kNumScoringFlags> _scoringFlags; + FlagsArray<uint32, kNumItems> _itemTakenFlags; + + FlagsArray<byte, kNumCaldoriaFlags> _caldoriaFlags; + TimeValue _caldoriaFuseTimeLimit; + + TimeValue _TSARipTimerTime; + TimeValue _TSAFuseTimeLimit; + byte _TSAState; + byte _T0BMonitorMode; + TimeValue _T0BMonitorStart; + FlagsArray<byte, kNumTSAFlags> _TSAFlags; + + FlagsArray<byte, kNumPrehistoricFlags> _prehistoricFlags; + + FlagsArray<byte, kNumNoradFlags> _noradFlags; + uint16 _noradSubRoomPressure; + tNoradSubPrepState _noradSubPrepState; + + FlagsArray<byte, kNumMarsFlags> _marsFlags; + + FlagsArray<byte, kNumWSCFlags> _WSCFlags; +}; + +} // End of namespace Pegasus + +#define GameState (::Pegasus::GameStateManager::instance()) + +#endif diff --git a/engines/pegasus/module.mk b/engines/pegasus/module.mk index 56a958948e..4840190a00 100644 --- a/engines/pegasus/module.mk +++ b/engines/pegasus/module.mk @@ -4,12 +4,12 @@ MODULE_OBJS = \ console.o \ credits.o \ detection.o \ + gamestate.o \ graphics.o \ menu.o \ overview.o \ pegasus.o \ video.o \ - Game_Shell/CGameState.o \ Game_Shell/CInventory.o \ Game_Shell/CItem.o \ Game_Shell/CItemList.o \ diff --git a/engines/pegasus/neighborhood/door.h b/engines/pegasus/neighborhood/door.h index 3aa8db6892..d311656c1f 100755 --- a/engines/pegasus/neighborhood/door.h +++ b/engines/pegasus/neighborhood/door.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/exit.h b/engines/pegasus/neighborhood/exit.h index 03bf52d43e..cd7bec41d1 100755 --- a/engines/pegasus/neighborhood/exit.h +++ b/engines/pegasus/neighborhood/exit.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/extra.h b/engines/pegasus/neighborhood/extra.h index 3658fbda63..3320f51289 100755 --- a/engines/pegasus/neighborhood/extra.h +++ b/engines/pegasus/neighborhood/extra.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/hotspotinfo.h b/engines/pegasus/neighborhood/hotspotinfo.h index 3199a51508..a9acfe7b21 100755 --- a/engines/pegasus/neighborhood/hotspotinfo.h +++ b/engines/pegasus/neighborhood/hotspotinfo.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp index 1197c65b98..3d47dbfb13 100644 --- a/engines/pegasus/neighborhood/neighborhood.cpp +++ b/engines/pegasus/neighborhood/neighborhood.cpp @@ -26,14 +26,14 @@ #include "common/debug.h" #include "common/stream.h" +#include "pegasus/gamestate.h" #include "pegasus/pegasus.h" -#include "pegasus/game_shell/CGameState.h" #include "pegasus/neighborhood/neighborhood.h" namespace Pegasus { Neighborhood::Neighborhood(PegasusEngine *vm, const Common::String &resName, tNeighborhoodID id) : _vm(vm), _resName(resName) { - CGameState::SetOpenDoorLocation(kNoRoomID, kNoDirection); + GameState.setOpenDoorLocation(kNoRoomID, kNoDirection); _currentAlternate = 0; } @@ -95,9 +95,9 @@ void Neighborhood::init() { } void Neighborhood::start() { - CGameState::SetCurrentRoom(CGameState::GetLastRoom()); - CGameState::SetCurrentDirection(CGameState::GetLastDirection()); - arriveAt(CGameState::GetNextRoom(), CGameState::GetNextDirection()); + GameState.setCurrentRoom(GameState.getLastRoom()); + GameState.setCurrentDirection(GameState.getLastDirection()); + arriveAt(GameState.getNextRoom(), GameState.getNextDirection()); } void Neighborhood::arriveAt(tRoomID room, tDirectionConstant direction) { @@ -114,7 +114,7 @@ void Neighborhood::getExitEntry(const tRoomID room, const tDirectionConstant dir } TimeValue Neighborhood::getViewTime(const tRoomID room, const tDirectionConstant direction) { - if (CGameState::GetOpenDoorRoom() == room && CGameState::GetOpenDoorDirection() == direction) { + if (GameState.getOpenDoorRoom() == room && GameState.getOpenDoorDirection() == direction) { // If we get here, the door entry for this location must exist. DoorTable::Entry doorEntry = _doorTable.findEntry(room, direction, _currentAlternate); @@ -174,13 +174,13 @@ void Neighborhood::getExtraEntry(const uint32 id, ExtraTable::Entry &extraEntry) tCanMoveForwardReason Neighborhood::canMoveForward(ExitTable::Entry &entry) { DoorTable::Entry door; - getExitEntry(CGameState::GetCurrentRoom(), CGameState::GetCurrentDirection(), entry); - getDoorEntry(CGameState::GetCurrentRoom(), CGameState::GetCurrentDirection(), door); + getExitEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), entry); + getDoorEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), door); // Fixed this so that doors that don't lead anywhere can be opened, but not walked // through. if (door.flags & kDoorPresentMask) { - if (CGameState::IsCurrentDoorOpen()) { + if (GameState.isCurrentDoorOpen()) { if (entry.exitRoom == kNoRoomID) return kCantMoveBlocked; else @@ -198,7 +198,7 @@ tCanMoveForwardReason Neighborhood::canMoveForward(ExitTable::Entry &entry) { } tCanTurnReason Neighborhood::canTurn(tTurnDirection turn, tDirectionConstant &nextDir) { - nextDir = getTurnEntry(CGameState::GetCurrentRoom(), CGameState::GetCurrentDirection(), turn); + nextDir = getTurnEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), turn); if (nextDir == kNoDirection) return kCantTurnNoTurn; @@ -207,10 +207,10 @@ tCanTurnReason Neighborhood::canTurn(tTurnDirection turn, tDirectionConstant &ne } tCanOpenDoorReason Neighborhood::canOpenDoor(DoorTable::Entry &entry) { - getDoorEntry(CGameState::GetCurrentRoom(), CGameState::GetCurrentDirection(), entry); + getDoorEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), entry); if (entry.flags & kDoorPresentMask) { - if (CGameState::IsCurrentDoorOpen()) + if (GameState.isCurrentDoorOpen()) return kCantOpenAlreadyOpen; if (entry.flags & kDoorLockedMask) diff --git a/engines/pegasus/neighborhood/spot.h b/engines/pegasus/neighborhood/spot.h index 1bfa5899d1..f4fdf81515 100755 --- a/engines/pegasus/neighborhood/spot.h +++ b/engines/pegasus/neighborhood/spot.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/turn.h b/engines/pegasus/neighborhood/turn.h index daeaf2f2ab..48970d745e 100755 --- a/engines/pegasus/neighborhood/turn.h +++ b/engines/pegasus/neighborhood/turn.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h index f1efb2b391..6a732d507e 100755 --- a/engines/pegasus/neighborhood/view.h +++ b/engines/pegasus/neighborhood/view.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/neighborhood/zoom.h b/engines/pegasus/neighborhood/zoom.h index e659b11a94..4046a76827 100755 --- a/engines/pegasus/neighborhood/zoom.h +++ b/engines/pegasus/neighborhood/zoom.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 598c97cfec..3093e9be2c 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -32,8 +32,8 @@ #include "gui/saveload.h" #include "pegasus/console.h" +#include "pegasus/gamestate.h" #include "pegasus/pegasus.h" -#include "pegasus/neighborhood/neighborhood.h" //#define RUN_SUB_MOVIE // :D :D :D :D :D :D //#define RUN_INTERFACE_TEST @@ -231,17 +231,17 @@ void PegasusEngine::mainGameLoop() { _video->playMovieCentered("Images/Caldoria/Pullback.movie"); drawInterface(); - Common::String navMovie = Common::String::format("Images/%s/%s.movie", getTimeZoneFolder(_neighborhood).c_str(), getTimeZoneDesc(_neighborhood).c_str()); + Common::String navMovie = Common::String::format("Images/%s/%s.movie", getTimeZoneFolder(GameState.getCurrentNeighborhood()).c_str(), getTimeZoneDesc(GameState.getCurrentNeighborhood()).c_str()); _video->playMovie(navMovie, kViewScreenOffset, kViewScreenOffset); _gameMode = kQuitMode; } void PegasusEngine::changeLocation(tNeighborhoodID neighborhood) { - _neighborhood = neighborhood; + GameState.setCurrentNeighborhood(neighborhood); // Just a test... - Neighborhood *neighborhoodPtr = new Neighborhood(this, getTimeZoneDesc(_neighborhood), _neighborhood); + Neighborhood *neighborhoodPtr = new Neighborhood(this, getTimeZoneDesc(neighborhood), neighborhood); neighborhoodPtr->init(); delete neighborhoodPtr; } diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index d6e312caf5..25fbc348b7 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -106,35 +106,6 @@ struct OverviewHotspot { uint32 time; }; -// Taken from JMP PP Resources -enum Item { - kAIBiochip = 128, - kInterfaceBiochip = 129, // NOT USED! - kMapBiochip = 130, - kOpticalBiochip = 131, - kPegasusBiochip = 132, - kRetinalScanBiochip = 133, - kShieldBiochip = 134, - kAirMask = 135, - kAntidote = 136, - kArgonCanister = 137, - kCardBomb = 138, - kCrowbar = 139, - kGasCanister = 140, - kHistoricalLog = 141, - kJourneymanKey = 142, - kKeyCard = 143, - kMachineGun = 144, // What the hell is this? - kMarsCard = 145, - kNitrogenCanister = 146, - kOrangeJuiceGlassFull = 147, - kOrangeJuiceGlassEmpty = 148, - kPoisonDart = 149, - kSinclairKey = 150, - kStunGun = 151, - kArgonPickup = 152 // ??? -}; - enum GameMode { kIntroMode, kMainMenuMode, @@ -197,7 +168,6 @@ private: // Game Variables bool _adventureMode; GameMode _gameMode; - tNeighborhoodID _neighborhood; Common::Array<ItemLocationData> _itemLocationData; // Console diff --git a/engines/pegasus/scoring.h b/engines/pegasus/scoring.h new file mode 100755 index 0000000000..bd09f2b834 --- /dev/null +++ b/engines/pegasus/scoring.h @@ -0,0 +1,281 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * Additional copyright for this file: + * Copyright (C) 1995-1997 Presto Studios, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef PEGASUS_SCORING_H +#define PEGASUS_SCORING_H + +#include "pegasus/types.h" + +namespace Pegasus { + +///////////////////////////////////////////// +// +// Scoring. + +const tCoordType kDeathScreenScoreLeft = 151; +const tCoordType kDeathScreenScoreTop = 212; +const tCoordType kDeathScreenScoreWidth = 124; +const tCoordType kDeathScreenScoreHeight = 12; +const tCoordType kDeathScreenScoreSkipVert = -16; + +// Caldoria & TSA + +const tGameScoreType kSawINNScore = 5; +const tGameScoreType kTookShowerScore = 2; +const tGameScoreType kFixedHairScore = 2; +const tGameScoreType kGotKeyCardScore = 5; +const tGameScoreType kReadPaperScore = 2; +const tGameScoreType kLookThroughTelescopeScore = 2; +const tGameScoreType kSawCaldoriaKioskScore = 2; +const tGameScoreType kGoToTSAScore = 3; + +const tGameScoreType kEnterTSAScore = 2; +const tGameScoreType kSawBust1Score = 2; +const tGameScoreType kSawBust2Score = 2; +const tGameScoreType kSawBust3Score = 2; +const tGameScoreType kSawBust4Score = 2; +const tGameScoreType kSawBust5Score = 2; +const tGameScoreType kSawBust6Score = 2; +const tGameScoreType kSawTheoryScore = 4; +const tGameScoreType kSawBackgroundScore = 4; +const tGameScoreType kSawProcedureScore = 4; +const tGameScoreType kGotJourneymanKeyScore = 5; +const tGameScoreType kGotPegasusBiochipScore = 5; +const tGameScoreType kGotBiosuitScore = 5; +const tGameScoreType kGoToPrehistoricScore = 5; + +const tGameScoreType kPutLogInReaderScore = 5; +const tGameScoreType kSawCaldoriaNormalScore = 2; +const tGameScoreType kSawCaldoriaAlteredScore = 2; +const tGameScoreType kSawNoradNormalScore = 2; +const tGameScoreType kSawNoradAlteredScore = 2; +const tGameScoreType kSawMarsNormalScore = 2; +const tGameScoreType kSawMarsAlteredScore = 2; +const tGameScoreType kSawWSCNormalScore = 2; +const tGameScoreType kSawWSCAlteredScore = 2; +const tGameScoreType kWentToReadyRoom2Score = 5; +const tGameScoreType kWentAfterSinclairScore = 5; +const tGameScoreType kUsedCardBombScore = 10; +const tGameScoreType kShieldedCardBombScore = 5; +const tGameScoreType kStunnedSinclairScore = 10; +const tGameScoreType kDisarmedNukeScore = 10; + +const tGameScoreType kMaxCaldoriaTSAScoreBefore = kSawINNScore + + kTookShowerScore + + kFixedHairScore + + kGotKeyCardScore + + kReadPaperScore + + kLookThroughTelescopeScore + + kSawCaldoriaKioskScore + + kGoToTSAScore + + kEnterTSAScore + + kSawBust1Score + + kSawBust2Score + + kSawBust3Score + + kSawBust4Score + + kSawBust5Score + + kSawBust6Score + + kSawTheoryScore + + kSawBackgroundScore + + kSawProcedureScore + + kGotJourneymanKeyScore + + kGotPegasusBiochipScore + + kGotBiosuitScore + + kGoToPrehistoricScore + + kPutLogInReaderScore + + kSawCaldoriaNormalScore + + kSawCaldoriaAlteredScore + + kSawNoradNormalScore + + kSawNoradAlteredScore + + kSawMarsNormalScore + + kSawMarsAlteredScore + + kSawWSCNormalScore + + kSawWSCAlteredScore + + kWentToReadyRoom2Score; + +const tGameScoreType kMaxCaldoriaTSAScoreAfter = kWentAfterSinclairScore + + kUsedCardBombScore + + kShieldedCardBombScore + + kStunnedSinclairScore + + kDisarmedNukeScore; + +const tGameScoreType kMaxCaldoriaTSAScore = kMaxCaldoriaTSAScoreBefore + + kMaxCaldoriaTSAScoreAfter; + +// Prehistoric + +const tGameScoreType kThrewBreakerScore = 10; +const tGameScoreType kExtendedBridgeScore = 10; +const tGameScoreType kGotHistoricalLogScore = 5; +const tGameScoreType kFinishedPrehistoricScore = 10; + +const tGameScoreType kMaxPrehistoricScore = kThrewBreakerScore + + kExtendedBridgeScore + + kGotHistoricalLogScore + + kFinishedPrehistoricScore; + +// Mars + +const tGameScoreType kThrownByRobotScore = 3; +const tGameScoreType kGotMarsCardScore = 5; +const tGameScoreType kSawMarsKioskScore = 2; +const tGameScoreType kSawTransportMapScore = 2; +const tGameScoreType kGotCrowBarScore = 5; +const tGameScoreType kTurnedOnTransportScore = 5; +const tGameScoreType kGotOxygenMaskScore = 5; +const tGameScoreType kAvoidedRobotScore = 5; +const tGameScoreType kActivatedPlatformScore = 2; +const tGameScoreType kUsedLiquidNitrogenScore = 3; +const tGameScoreType kUsedCrowBarScore = 3; +const tGameScoreType kFoundCardBombScore = 4; +const tGameScoreType kDisarmedCardBombScore = 8; +const tGameScoreType kGotCardBombScore = 5; +const tGameScoreType kThreadedMazeScore = 5; +const tGameScoreType kThreadedGearRoomScore = 2; +const tGameScoreType kEnteredShuttleScore = 2; +const tGameScoreType kEnteredLaunchTubeScore = 4; +const tGameScoreType kStoppedRobotsShuttleScore = 10; +const tGameScoreType kGotMarsOpMemChipScore = 10; +const tGameScoreType kFinishedMarsScore = 10; + +const tGameScoreType kMaxMarsScore = kThrownByRobotScore + + kGotMarsCardScore + + kSawMarsKioskScore + + kSawTransportMapScore + + kGotCrowBarScore + + kTurnedOnTransportScore + + kGotOxygenMaskScore + + kAvoidedRobotScore + + kActivatedPlatformScore + + kUsedLiquidNitrogenScore + + kUsedCrowBarScore + + kFoundCardBombScore + + kDisarmedCardBombScore + + kGotCardBombScore + + kThreadedMazeScore + + kThreadedGearRoomScore + + kEnteredShuttleScore + + kEnteredLaunchTubeScore + + kStoppedRobotsShuttleScore + + kGotMarsOpMemChipScore + + kFinishedMarsScore; + +// Norad + +const tGameScoreType kSawSecurityMonitorScore = 5; +const tGameScoreType kFilledOxygenCanisterScore = 5; +const tGameScoreType kFilledArgonCanisterScore = 5; +const tGameScoreType kSawUnconsciousOperatorScore = 5; +const tGameScoreType kWentThroughPressureDoorScore = 5; +const tGameScoreType kPreppedSubScore = 5; +const tGameScoreType kEnteredSubScore = 5; +const tGameScoreType kExitedSubScore = 10; +const tGameScoreType kSawRobotAt54NorthScore = 5; +const tGameScoreType kPlayedWithClawScore = 5; +const tGameScoreType kUsedRetinalChipScore = 5; +const tGameScoreType kFinishedGlobeGameScore = 10; +const tGameScoreType kStoppedNoradRobotScore = 10; +const tGameScoreType kGotNoradOpMemChipScore = 10; +const tGameScoreType kFinishedNoradScore = 10; + +const tGameScoreType kMaxNoradScore = kSawSecurityMonitorScore + + kFilledOxygenCanisterScore + + kFilledArgonCanisterScore + + kSawUnconsciousOperatorScore + + kWentThroughPressureDoorScore + + kPreppedSubScore + + kEnteredSubScore + + kExitedSubScore + + kSawRobotAt54NorthScore + + kPlayedWithClawScore + + kUsedRetinalChipScore + + kFinishedGlobeGameScore + + kStoppedNoradRobotScore + + kGotNoradOpMemChipScore + + kFinishedNoradScore; + +// WSC + +const tGameScoreType kRemovedDartScore = 5; +const tGameScoreType kAnalyzedDartScore = 5; +const tGameScoreType kBuiltAntidoteScore = 5; +const tGameScoreType kGotSinclairKeyScore = 5; +const tGameScoreType kGotArgonCanisterScore = 5; +const tGameScoreType kGotNitrogenCanisterScore = 5; +const tGameScoreType kPlayedWithMessagesScore = 2; +const tGameScoreType kSawMorphExperimentScore = 3; +const tGameScoreType kEnteredSinclairOfficeScore = 2; +const tGameScoreType kSawBrochureScore = 3; +const tGameScoreType kSawSinclairEntry1Score = 3; +const tGameScoreType kSawSinclairEntry2Score = 3; +const tGameScoreType kSawSinclairEntry3Score = 3; +const tGameScoreType kSawWSCDirectoryScore = 3; +const tGameScoreType kUsedCrowBarInWSCScore = 5; +const tGameScoreType kFinishedPlasmaDodgeScore = 10; +const tGameScoreType kOpenedCatwalkScore = 3; +const tGameScoreType kStoppedWSCRobotScore = 10; +const tGameScoreType kGotWSCOpMemChipScore = 10; +const tGameScoreType kFinishedWSCScore = 10; + +const tGameScoreType kMaxWSCScore = kRemovedDartScore + + kAnalyzedDartScore + + kBuiltAntidoteScore + + kGotSinclairKeyScore + + kGotArgonCanisterScore + + kGotNitrogenCanisterScore + + kPlayedWithMessagesScore + + kSawMorphExperimentScore + + kEnteredSinclairOfficeScore + + kSawBrochureScore + + kSawSinclairEntry1Score + + kSawSinclairEntry2Score + + kSawSinclairEntry3Score + + kSawWSCDirectoryScore + + kUsedCrowBarInWSCScore + + kFinishedPlasmaDodgeScore + + kOpenedCatwalkScore + + kStoppedWSCRobotScore + + kGotWSCOpMemChipScore + + kFinishedWSCScore; + +// Gandhi + +const tGameScoreType kMarsGandhiScore = 10; +const tGameScoreType kNoradGandhiScore = 10; +const tGameScoreType kWSCGandhiScore = 10; + +const tGameScoreType kMaxGandhiScore = kMarsGandhiScore + + kNoradGandhiScore + + kWSCGandhiScore; + +const tGameScoreType kMaxTotalScore = kMaxCaldoriaTSAScore + + kMaxPrehistoricScore + + kMaxMarsScore + + kMaxNoradScore + + kMaxWSCScore + + kMaxGandhiScore; +} // End of namespace Pegasus + +#endif
\ No newline at end of file diff --git a/engines/pegasus/MMShell/MMTypes.h b/engines/pegasus/types.h index a4bc547e2a..6c51c930eb 100755 --- a/engines/pegasus/MMShell/MMTypes.h +++ b/engines/pegasus/types.h @@ -22,9 +22,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - -#ifndef PEGASUS_MMSHELL_MMTYPES_H -#define PEGASUS_MMSHELL_MMTYPES_H + +#ifndef PEGASUS_TYPES_H +#define PEGASUS_TYPES_H #include "common/scummsys.h" @@ -98,6 +98,88 @@ typedef uint TimeValue; typedef uint TimeScale; // TODO: Fixed and RGBColor +typedef tMM16BitID tGameID; + +typedef tGameID tItemID; +typedef tGameID tActorID; +typedef tGameID tRoomID; +typedef tGameID tNeighborhoodID; +typedef tMM8BitU tAlternateID; +typedef tMM8BitS tHotSpotActivationID; + +typedef tMM16BitS tWeightType; + +typedef tMM8BitU tDirectionConstant; +typedef tMM8BitU tTurnDirection; + +// Meant to be room in low 16 bits and direction in high 16 bits. +typedef tMM32BitU tRoomViewID; + +#define MakeRoomView(room, direction) (((tRoomViewID) (room)) | (((tRoomViewID) (direction)) << 16)) + +typedef tMM32BitU tExtraID; + +typedef tMM16BitS tGameMode; + +typedef tMM16BitS tWeightType; + +typedef tMM16BitS tItemState; + +typedef tMM8BitS tDeathReason; + +typedef tMM32BitS tGameMenuCommand; + +typedef tMM32BitS tGameScoreType; + +typedef long tCanMoveForwardReason; + +typedef long tCanTurnReason; + +typedef long tCanOpenDoorReason; + +enum tInventoryResult { + kInventoryOK, + kTooMuchWeight, + kItemNotInInventory +}; + +typedef tMM32BitID tInteractionID; + +typedef tMM32BitID tAIConditionID; + +enum tEnergyStage { + kStageNoStage, + kStageCasual, // more than 50% energy + kStageWorried, // more than 25% energy + kStageNervous, // more than 5% energy + kStagePanicStricken // less than 5% energy +}; + +enum tNoradSubPrepState { + kSubNotPrepped, + kSubPrepped, + kSubDamaged +}; + +enum tLowerClientSignature { + kNoClientSignature, + kInventorySignature, + kBiochipSignature, + kAISignature +}; + +enum tLowerAreaSignature { + kLeftAreaSignature, + kMiddleAreaSignature, + kRightAreaSignature +}; + +enum tAirQuality { + kAirQualityGood, + kAirQualityDirty, + kAirQualityVacuum +}; + } // End of namespace Pegasus #endif |