ScummVM API documentation
ZVision::TimerNode Class Reference
Inheritance diagram for ZVision::TimerNode:
ZVision::ScriptingEffect

Public Member Functions

 TimerNode (ZVision *engine, uint32 key, uint timeInSeconds)
 
bool process (uint32 deltaTimeInMillis) override
 
void serialize (Common::WriteStream *stream) override
 
void deserialize (Common::SeekableReadStream *stream) override
 
bool needsSerialization () override
 
bool stop () override
 
- Public Member Functions inherited from ZVision::ScriptingEffect
 ScriptingEffect (ZVision *engine, uint32 key, ScriptingEffectType type)
 
uint32 getKey ()
 
ScriptingEffectType getType ()
 
virtual void kill ()
 

Additional Inherited Members

- Public Types inherited from ZVision::ScriptingEffect
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
}
 
- Protected Attributes inherited from ZVision::ScriptingEffect
ZVision_engine
 
uint32 _key
 
ScriptingEffectType _type
 

Member Function Documentation

◆ process()

bool ZVision::TimerNode::process ( uint32  deltaTimeInMillis)
overridevirtual

Decrement the timer by the delta time. If the timer is finished, set the status in _globalState and let this node be deleted

Parameters
deltaTimeInMillisThe number of milliseconds that have passed since last frame
Returns
If true, the node can be deleted after process() finishes

Reimplemented from ZVision::ScriptingEffect.

◆ serialize()

void ZVision::TimerNode::serialize ( Common::WriteStream stream)
overridevirtual

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 from ZVision::ScriptingEffect.

◆ deserialize()

void ZVision::TimerNode::deserialize ( Common::SeekableReadStream stream)
overridevirtual

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 from ZVision::ScriptingEffect.

◆ needsSerialization()

bool ZVision::TimerNode::needsSerialization ( )
inlineoverridevirtual

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

Returns
Does the SideFX need save game serialization?

Reimplemented from ZVision::ScriptingEffect.


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