diff options
author | Paul Gilbert | 2015-02-15 12:20:44 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-15 12:20:44 -0500 |
commit | 6605a0c505b2e58bd458fab6865e4db1bf55972b (patch) | |
tree | 7fe6548cd57afcda946ce9e8d2e149cf081ea2bb | |
parent | cc9f62fcb936f86468566cd33602ff394040d33a (diff) | |
download | scummvm-rg350-6605a0c505b2e58bd458fab6865e4db1bf55972b.tar.gz scummvm-rg350-6605a0c505b2e58bd458fab6865e4db1bf55972b.tar.bz2 scummvm-rg350-6605a0c505b2e58bd458fab6865e4db1bf55972b.zip |
XEEN: Implemented more code from end of draw3d
-rw-r--r-- | engines/xeen/combat.cpp | 6 | ||||
-rw-r--r-- | engines/xeen/combat.h | 2 | ||||
-rw-r--r-- | engines/xeen/interface.cpp | 22 | ||||
-rw-r--r-- | engines/xeen/interface.h | 2 | ||||
-rw-r--r-- | engines/xeen/interface_map.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface_map.h | 2 |
6 files changed, 27 insertions, 9 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index fec244b63a..4d0add115a 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -22,6 +22,7 @@ #include "xeen/combat.h" #include "common/algorithm.h" +#include "common/textconsole.h" namespace Xeen { @@ -42,4 +43,9 @@ void Combat::clear() { Common::fill(&_attackMonsters[0], &_attackMonsters[26], -1); } +void Combat::doCombat() { + error("TODO: doCombat"); +} + + } // End of namespace Xeen diff --git a/engines/xeen/combat.h b/engines/xeen/combat.h index ef82de5af2..c5c7f0817b 100644 --- a/engines/xeen/combat.h +++ b/engines/xeen/combat.h @@ -65,6 +65,8 @@ public: Combat(XeenEngine *vm); void clear(); + + void doCombat(); }; } // End of namespace Xeen diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 51a59e1f6f..89747d1a81 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -937,12 +937,13 @@ void Interface::draw3d(bool updateFlag) { EventsManager &events = *_vm->_events; Party &party = *_vm->_party; Screen &screen = *_vm->_screen; + Scripts &scripts = *_vm->_scripts; if (screen._windows[11]._enabled) return; // Draw the map - drawMap(updateFlag); + drawMap(); // Draw the minimap drawMiniMap(); @@ -966,11 +967,20 @@ void Interface::draw3d(bool updateFlag) { screen._windows[3].update(); } - // TODO: more stuff + if (combat._attackMonsters[0] != -1 || combat._attackMonsters[1] != -1 + || combat._attackMonsters[2] != -1) { + if ((_vm->_mode == MODE_1 || _vm->_mode == MODE_SLEEPING) && !_flag1 + && !_charsShooting && _vm->_moveMonsters) { + combat.doCombat(); + if (scripts._eventSkipped) + scripts.checkEvents(); + } + } - _vm->_party->_stepped = false; + party._stepped = false; if (_vm->_mode == MODE_9) { - // TODO + // TODO: Save current scripts data? + error("TODO: save scripts?"); } // TODO: Check use of updateFlag here. Original doesn't have it, but I @@ -1029,7 +1039,7 @@ void Interface::handleFalling() { assembleBorder(); w.update(); - shake(); + shake(10); } void Interface::saveFall() { @@ -1040,7 +1050,7 @@ void Interface::fall(int v) { } -void Interface::shake() { +void Interface::shake(int time) { } diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h index 57db3f2bcd..660d1b1340 100644 --- a/engines/xeen/interface.h +++ b/engines/xeen/interface.h @@ -92,7 +92,7 @@ private: void fall(int v); - void shake(); + void shake(int time); public: int _intrIndex1; Common::String _interfaceText; diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index 6893c7114a..a098800f28 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -406,7 +406,7 @@ void InterfaceMap::setup() { _charPowSprites.load("charpow.icn"); } -void InterfaceMap::drawMap(bool updateFlag) { +void InterfaceMap::drawMap() { Combat &combat = *_vm->_combat; Map &map = *_vm->_map; Scripts &scripts = *_vm->_scripts; diff --git a/engines/xeen/interface_map.h b/engines/xeen/interface_map.h index b65b7d6fb9..3fe851b2e8 100644 --- a/engines/xeen/interface_map.h +++ b/engines/xeen/interface_map.h @@ -127,7 +127,7 @@ protected: virtual void setup(); - void drawMap(bool updateFlag); + void drawMap(); public: OutdoorDrawList _outdoorList; IndoorDrawList _indoorList; |