[Scummvm-git-logs] scummvm master -> 6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0
dreammaster
dreammaster at scummvm.org
Thu Jul 6 01:58:22 CEST 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:
6d0207c7d6 TITANIC: Fix refreshing inventory tooltip when chicken gets cold
Commit: 6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0
https://github.com/scummvm/scummvm/commit/6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-07-05T19:58:11-04:00
Commit Message:
TITANIC: Fix refreshing inventory tooltip when chicken gets cold
Changed paths:
engines/titanic/carry/chicken.cpp
engines/titanic/pet_control/pet_inventory_glyphs.cpp
diff --git a/engines/titanic/carry/chicken.cpp b/engines/titanic/carry/chicken.cpp
index 91d4c95..27d09a6 100644
--- a/engines/titanic/carry/chicken.cpp
+++ b/engines/titanic/carry/chicken.cpp
@@ -160,19 +160,18 @@ bool CChicken::VisibleMsg(CVisibleMsg *msg) {
}
bool CChicken::TimerMsg(CTimerMsg *msg) {
+ // Check whether chicken has been mailed
CGameObject *obj = getMailManFirstObject();
while (obj && obj->getName() != "Chicken")
obj = getMailManNextObject(obj);
- bool flag = false;
- if (obj) {
- flag = _temperature;
- } else if (_temperature > 0) {
+ // If chicken is not mailed, and still hot, cool it down a bit
+ if (!obj && _temperature > 0)
--_temperature;
- flag = _temperature;
- }
- if (flag) {
+ // If chicken is cooled, refresh the inventory, just in case
+ // the user had the hot chicken selected
+ if (!_temperature) {
petInvChange();
stopTimer(_timerId);
}
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
index e49e0c5..bda88ba 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
@@ -181,7 +181,7 @@ bool CPetInventoryGlyph::doAction(CGlyphAction *action) {
}
break;
- case ACTION_REMOVE:
+ case ACTION_CHANGE:
if (_item == invAction->_item && _owner) {
int v = populateItem(_item, 0);
_background = owner->getBackground(v);
More information about the Scummvm-git-logs
mailing list