ZVISION: Revert to normal pointers instead of shared pointers

This commit is contained in:
richiesams 2013-08-18 19:51:27 -05:00
parent 2fcba2743c
commit b0635edff8
4 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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)) {

View File

@ -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);
}

View File

@ -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