use input->delay instead of system->delay

svn-id: r11035
This commit is contained in:
Gregory Montoir 2003-11-01 21:20:36 +00:00
parent 72bee75297
commit 561d4c09d8
3 changed files with 7 additions and 9 deletions

View File

@ -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);
}
}

View File

@ -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[];

View File

@ -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);