diff options
author | Bendegúz Nagy | 2016-06-28 20:33:04 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 5ba83b8b4dfb3ed4bf4789c528d0c5d0d169fae8 (patch) | |
tree | e136f35f8cf17ee5e87f270fb8bc6450c5b16522 /engines/dm/champion.cpp | |
parent | ae6f2d711ccf3a2351be2d98da07ed2daf95c017 (diff) | |
download | scummvm-rg350-5ba83b8b4dfb3ed4bf4789c528d0c5d0d169fae8.tar.gz scummvm-rg350-5ba83b8b4dfb3ed4bf4789c528d0c5d0d169fae8.tar.bz2 scummvm-rg350-5ba83b8b4dfb3ed4bf4789c528d0c5d0d169fae8.zip |
DM: Add F0295_CHAMPION_HasObjectIconInSlotBoxChanged, F0039_OBJECT_GetIconIndexInSlotBox
Diffstat (limited to 'engines/dm/champion.cpp')
-rw-r--r-- | engines/dm/champion.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index deae8b4247..d2df2ac022 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -267,6 +267,27 @@ T0299044_ApplyModifier: }
+bool ChampionMan::hasObjectIconInSlotBoxChanged(int16 slotBoxIndex, Thing thing) {
+ ObjectMan &objMan = *_vm->_objectMan;
+
+ IconIndice currIconIndex = objMan.getIconIndexInSlotBox(slotBoxIndex);
+ if (((currIconIndex < kIconIndiceWeaponDagger) && (currIconIndex >= kIconIndiceJunkCompassNorth))
+ || ((currIconIndex >= kIconIndicePotionMaPotionMonPotion) && (currIconIndex <= kIconIndicePotionWaterFlask))
+ || (currIconIndex == kIconIndicePotionEmptyFlask)) {
+ IconIndice newIconIndex = objMan.getIconIndex(thing);
+ if (newIconIndex != currIconIndex) {
+ if ((slotBoxIndex < kSlotBoxInventoryFirstSlot) && !_mousePointerHiddenToDrawChangedObjIconOnScreen) {
+ _mousePointerHiddenToDrawChangedObjIconOnScreen = true;
+ warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
+ }
+ objMan.drawIconInSlotBox(slotBoxIndex, newIconIndex);
+ return true;
+ }
+ }
+
+ return false;
+}
+
ChampionIndex ChampionMan::getIndexInCell(ViewCell cell) {
for (uint16 i = 0; i < _partyChampionCount; ++i) {
if ((_champions[i]._cell == cell) && _champions[i]._currHealth)
|