diff options
Diffstat (limited to 'engines/parallaction/objects.cpp')
-rw-r--r-- | engines/parallaction/objects.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index a6ca3fcd2b..9bcd344f06 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -36,7 +36,6 @@ Command::Command() { _valid = false; _flags = 0; - _string = 0; _callable = 0; _object = 0; _counterValue = 0; @@ -44,26 +43,17 @@ Command::Command() { _zeta1 = 0; _zeta2 = 0; _characterId = 0; - _string2 = 0; _musicCommand = 0; _musicParm = 0; } -Command::~Command() { - free(_string); - free(_string2); -} - - Animation::Animation() { gfxobj = NULL; - _scriptName = 0; _frame = 0; _z = 0; } Animation::~Animation() { - free(_scriptName); if (gfxobj) { gfxobj->release(); } @@ -307,16 +297,9 @@ Instruction::Instruction() { _endif = 0; // BRA specific - _text = 0; - _text2 = 0; _y = 0; } -Instruction::~Instruction() { - free(_text); - free(_text2); -} - int16 ScriptVar::getValue() { if (_flags & kParaImmediate) { @@ -415,8 +398,9 @@ void Table::addData(const char* s) { if (!(_used < _size)) error("Table overflow"); - _data[_used++] = strdup(s); - + char *data = (char *)malloc(strlen(s) + 1); + strcpy(data, s); + _data[_used++] = data; } uint16 Table::lookup(const char* s) { |