aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-27 23:13:18 -0400
committerPaul Gilbert2018-03-28 20:49:44 -0400
commit8c86a18806d4afc5a28cbfa1eb9b499a5a9d0ff1 (patch)
tree5dd54919b7e6d82245b4caf29b06e30315690cc7 /engines
parent4b0fc02ad08c86a7583fdbb5949d8f37a950259c (diff)
downloadscummvm-rg350-8c86a18806d4afc5a28cbfa1eb9b499a5a9d0ff1.tar.gz
scummvm-rg350-8c86a18806d4afc5a28cbfa1eb9b499a5a9d0ff1.tar.bz2
scummvm-rg350-8c86a18806d4afc5a28cbfa1eb9b499a5a9d0ff1.zip
XEEN: Fix missing message for when all Guild spells bought
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/character.cpp2
-rw-r--r--engines/xeen/dialogs/dialogs_spells.cpp2
-rw-r--r--engines/xeen/locations.cpp2
-rw-r--r--engines/xeen/resources.cpp3
-rw-r--r--engines/xeen/resources.h3
5 files changed, 8 insertions, 4 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 810c76531e..333bad80fe 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -1197,6 +1197,7 @@ void Character::addHitPoints(int amount) {
intf.drawParty(true);
}
+ assert(_currentHp < 65000);
Common::fill(&intf._charFX[0], &intf._charFX[MAX_ACTIVE_PARTY], 0);
}
@@ -1211,6 +1212,7 @@ void Character::subtractHitPoints(int amount) {
// Subtract the given HP amount
_currentHp -= amount;
bool flag = _currentHp <= 10;
+ assert(_currentHp < 65000);
if (_currentHp < 1) {
int v = getMaxHP() + _currentHp;
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 296bf29071..a14d4babaa 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -356,7 +356,7 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) {
}
}
- return nullptr;
+ return _spells.empty() ? Res.SPELLS_LEARNED_ALL : nullptr;
}
/*------------------------------------------------------------------------*/
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index f1d5348f33..72362171be 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -1042,7 +1042,7 @@ Common::String TrainingLocation::createLocationText(Character &ch) {
} else if (ch._level._permanent >= _maxLevel) {
// At maximum level
_experienceToNextLevel = 1;
- msg = Common::String::format(Res.LEARNED_ALL, ch._name.c_str());
+ msg = Common::String::format(Res.TRAINING_LEARNED_ALL, ch._name.c_str());
} else {
// Eligble for level increase
uint cost = ch._level._permanent * ch._level._permanent * 10;
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index 7c804b18f0..e23920183f 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -166,7 +166,7 @@ void Resources::loadData() {
file.syncString(FOOD_AND_DRINK);
file.syncString(TEMPLE_TEXT);
file.syncString(EXPERIENCE_FOR_LEVEL);
- file.syncString(LEARNED_ALL);
+ file.syncString(TRAINING_LEARNED_ALL);
file.syncString(ELIGIBLE_FOR_LEVEL);
file.syncString(TRAINING_TEXT);
file.syncString(GOLD_GEMS);
@@ -188,6 +188,7 @@ void Resources::loadData() {
file.syncNumbers2D((int *)DARK_SPELL_RANGES, 12, 2);
file.syncNumbers((int *)SPELL_GEM_COST, 77);
file.syncString(NOT_A_SPELL_CASTER);
+ file.syncString(SPELLS_LEARNED_ALL);
file.syncString(SPELLS_FOR);
file.syncString(SPELL_LINES_0_TO_9);
file.syncString(SPELLS_DIALOG_SPELLS);
diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h
index 3e70987627..782dc3bd05 100644
--- a/engines/xeen/resources.h
+++ b/engines/xeen/resources.h
@@ -220,7 +220,7 @@ public:
const char *FOOD_AND_DRINK;
const char *TEMPLE_TEXT;
const char *EXPERIENCE_FOR_LEVEL;
- const char *LEARNED_ALL;
+ const char *TRAINING_LEARNED_ALL;
const char *ELIGIBLE_FOR_LEVEL;
const char *TRAINING_TEXT;
const char *GOLD_GEMS;
@@ -243,6 +243,7 @@ public:
int SPELL_LEVEL_OFFSETS[3][39];
int SPELL_GEM_COST[77];
const char *NOT_A_SPELL_CASTER;
+ const char *SPELLS_LEARNED_ALL;
const char *SPELLS_FOR;
const char *SPELL_LINES_0_TO_9;
const char *SPELLS_DIALOG_SPELLS;