[Scummvm-git-logs] scummvm branch-2-2 -> 9c6867ddab13da0d14f41917570c60f555ecac3b
dreammaster
paulfgilbert at gmail.com
Sun Sep 13 00:59:20 UTC 2020
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:
9c6867ddab XEEN: Fix attributes going negative
Commit: 9c6867ddab13da0d14f41917570c60f555ecac3b
https://github.com/scummvm/scummvm/commit/9c6867ddab13da0d14f41917570c60f555ecac3b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-09-12T17:58:28-07:00
Commit Message:
XEEN: Fix attributes going negative
Changed paths:
NEWS.md
engines/xeen/character.cpp
engines/xeen/character.h
diff --git a/NEWS.md b/NEWS.md
index 501bfe6c0f..f686b6c5b7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -122,6 +122,8 @@ For a more comprehensive changelog of the latest experimental code, see:
- Fix loading of wall items from savegames.
- Fix U/D keys not working on Quests dialog
- Fix incorrect mirror destination for Dragon Tower
+ - Fix crash reading book in Great Pyramid safe
+ - Prevent attributes from going negative
ZVision:
- Fixed regression in the safe puzzle in Zork Nemesis: The Forbidden Lands.
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 6b4ca056dc..78ff5f1eae 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -403,7 +403,7 @@ uint Character::getStat(Attribute attrib, bool baseOnly) const {
attr._permanent += attr._temporary;
}
- return MAX(attr._permanent, (uint)0);
+ return MAX(attr._permanent, 0);
}
int Character::statColor(int amount, int threshold) {
@@ -550,7 +550,7 @@ int Character::getThievery() const {
}
uint Character::getCurrentLevel() const {
- return MAX(_level._permanent + _level._temporary, (uint)0);
+ return MAX(_level._permanent + _level._temporary, 0);
}
int Character::itemScan(int itemId) const {
diff --git a/engines/xeen/character.h b/engines/xeen/character.h
index 5181f0f59f..38760445f9 100644
--- a/engines/xeen/character.h
+++ b/engines/xeen/character.h
@@ -92,8 +92,8 @@ class XeenEngine;
class AttributePair {
public:
- uint _permanent;
- uint _temporary;
+ int _permanent;
+ int _temporary;
public:
AttributePair();
void synchronize(Common::Serializer &s);
More information about the Scummvm-git-logs
mailing list