DM: Add missing F0292_CHAMPION_DrawState functions, fix error in toggleInventory

This commit is contained in:
Bendegúz Nagy 2016-08-26 22:24:42 +02:00
parent c986a71bea
commit afd844b6de
3 changed files with 13 additions and 13 deletions

View file

@ -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);
}
}

View file

@ -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");

View file

@ -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() {
}
}
}
}