aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput/lilliput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lilliput/lilliput.cpp')
-rw-r--r--engines/lilliput/lilliput.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index f68c920a66..7d1ff65aab 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -111,6 +111,9 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_console = new LilliputConsole(this);
_rnd = 0;
+ _mouseX = 0;
+ _mouseY = 0;
+ _mouseButton = 0;
_scriptHandler = new LilliputScript(this);
_byte1714E = 0;
@@ -153,6 +156,18 @@ Common::Platform LilliputEngine::getPlatform() const {
return _platform;
}
+void LilliputEngine::getMouseEvent() {
+ Common::EventManager *_event = _system->getEventManager();
+
+ Common::Event event;
+ while (_event->pollEvent(event) && !_shouldQuit)
+ ;
+
+ _mouseX = _event->getMousePos().x;
+ _mouseY = _event->getMousePos().y;
+ _mouseButton = _event->getButtonState();
+}
+
byte *LilliputEngine::loadVGA(Common::String filename, bool loadPal) {
Common::File f;
@@ -445,6 +460,7 @@ void LilliputEngine::initialize() {
_rnd = new Common::RandomSource("robin");
_rnd->setSeed(42); // Kick random number generator
+ _shouldQuit = false;
for (int i = 0; i < 4; i++) {
_arr18560[i]._field0 = 0;