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/neighborhood | |
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/neighborhood')
-rwxr-xr-x | engines/pegasus/neighborhood/door.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/exit.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/extra.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/hotspotinfo.h | 2 | ||||
-rw-r--r-- | engines/pegasus/neighborhood/neighborhood.cpp | 24 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/spot.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/turn.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/view.h | 2 | ||||
-rwxr-xr-x | engines/pegasus/neighborhood/zoom.h | 2 |
9 files changed, 20 insertions, 20 deletions
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; |