diff options
author | Paul Gilbert | 2015-02-21 10:43:27 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-21 10:43:27 -0500 |
commit | c5a98b0093330589dc269fe337a60cf0e1508785 (patch) | |
tree | 10ad9d145080534e3db0151010289132307a154c /engines/xeen/party.cpp | |
parent | b790e9bac1ee20482cbea6056dcf084bd85c0da5 (diff) | |
download | scummvm-rg350-c5a98b0093330589dc269fe337a60cf0e1508785.tar.gz scummvm-rg350-c5a98b0093330589dc269fe337a60cf0e1508785.tar.bz2 scummvm-rg350-c5a98b0093330589dc269fe337a60cf0e1508785.zip |
XEEN: Implement more combat methods
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r-- | engines/xeen/party.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index ab8abd7f92..aede42464b 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -559,4 +559,32 @@ void Party::moveToRunLocation() { _mazePosition = _vm->_map->mazeData()._runPosition; } +/** + * Give treasure to the party + */ +void Party::giveTreasure() { + Combat &combat = *_vm->_combat; + Interface &intf = *_vm->_interface; + SoundManager &sound = *_vm->_sound; + + if (!_treasure._gold && !_treasure._gems) + return; + + bool monstersPresent = false; + for (int idx = 0; idx < 26 && !monstersPresent; ++idx) + monstersPresent = combat._attackMonsters[idx] != -1; + + if (_vm->_mode != MODE_9 && monstersPresent) + return; + + Common::fill(&combat._shooting[0], &combat._shooting[MAX_PARTY_COUNT], 0); + intf._charsShooting = false; + intf.draw3d(true); + + if (_treasure._gold || _treasure._gems) + sound.playFX(54); + + error("TODO"); +} + } // End of namespace Xeen |