From f0f46113ee103e922ecde5f32652a482899c7e61 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 16 Aug 2007 17:28:18 +0000 Subject: Changed more parsing routines to use tables instead of switch statements. svn-id: r28637 --- engines/parallaction/commands.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/parallaction/commands.h') diff --git a/engines/parallaction/commands.h b/engines/parallaction/commands.h index 64510afc13..6db194d8c7 100644 --- a/engines/parallaction/commands.h +++ b/engines/parallaction/commands.h @@ -46,7 +46,7 @@ struct Animation; // TODO: turn this into a struct -union CommandData { +struct CommandData { uint32 _flags; Animation * _animation; Zone* _zone; @@ -60,9 +60,18 @@ union CommandData { CommandData() { _flags = 0; + _animation = 0; + _zone = 0; + _string = 0; + _callable = 0; + _object = 0; + _move._x = 0; + _move._y = 0; } ~CommandData() { + if (_string) + free(_string); } }; -- cgit v1.2.3