mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
ZVISION: Implement action:animunload
This commit is contained in:
parent
0efa1bc560
commit
53002dd2d0
@ -440,6 +440,25 @@ bool ActionPreloadAnimation::execute() {
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ActionUnloadAnimation
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ActionUnloadAnimation::ActionUnloadAnimation(ZVision *engine, int32 slotkey, const Common::String &line) :
|
||||
ResultAction(engine, slotkey) {
|
||||
|
||||
sscanf(line.c_str(), "%u", &_key);
|
||||
}
|
||||
|
||||
bool ActionUnloadAnimation::execute() {
|
||||
AnimationNode *nod = (AnimationNode *)_engine->getScriptManager()->getSideFX(_key);
|
||||
|
||||
if (nod && nod->getType() == SideFX::SIDEFX_ANIM)
|
||||
_engine->getScriptManager()->deleteSideFx(_key);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ActionPlayAnimation
|
||||
|
@ -347,6 +347,8 @@ class ActionUnloadAnimation : public ResultAction {
|
||||
public:
|
||||
ActionUnloadAnimation(ZVision *engine, int32 slotkey, const Common::String &line);
|
||||
bool execute();
|
||||
private:
|
||||
uint32 _key;
|
||||
};
|
||||
|
||||
class ActionRandom : public ResultAction {
|
||||
|
@ -220,7 +220,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
|
||||
} else if (act.matchString("animpreload", true)) {
|
||||
actionList.push_back(new ActionPreloadAnimation(_engine, slot, args));
|
||||
} else if (act.matchString("animunload", true)) {
|
||||
//actionList.push_back(new ActionUnloadAnimation(_engine, slot, args));
|
||||
actionList.push_back(new ActionUnloadAnimation(_engine, slot, args));
|
||||
} else if (act.matchString("attenuate", true)) {
|
||||
actionList.push_back(new ActionAttenuate(_engine, slot, args));
|
||||
} else if (act.matchString("assign", true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user