[Scummvm-git-logs] scummvm master -> 33b76cf5d0e10756317cbd09cc0020b2f538a0d3

dreammaster dreammaster at scummvm.org
Sat Nov 18 22:45:41 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
33b76cf5d0 XEEN: Fixes for Character class


Commit: 33b76cf5d0e10756317cbd09cc0020b2f538a0d3
    https://github.com/scummvm/scummvm/commit/33b76cf5d0e10756317cbd09cc0020b2f538a0d3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-18T16:45:41-05:00

Commit Message:
XEEN: Fixes for Character class

Changed paths:
    engines/xeen/character.cpp
    engines/xeen/worldofxeen/clouds_cutscenes.cpp


diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index ac02f2d..3827fa8 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 82a7d7c..b827e51 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)





More information about the Scummvm-git-logs mailing list