[Scummvm-cvs-logs] scummvm master -> 2350eca546396775c6e9ac9875ebd59bcc17663f

bluegr bluegr at gmail.com
Fri Dec 26 11:05:20 CET 2014


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:
2350eca546 ZVISION: Remove some unused actions. Cleanup


Commit: 2350eca546396775c6e9ac9875ebd59bcc17663f
    https://github.com/scummvm/scummvm/commit/2350eca546396775c6e9ac9875ebd59bcc17663f
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-26T12:04:21+02:00

Commit Message:
ZVISION: Remove some unused actions. Cleanup

Changed paths:
    engines/zvision/scripting/actions.cpp
    engines/zvision/scripting/actions.h
    engines/zvision/scripting/scr_file_handling.cpp



diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index ebbd09c..c26a93f 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -243,23 +243,6 @@ bool ActionDisableControl::execute() {
 }
 
 //////////////////////////////////////////////////////////////////////////////
-// ActionDisableVenus
-//////////////////////////////////////////////////////////////////////////////
-
-ActionDisableVenus::ActionDisableVenus(ZVision *engine, int32 slotkey, const Common::String &line) :
-	ResultAction(engine, slotkey) {
-	_key = 0;
-
-	sscanf(line.c_str(), "%d", &_key);
-}
-
-bool ActionDisableVenus::execute() {
-	_engine->getScriptManager()->setStateValue(_key, 0);
-
-	return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
 // ActionDisplayMessage
 //////////////////////////////////////////////////////////////////////////////
 
@@ -295,7 +278,7 @@ bool ActionDissolve::execute() {
 }
 
 //////////////////////////////////////////////////////////////////////////////
-// ActionDistort
+// ActionDistort - only used by Zork: Nemesis for the "treatment" puzzle in the Sanitarium (aj30)
 //////////////////////////////////////////////////////////////////////////////
 
 ActionDistort::ActionDistort(ZVision *engine, int32 slotkey, const Common::String &line) :
@@ -406,7 +389,7 @@ bool ActionInventory::execute() {
 }
 
 //////////////////////////////////////////////////////////////////////////////
-// ActionKill
+// ActionKill - only used by ZGI
 //////////////////////////////////////////////////////////////////////////////
 
 ActionKill::ActionKill(ZVision *engine, int32 slotkey, const Common::String &line) :
@@ -735,13 +718,13 @@ bool ActionRegion::execute() {
 	if (_engine->getScriptManager()->getSideFX(_slotKey))
 		return true;
 
-	Effect *effct = NULL;
+	Effect *effect = NULL;
 	switch (_type) {
 	case 0: {
 		uint16 centerX, centerY, frames;
 		double amplitude, waveln, speed;
 		sscanf(_custom.c_str(), "%hu,%hu,%hu,%lf,%lf,%lf,", &centerX, &centerY, &frames, &amplitude, &waveln, &speed);
-		effct = new WaveFx(_engine, _slotKey, _rect, _unk1, frames, centerX, centerY, amplitude, waveln, speed);
+		effect = new WaveFx(_engine, _slotKey, _rect, _unk1, frames, centerX, centerY, amplitude, waveln, speed);
 	}
 	break;
 	case 1: {
@@ -753,7 +736,7 @@ bool ActionRegion::execute() {
 		int8 minD;
 		int8 maxD;
 		EffectMap *_map = _engine->getRenderManager()->makeEffectMap(Common::Point(aX, aY), aD, _rect, &minD, &maxD);
-		effct = new LightFx(_engine, _slotKey, _rect, _unk1, _map, atoi(_custom.c_str()), minD, maxD);
+		effect = new LightFx(_engine, _slotKey, _rect, _unk1, _map, atoi(_custom.c_str()), minD, maxD);
 	}
 	break;
 	case 9: {
@@ -769,16 +752,16 @@ bool ActionRegion::execute() {
 			_rect.setHeight(tempMask.h);
 
 		EffectMap *_map = _engine->getRenderManager()->makeEffectMap(tempMask, 0);
-		effct = new FogFx(_engine, _slotKey, _rect, _unk1, _map, Common::String(buf));
+		effect = new FogFx(_engine, _slotKey, _rect, _unk1, _map, Common::String(buf));
 	}
 	break;
 	default:
 		break;
 	}
 
-	if (effct) {
-		_engine->getScriptManager()->addSideFX(new RegionNode(_engine, _slotKey, effct, _delay));
-		_engine->getRenderManager()->addEffect(effct);
+	if (effect) {
+		_engine->getScriptManager()->addSideFX(new RegionNode(_engine, _slotKey, effect, _delay));
+		_engine->getRenderManager()->addEffect(effect);
 	}
 
 	return true;
@@ -900,24 +883,6 @@ bool ActionSetScreen::execute() {
 }
 
 //////////////////////////////////////////////////////////////////////////////
-// ActionSetVenus
-//////////////////////////////////////////////////////////////////////////////
-
-ActionSetVenus::ActionSetVenus(ZVision *engine, int32 slotkey, const Common::String &line) :
-	ResultAction(engine, slotkey) {
-	_key = 0;
-
-	sscanf(line.c_str(), "%d", &_key);
-}
-
-bool ActionSetVenus::execute() {
-	if (_engine->getScriptManager()->getStateValue(_key))
-		_engine->getScriptManager()->setStateValue(StateKey_Venus, _key);
-
-	return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
 // ActionStop
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/engines/zvision/scripting/actions.h b/engines/zvision/scripting/actions.h
index 3501372..8d43309 100644
--- a/engines/zvision/scripting/actions.h
+++ b/engines/zvision/scripting/actions.h
@@ -124,14 +124,6 @@ private:
 	uint8 _action;
 };
 
-class ActionDebug : public ResultAction {
-public:
-	ActionDebug(ZVision *engine, int32 slotkey, const Common::String &line);
-	bool execute();
-
-private:
-};
-
 class ActionDelayRender : public ResultAction {
 public:
 	ActionDelayRender(ZVision *engine, int32 slotkey, const Common::String &line);
@@ -150,15 +142,6 @@ private:
 	uint32 _key;
 };
 
-class ActionDisableVenus : public ResultAction {
-public:
-	ActionDisableVenus(ZVision *engine, int32 slotkey, const Common::String &line);
-	bool execute();
-
-private:
-	int32 _key;
-};
-
 class ActionDisplayMessage : public ResultAction {
 public:
 	ActionDisplayMessage(ZVision *engine, int32 slotkey, const Common::String &line);
@@ -397,15 +380,6 @@ private:
 	Common::String _fileName;
 };
 
-class ActionSetVenus : public ResultAction {
-public:
-	ActionSetVenus(ZVision *engine, int32 slotkey, const Common::String &line);
-	bool execute();
-
-private:
-	int32 _key;
-};
-
 class ActionStop : public ResultAction {
 public:
 	ActionStop(ZVision *engine, int32 slotkey, const Common::String &line);
diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp
index 83be3b5..fd5c158 100644
--- a/engines/zvision/scripting/scr_file_handling.cpp
+++ b/engines/zvision/scripting/scr_file_handling.cpp
@@ -235,12 +235,13 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
 				} else if (act.matchString("disable_control", true)) {
 					actionList.push_back(new ActionDisableControl(_engine, slot, args));
 				} else if (act.matchString("disable_venus", true)) {
-					actionList.push_back(new ActionDisableVenus(_engine, slot, args));
+					// Not used. Purposely left empty
 				} else if (act.matchString("display_message", true)) {
 					actionList.push_back(new ActionDisplayMessage(_engine, slot, args));
 				} else if (act.matchString("dissolve", true)) {
 					actionList.push_back(new ActionDissolve(_engine));
 				} else if (act.matchString("distort", true)) {
+					// Only used by Zork: Nemesis for the "treatment" puzzle in the Sanitarium (aj30)
 					actionList.push_back(new ActionDistort(_engine, slot, args));
 				} else if (act.matchString("enable_control", true)) {
 					actionList.push_back(new ActionEnableControl(_engine, slot, args));
@@ -249,6 +250,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
 				} else if (act.matchString("inventory", true)) {
 					actionList.push_back(new ActionInventory(_engine, slot, args));
 				} else if (act.matchString("kill", true)) {
+					// Only used by ZGI
 					actionList.push_back(new ActionKill(_engine, slot, args));
 				} else if (act.matchString("menu_bar_enable", true)) {
 					actionList.push_back(new ActionMenuBarEnable(_engine, slot, args));
@@ -278,7 +280,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
 				} else if (act.matchString("set_screen", true)) {
 					actionList.push_back(new ActionSetScreen(_engine, slot, args));
 				} else if (act.matchString("set_venus", true)) {
-					actionList.push_back(new ActionSetVenus(_engine, slot, args));
+					// Not used. Purposely left empty
 				} else if (act.matchString("stop", true)) {
 					actionList.push_back(new ActionStop(_engine, slot, args));
 				} else if (act.matchString("streamvideo", true)) {






More information about the Scummvm-git-logs mailing list