aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-26 22:24:42 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitafd844b6de922f27e22a66e075c273dc7a586ac0 (patch)
tree9813ca999d55437c84bef1266d184e9c950efcb8
parentc986a71beabb7ba8f54a79f3b20735ab6a83e7e0 (diff)
downloadscummvm-rg350-afd844b6de922f27e22a66e075c273dc7a586ac0.tar.gz
scummvm-rg350-afd844b6de922f27e22a66e075c273dc7a586ac0.tar.bz2
scummvm-rg350-afd844b6de922f27e22a66e075c273dc7a586ac0.zip
DM: Add missing F0292_CHAMPION_DrawState functions, fix error in toggleInventory
-rw-r--r--engines/dm/eventman.cpp16
-rw-r--r--engines/dm/inventory.cpp6
-rw-r--r--engines/dm/menus.cpp4
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index a7a330366d..b7caa60668 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -435,11 +435,11 @@ void EventManager::commandMoveParty(CommandType cmdType) {
// MISSING CODE: Lots of code
}
-void EventManager::commandSetLeader(ChampionIndex index) {
+void EventManager::commandSetLeader(ChampionIndex champIndex) {
ChampionMan &cm = *_vm->_championMan;
ChampionIndex leaderIndex;
- if ((cm._leaderIndex == index) || ((index != kChampionNone) && !cm._champions[index]._currHealth))
+ if ((cm._leaderIndex == champIndex) || ((champIndex != kChampionNone) && !cm._champions[champIndex]._currHealth))
return;
if (cm._leaderIndex != kChampionNone) {
@@ -448,20 +448,20 @@ void EventManager::commandSetLeader(ChampionIndex index) {
cm._champions[leaderIndex].setAttributeFlag(kChampionAttributeNameTitle, true);
cm._champions[leaderIndex]._load -= _vm->_dungeonMan->getObjectWeight(cm._leaderHand);
cm._leaderIndex = kChampionNone;
- warning("MISSING CODE: F0292_CHAMPION_DrawState");
+ cm.drawChampionState(leaderIndex);
}
- if (index == kChampionNone) {
+ if (champIndex == kChampionNone) {
cm._leaderIndex = kChampionNone;
return;
}
- cm._leaderIndex = index;
+ cm._leaderIndex = champIndex;
Champion *champion = &cm._champions[cm._leaderIndex];
champion->_dir = _vm->_dungeonMan->_currMap._partyDir;
- cm._champions[index]._load += _vm->_dungeonMan->getObjectWeight(cm._leaderHand);
- if (indexToOrdinal(index) != cm._candidateChampionOrdinal) {
+ cm._champions[champIndex]._load += _vm->_dungeonMan->getObjectWeight(cm._leaderHand);
+ if (indexToOrdinal(champIndex) != cm._candidateChampionOrdinal) {
champion->setAttributeFlag(kChampionAttributeIcon, true);
champion->setAttributeFlag(kChampionAttributeNameTitle, true);
- warning("MISSING CODE: F0292_CHAMPION_DrawState");
+ cm.drawChampionState(champIndex);
}
}
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index db3472051d..b0cc9f0281 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -37,10 +37,10 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
if (invChampOrdinal) {
_inventoryChampionOrdinal = indexToOrdinal(kChampionNone);
warning("MISSING CODE: F0334_INVENTORY_CloseChest");
- champion = &cm._champions[ordinalToIndex(_inventoryChampionOrdinal)];
+ champion = &cm._champions[ordinalToIndex(invChampOrdinal)];
if (champion->_currHealth && !cm._candidateChampionOrdinal) {
champion->setAttributeFlag(kChampionAttributeStatusBox, true);
- warning("MISSING CODE: F0292_CHAMPION_DrawState");
+ cm.drawChampionState((ChampionIndex)ordinalToIndex(invChampOrdinal));
}
if (cm._partyIsSleeping) {
return;
@@ -81,7 +81,7 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
champion->setAttributeFlag(kChampionAttributeStatistics, true);
champion->setAttributeFlag(kChampionAttributeNameTitle, true);
- warning("MISSING CODE: F0292_CHAMPION_DrawState");
+ cm.drawChampionState(championIndex);
em._mousePointerBitmapUpdated = true;
em._secondaryMouseInput = gSecondaryMouseInput_ChampionInventory;
warning("MISSING CODE: set G0444_ps_SecondaryKeyboardInput");
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index d39aa22a1a..f641e02ede 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -25,7 +25,7 @@ void MenuMan::clearActingChampion() {
if (cm._actingChampionOrdinal) {
cm._actingChampionOrdinal--;
cm._champions[cm._actingChampionOrdinal].setAttributeFlag(kChampionAttributeActionHand, true);
- warning("MISSING CODE: F0292_CHAMPION_DrawState");
+ cm.drawChampionState((ChampionIndex)cm._actingChampionOrdinal);
cm._actingChampionOrdinal = indexToOrdinal(kChampionNone);
_shouldRefreshActionArea = true;
}
@@ -88,4 +88,4 @@ void MenuMan::drawDisabledMenu() {
}
}
-} \ No newline at end of file
+}