diff options
author | Gregory Montoir | 2003-11-01 21:20:36 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-11-01 21:20:36 +0000 |
commit | 561d4c09d89986f010090c1893168611ba0774cf (patch) | |
tree | dfdaf5c72656f0ac293858860ce314b17c3b5979 | |
parent | 72bee75297bb42703c5825027cd3a4c11dd9347a (diff) | |
download | scummvm-rg350-561d4c09d89986f010090c1893168611ba0774cf.tar.gz scummvm-rg350-561d4c09d89986f010090c1893168611ba0774cf.tar.bz2 scummvm-rg350-561d4c09d89986f010090c1893168611ba0774cf.zip |
use input->delay instead of system->delay
svn-id: r11035
-rw-r--r-- | queen/display.cpp | 11 | ||||
-rw-r--r-- | queen/display.h | 3 | ||||
-rw-r--r-- | queen/queen.cpp | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/queen/display.cpp b/queen/display.cpp index 871fa84b0e..6a483d6ac0 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -22,6 +22,7 @@ #include "stdafx.h" #include "queen/display.h" #include "queen/defs.h" +#include "queen/input.h" #include "queen/logic.h" // For RandomSource #include "queen/resource.h" @@ -100,8 +101,8 @@ void TextRenderer::drawChar(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, -Display::Display(OSystem *system) - : _system(system) { +Display::Display(OSystem *system, Input *input) + : _system(system), _input(input) { _dynalum.prevColMask = 0xFF; _textRenderer.init(); @@ -816,11 +817,7 @@ void Display::waitForTimer() { _gotTick = false; while (!_gotTick) { - // FIXME: use _input->delay() instead - OSystem::Event event; - - _system->delay_msecs(10); - while (_system->poll_event(&event)); + _input->delay(10); } } diff --git a/queen/display.h b/queen/display.h index 4fe4ebf8fa..3b1e51548b 100644 --- a/queen/display.h +++ b/queen/display.h @@ -63,7 +63,7 @@ struct TextRenderer { class Display { public: - Display(OSystem *system); + Display(OSystem *system, Input *input); ~Display(); void dynalumInit(Resource *resource, const char *roomName, uint16 roomNum); @@ -144,6 +144,7 @@ private: Dynalum _dynalum; OSystem *_system; + Input *_input; static const uint8 PAL_JOE_CLOTHES[]; static const uint8 PAL_JOE_DRESS[]; diff --git a/queen/queen.cpp b/queen/queen.cpp index 804fc11493..9e1ee37e4c 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -211,8 +211,8 @@ void QueenEngine::go() { void QueenEngine::initialise(void) { _resource = new Resource(_gameDataPath, _detector->_game.detectname); - _display = new Display(_system); _input = new Input(_system); + _display = new Display(_system, _input); _graphics = new Graphics(_display, _input, _resource); _sound = Sound::giveSound(_mixer, _input, _resource, _resource->compression()); _logic = new Logic(_resource, _graphics, _display, _input, _sound); |