[Scummvm-git-logs] scummvm master -> 02aaff2a9f2e03c711bcae121920546532c3f06f
dreammaster
dreammaster at scummvm.org
Sat Dec 30 04:39:52 CET 2017
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:
e5ab696148 XEEN: Fix teleporting using magic mirror
2fac15ad29 XEEN: Fix showing Dark Side awards in the awards dialog
02aaff2a9f XEEN: REplace award values with descriptive constants
Commit: e5ab69614823578eefdd4cb9efa6bc4d9b9e1ffb
https://github.com/scummvm/scummvm/commit/e5ab69614823578eefdd4cb9efa6bc4d9b9e1ffb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-29T22:19:35-05:00
Commit Message:
XEEN: Fix teleporting using magic mirror
Changed paths:
engines/xeen/dialogs_input.cpp
diff --git a/engines/xeen/dialogs_input.cpp b/engines/xeen/dialogs_input.cpp
index 8346c8e..6437778 100644
--- a/engines/xeen/dialogs_input.cpp
+++ b/engines/xeen/dialogs_input.cpp
@@ -144,6 +144,7 @@ int StringInput::show(XeenEngine *vm, bool type, const Common::String &msg1,
int StringInput::execute(bool type, const Common::String &expected,
const Common::String &title, int opcode) {
+ FileManager &files = *_vm->_files;
Interface &intf = *_vm->_interface;
Scripts &scripts = *_vm->_scripts;
Windows &windows = *_vm->_windows;
@@ -165,8 +166,7 @@ int StringInput::execute(bool type, const Common::String &expected,
}
} else {
// Load in the mirror list
- File f(Common::String::format("%smirr.txt",
- _vm->_files->_isDarkCc ? "dark" : "xeen"));
+ File f(Common::String::format("%smirr.txt", files._isDarkCc ? "dark" : "xeen"), 1);
MirrorEntry me;
scripts._mirror.clear();
while (me.synchronize(f))
Commit: 2fac15ad29eff1b44ae433868448ede8d627e76b
https://github.com/scummvm/scummvm/commit/2fac15ad29eff1b44ae433868448ede8d627e76b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-29T22:26:13-05:00
Commit Message:
XEEN: Fix showing Dark Side awards in the awards dialog
Changed paths:
engines/xeen/dialogs.cpp
engines/xeen/dialogs.h
engines/xeen/dialogs_awards.cpp
diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp
index 3062bec..04d56d7 100644
--- a/engines/xeen/dialogs.cpp
+++ b/engines/xeen/dialogs.cpp
@@ -160,6 +160,14 @@ void ButtonContainer::loadStrings(const Common::String &name) {
f.close();
}
+void ButtonContainer::loadStrings(const Common::String &name, int ccMode) {
+ File f(name, ccMode);
+ _textStrings.clear();
+ while (f.pos() < f.size())
+ _textStrings.push_back(f.readString());
+ f.close();
+}
+
/*------------------------------------------------------------------------*/
void SettingsBaseDialog::showContents(SpriteResource &title1, bool waitFlag) {
diff --git a/engines/xeen/dialogs.h b/engines/xeen/dialogs.h
index 92e2d3b..d0bf201 100644
--- a/engines/xeen/dialogs.h
+++ b/engines/xeen/dialogs.h
@@ -70,6 +70,13 @@ protected:
* @param name Name of resource containing strings
*/
void loadStrings(const Common::String &name);
+
+ /**
+ * Load a set of text strings from the given resource
+ * @param name Name of resource containing strings
+ * @param ccMode Optional cc file number to explicitly use
+ */
+ void loadStrings(const Common::String &name, int ccMode);
public:
ButtonContainer(XeenEngine *vm) : Cutscenes(vm), _buttonValue(0) {}
diff --git a/engines/xeen/dialogs_awards.cpp b/engines/xeen/dialogs_awards.cpp
index 91421ca..ab1b791 100644
--- a/engines/xeen/dialogs_awards.cpp
+++ b/engines/xeen/dialogs_awards.cpp
@@ -41,7 +41,7 @@ void Awards::execute(const Character *ch) {
Mode oldMode = g_vm->_mode;
int topIndex = 0;
- loadStrings("award.bin");
+ loadStrings("award.bin", 1);
addButtons();
// Open the window and draw contents
Commit: 02aaff2a9f2e03c711bcae121920546532c3f06f
https://github.com/scummvm/scummvm/commit/02aaff2a9f2e03c711bcae121920546532c3f06f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-29T22:39:04-05:00
Commit Message:
XEEN: REplace award values with descriptive constants
Changed paths:
engines/xeen/character.cpp
engines/xeen/character.h
engines/xeen/scripts.cpp
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index d70ea8a..7e36e54 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -1451,23 +1451,24 @@ void Character::setValue(int id, uint value) {
}
bool Character::guildMember() const {
- Party &party = *Party::_vm->_party;
+ FileManager &files = *g_vm->_files;
+ Party &party = *g_vm->_party;
- if (party._mazeId == 49 && !Party::_vm->_files->_isDarkCc) {
- return hasAward(5);
+ if (party._mazeId == 49 && !files._isDarkCc) {
+ return hasAward(SHANGRILA_GUILD_MEMBER);
}
switch (party._mazeId) {
case 29:
- return hasAward(83);
+ return hasAward(CASTLEVIEW_GUILD_MEMBER);
case 31:
- return hasAward(84);
+ return hasAward(SANDCASTER_GUILD_MEMBER);
case 33:
- return hasAward(85);
+ return hasAward(LAKESIDE_GUILD_MEMBER);
case 35:
- return hasAward(86);
+ return hasAward(NECROPOLIS_GUILD_MEMBER);
default:
- return hasAward(87);
+ return hasAward(OLYMPUS_GUILD_MEMBER);
}
}
diff --git a/engines/xeen/character.h b/engines/xeen/character.h
index 4dde341..54e8d1a 100644
--- a/engines/xeen/character.h
+++ b/engines/xeen/character.h
@@ -37,6 +37,12 @@ namespace Xeen {
#define AWARDS_TOTAL 88
#define WARZONE_AWARD 9
+enum Award {
+ SHANGRILA_GUILD_MEMBER = 5, GOOBER = 76, SUPER_GOOBER = 77,
+ CASTLEVIEW_GUILD_MEMBER = 83, SANDCASTER_GUILD_MEMBER = 84,
+ LAKESIDE_GUILD_MEMBER = 85, NECROPOLIS_GUILD_MEMBER = 86, OLYMPUS_GUILD_MEMBER = 87
+};
+
enum BonusFlags {
ITEMFLAG_BONUS_MASK = 0xBF, ITEMFLAG_CURSED = 0x40, ITEMFLAG_BROKEN = 0x80
};
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 59e12f6..9960322 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -1432,10 +1432,10 @@ void Scripts::doEnding(const Common::String &endStr) {
int state = 0;
for (uint idx = 0; idx < party._activeParty.size(); ++idx) {
Character &player = party._activeParty[idx];
- if (player.hasAward(77)) {
+ if (player.hasAward(SUPER_GOOBER)) {
state = 2;
break;
- } else if (player.hasAward(76)) {
+ } else if (player.hasAward(GOOBER)) {
state = 1;
break;
}
More information about the Scummvm-git-logs
mailing list