ScummVM API documentation
ZVision::ScriptingEffect Class Reference

#include <scripting_effect.h>

Inheritance diagram for ZVision::ScriptingEffect:
ZVision::AnimationEffect ZVision::DistortNode ZVision::MusicNodeBASE ZVision::PanTrackNode ZVision::RegionNode ZVision::SyncSoundNode ZVision::TimerNode ZVision::ttyTextNode

Public Types

enum  ScriptingEffectType {
  SCRIPTING_EFFECT_ANIM = 1, SCRIPTING_EFFECT_AUDIO = 2, SCRIPTING_EFFECT_DISTORT = 4, SCRIPTING_EFFECT_PANTRACK = 8,
  SCRIPTING_EFFECT_REGION = 16, SCRIPTING_EFFECT_TIMER = 32, SCRIPTING_EFFECT_TTYTXT = 64, SCRIPTING_EFFECT_UNKNOWN = 128,
  SCRIPTING_EFFECT_ALL = 255
}
 

Public Member Functions

 ScriptingEffect (ZVision *engine, uint32 key, ScriptingEffectType type)
 
uint32 getKey ()
 
ScriptingEffectType getType ()
 
virtual bool process (uint32 deltaTimeInMillis)
 
virtual void serialize (Common::WriteStream *stream)
 
virtual void deserialize (Common::SeekableReadStream *stream)
 
virtual bool needsSerialization ()
 
virtual bool stop ()
 
virtual void kill ()
 

Protected Attributes

ZVision_engine
 
uint32 _key
 
ScriptingEffectType _type
 

Detailed Description

The base class that represents effects created from Actions. This class is virtual.

Detailed Description: A scene has Controls. By interacting with the controls, the user causes Actions to execute. Certain Actions create 'effects', for example, a sound or an animation. This is the base class for those effects.

Member Function Documentation

◆ serialize()

virtual void ZVision::ScriptingEffect::serialize ( Common::WriteStream stream)
inlinevirtual

Serialize a SideFX for save game use. This should only be used if a SideFX needs to save values that would be different from initialization. AKA a TimerNode needs to store the amount of time left on the timer. Any Controls overriding this MUST write their key as the first data outputted. The default implementation is NOP.

NOTE: If this method is overridden, you MUST also override deserialize() and needsSerialization()

Parameters
streamStream to write any needed data to

Reimplemented in ZVision::TimerNode.

◆ deserialize()

virtual void ZVision::ScriptingEffect::deserialize ( Common::SeekableReadStream stream)
inlinevirtual

De-serialize data from a save game stream. This should only be implemented if the SideFX also implements serialize(). The calling method assumes the size of the data read from the stream exactly equals that written in serialize(). The default implementation is NOP.

NOTE: If this method is overridden, you MUST also override serialize() and needsSerialization()

Parameters
streamSave game file stream

Reimplemented in ZVision::TimerNode.

◆ needsSerialization()

virtual bool ZVision::ScriptingEffect::needsSerialization ( )
inlinevirtual

If a SideFX overrides serialize() and deserialize(), this should return true

Returns
Does the SideFX need save game serialization?

Reimplemented in ZVision::TimerNode.


The documentation for this class was generated from the following file: