[Scummvm-cvs-logs] scummvm master -> 396808638d538e6c02f7ea111557928e4c6bdd71

clone2727 clone2727 at gmail.com
Fri Oct 18 05:04:21 CEST 2013


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:
396808638d ZVISION: Consistently use the type of the state map


Commit: 396808638d538e6c02f7ea111557928e4c6bdd71
    https://github.com/scummvm/scummvm/commit/396808638d538e6c02f7ea111557928e4c6bdd71
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2013-10-17T20:02:22-07:00

Commit Message:
ZVISION: Consistently use the type of the state map

Should fix the AmigaOS4 build

Changed paths:
    engines/zvision/script_manager.cpp
    engines/zvision/script_manager.h



diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index b33ca4c..66a5408 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 c44c836..388d080 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 */






More information about the Scummvm-git-logs mailing list