diff options
| -rw-r--r-- | engines/zvision/timer_node.cpp | 11 | ||||
| -rw-r--r-- | engines/zvision/timer_node.h | 3 | 
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/zvision/timer_node.cpp b/engines/zvision/timer_node.cpp index c9ef9d29d1..81468dbb0b 100644 --- a/engines/zvision/timer_node.cpp +++ b/engines/zvision/timer_node.cpp @@ -22,6 +22,8 @@  #include "common/scummsys.h" +#include "common/stream.h" +  #include "zvision/timer_node.h"  #include "zvision/zvision.h"  #include "zvision/script_manager.h" @@ -43,4 +45,13 @@ bool TimerNode::process(uint32 deltaTimeInMillis) {  	return false;  } +void TimerNode::serialize(Common::WriteStream *stream) { +	stream->writeUint32LE(_key); +	stream->writeUint32LE(_timeLeft); +} + +void TimerNode::deserialize(Common::SeekableReadStream *stream) { +	_timeLeft = stream->readUint32LE(); +} +  } // End of namespace ZVision diff --git a/engines/zvision/timer_node.h b/engines/zvision/timer_node.h index d692f1f0ca..21c344bb15 100644 --- a/engines/zvision/timer_node.h +++ b/engines/zvision/timer_node.h @@ -43,6 +43,9 @@ public:  	 * @return                     If true, the node can be deleted after process() finishes  	 */  	bool process(uint32 deltaTimeInMillis); +	void serialize(Common::WriteStream *stream); +	void deserialize(Common::SeekableReadStream *stream); +	inline bool needsSerialization() { return true; }  private:  	uint32 _timeLeft;  | 
