aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2013-10-17 23:02:22 -0400
committerMatthew Hoops2013-10-17 23:02:22 -0400
commit396808638d538e6c02f7ea111557928e4c6bdd71 (patch)
treea5bb8ec14870311dd98bb52790d48a51a778fc51 /engines
parente8fe506a1e3d48c0e0f3e9200f874a3155d2aecc (diff)
downloadscummvm-rg350-396808638d538e6c02f7ea111557928e4c6bdd71.tar.gz
scummvm-rg350-396808638d538e6c02f7ea111557928e4c6bdd71.tar.bz2
scummvm-rg350-396808638d538e6c02f7ea111557928e4c6bdd71.zip
ZVISION: Consistently use the type of the state map
Should fix the AmigaOS4 build
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/script_manager.cpp4
-rw-r--r--engines/zvision/script_manager.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index b33ca4c515..66a54088fd 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -196,7 +196,7 @@ void ScriptManager::checkPuzzleCriteria() {
}
void ScriptManager::cleanStateTable() {
- for (Common::HashMap<uint32, uint32>::iterator iter = _globalState.begin(); iter != _globalState.end(); ++iter) {
+ for (StateMap::iterator iter = _globalState.begin(); iter != _globalState.end(); ++iter) {
// If the value is equal to zero, we can purge it since getStateValue()
// will return zero if _globalState doesn't contain a key
if (iter->_value == 0) {
@@ -384,7 +384,7 @@ void ScriptManager::serializeStateTable(Common::WriteStream *stream) {
// Write the number of state value entries
stream->writeUint32LE(_globalState.size());
- for (Common::HashMap<uint32, uint32>::iterator iter = _globalState.begin(); iter != _globalState.end(); ++iter) {
+ for (StateMap::iterator iter = _globalState.begin(); iter != _globalState.end(); ++iter) {
// Write out the key/value pair
stream->writeUint32LE(iter->_key);
stream->writeUint32LE(iter->_value);
diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h
index c44c836171..388d0805e0 100644
--- a/engines/zvision/script_manager.h
+++ b/engines/zvision/script_manager.h
@@ -53,6 +53,7 @@ typedef Common::HashMap<uint32, Common::Array<Puzzle *> > PuzzleMap;
typedef Common::List<Puzzle *> PuzzleList;
typedef Common::Queue<Puzzle *> PuzzleQueue;
typedef Common::List<Control *> ControlList;
+typedef Common::HashMap<uint32, uint32> StateMap;
class ScriptManager {
public:
@@ -66,7 +67,7 @@ private:
* mutators getStateValue() and setStateValue(). This ensures that Puzzles that reference a
* particular state key are checked after the key is modified.
*/
- Common::HashMap<uint32, uint> _globalState;
+ StateMap _globalState;
/** References _globalState keys to Puzzles */
PuzzleMap _referenceTable;
/** Holds the Puzzles that should be checked this frame */