aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wage/detection_tables.h1
-rw-r--r--engines/wage/util.cpp13
-rw-r--r--engines/wage/wage.cpp6
-rw-r--r--engines/wage/wage.h4
-rw-r--r--engines/wage/world.h2
5 files changed, 20 insertions, 6 deletions
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index e74862e03f..096338659b 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -164,6 +164,7 @@ static const ADGameDescription gameDescriptions[] = {
// Polygons with ignored byte 1 and 2 on second scene
FANGAME("The Village", "b9b5cfbfc7f482eae7587b55edc135ed", 314828),
FANGAME("The Wizard's Apprentice", "7eff3cb7d1a3f59639c62cf196039745", 782824),
+ // Messed up first scene
FANGAMEND("Tombworld", "Demo TombWorld", "f7c86166e29fb8b57f7a1400d4963a4e", 664252), // Original file name "Demo TombWorld©"
// Doesn't go past first scene
BIGGAME("twisted", "", "Twisted! 1.6", "97ab265eddf0cfed6d43d062c853cbc0", 960954),
diff --git a/engines/wage/util.cpp b/engines/wage/util.cpp
index f31a83ca04..8c8af6652e 100644
--- a/engines/wage/util.cpp
+++ b/engines/wage/util.cpp
@@ -122,4 +122,17 @@ const char *getGenderSpecificPronoun(int gender, bool capitalize) {
return capitalize ? "It" : "it";
}
+bool isStorageScene(const Common::String &name) {
+ if (name.equalsIgnoreCase(STORAGESCENE))
+ return true;
+
+ if (name.equalsIgnoreCase("STROAGE@")) // Jumble
+ return true;
+
+ if (name.equalsIgnoreCase("STORAGE@@")) // Jumble
+ return true;
+
+ return false;
+}
+
} // End of namespace Wage
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index a6f5bb7990..aa480b63fe 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -281,7 +281,7 @@ void WageEngine::performInitialSetup() {
debug(5, "Resetting Owners: %d", _world->_orderedObjs.size());
for (uint i = 0; i < _world->_orderedObjs.size(); i++) {
Obj *obj = _world->_orderedObjs[i];
- if (!obj->_sceneOrOwner.equalsIgnoreCase(STORAGESCENE)) {
+ if (!isStorageScene(obj->_sceneOrOwner)) {
Common::String location = obj->_sceneOrOwner;
location.toLowercase();
Scene *scene = getSceneByName(location);
@@ -290,7 +290,7 @@ void WageEngine::performInitialSetup() {
} else {
if (!_world->_chrs.contains(location)) {
// Note: PLAYER@ is not a valid target here.
- warning("Couldn't move %s to %s", obj->_name.c_str(), obj->_sceneOrOwner.c_str());
+ 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, _world->_chrs[location]);
@@ -302,7 +302,7 @@ void WageEngine::performInitialSetup() {
bool playerPlaced = false;
for (uint i = 0; i < _world->_orderedChrs.size(); i++) {
Chr *chr = _world->_orderedChrs[i];
- if (!chr->_initialScene.equalsIgnoreCase(STORAGESCENE)) {
+ if (!isStorageScene(chr->_initialScene)) {
Common::String key = chr->_initialScene;
key.toLowercase();
if (_world->_scenes.contains(key) && _world->_scenes[key] != NULL) {
diff --git a/engines/wage/wage.h b/engines/wage/wage.h
index 8ca306aea3..a0be7a70a9 100644
--- a/engines/wage/wage.h
+++ b/engines/wage/wage.h
@@ -75,6 +75,8 @@ typedef Common::Array<Chr *> ChrArray;
typedef Common::List<Obj *> ObjList;
typedef Common::List<Chr *> ChrList;
+#define STORAGESCENE "STORAGE@"
+
enum OperandType {
OBJ = 0,
CHR = 1,
@@ -113,7 +115,7 @@ Common::Rect *readRect(Common::SeekableReadStream *in);
const char *getIndefiniteArticle(const Common::String &word);
const char *prependGenderSpecificPronoun(int gender);
const char *getGenderSpecificPronoun(int gender, bool capitalize);
-
+bool isStorageScene(const Common::String &name);
typedef Common::Array<byte *> Patterns;
diff --git a/engines/wage/world.h b/engines/wage/world.h
index e9041139df..355d660c8d 100644
--- a/engines/wage/world.h
+++ b/engines/wage/world.h
@@ -50,8 +50,6 @@
namespace Wage {
-#define STORAGESCENE "STORAGE@"
-
class Sound;
class World {