aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-02 22:25:36 -0400
committerPaul Gilbert2016-08-02 22:25:36 -0400
commit08c881e8eb72072816ab6539dc603f27963cbc65 (patch)
tree0276e27099c932e6535ee93be388581af7d11ecf /engines/titanic
parent3a466a29ea91f829c542f9537b3f578e72af31f3 (diff)
downloadscummvm-rg350-08c881e8eb72072816ab6539dc603f27963cbc65.tar.gz
scummvm-rg350-08c881e8eb72072816ab6539dc603f27963cbc65.tar.bz2
scummvm-rg350-08c881e8eb72072816ab6539dc603f27963cbc65.zip
TITANIC: Add game state thunk methods to CGameObject
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/game_object.cpp13
-rw-r--r--engines/titanic/core/game_object.h30
2 files changed, 33 insertions, 10 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 3ee3254f1c..c04f2e17f4 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -1493,7 +1493,7 @@ void CGameObject::talkSetDialRegion(const CString &name, int dialNum, int region
}
}
-int CGameObject::talkGetDIalRegion(const CString &name, int dialNum) {
+int CGameObject::talkGetDialRegion(const CString &name, int dialNum) {
CGameManager *gameManager = getGameManager();
if (gameManager) {
CTrueTalkManager *talkManager = gameManager->getTalkManager();
@@ -1507,4 +1507,15 @@ int CGameObject::talkGetDIalRegion(const CString &name, int dialNum) {
return 0;
}
+/*------------------------------------------------------------------------*/
+
+uint CGameObject::getNodeChangedCtr() const {
+ return getGameManager()->_gameState.getNodeChangedCtr();
+}
+
+uint CGameObject::getNodeEnterTicks() const {
+ return getGameManager()->_gameState.getNodeEnterTicks();
+}
+
+
} // End of namespace Titanic
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index 048c1668d4..abb7e999d6 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -424,14 +424,6 @@ protected:
*/
void petUnlockInput();
- void setState1C(bool flag);
- void stateInc14();
- int stateGet14() const;
- void stateSet24();
- int stateGet24() const;
- void stateInc38();
- int stateGet38() const;
-
/**
* Flag to quit the game
*/
@@ -847,7 +839,7 @@ public:
/**
* Gets a dial region for a given NPC
*/
- int talkGetDIalRegion(const CString &name, int dialNum);
+ int talkGetDialRegion(const CString &name, int dialNum);
/*--- CVideoSurface Methods ---*/
@@ -861,6 +853,26 @@ public:
* playing ranges
*/
void movieEvent();
+
+ /*--- CGameState Methods ---*/
+
+ void setState1C(bool flag);
+ void stateInc14();
+ int stateGet14() const;
+ void stateSet24();
+ int stateGet24() const;
+ void stateInc38();
+ int stateGet38() const;
+
+ /**
+ * Gets the game state node changed counter
+ */
+ uint getNodeChangedCtr() const;
+
+ /**
+ * Gets the game state node enter ticks
+ */
+ uint getNodeEnterTicks() const;
};
} // End of namespace Titanic