diff options
author | Alexander Tkachev | 2016-07-27 17:51:00 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-07-27 17:51:00 +0600 |
commit | 35883517994efbcef9b5eb429b3888235745dea8 (patch) | |
tree | 4d91db6b3a5cf1cb7775526f39981ffca2554d31 /engines/wage/entities.cpp | |
parent | 6b21b1f89365bd77494940ec918212069238cc70 (diff) | |
download | scummvm-rg350-35883517994efbcef9b5eb429b3888235745dea8.tar.gz scummvm-rg350-35883517994efbcef9b5eb429b3888235745dea8.tar.bz2 scummvm-rg350-35883517994efbcef9b5eb429b3888235745dea8.zip |
WAGE: Refine saveGame() once more
_resourceId is added to entities, so saveGame() can access these ids and
save them.
Diffstat (limited to 'engines/wage/entities.cpp')
-rw-r--r-- | engines/wage/entities.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 43ac6c8cc7..b2babbab4d 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -80,6 +80,8 @@ Context::Context() { } Scene::Scene() { + _resourceId = 0; + _script = NULL; _design = NULL; _textBounds = NULL; @@ -104,6 +106,8 @@ Scene::Scene(Common::String name, Common::SeekableReadStream *data) { _classType = SCENE; _design = new Design(data); + _resourceId = 0; + _script = NULL; _textBounds = NULL; _fontSize = 0; @@ -221,6 +225,7 @@ Designed *Scene::lookUpEntity(int x, int y) { Obj::Obj() : _currentOwner(NULL), _currentScene(NULL) { _index = 0; + _resourceId = 0; _namePlural = false; _value = 0; _attackType = 0; @@ -231,7 +236,9 @@ Obj::Obj() : _currentOwner(NULL), _currentScene(NULL) { _damage = 0; } -Obj::Obj(Common::String name, Common::SeekableReadStream *data) { +Obj::Obj(Common::String name, Common::SeekableReadStream *data, int resourceId) { + _resourceId = resourceId; + _name = name; _classType = OBJ; _currentOwner = NULL; @@ -322,6 +329,7 @@ Chr::Chr(Common::String name, Common::SeekableReadStream *data) { _design = new Design(data); _index = 0; + _resourceId = 0; _currentScene = NULL; setDesignBounds(readRect(data)); |