[Scummvm-cvs-logs] scummvm master -> 08c881e8eb72072816ab6539dc603f27963cbc65

dreammaster dreammaster at scummvm.org
Wed Aug 3 04:25:44 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
08c881e8eb TITANIC: Add game state thunk methods to CGameObject


Commit: 08c881e8eb72072816ab6539dc603f27963cbc65
    https://github.com/scummvm/scummvm/commit/08c881e8eb72072816ab6539dc603f27963cbc65
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-02T22:25:36-04:00

Commit Message:
TITANIC: Add game state thunk methods to CGameObject

Changed paths:
    engines/titanic/core/game_object.cpp
    engines/titanic/core/game_object.h



diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 3ee3254..c04f2e1 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 048c166..abb7e99 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






More information about the Scummvm-git-logs mailing list