Mercurial > mm7
changeset 1359:60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 17:13:45 +0200 |
parents | 61010a655c94 |
children | a47d9282ea7c |
files | Actor.cpp Party.cpp Party.h Player.cpp mm7_2.cpp |
diffstat | 5 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/Actor.cpp Sat Jul 13 16:52:00 2013 +0200 +++ b/Actor.cpp Sat Jul 13 17:13:45 2013 +0200 @@ -2046,17 +2046,17 @@ { if ( v1 == 6 || v1 == 7 ) { - _449B57_test_bit(pParty->_quest_bits, 99); - if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 100) ) + pParty->IsPartyGood(); //the binary file contains this call. if someone finds out whether it's supposed to be here or not, feel free to apply the appropriate change + if ( pParty->IsPartyEvil() ) return; goto LABEL_12; } if ( v1 != 8 ) goto LABEL_12; } - if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 99) ) + if ( pParty->IsPartyGood() ) v3 = 0; - if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 100) ) + if ( pParty->IsPartyEvil() ) v3 = 1; if ( v3 ) { @@ -4906,9 +4906,9 @@ v8 = 1; if ( !_stricmp(pCurrentMapName.data(), "d26.blv") ) v6 = 1; - if (_449B57_test_bit(pParty->_quest_bits, 99)) + if (pParty->IsPartyGood()) v7 = 1; - if (_449B57_test_bit(pParty->_quest_bits, 100)) + if (pParty->IsPartyEvil()) v5 = 1; Log::Warning(L"%S %S %u", __FILE__, __FUNCTION__, __LINE__); // ai_near_actors_targets_pid[i] for AI_Stand seems always 0; original code behaviour is identical
--- a/Party.cpp Sat Jul 13 16:52:00 2013 +0200 +++ b/Party.cpp Sat Jul 13 17:13:45 2013 +0200 @@ -1153,6 +1153,7 @@ } pParty->days_played_without_rest = 0; } + //----- (004938D1) -------------------------------------------------------- void __fastcall Rest(unsigned int uHoursToSleep) { @@ -1513,4 +1514,15 @@ pIcons_LOD->SyncLoadedFilesCount(); } return 1; +} + + +bool Party::IsPartyEvil() +{ + return _449B57_test_bit(_quest_bits, 100); +} + +bool Party::IsPartyGood() +{ + return _449B57_test_bit(_quest_bits, 99); } \ No newline at end of file
--- a/Party.h Sat Jul 13 16:52:00 2013 +0200 +++ b/Party.h Sat Jul 13 17:13:45 2013 +0200 @@ -194,6 +194,8 @@ inline bool GetYellowAlert() {return (uFlags & PARTY_FLAGS_1_ALERT_YELLOW) != 0;} inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;} + bool IsPartyEvil(); + bool IsPartyGood(); int field_0; unsigned int uPartyHeight;
--- a/Player.cpp Sat Jul 13 16:52:00 2013 +0200 +++ b/Player.cpp Sat Jul 13 17:13:45 2013 +0200 @@ -684,9 +684,9 @@ { case ITEM_RELIC_ETHRICS_STAFF: case ITEM_RELIC_OLD_NICK: - case ITEM_RELIC_TWILIGHT: return _449B57_test_bit(pParty->_quest_bits, 100); break; + case ITEM_RELIC_TWILIGHT: return pParty->IsPartyEvil(); break; case ITEM_RELIC_TALEDONS_HELM: - case ITEM_RELIC_JUSTICE: return _449B57_test_bit(pParty->_quest_bits, 99); break; + case ITEM_RELIC_JUSTICE: return pParty->IsPartyGood(); break; case ITEM_ARTIFACT_ELFBANE: return IsRaceGoblin(); break; case ITEM_ARTIFACT_MINDS_EYE: return IsRaceHuman(); break; case ITEM_ELVEN_CHAINMAIL: return IsRaceElf(); break;
--- a/mm7_2.cpp Sat Jul 13 16:52:00 2013 +0200 +++ b/mm7_2.cpp Sat Jul 13 17:13:45 2013 +0200 @@ -825,13 +825,13 @@ pWindow.uFrameZ = 543; pWindow.uFrameW = 397; pFont = LoadFont("endgame.fnt", "FONTPAL", NULL); - if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 99) ) + if ( pParty->IsPartyGood() ) { v1 = pGlobalTXT_LocalizationStrings[675]; } else { - result = _449B57_test_bit(pParty->_quest_bits, 100); + result = pParty->IsPartyEvil(); if ( !(short)result ) return result; v1 = pGlobalTXT_LocalizationStrings[676];