aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorrichiesams2013-08-03 13:40:25 -0500
committerrichiesams2013-08-04 13:33:05 -0500
commit44ee28c13f39328a4e5e0eca27ac0b5349fe1253 (patch)
tree838d1fc8a909fcb1b2c54055a30656d843b78a4d /engines/zvision
parent93e4f4dbf7cb6868e790d877ba01678ba19a8fbb (diff)
downloadscummvm-rg350-44ee28c13f39328a4e5e0eca27ac0b5349fe1253.tar.gz
scummvm-rg350-44ee28c13f39328a4e5e0eca27ac0b5349fe1253.tar.bz2
scummvm-rg350-44ee28c13f39328a4e5e0eca27ac0b5349fe1253.zip
ZVISION: Remove ResultAction clone member function
Puzzle now uses smart pointers so clone is no longer necessary
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/actions.cpp33
-rw-r--r--engines/zvision/actions.h11
2 files changed, 0 insertions, 44 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp
index d1f5b93431..438cec7adc 100644
--- a/engines/zvision/actions.cpp
+++ b/engines/zvision/actions.cpp
@@ -37,10 +37,6 @@ ActionAdd::ActionAdd(const Common::String &line) {
sscanf(line.c_str(), ":add(%u,%u)", &_key, &_value);
}
-ResultAction *ActionAdd::clone() const {
- return new ActionAdd(*this);
-}
-
bool ActionAdd::execute(ZVision *engine) {
engine->getScriptManager()->addToStateValue(_key, _value);
return true;
@@ -55,10 +51,6 @@ ActionAssign::ActionAssign(const Common::String &line) {
sscanf(line.c_str(), ":assign(%u, %u)", &_key, &_value);
}
-ResultAction *ActionAssign::clone() const {
- return new ActionAssign(*this);
-}
-
bool ActionAssign::execute(ZVision *engine) {
engine->getScriptManager()->setStateValue(_key, _value);
return true;
@@ -73,10 +65,6 @@ ActionAttenuate::ActionAttenuate(const Common::String &line) {
sscanf(line.c_str(), ":assign(%u, %d)", &_key, &_attenuation);
}
-ResultAction *ActionAttenuate::clone() const {
- return new ActionAttenuate(*this);
-}
-
bool ActionAttenuate::execute(ZVision *engine) {
// TODO: Implement
return true;
@@ -91,10 +79,6 @@ ActionChangeLocation::ActionChangeLocation(const Common::String &line) {
sscanf(line.c_str(), ":change_location(%c,%c,%c%c,%u)", &_world, &_room, &_node, &_view, &_x);
}
-ResultAction *ActionChangeLocation::clone() const {
- return new ActionChangeLocation(*this);
-}
-
bool ActionChangeLocation::execute(ZVision *engine) {
// TODO: Implement
return true;
@@ -111,10 +95,6 @@ ActionCrossfade::ActionCrossfade(const Common::String &line) {
&_keyOne, &_keyTwo, &_oneStartVolume, &_twoStartVolume, &_oneEndVolume, &_twoEndVolume, &_timeInMillis);
}
-ResultAction *ActionCrossfade::clone() const {
- return new ActionCrossfade(*this);
-}
-
bool ActionCrossfade::execute(ZVision *engine) {
// TODO: Implement
return true;
@@ -128,10 +108,7 @@ bool ActionCrossfade::execute(ZVision *engine) {
ActionPreloadAnimation::ActionPreloadAnimation(const Common::String &line) {
// The two %*u are always 0 and dont seem to have a use
sscanf(line.c_str(), ":animpreload:%u(%s %*u %*u %u %u)", &_key, &_fileName, &_mask, &_framerate);
-}
-ResultAction *ActionPreloadAnimation::clone() const {
- return new ActionPreloadAnimation(*this);
}
bool ActionPreloadAnimation::execute(ZVision *engine) {
@@ -155,10 +132,6 @@ ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) {
_fileName = Common::String(fileName);
}
-ResultAction *ActionPlayAnimation::clone() const {
- return new ActionPlayAnimation(*this);
-}
-
bool ActionPlayAnimation::execute(ZVision *engine) {
// TODO: Implement
return true;
@@ -173,10 +146,6 @@ ActionRandom::ActionRandom(const Common::String &line) {
sscanf(line.c_str(), ":random:%u, %u)", &_key, &_max);
}
-ResultAction *ActionRandom::clone() const {
- return new ActionRandom(*this);
-}
-
bool ActionRandom::execute(ZVision *engine) {
uint randNumber = engine->getRandomSource()->getRandomNumber(_max);
engine->getScriptManager()->setStateValue(_key, randNumber);
@@ -192,8 +161,6 @@ ActionTimer::ActionTimer(const Common::String &line) {
sscanf(line.c_str(), ":timer:%u(%u)", &_key, &_time);
}
-ResultAction *ActionTimer::clone() const {
- return new ActionTimer(*this);
}
bool ActionTimer::execute(ZVision *engine) {
diff --git a/engines/zvision/actions.h b/engines/zvision/actions.h
index e10a68869a..7ee51ad279 100644
--- a/engines/zvision/actions.h
+++ b/engines/zvision/actions.h
@@ -35,7 +35,6 @@ class ZVision;
class ResultAction {
public:
virtual ~ResultAction() {}
- virtual ResultAction *clone() const = 0;
virtual bool execute(ZVision *engine) = 0;
};
@@ -74,7 +73,6 @@ public:
class ActionAdd : public ResultAction {
public:
ActionAdd(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -85,7 +83,6 @@ private:
class ActionAssign : public ResultAction {
public:
ActionAssign(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -96,7 +93,6 @@ private:
class ActionAttenuate : public ResultAction {
public:
ActionAttenuate(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -107,7 +103,6 @@ private:
class ActionChangeLocation : public ResultAction {
public:
ActionChangeLocation(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -121,7 +116,6 @@ private:
class ActionCrossfade : public ResultAction {
public:
ActionCrossfade(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -137,7 +131,6 @@ private:
class ActionDelayRender : public ResultAction {
public:
ActionDelayRender(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -148,7 +141,6 @@ private:
class ActionPlayAnimation : public ResultAction {
public:
ActionPlayAnimation(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -168,7 +160,6 @@ private:
class ActionPreloadAnimation : public ResultAction {
public:
ActionPreloadAnimation(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -188,7 +179,6 @@ private:
class ActionRandom : public ResultAction {
public:
ActionRandom(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private:
@@ -199,7 +189,6 @@ private:
class ActionTimer : public ResultAction {
public:
ActionTimer(const Common::String &line);
- ResultAction *clone() const;
bool execute(ZVision *engine);
private: