aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/puzzle.h2
-rw-r--r--engines/zvision/scr_file_handling.cpp24
-rw-r--r--engines/zvision/script_manager.cpp2
-rw-r--r--engines/zvision/script_manager.h2
4 files changed, 15 insertions, 15 deletions
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<Common::List <CriteriaEntry> > criteriaList;
// This has to be list of pointers because ResultAction is abstract
- Common::List<Common::SharedPtr<ResultAction> > resultActions;
+ Common::List<ResultAction *> 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<Common::SharedPtr<ResultAction> > &actionList) const {
+void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::List<ResultAction *> &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<ResultAction>(new ActionAdd(line)));
+ actionList.push_back(new ActionAdd(line));
} else if (line.matchString("*:animplay*", true)) {
- actionList.push_back(Common::SharedPtr<ResultAction>(new ActionPlayAnimation(line)));
+ actionList.push_back(new ActionPlayAnimation(line));
} else if (line.matchString("*:animpreload*", true)) {
- actionList.push_back(Common::SharedPtr<ResultAction>(new ActionPreloadAnimation(line)));
+ actionList.push_back(new ActionPreloadAnimation(line));
} else if (line.matchString("*:animunload*", true)) {
- //actionList.push_back(Common::SharedPtr<ResultAction>(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<ResultAction>(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<ResultAction>(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<ResultAction>(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<ResultAction>(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<ResultAction>(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<ResultAction>(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<ResultAction>(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<Common::SharedPtr<ResultAction> >::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) {
+ for (Common::List<ResultAction *>::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<Common::SharedPtr<ResultAction> > &actionList) const;
+ void parseResults(Common::SeekableReadStream &stream, Common::List<ResultAction *> &actionList) const;
/**
* Helper method for parsePuzzle. Parses the stream into a bitwise or of the StateFlags enum