Skip to content

Commit

Permalink
DM: Refactor f318_dropAllObjects, f319_championKill and f323_unpoison…
Browse files Browse the repository at this point in the history
…. Rename _moveSens
  • Loading branch information
Strangerke authored and Bendegúz Nagy committed Aug 26, 2016
1 parent 58d8235 commit cdbbc15
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 122 deletions.
114 changes: 52 additions & 62 deletions engines/dm/champion.cpp
Expand Up @@ -1405,16 +1405,9 @@ void ChampionMan::f320_applyAndDrawPendingDamageAndWounds() {
}

void ChampionMan::f319_championKill(uint16 champIndex) {
uint16 L0962_ui_Multiple = 0;
#define AL0962_ui_Cell L0962_ui_Multiple
#define AL0962_ui_ChampionIconIndex L0962_ui_Multiple
int16 L0963_i_AliveChampionIndex;
Thing L0964_T_Thing;
Champion* L0965_ps_Champion;

L0965_ps_Champion = &_vm->_championMan->_gK71_champions[champIndex];
L0965_ps_Champion->_currHealth = 0;
setFlag(L0965_ps_Champion->_attributes, k0x1000_ChampionAttributeStatusBox);
Champion *curChampion = &_vm->_championMan->_gK71_champions[champIndex];
curChampion->_currHealth = 0;
setFlag(curChampion->_attributes, k0x1000_ChampionAttributeStatusBox);
if (_vm->M0_indexToOrdinal(champIndex) == _vm->_inventoryMan->_g432_inventoryChampionOrdinal) {
if (_vm->_g331_pressingEye) {
_vm->_g331_pressingEye = false;
Expand All @@ -1424,63 +1417,65 @@ void ChampionMan::f319_championKill(uint16 champIndex) {
}
_vm->_eventMan->_g587_hideMousePointerRequestCount = 1;
_vm->_eventMan->f77_hideMouse();
} else {
if (_vm->_g333_pressingMouth) {
_vm->_g333_pressingMouth = false;
_vm->_eventMan->_g597_ignoreMouseMovements = false;
_vm->_eventMan->_g587_hideMousePointerRequestCount = 1;
_vm->_eventMan->f77_hideMouse();
}
} else if (_vm->_g333_pressingMouth) {
_vm->_g333_pressingMouth = false;
_vm->_eventMan->_g597_ignoreMouseMovements = false;
_vm->_eventMan->_g587_hideMousePointerRequestCount = 1;
_vm->_eventMan->f77_hideMouse();
}
_vm->_inventoryMan->f355_toggleInventory(k4_ChampionCloseInventory);
}
f318_dropAllObjects(champIndex);
L0964_T_Thing = _vm->_dungeonMan->f166_getUnusedThing(k0x8000_championBones | k10_JunkThingType);
if (L0964_T_Thing == Thing::_none) {
} else {
Junk* L0966_ps_Junk = (Junk*)_vm->_dungeonMan->f156_getThingData(L0964_T_Thing);
Thing unusedThing = _vm->_dungeonMan->f166_getUnusedThing(k0x8000_championBones | k10_JunkThingType);
uint16 curCell = 0;
if (unusedThing != Thing::_none) {
Junk *L0966_ps_Junk = (Junk *)_vm->_dungeonMan->f156_getThingData(unusedThing);
L0966_ps_Junk->setType(k5_JunkTypeBones);
L0966_ps_Junk->setDoNotDiscard(true);
L0966_ps_Junk->setChargeCount(champIndex);
AL0962_ui_Cell = L0965_ps_Champion->_cell;
_vm->_movsens->f267_getMoveResult(M15_thingWithNewCell(L0964_T_Thing, AL0962_ui_Cell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY);
}
L0965_ps_Champion->_symbolStep = 0;
L0965_ps_Champion->_symbols[0] = '\0';
L0965_ps_Champion->_dir = _vm->_dungeonMan->_g308_partyDir;
L0965_ps_Champion->_maximumDamageReceived = 0;
AL0962_ui_ChampionIconIndex = _vm->_championMan->M26_championIconIndex(AL0962_ui_Cell, _vm->_dungeonMan->_g308_partyDir);
if (_vm->M0_indexToOrdinal(AL0962_ui_ChampionIconIndex) == _vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap) {
curCell = curChampion->_cell;
_vm->_moveSens->f267_getMoveResult(M15_thingWithNewCell(unusedThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY);
}
curChampion->_symbolStep = 0;
curChampion->_symbols[0] = '\0';
curChampion->_dir = _vm->_dungeonMan->_g308_partyDir;
curChampion->_maximumDamageReceived = 0;
uint16 curChampionIconIndex = _vm->_championMan->M26_championIconIndex(curCell, _vm->_dungeonMan->_g308_partyDir);
if (_vm->M0_indexToOrdinal(curChampionIconIndex) == _vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap) {
_vm->_eventMan->_g598_mousePointerBitmapUpdated = true;
_vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap = _vm->M0_indexToOrdinal(kM1_ChampionNone);
warning(false, "IGNORED CODE:G0592_B_BuildMousePointerScreenAreaRequested = true");
}
if (L0965_ps_Champion->_poisonEventCount) {

if (curChampion->_poisonEventCount)
f323_unpoison(champIndex);
}

_vm->_displayMan->_g578_useByteBoxCoordinates = false;
_vm->_displayMan->D24_fillScreenBox(g54_BoxChampionIcons[AL0962_ui_ChampionIconIndex << 2], k0_ColorBlack);
_vm->_displayMan->D24_fillScreenBox(g54_BoxChampionIcons[curChampionIconIndex << 2], k0_ColorBlack);
_vm->_championMan->f292_drawChampionState((ChampionIndex)champIndex);
for (L0963_i_AliveChampionIndex = k0_ChampionFirst, L0965_ps_Champion = _vm->_championMan->_gK71_champions; L0963_i_AliveChampionIndex < _vm->_championMan->_g305_partyChampionCount; L0963_i_AliveChampionIndex++, L0965_ps_Champion++) {
if (L0965_ps_Champion->_currHealth)

int16 aliveChampionIndex;
for (aliveChampionIndex = k0_ChampionFirst, curChampion = _vm->_championMan->_gK71_champions; aliveChampionIndex < _vm->_championMan->_g305_partyChampionCount; aliveChampionIndex++, curChampion++) {
if (curChampion->_currHealth)
break;
}
if (L0963_i_AliveChampionIndex == _vm->_championMan->_g305_partyChampionCount) { /* BUG0_43 The game does not end if the last living champion in the party is killed while looking at a candidate champion in a portrait. The condition to end the game when the whole party is killed is not true because the code considers the candidate champion as alive (in the loop above) */

if (aliveChampionIndex == _vm->_championMan->_g305_partyChampionCount) { /* BUG0_43 The game does not end if the last living champion in the party is killed while looking at a candidate champion in a portrait. The condition to end the game when the whole party is killed is not true because the code considers the candidate champion as alive (in the loop above) */
_vm->_championMan->_g303_partyDead = true;
return;
}
if (champIndex == _vm->_championMan->_g411_leaderIndex) {
_vm->_eventMan->f368_commandSetLeader((ChampionIndex)L0963_i_AliveChampionIndex);
}
if (champIndex == _vm->_championMan->_g514_magicCasterChampionIndex) {
_vm->_menuMan->f394_setMagicCasterAndDrawSpellArea(L0963_i_AliveChampionIndex);
} else {

if (champIndex == _vm->_championMan->_g411_leaderIndex)
_vm->_eventMan->f368_commandSetLeader((ChampionIndex)aliveChampionIndex);

if (champIndex == _vm->_championMan->_g514_magicCasterChampionIndex)
_vm->_menuMan->f394_setMagicCasterAndDrawSpellArea(aliveChampionIndex);
else
_vm->_menuMan->f393_drawSpellAreaControls(_vm->_championMan->_g514_magicCasterChampionIndex);
}
}

void ChampionMan::f318_dropAllObjects(uint16 champIndex) {
static int16 G0057_ai_Graphic562_SlotDropOrder[30] = {
static const int16 slotDropOrder[30] = {
k5_ChampionSlotFeet,
k4_ChampionSlotLegs,
k9_ChampionSlotQuiverLine_2_2,
Expand Down Expand Up @@ -1510,31 +1505,26 @@ void ChampionMan::f318_dropAllObjects(uint16 champIndex) {
k10_ChampionSlotNeck,
k2_ChampionSlotHead,
k0_ChampionSlotReadyHand,
k1_ChampionSlotActionHand};

uint16 L0959_ui_Cell;
Thing L0960_T_Thing;
uint16 L0961_ui_SlotIndex;
k1_ChampionSlotActionHand
};

L0959_ui_Cell = _vm->_championMan->_gK71_champions[champIndex]._cell;
for (L0961_ui_SlotIndex = k0_ChampionSlotReadyHand; L0961_ui_SlotIndex < k30_ChampionSlotChest_1; L0961_ui_SlotIndex++) {
if ((L0960_T_Thing = f300_getObjectRemovedFromSlot(champIndex, G0057_ai_Graphic562_SlotDropOrder[L0961_ui_SlotIndex])) != Thing::_none) {
_vm->_movsens->f267_getMoveResult(M15_thingWithNewCell(L0960_T_Thing, L0959_ui_Cell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY);
uint16 curCell = _vm->_championMan->_gK71_champions[champIndex]._cell;
for (uint16 slotIndex = k0_ChampionSlotReadyHand; slotIndex < k30_ChampionSlotChest_1; slotIndex++) {
Thing curThing = f300_getObjectRemovedFromSlot(champIndex, slotDropOrder[slotIndex]);
if (curThing != Thing::_none) {
_vm->_moveSens->f267_getMoveResult(M15_thingWithNewCell(curThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY);
}
}
}

void ChampionMan::f323_unpoison(int16 champIndex) {
int16 L0982_i_EventIndex;
TimelineEvent* L0983_ps_Event;

if (champIndex == kM1_ChampionNone) {
if (champIndex == kM1_ChampionNone)
return;
}
for (L0982_i_EventIndex = 0, L0983_ps_Event = _vm->_timeline->_g370_events; L0982_i_EventIndex < _vm->_timeline->_g369_eventMaxCount; L0983_ps_Event++, L0982_i_EventIndex++) {
if ((L0983_ps_Event->_type == k75_TMEventTypePoisonChampion) && (L0983_ps_Event->_priority == champIndex)) {
_vm->_timeline->f237_deleteEvent(L0982_i_EventIndex);
}

TimelineEvent *eventPtr = _vm->_timeline->_g370_events;
for (uint16 eventIndex = 0; eventIndex < _vm->_timeline->_g369_eventMaxCount; eventPtr++, eventIndex++) {
if ((eventPtr->_type == k75_TMEventTypePoisonChampion) && (eventPtr->_priority == champIndex))
_vm->_timeline->f237_deleteEvent(eventIndex);
}
_vm->_championMan->_gK71_champions[champIndex]._poisonEventCount = 0;
}
Expand Down
10 changes: 5 additions & 5 deletions engines/dm/dm.cpp
Expand Up @@ -144,7 +144,7 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
_objectMan = nullptr;
_inventoryMan = nullptr;
_textMan = nullptr;
_movsens = nullptr;
_moveSens = nullptr;
_groupMan = nullptr;
_timeline = nullptr;
_projexpl = nullptr;
Expand Down Expand Up @@ -195,7 +195,7 @@ DMEngine::~DMEngine() {
delete _objectMan;
delete _inventoryMan;
delete _textMan;
delete _movsens;
delete _moveSens;
delete _groupMan;
delete _timeline;
delete _projexpl;
Expand Down Expand Up @@ -241,7 +241,7 @@ void DMEngine::f463_initializeGame() {

f462_startGame();
if (_g298_newGame)
_movsens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY);
_moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY);
_eventMan->f78_showMouse();
_eventMan->f357_discardAllInput();
}
Expand Down Expand Up @@ -314,7 +314,7 @@ Common::Error DMEngine::run() {
_objectMan = new ObjectMan(this);
_inventoryMan = new InventoryMan(this);
_textMan = new TextMan(this);
_movsens = new MovesensMan(this);
_moveSens = new MovesensMan(this);
_groupMan = new GroupMan(this);
_timeline = new Timeline(this);
_projexpl = new ProjExpl(this);
Expand All @@ -341,7 +341,7 @@ void DMEngine::f2_gameloop() {
if (_g327_newPartyMapIndex != kM1_mapIndexNone) {
T0002002:
f3_processNewPartyMap(_g327_newPartyMapIndex);
_movsens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY);
_moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY);
_g327_newPartyMapIndex = kM1_mapIndexNone;
_eventMan->f357_discardAllInput();
}
Expand Down
2 changes: 1 addition & 1 deletion engines/dm/dm.h
Expand Up @@ -240,7 +240,7 @@ class DMEngine : public Engine {
ObjectMan *_objectMan;
InventoryMan *_inventoryMan;
TextMan *_textMan;
MovesensMan *_movsens;
MovesensMan *_moveSens;
GroupMan *_groupMan;
Timeline *_timeline;
ProjExpl *_projexpl;
Expand Down
2 changes: 1 addition & 1 deletion engines/dm/dungeonman.cpp
Expand Up @@ -1509,7 +1509,7 @@ Thing DungeonMan::f165_getDiscardTHing(uint16 thingType) {
continue;
T0165026:
_vm->_dungeonMan->f173_setCurrentMap(L0279_ui_MapIndex);
_vm->_movsens->f267_getMoveResult(L0278_T_Thing, L0276_ui_MapX, L0277_ui_MapY, kM1_MapXNotOnASquare, 0);
_vm->_moveSens->f267_getMoveResult(L0278_T_Thing, L0276_ui_MapX, L0277_ui_MapY, kM1_MapXNotOnASquare, 0);
}
_vm->_dungeonMan->f173_setCurrentMap(L0284_i_CurrentMapIndex);
G0294_auc_LastDiscardedThingMapIndex[thingType] = L0279_ui_MapIndex;
Expand Down
22 changes: 11 additions & 11 deletions engines/dm/eventman.cpp
Expand Up @@ -806,9 +806,9 @@ void EventManager::f365_commandTurnParty(CommandType cmdType) {
f364_commandTakeStairs(getFlag(L1114_ui_Square, k0x0004_StairsUp));
return;
}
_vm->_movsens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, Thing::_party, true, false);
_vm->_moveSens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, Thing::_party, true, false);
_vm->_championMan->f284_setPartyDirection(M21_normalizeModulo4(_vm->_dungeonMan->_g308_partyDir + ((cmdType == k2_CommandTurnRight) ? 1 : 3)));
_vm->_movsens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, Thing::_party, true, true);
_vm->_moveSens->f276_sensorProcessThingAdditionOrRemoval(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, Thing::_party, true, true);
}

void EventManager::f366_commandMoveParty(CommandType cmdType) {
Expand Down Expand Up @@ -864,7 +864,7 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) {
_vm->_dungeonMan->f150_mapCoordsAfterRelMovement(_vm->_dungeonMan->_g308_partyDir, g465_movementArrowToStepForwardCount[AL1118_ui_MovementArrowIndex], g466_movementArrowToSepRightCount[AL1118_ui_MovementArrowIndex], L1121_i_MapX, L1122_i_MapY);
L1116_i_SquareType = Square(AL1115_ui_Square = _vm->_dungeonMan->f151_getSquare(L1121_i_MapX, L1122_i_MapY).toByte()).getType();
if (L1116_i_SquareType == k3_ElementTypeStairs) {
_vm->_movsens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_dungeonMan->_g306_partyMapX = L1121_i_MapX;
_vm->_dungeonMan->_g307_partyMapY = L1122_i_MapY;
f364_commandTakeStairs(getFlag(AL1115_ui_Square, k0x0004_StairsUp));
Expand Down Expand Up @@ -905,9 +905,9 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) {
return;
}
if (L1123_B_StairsSquare) {
_vm->_movsens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, L1121_i_MapX, L1122_i_MapY);
_vm->_moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, L1121_i_MapX, L1122_i_MapY);
} else {
_vm->_movsens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, L1121_i_MapX, L1122_i_MapY);
_vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, L1121_i_MapX, L1122_i_MapY);
}
AL1115_ui_Ticks = 1;
L1119_ps_Champion = _vm->_championMan->_gK71_champions;
Expand Down Expand Up @@ -1003,7 +1003,7 @@ void EventManager::f372_commandProcessType80ClickInDungeonViewTouchFrontWall() {
L1136_ui_MapY = _vm->_dungeonMan->_g307_partyMapY;
L1135_ui_MapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_g308_partyDir], L1136_ui_MapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_g308_partyDir];
if ((L1135_ui_MapX >= 0) && (L1135_ui_MapX < _vm->_dungeonMan->_g273_currMapWidth) && (L1136_ui_MapY >= 0) && (L1136_ui_MapY < _vm->_dungeonMan->_g274_currMapHeight)) {
_vm->_g321_stopWaitingForPlayerInput = _vm->_movsens->f275_sensorIsTriggeredByClickOnWall(L1135_ui_MapX, L1136_ui_MapY, returnOppositeDir(_vm->_dungeonMan->_g308_partyDir));
_vm->_g321_stopWaitingForPlayerInput = _vm->_moveSens->f275_sensorIsTriggeredByClickOnWall(L1135_ui_MapX, L1136_ui_MapY, returnOppositeDir(_vm->_dungeonMan->_g308_partyDir));
}
}

Expand All @@ -1028,7 +1028,7 @@ void EventManager::f377_commandProcessType80ClickInDungeonView(int16 posX, int16
if ((((Door*)L1151_ps_Junk)->hasButton()) && _vm->_dungeonMan->_g291_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
_vm->_g321_stopWaitingForPlayerInput = true;
_vm->f064_SOUND_RequestPlay_CPSD(k01_soundSWITCH, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, k1_soundModePlayIfPrioritized);
_vm->_movsens->f268_addEvent(k10_TMEventTypeDoor, L1155_i_MapX, L1156_i_MapY, 0, k2_SensorEffToggle, _vm->_g313_gameTime + 1);
_vm->_moveSens->f268_addEvent(k10_TMEventTypeDoor, L1155_i_MapX, L1156_i_MapY, 0, k2_SensorEffToggle, _vm->_g313_gameTime + 1);
return;
}
} else {
Expand Down Expand Up @@ -1212,14 +1212,14 @@ void EventManager::f373_processType80_clickInDungeonView_grabLeaderHandObject(ui
if (viewCell >= k2_ViewCellBackRight) {
L1137_i_MapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_g308_partyDir], L1138_i_MapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_g308_partyDir];
if (((L1139_T_Thing = _vm->_groupMan->f175_groupGetThing(L1137_i_MapX, L1138_i_MapY)) != Thing::_endOfList) &&
!_vm->_movsens->f264_isLevitating(L1139_T_Thing) &&
!_vm->_moveSens->f264_isLevitating(L1139_T_Thing) &&
_vm->_groupMan->f176_getCreatureOrdinalInCell((Group*)_vm->_dungeonMan->f156_getThingData(L1139_T_Thing), M21_normalizeModulo4(viewCell + _vm->_dungeonMan->_g308_partyDir))) {
return; /* It is not possible to grab an object on floor if there is a non levitating creature on its cell */
}
}
L1139_T_Thing = _vm->_dungeonMan->_g292_pileTopObject[viewCell];
if (_vm->_objectMan->f33_getIconIndex(L1139_T_Thing) != kM1_IconIndiceNone) {
_vm->_movsens->f267_getMoveResult(L1139_T_Thing, L1137_i_MapX, L1138_i_MapY, kM1_MapXNotOnASquare, 0);
_vm->_moveSens->f267_getMoveResult(L1139_T_Thing, L1137_i_MapX, L1138_i_MapY, kM1_MapXNotOnASquare, 0);
_vm->_championMan->f297_putObjectInLeaderHand(L1139_T_Thing, true);
}
_vm->_g321_stopWaitingForPlayerInput = true;
Expand Down Expand Up @@ -1249,7 +1249,7 @@ void EventManager::f374_processType80_clickInDungeonViewDropLeaderHandObject(uin
}
L1145_ui_Cell = M21_normalizeModulo4(_vm->_dungeonMan->_g308_partyDir + viewCell);
L1142_T_Thing = _vm->_championMan->f298_getObjectRemovedFromLeaderHand();
_vm->_movsens->f267_getMoveResult(M15_thingWithNewCell(L1142_T_Thing, L1145_ui_Cell), kM1_MapXNotOnASquare, 0, L1140_i_MapX, L1141_i_MapY);
_vm->_moveSens->f267_getMoveResult(M15_thingWithNewCell(L1142_T_Thing, L1145_ui_Cell), kM1_MapXNotOnASquare, 0, L1140_i_MapX, L1141_i_MapY);
if (L1146_B_DroppingIntoAnAlcove && _vm->_dungeonMan->_g287_isFacingViAltar && ((L1144_i_IconIndex = _vm->_objectMan->f33_getIconIndex(L1142_T_Thing)) == k147_IconIndiceJunkChampionBones)) {
L1143_ps_Junk = (Junk*)_vm->_dungeonMan->f156_getThingData(L1142_T_Thing);
M33_setMapAndTime(L1147_s_Event._mapTime, _vm->_dungeonMan->_g309_partyMapIndex, _vm->_g313_gameTime + 1);
Expand Down Expand Up @@ -1283,7 +1283,7 @@ void EventManager::f357_discardAllInput() {
}

void EventManager::f364_commandTakeStairs(bool stairsGoDown) {
_vm->_movsens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_moveSens->f267_getMoveResult(Thing::_party, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, kM1_MapXNotOnASquare, 0);
_vm->_g327_newPartyMapIndex = _vm->_dungeonMan->f154_getLocationAfterLevelChange(_vm->_dungeonMan->_g309_partyMapIndex, stairsGoDown ? -1 : 1, &_vm->_dungeonMan->_g306_partyMapX, &_vm->_dungeonMan->_g307_partyMapY);
_vm->_dungeonMan->f173_setCurrentMap(_vm->_g327_newPartyMapIndex);
_vm->_championMan->f284_setPartyDirection(_vm->_dungeonMan->f155_getStairsExitDirection(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY));
Expand Down

0 comments on commit cdbbc15

Please sign in to comment.