diff options
-rw-r--r-- | engines/wage/design.cpp | 1 | ||||
-rw-r--r-- | engines/wage/entities.cpp | 12 | ||||
-rw-r--r-- | engines/wage/entities.h | 2 | ||||
-rw-r--r-- | engines/wage/menu.cpp | 2 | ||||
-rw-r--r-- | engines/wage/script.cpp | 9 | ||||
-rw-r--r-- | engines/wage/wage.cpp | 10 | ||||
-rw-r--r-- | engines/wage/world.cpp | 2 |
7 files changed, 37 insertions, 1 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 247d98970e..3ecb02ef08 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -70,6 +70,7 @@ Design::Design(Common::SeekableReadStream *data) { data->read(_data, _len); _surface = NULL; + _bounds = NULL; } Design::~Design() { diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index f85a228fbd..d9e4b60591 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -200,6 +200,18 @@ const char *Scene::getFontName() { return "Unknown"; } +Obj::Obj() : _currentOwner(NULL), _currentScene(NULL) { + _index = 0; + _namePlural = false; + _value = 0; + _attackType = 0; + _numberOfUses = 0; + _returnToRandomScene = false; + _type = 0; + _accuracy = 0; + _damage = 0; +} + Obj::Obj(Common::String name, Common::SeekableReadStream *data) { _name = name; _classType = OBJ; diff --git a/engines/wage/entities.h b/engines/wage/entities.h index 3010c8a955..ce006a6785 100644 --- a/engines/wage/entities.h +++ b/engines/wage/entities.h @@ -228,7 +228,7 @@ public: class Obj : public Designed { public: - Obj() : _currentOwner(NULL), _currentScene(NULL) {} + Obj(); Obj(Common::String name, Common::SeekableReadStream *data); ~Obj(); diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp index dfb042dd15..48f16421b5 100644 --- a/engines/wage/menu.cpp +++ b/engines/wage/menu.cpp @@ -130,6 +130,8 @@ Menu::Menu(Gui *gui) : _gui(gui) { _items.push_back(_commands); regenCommandsMenu(); + _weapons = NULL; + if (!_gui->_engine->_world->_weaponMenuDisabled) { _weapons = new MenuItem(_gui->_engine->_world->_weaponsMenuName.c_str()); _items.push_back(_weapons); diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 523f1e1a1b..b7e77dfcca 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -75,6 +75,15 @@ Common::String Script::Operand::toString() { } Script::Script(Common::SeekableReadStream *data) : _data(data) { + _engine = NULL; + _world = NULL; + + _loopCount = 0; + _inputText = NULL; + _inputClick = NULL; + + _handled = false; + convertToText(); } diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 0a68ce45c7..1932168e41 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -71,10 +71,20 @@ WageEngine::WageEngine(OSystem *syst, const ADGameDescription *desc) : Engine(sy _running = NULL; _lastScene = NULL; + _loopCount = 0; + _turn = 0; + _commandWasQuick = false; _shouldQuit = false; + _gui = NULL; + _world = NULL; + _console = NULL; + _offer = NULL; + + _resManager = NULL; + debug("WageEngine::WageEngine()"); } diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index cb6e806ab0..066c39422f 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -67,6 +67,8 @@ World::World(WageEngine *engine) { _saveBeforeCloseMessage = nullptr; _revertMessage = nullptr; + _weaponMenuDisabled = true; + _engine = engine; } |