aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/interface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-15 12:01:04 -0500
committerPaul Gilbert2015-02-15 12:01:04 -0500
commitcc9f62fcb936f86468566cd33602ff394040d33a (patch)
treee5016b6790e6b48339a265ca7cf57655f8d1a32a /engines/xeen/interface.cpp
parentdae789369ed3ec4568e8149d9e5a3eca1d6b5d7b (diff)
downloadscummvm-rg350-cc9f62fcb936f86468566cd33602ff394040d33a.tar.gz
scummvm-rg350-cc9f62fcb936f86468566cd33602ff394040d33a.tar.bz2
scummvm-rg350-cc9f62fcb936f86468566cd33602ff394040d33a.zip
XEEN: Split up draw3d between Interface and InterfaceMap, start of fall code
Diffstat (limited to 'engines/xeen/interface.cpp')
-rw-r--r--engines/xeen/interface.cpp111
1 files changed, 111 insertions, 0 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index dc35b216b1..51a59e1f6f 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -932,5 +932,116 @@ void Interface::bash(const Common::Point &pt, Direction direction) {
drawParty(true);
}
+void Interface::draw3d(bool updateFlag) {
+ Combat &combat = *_vm->_combat;
+ EventsManager &events = *_vm->_events;
+ Party &party = *_vm->_party;
+ Screen &screen = *_vm->_screen;
+
+ if (screen._windows[11]._enabled)
+ return;
+
+ // Draw the map
+ drawMap(updateFlag);
+
+ // Draw the minimap
+ drawMiniMap();
+
+ if (party._falling == 1)
+ handleFalling();
+
+ if (party._falling == 2) {
+ screen.saveBackground(1);
+ }
+
+ assembleBorder();
+
+ // Draw any on-screen text if flagged to do so
+ if (_upDoorText && combat._attackMonsters[0] == -1) {
+ screen._windows[3].writeString(_screenText);
+ }
+
+ if (updateFlag) {
+ screen._windows[1].update();
+ screen._windows[3].update();
+ }
+
+ // TODO: more stuff
+
+ _vm->_party->_stepped = false;
+ if (_vm->_mode == MODE_9) {
+ // TODO
+ }
+
+ // TODO: Check use of updateFlag here. Original doesn't have it, but I
+ // wanted to ensure in places like the AutoMapDialog, that the draw3d
+ // doesn't result in the screen updating until the dialog has had
+ // a chance to full render itself
+ if (updateFlag)
+ events.wait(2);
+}
+
+void Interface::handleFalling() {
+ Party &party = *_vm->_party;
+ Screen &screen = *_vm->_screen;
+ SoundManager &sound = *_vm->_sound;
+ Window &w = screen._windows[3];
+ File voc1("scream.voc");
+ File voc2("unnh.voc");
+ saveFall();
+
+ for (uint idx = 0; idx < party._activeParty.size(); ++idx) {
+ party._activeParty[idx]._faceSprites->draw(screen._windows[0], 4,
+ Common::Point(CHAR_FACES_X[idx], 150));
+ }
+
+ screen._windows[33].update();
+ sound.playFX(11);
+ sound.playSample(&voc1, 0);
+
+ for (int idx = 0, incr = 2; idx < 133; ++incr, idx += incr) {
+ fall(idx);
+ assembleBorder();
+ w.update();
+ }
+
+ fall(132);
+ assembleBorder();
+ w.update();
+
+ sound.playSample(nullptr, 0);
+ sound.playSample(&voc2, 0);
+ sound.playFX(31);
+
+ fall(127);
+ assembleBorder();
+ w.update();
+
+ fall(132);
+ assembleBorder();
+ w.update();
+
+ fall(129);
+ assembleBorder();
+ w.update();
+
+ fall(132);
+ assembleBorder();
+ w.update();
+
+ shake();
+}
+
+void Interface::saveFall() {
+
+}
+
+void Interface::fall(int v) {
+
+}
+
+void Interface::shake() {
+
+}
} // End of namespace Xeen