[Scummvm-cvs-logs] scummvm master -> 6775d86d0647ada89972f0eb9531c3a857274332
sev-
sev at scummvm.org
Tue Apr 5 18:57:34 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dee6957c31 WAGE: Fix window overlap
644b4dcd0b WAGE: Fixed moving objects to random scene
6775d86d06 WAGE: Fix bugs in original, when people mistype storage scene name
Commit: dee6957c314be54df8b5c1e6ce0f8989f215e58c
https://github.com/scummvm/scummvm/commit/dee6957c314be54df8b5c1e6ce0f8989f215e58c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-05T18:19:23+02:00
Commit Message:
WAGE: Fix window overlap
Changed paths:
engines/wage/detection_tables.h
engines/wage/gui.cpp
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 0214f22..e74862e 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -84,7 +84,6 @@ static const ADGameDescription gameDescriptions[] = {
// No Next button in intro
FANGAME("Jamie the Demon Slayer", "fa0ca9618c18425b6d9bf913f762d91b", 232789),
FANGAMEN("Journey", "The Journey 1.6.2 US", "e66f37472e1414a088eb5d5acc4df794", 820572),
- // Problems with window overlay
FANGAMEN("Jumble", "LSJUMBLE", "7c46851d2f90c7da9efe40b1688869c2", 647339), // Original file name is "LSJUMBLE† "
FANGAME("Karth of the Jungle", "5f2346834821dc3c4008e139cd37b3cb", 96711),
FANGAME("Karth of the Jungle", "444f9426f342135fbcc32180e5ba5b1c", 96960), // Alternative version
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 4c84896..93c799e 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -238,6 +238,12 @@ void Gui::draw() {
return;
}
+ if (_scene != _engine->_world->_player->_currentScene)
+ _sceneDirty = true;
+
+ if (_sceneDirty || _bordersDirty)
+ drawDesktop();
+
if (_sceneIsActive) {
drawConsole();
drawScene();
@@ -264,13 +270,11 @@ void Gui::draw() {
}
void Gui::drawScene() {
- if (_scene == _engine->_world->_player->_currentScene && !_sceneDirty)
+ if (!_sceneDirty && !_bordersDirty)
return;
_scene = _engine->_world->_player->_currentScene;
- drawDesktop();
-
_sceneDirty = true;
_consoleDirty = true;
_menuDirty = true;
@@ -288,17 +292,16 @@ void Gui::drawScene() {
_consoleTextArea.setWidth(_scene->_textBounds->width() - 2 * kBorderWidth);
_consoleTextArea.setHeight(_scene->_textBounds->height() - 2 * kBorderWidth);
- if (_scene && (_bordersDirty || _sceneDirty))
- paintBorder(&_screen, _sceneArea, kWindowScene);
+ paintBorder(&_screen, _sceneArea, kWindowScene);
}
// Render console
void Gui::drawConsole() {
- if (_consoleDirty || _consoleFullRedraw)
- renderConsole(&_screen, _consoleTextArea);
+ if (!_consoleDirty && !_consoleFullRedraw && !_bordersDirty)
+ return;
- if (_bordersDirty || _consoleDirty || _consoleFullRedraw)
- paintBorder(&_screen, _consoleTextArea, kWindowConsole);
+ renderConsole(&_screen, _consoleTextArea);
+ paintBorder(&_screen, _consoleTextArea, kWindowConsole);
}
void Gui::drawBox(Graphics::Surface *g, int x, int y, int w, int h) {
Commit: 644b4dcd0b3a01751ed525370a9c6bc4ccc4bbc6
https://github.com/scummvm/scummvm/commit/644b4dcd0b3a01751ed525370a9c6bc4ccc4bbc6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-05T18:35:36+02:00
Commit Message:
WAGE: Fixed moving objects to random scene
Changed paths:
engines/wage/wage.cpp
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index e0299c8..a6f5bb7 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -284,8 +284,9 @@ void WageEngine::performInitialSetup() {
if (!obj->_sceneOrOwner.equalsIgnoreCase(STORAGESCENE)) {
Common::String location = obj->_sceneOrOwner;
location.toLowercase();
- if (_world->_scenes.contains(location)) {
- _world->move(obj, _world->_scenes[location]);
+ Scene *scene = getSceneByName(location);
+ if (scene != NULL) {
+ _world->move(obj, scene);
} else {
if (!_world->_chrs.contains(location)) {
// Note: PLAYER@ is not a valid target here.
@@ -328,13 +329,14 @@ void WageEngine::doClose() {
}
Scene *WageEngine::getSceneByName(Common::String &location) {
- Scene *scene;
if (location.equals("random@")) {
- scene = _world->getRandomScene();
+ return _world->getRandomScene();
} else {
- scene = _world->_scenes[location];
+ if (_world->_scenes.contains(location))
+ return _world->_scenes[location];
+ else
+ return NULL;
}
- return scene;
}
void WageEngine::onMove(Designed *what, Designed *from, Designed *to) {
Commit: 6775d86d0647ada89972f0eb9531c3a857274332
https://github.com/scummvm/scummvm/commit/6775d86d0647ada89972f0eb9531c3a857274332
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-05T18:48:29+02:00
Commit Message:
WAGE: Fix bugs in original, when people mistype storage scene name
Changed paths:
engines/wage/detection_tables.h
engines/wage/util.cpp
engines/wage/wage.cpp
engines/wage/wage.h
engines/wage/world.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index e74862e..0963386 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 f31a83c..8c8af66 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 a6f5bb7..aa480b6 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 8ca306a..a0be7a7 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 e904113..355d660 100644
--- a/engines/wage/world.h
+++ b/engines/wage/world.h
@@ -50,8 +50,6 @@
namespace Wage {
-#define STORAGESCENE "STORAGE@"
-
class Sound;
class World {
More information about the Scummvm-git-logs
mailing list