diff options
author | Paul Gilbert | 2017-11-18 16:45:41 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-11-18 16:45:41 -0500 |
commit | 33b76cf5d0e10756317cbd09cc0020b2f538a0d3 (patch) | |
tree | 895b19afed1122045cc07f70ab3e0044bc595ae1 /engines | |
parent | 34d19ff4245ecc1273a109568b029229c6865ab3 (diff) | |
download | scummvm-rg350-33b76cf5d0e10756317cbd09cc0020b2f538a0d3.tar.gz scummvm-rg350-33b76cf5d0e10756317cbd09cc0020b2f538a0d3.tar.bz2 scummvm-rg350-33b76cf5d0e10756317cbd09cc0020b2f538a0d3.zip |
XEEN: Fixes for Character class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/character.cpp | 17 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/clouds_cutscenes.cpp | 5 |
2 files changed, 14 insertions, 8 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp index ac02f2d59e..3827fa84d1 100644 --- a/engines/xeen/character.cpp +++ b/engines/xeen/character.cpp @@ -1157,8 +1157,8 @@ int Character::itemScan(int itemId) const { for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx) { const XeenItem &item = _accessories[idx]; - if (item._frame && !(item._bonusFlags & 0xC0) && itemId < 11 && itemId != 3) { - if (item._material >= 59 && item._material <= 130) { + if (item._frame && !(item._bonusFlags & 0xC0)) { + if (itemId < 11 && itemId != 3 && item._material >= 59 && item._material <= 130) { int mIndex = (int)item.getAttributeCategory(); if (mIndex > PERSONALITY) ++mIndex; @@ -1174,11 +1174,18 @@ int Character::itemScan(int itemId) const { if (mIndex == itemId) result += Res.ELEMENTAL_RESISTENCES[item._material]; } + + if (itemId == 9) { + result += Res.ARMOR_STRENGTHS[item._id]; + if (item._material >= 37 && item._material <= 58) { + result += Res.METAL_LAC[item._material - 37]; + } + } } } break; } - }; + } return result; } @@ -1473,7 +1480,7 @@ uint Character::getCurrentExperience() const { int lev = _level._permanent - 1; int shift, base; - if (lev > 0 && lev < 12) + if (lev == 0) return _experience; if (lev >= 12) { @@ -1704,7 +1711,7 @@ int Character::makeItem(int p1, int itemIndex, int p3) { mult = 9; } - v12 = Res.MAKE_ITEM_ARR1[vm->getRandomNumber(Res.MAKE_ITEM_ARR3[mult][p1][0], + v14 = Res.MAKE_ITEM_ARR1[vm->getRandomNumber(Res.MAKE_ITEM_ARR3[mult][p1][0], Res.MAKE_ITEM_ARR3[mult][p1][1])]; break; diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp index 82a7d7c0ca..b827e5135b 100644 --- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp +++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp @@ -119,8 +119,7 @@ bool CloudsCutscenes::showCloudsIntro() { screen.vertMerge(yScroll); if (yCtr < 160) { xeen.draw(screen, 0); - } - else if (yCtr < 100) { + } else if (yCtr < 100) { xeen.draw(screen, 0); if (++xeenCtr < 14) xeen1.draw(screen, xeenCtr); @@ -392,7 +391,7 @@ bool CloudsCutscenes::showCloudsEnding() { // Show swirling vortex // TODO? SpriteResource vort[21]; - SpriteResource cast[6], darkLord[4]; + SpriteResource cast[16], darkLord[4]; for (int idx = 1; idx < 7; ++idx) cast[idx - 1].load(Common::String::format("cast%02u.end", idx)); for (int idx = 1; idx < 4; ++idx) |