[Scummvm-git-logs] scummvm master -> 65ecb6e56f91c3ea92a7001d80337efb4a93e004
dreammaster
dreammaster at scummvm.org
Sun Dec 10 01:54:57 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
65ecb6e56f XEEN: Do rendering delays like the original did
Commit: 65ecb6e56f91c3ea92a7001d80337efb4a93e004
https://github.com/scummvm/scummvm/commit/65ecb6e56f91c3ea92a7001d80337efb4a93e004
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-09T19:54:46-05:00
Commit Message:
XEEN: Do rendering delays like the original did
Changed paths:
engines/xeen/dialogs_map.cpp
engines/xeen/events.cpp
engines/xeen/events.h
engines/xeen/interface.cpp
engines/xeen/interface.h
diff --git a/engines/xeen/dialogs_map.cpp b/engines/xeen/dialogs_map.cpp
index ccc93db..084ee87 100644
--- a/engines/xeen/dialogs_map.cpp
+++ b/engines/xeen/dialogs_map.cpp
@@ -73,7 +73,7 @@ void MapDialog::execute() {
events.updateGameCounter();
do {
if (drawFlag)
- intf.draw3d(false, true);
+ intf.draw3d(false);
windows[5].writeString("\r");
if (map._isOutdoors)
diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp
index 9299eee..0f54214 100644
--- a/engines/xeen/events.cpp
+++ b/engines/xeen/events.cpp
@@ -161,6 +161,12 @@ void EventsManager::ipause(uint amount) {
} while (!_vm->shouldQuit() && timeElapsed() < amount);
}
+void EventsManager::ipause5(uint amount) {
+ do {
+ pollEventsAndWait();
+ } while (!_vm->shouldQuit() && timeElapsed5() < amount);
+}
+
void EventsManager::nextFrame() {
++_frameCounter;
diff --git a/engines/xeen/events.h b/engines/xeen/events.h
index 4ebc36d..921ee56 100644
--- a/engines/xeen/events.h
+++ b/engines/xeen/events.h
@@ -109,7 +109,15 @@ public:
bool wait(uint numFrames, bool interruptable = true);
+ /**
+ * Pause for a set amount
+ */
void ipause(uint amount);
+
+ /**
+ * Pauses a set amount past the previous call to timeMark5
+ */
+ void ipause5(uint amount);
};
class GameEvent {
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index c7ed3fd..f39c2d4 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -1242,7 +1242,7 @@ void Interface::bash(const Common::Point &pt, Direction direction) {
drawParty(true);
}
-void Interface::draw3d(bool updateFlag, bool skipDelay) {
+void Interface::draw3d(bool updateFlag) {
Combat &combat = *_vm->_combat;
EventsManager &events = *_vm->_events;
Party &party = *_vm->_party;
@@ -1250,7 +1250,7 @@ void Interface::draw3d(bool updateFlag, bool skipDelay) {
Scripts &scripts = *_vm->_scripts;
Windows &windows = *_vm->_windows;
- events.updateGameCounter();
+ events.timeMark5();
if (windows[11]._enabled)
return;
@@ -1299,12 +1299,7 @@ void Interface::draw3d(bool updateFlag, bool skipDelay) {
}
party._stepped = false;
- if (_vm->_mode == MODE_RECORD_EVENTS) {
- // TODO: Save current scripts data?
- }
-
- if (!skipDelay)
- events.wait(2, false);
+ events.ipause5(2);
}
void Interface::handleFalling() {
diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h
index 3516928..54a9cd1 100644
--- a/engines/xeen/interface.h
+++ b/engines/xeen/interface.h
@@ -161,9 +161,15 @@ public:
void rest();
+ /**
+ * Handles bash actions
+ */
void bash(const Common::Point &pt, Direction direction);
- void draw3d(bool updateFlag, bool skipDelay = false);
+ /**
+ * Handles drawing the elements of the interface and game scene
+ */
+ void draw3d(bool updateFlag);
/**
* Draw the display borders
More information about the Scummvm-git-logs
mailing list