XEEN: Fixes to the Character Info dialog

This commit is contained in:
Paul Gilbert 2015-02-01 15:24:12 -05:00
parent 3ae4958f0b
commit d57c9f2021
4 changed files with 11 additions and 8 deletions

View File

@ -88,9 +88,9 @@ void CharacterInfo::execute(int charIndex) {
charIndex = _buttonValue; charIndex = _buttonValue;
c = (oldMode != MODE_InCombat) ? &party._activeParty[charIndex] : party._combatParty[charIndex]; c = (oldMode != MODE_InCombat) ? &party._activeParty[charIndex] : party._combatParty[charIndex];
} else { } else {
_iconSprites.load("view.icn");
_vm->_mode = MODE_CHARACTER_INFO; _vm->_mode = MODE_CHARACTER_INFO;
} }
redrawFlag = true;
break; break;
case Common::KEYCODE_UP: case Common::KEYCODE_UP:
@ -290,7 +290,7 @@ Common::String CharacterInfo::loadCharacterDetails(const Character &c) {
RACE_NAMES[c._race], CLASS_NAMES[c._class], RACE_NAMES[c._race], CLASS_NAMES[c._class],
c.statColor(c.getStat(MIGHT), c.getStat(MIGHT, true)), c.getStat(MIGHT), c.statColor(c.getStat(MIGHT), c.getStat(MIGHT, true)), c.getStat(MIGHT),
c.statColor(c.getStat(ACCURACY), c.getStat(ACCURACY, true)), c.getStat(ACCURACY), c.statColor(c.getStat(ACCURACY), c.getStat(ACCURACY, true)), c.getStat(ACCURACY),
c.statColor(c._currentHp, c.getMaxHP()), c.statColor(c._currentHp, c.getMaxHP()), c._currentHp,
c.getCurrentExperience(), c.getCurrentExperience(),
c.statColor(c.getStat(INTELLECT), c.getStat(INTELLECT, true)), c.getStat(INTELLECT), c.statColor(c.getStat(INTELLECT), c.getStat(INTELLECT, true)), c.getStat(INTELLECT),
c.statColor(c.getStat(LUCK), c.getStat(LUCK, true)), c.getStat(LUCK), c.statColor(c.getStat(LUCK), c.getStat(LUCK, true)), c.getStat(LUCK),

View File

@ -187,7 +187,7 @@ int Character::getMaxSP() const {
Attribute attrib; Attribute attrib;
Skill skill; Skill skill;
if (_hasSpells) if (!_hasSpells)
return 0; return 0;
if (_class == CLASS_SORCERER || _class == CLASS_ARCHER) { if (_class == CLASS_SORCERER || _class == CLASS_ARCHER) {
@ -202,7 +202,7 @@ int Character::getMaxSP() const {
for (;;) { for (;;) {
// Get the base number of spell points // Get the base number of spell points
result = statBonus(getStat(attrib)); result = statBonus(getStat(attrib)) + 3;
result += RACE_SP_BONUSES[_race][attrib - 1]; result += RACE_SP_BONUSES[_race][attrib - 1];
if (_skills[skill]) if (_skills[skill])

View File

@ -304,9 +304,9 @@ const uint CLASS_EXP_LEVELS[10] = {
}; };
const char *const CONDITION_NAMES[17] = { const char *const CONDITION_NAMES[17] = {
nullptr, "Cursed", "Heart Broken", "Weak", "Poisoned", "Diseased", "Cursed", "Heart Broken", "Weak", "Poisoned", "Diseased",
"Insane", "In Love", "Drunk", "Asleep", "Depressed", "Confused", "Insane", "In Love", "Drunk", "Asleep", "Depressed", "Confused",
"Paralyzed", "Unconscious", "Dead", "Stone", "Eradicated" "Paralyzed", "Unconscious", "Dead", "Stone", "Eradicated", "Good"
}; };
const int CONDITION_COLORS[17] = { const int CONDITION_COLORS[17] = {

View File

@ -192,9 +192,12 @@ void Window::drawList(DrawStruct *items, int count) {
if (items->_frame == -1 || items->_scale == -1 || items->_sprites == nullptr) if (items->_frame == -1 || items->_scale == -1 || items->_sprites == nullptr)
continue; continue;
Common::Point pt(items->_x, items->_y);
pt.x += _innerBounds.left;
pt.y += _innerBounds.top;
// TODO: There are two sprite calls in this method. Figure out why // TODO: There are two sprite calls in this method. Figure out why
items->_sprites->draw(*this, items->_frame, items->_sprites->draw(*this, items->_frame, pt, items->_flags, items->_scale);
Common::Point(items->_x, items->_y), items->_flags, items->_scale);
} }
} }