Skip to content

Commit

Permalink
XEEN: Remove duplicated party dead flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Mar 24, 2018
1 parent 8c9f1b2 commit c3d6dcf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions engines/xeen/interface.cpp
Expand Up @@ -267,7 +267,7 @@ void Interface::perform() {
_buttonValue = 0;
do {
events.pollEventsAndWait();
if (g_vm->shouldExit() || g_vm->isLoadPending() || party._partyDead)
if (g_vm->shouldExit() || g_vm->isLoadPending() || party._dead)
return;

if (events._leftButton && WAIT_BOUNDS.contains(events._mousePos))
Expand Down Expand Up @@ -585,7 +585,7 @@ void Interface::perform() {
}

void Interface::chargeStep() {
if (!_vm->_party->_partyDead) {
if (!_vm->_party->_dead) {
_vm->_party->changeTime(_vm->_map->_isOutdoors ? 10 : 1);
if (_tillMove) {
_vm->_combat->moveMonsters();
Expand Down Expand Up @@ -628,7 +628,7 @@ void Interface::doStepCode() {
switch (surfaceId) {
case SURFTYPE_SPACE:
// Wheeze.. can't breathe in space! Explosive decompression, here we come
party._partyDead = true;
party._dead = true;
break;
case SURFTYPE_LAVA:
// It burns, it burns!
Expand Down Expand Up @@ -678,7 +678,7 @@ void Interface::doStepCode() {

combat._combatTarget = oldTarget;
_flipGround = !_flipGround;
} else if (party._partyDead) {
} else if (party._dead) {
draw3d(true);
}
}
Expand Down
1 change: 0 additions & 1 deletion engines/xeen/party.cpp
Expand Up @@ -241,7 +241,6 @@ Party::Party(XeenEngine *vm) {
for (int i = 0; i < TOTAL_CHARACTERS; ++i)
Common::fill(&_characterFlags[i][0], &_characterFlags[i][24], false);

_partyDead = false;
_newDay = false;
_isNight = false;
_stepped = false;
Expand Down
1 change: 0 additions & 1 deletion engines/xeen/party.h
Expand Up @@ -216,7 +216,6 @@ class Party {
// Other party related runtime data
Roster _roster;
Common::Array<Character> _activeParty;
bool _partyDead;
bool _newDay;
bool _isNight;
bool _stepped;
Expand Down
2 changes: 1 addition & 1 deletion engines/xeen/scripts.cpp
Expand Up @@ -376,7 +376,7 @@ bool Scripts::doOpcode(MazeEvent &event) {
bool result = (this->*COMMAND_LIST[event._opcode])(params);
if (result)
// Move to next line
_lineNum = _vm->_party->_partyDead ? -1 : _lineNum + 1;
_lineNum = _vm->_party->_dead ? SCRIPT_ABORT : _lineNum + 1;

return result;
}
Expand Down

0 comments on commit c3d6dcf

Please sign in to comment.