From b0635edff8c0d5b05cef8a22c74c569921a8346b Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 18 Aug 2013 19:51:27 -0500 Subject: ZVISION: Revert to normal pointers instead of shared pointers --- engines/zvision/puzzle.h | 2 +- engines/zvision/scr_file_handling.cpp | 24 ++++++++++++------------ engines/zvision/script_manager.cpp | 2 +- engines/zvision/script_manager.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/zvision/puzzle.h b/engines/zvision/puzzle.h index 36787e7ba1..227183ab02 100644 --- a/engines/zvision/puzzle.h +++ b/engines/zvision/puzzle.h @@ -64,7 +64,7 @@ struct Puzzle { uint32 key; Common::List > criteriaList; // This has to be list of pointers because ResultAction is abstract - Common::List > resultActions; + Common::List resultActions; uint flags; // Used by the ScriptManager to allow unique-ification of _referenceTable diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp index dd2754c12f..eb15d04070 100644 --- a/engines/zvision/scr_file_handling.cpp +++ b/engines/zvision/scr_file_handling.cpp @@ -140,7 +140,7 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li return true; } -void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::List > &actionList) const { +void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::List &actionList) const { // Loop until we find the closing brace Common::String line = stream.readLine(); trimCommentsAndWhiteSpace(&line); @@ -156,13 +156,13 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis // Parse for the action type if (line.matchString("*:add*", true)) { - actionList.push_back(Common::SharedPtr(new ActionAdd(line))); + actionList.push_back(new ActionAdd(line)); } else if (line.matchString("*:animplay*", true)) { - actionList.push_back(Common::SharedPtr(new ActionPlayAnimation(line))); + actionList.push_back(new ActionPlayAnimation(line)); } else if (line.matchString("*:animpreload*", true)) { - actionList.push_back(Common::SharedPtr(new ActionPreloadAnimation(line))); + actionList.push_back(new ActionPreloadAnimation(line)); } else if (line.matchString("*:animunload*", true)) { - //actionList.push_back(Common::SharedPtr(new ActionUnloadAnimation(line))); + //actionList.push_back(new ActionUnloadAnimation(line)); } else if (line.matchString("*:attenuate*", true)) { @@ -170,7 +170,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:change_location*", true)) { - actionList.push_back(Common::SharedPtr(new ActionChangeLocation(line))); + actionList.push_back(new ActionChangeLocation(line)); } else if (line.matchString("*:crossfade*", true)) { @@ -181,7 +181,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:disable_control*", true)) { - actionList.push_back(Common::SharedPtr(new ActionDisableControl(line))); + actionList.push_back(new ActionDisableControl(line)); } else if (line.matchString("*:disable_venus*", true)) { @@ -195,7 +195,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:enable_control*", true)) { - actionList.push_back(Common::SharedPtr(new ActionEnableControl(line))); + actionList.push_back(new ActionEnableControl(line)); } else if (line.matchString("*:flush_mouse_events*", true)) { @@ -209,7 +209,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:music*", true)) { - actionList.push_back(Common::SharedPtr(new ActionMusic(line))); + actionList.push_back(new ActionMusic(line)); } else if (line.matchString("*:pan_track*", true)) { @@ -220,7 +220,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:quit*", true)) { - actionList.push_back(Common::SharedPtr(new ActionQuit())); + actionList.push_back(new ActionQuit()); } else if (line.matchString("*:random*", true)) { @@ -240,7 +240,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:set_screen*", true)) { - actionList.push_back(Common::SharedPtr(new ActionSetScreen(line))); + actionList.push_back(new ActionSetScreen(line)); } else if (line.matchString("*:set_venus*", true)) { @@ -248,7 +248,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:streamvideo*", true)) { - actionList.push_back(Common::SharedPtr(new ActionStreamVideo(line))); + actionList.push_back(new ActionStreamVideo(line)); } else if (line.matchString("*:syncsound*", true)) { diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index c80b5a2bc4..6a1794dabf 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -167,7 +167,7 @@ void ScriptManager::checkPuzzleCriteria() { debug("Puzzle %u criteria passed. Executing its ResultActions", puzzle->key); bool shouldContinue = true; - for (Common::List >::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) { + for (Common::List::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) { shouldContinue = shouldContinue && (*resultIter)->execute(_engine); } diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h index 362c4efed9..884699a6b0 100644 --- a/engines/zvision/script_manager.h +++ b/engines/zvision/script_manager.h @@ -132,7 +132,7 @@ private: * @param actionList The list where the results will be added * @return Created Results object */ - void parseResults(Common::SeekableReadStream &stream, Common::List > &actionList) const; + void parseResults(Common::SeekableReadStream &stream, Common::List &actionList) const; /** * Helper method for parsePuzzle. Parses the stream into a bitwise or of the StateFlags enum -- cgit v1.2.3