Skip to content

Commit

Permalink
WAGE: Initialize class variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Dec 31, 2015
1 parent 1b6663a commit 6852fc9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engines/wage/entities.cpp
Expand Up @@ -166,6 +166,8 @@ Obj::Obj(String name, Common::SeekableReadStream *data) {
_currentOwner = NULL;
_currentScene = NULL;

_index = 0;

_design = new Design(data);

setDesignBounds(readRect(data));
Expand Down Expand Up @@ -239,6 +241,7 @@ Chr::Chr(String name, Common::SeekableReadStream *data) {
_classType = CHR;
_design = new Design(data);

_index = 0;
_currentScene = NULL;

setDesignBounds(readRect(data));
Expand Down Expand Up @@ -267,6 +270,9 @@ Chr::Chr(String name, Common::SeekableReadStream *data) {

if (data->readSByte() == 1)
_playerCharacter = true;
else
_playerCharacter = false;

_maximumCarriedObjects = data->readByte();
_returnTo = data->readSByte();

Expand All @@ -282,6 +288,8 @@ Chr::Chr(String name, Common::SeekableReadStream *data) {
_gender = data->readSByte();
if (data->readSByte() == 1)
_nameProperNoun = true;
else
_nameProperNoun = false;

_initialScene = readPascalString(data);
_nativeWeapon1 = readPascalString(data);
Expand Down

0 comments on commit 6852fc9

Please sign in to comment.