aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarisa-Chan2013-11-01 16:46:24 +0700
committerMarisa-Chan2013-11-01 16:46:24 +0700
commit7f166720372ef8e4fd95cc4622801d420a8669d6 (patch)
tree062bd53e7ee2e6795a3ef0f3cbf2098f9d9244e2
parentf46d63d35c61c9076a3c4ef9936bd88dbf8b8218 (diff)
downloadscummvm-rg350-7f166720372ef8e4fd95cc4622801d420a8669d6.tar.gz
scummvm-rg350-7f166720372ef8e4fd95cc4622801d420a8669d6.tar.bz2
scummvm-rg350-7f166720372ef8e4fd95cc4622801d420a8669d6.zip
ZVISION: StateValue must be signed.
-rw-r--r--engines/zvision/script_manager.cpp6
-rw-r--r--engines/zvision/script_manager.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index e7ec34f9e7..b58056ab29 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -162,7 +162,7 @@ void ScriptManager::checkPuzzleCriteria(Puzzle *puzzle, uint counter) {
for (Common::List<Puzzle::CriteriaEntry>::iterator entryIter = criteriaIter->begin(); entryIter != criteriaIter->end(); ++entryIter) {
// Get the value to compare against
- uint argumentValue;
+ int argumentValue;
if (entryIter->argumentIsAKey)
argumentValue = getStateValue(entryIter->argument);
else
@@ -246,7 +246,7 @@ void ScriptManager::cleanScriptScope(script_scope &scope) {
scope.proc_count = 0;
}
-uint ScriptManager::getStateValue(uint32 key) {
+int ScriptManager::getStateValue(uint32 key) {
if (_globalState.contains(key))
return _globalState[key];
else
@@ -263,7 +263,7 @@ void ScriptManager::queuePuzzles(uint32 key) {
}
}
-void ScriptManager::setStateValue(uint32 key, uint value) {
+void ScriptManager::setStateValue(uint32 key, int value) {
if (value == 0)
_globalState.erase(key);
else
diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h
index 07c09c513e..487a27cf05 100644
--- a/engines/zvision/script_manager.h
+++ b/engines/zvision/script_manager.h
@@ -109,7 +109,7 @@ struct Location {
typedef Common::List<Puzzle *> PuzzleList;
typedef Common::Queue<Puzzle *> PuzzleQueue;
typedef Common::List<Control *> ControlList;
-typedef Common::HashMap<uint32, uint32> StateMap;
+typedef Common::HashMap<uint32, int32> StateMap;
typedef Common::List<SideFX *> SideFXList;
class ScriptManager {
@@ -170,8 +170,8 @@ public:
void update(uint deltaTimeMillis);
void queuePuzzles(uint32 key);
- uint getStateValue(uint32 key);
- void setStateValue(uint32 key, uint value);
+ int getStateValue(uint32 key);
+ void setStateValue(uint32 key, int value);
uint getStateFlag(uint32 key);
void setStateFlag(uint32 key, uint value);