diff options
author | Eugene Sandulenko | 2015-12-25 12:02:28 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-27 15:41:02 +0100 |
commit | 59b2809f3740923cc63477a25eaabde2535f6f2e (patch) | |
tree | 9c892e98e062d24ffc4368da9db6962dd3d9e4e1 /engines | |
parent | d4afcf99f2b21319251fcb7e8a3de2854808e161 (diff) | |
download | scummvm-rg350-59b2809f3740923cc63477a25eaabde2535f6f2e.tar.gz scummvm-rg350-59b2809f3740923cc63477a25eaabde2535f6f2e.tar.bz2 scummvm-rg350-59b2809f3740923cc63477a25eaabde2535f6f2e.zip |
WAGE: Finished WageEngine::performInitialSetup()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/wage.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 173646b5bc..615a7a0b75 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -166,28 +166,25 @@ void WageEngine::performInitialSetup() { for (int i = 0; i < _world->_orderedChrs.size(); i++) _world->move(_world->_orderedChrs[i], &_world->_storageScene); - warning("STUB: performInitialSetup"); -/* - for (int i = 0; i < _world->_orderedObjs.size(); i++) - Obj obj = _world->_orderedObjs[i]; - if (!obj.getSceneOrOwner().equalsIgnoreCase(World.STORAGE)) { - String location = obj.getSceneOrOwner().toLowerCase(); - Scene scene = getSceneByName(location); - if (scene != null) { - world.move(obj, scene); + for (int i = 0; i < _world->_orderedObjs.size(); i++) { + Obj *obj = _world->_orderedObjs[i]; + if (!obj->_sceneOrOwner.equalsIgnoreCase(STORAGESCENE)) { + String location = obj->_sceneOrOwner; + location.toLowercase(); + if (_world->_scenes.contains(location)) { + _world->move(obj, _world->_scenes[location]); } else { - Chr chr = world.getChrs().get(location); - if (chr == null) { + if (!_world->_chrs.contains(location)) { // Note: PLAYER@ is not a valid target here. - System.err.printf("Couldn't move %s to %s\n", obj.getName(), obj.getSceneOrOwner()); + warning("Couldn't move %s to %s", obj->_name.c_str(), obj->_sceneOrOwner.c_str()); } else { // TODO: Add check for max items. - world.move(obj, chr); + _world->move(obj, _world->_chrs[location]); } } } } -*/ + bool playerPlaced = false; for (int i = 0; i < _world->_orderedChrs.size(); i++) { Chr *chr = _world->_orderedChrs[i]; |