25 #include "common/scummsys.h" 26 #include "common/events.h" 27 #include "common/queue.h" 28 #include "xeen/sprites.h" 32 #define GAME_FRAME_RATE (1000 / 50) 33 #define GAME_FRAME_TIME 50 34 #define SCREEN_UPDATE_TIME 10 35 #define MAX_PENDING_EVENTS 5 44 PendingEvent() : _leftButton(
false), _rightButton(
false) {}
46 PendingEvent(
bool leftButton,
bool rightButton) : _leftButton(leftButton), _rightButton(rightButton) {}
56 bool isMouse()
const {
return _leftButton || _rightButton; }
63 uint32 _priorFrameCounterTime;
64 uint32 _priorScreenRefreshTime;
66 uint32 _gameCounters[6];
80 bool isModifierKey(
const Common::KeyCode &keycode)
const;
90 void setCursor(
int cursorId);
105 bool isCursorVisible();
115 void pollEventsAndWait();
125 void debounceMouse();
135 void addEvent(
bool leftButton,
bool rightButton);
150 bool isKeyMousePressed();
152 void updateGameCounter() { _gameCounter = _frameCounter; }
153 void timeMark1() { _gameCounters[1] = _frameCounter; }
154 void timeMark2() { _gameCounters[2] = _frameCounter; }
155 void timeMark3() { _gameCounters[3] = _frameCounter; }
156 void timeMark4() { _gameCounters[4] = _frameCounter; }
157 void timeMark5() { _gameCounters[5] = _frameCounter; }
159 uint32 timeElapsed()
const {
return _frameCounter - _gameCounter; }
160 uint32 timeElapsed1()
const {
return _frameCounter - _gameCounters[1]; }
161 uint32 timeElapsed2()
const {
return _frameCounter - _gameCounters[2]; }
162 uint32 timeElapsed3()
const {
return _frameCounter - _gameCounters[3]; }
163 uint32 timeElapsed4()
const {
return _frameCounter - _gameCounters[4]; }
164 uint32 timeElapsed5()
const {
return _frameCounter - _gameCounters[5]; }
165 uint32 getTicks() {
return _frameCounter; }
166 uint32 playTime()
const {
return _playTime; }
167 void setPlayTime(uint32 time) { _playTime = time; }
175 bool wait(uint numFrames,
bool interruptable =
true);
180 void ipause(uint amount);
185 void ipause5(uint amount);
190 void waitForPressAnimated();
bool isKeyboard() const
Definition: events.h:51
bool isMouse() const
Definition: events.h:56
KeyCode keycode
Definition: keyboard.h:299
bool isEventPending() const
Definition: events.h:145
Definition: keyboard.h:294
Definition: character.h:33