25 #include "common/scummsys.h" 26 #include "common/events.h" 27 #include "common/queue.h" 28 #include "mm/xeen/sprites.h" 33 #define GAME_FRAME_RATE (1000 / 50) 34 #define GAME_FRAME_TIME 50 35 #define SCREEN_UPDATE_TIME 10 36 #define MAX_PENDING_EVENTS 5 45 PendingEvent() : _leftButton(
false), _rightButton(
false) {}
47 PendingEvent(
bool leftButton,
bool rightButton) : _leftButton(leftButton), _rightButton(rightButton) {}
57 bool isMouse()
const {
return _leftButton || _rightButton; }
64 uint32 _priorFrameCounterTime;
65 uint32 _priorScreenRefreshTime;
67 uint32 _gameCounters[6];
81 bool isModifierKey(
const Common::KeyCode &keycode)
const;
91 void setCursor(
int cursorId);
106 bool isCursorVisible();
116 void pollEventsAndWait();
126 void debounceMouse();
136 void addEvent(
bool leftButton,
bool rightButton);
151 bool isKeyMousePressed();
153 void updateGameCounter() { _gameCounter = _frameCounter; }
154 void timeMark1() { _gameCounters[1] = _frameCounter; }
155 void timeMark2() { _gameCounters[2] = _frameCounter; }
156 void timeMark3() { _gameCounters[3] = _frameCounter; }
157 void timeMark4() { _gameCounters[4] = _frameCounter; }
158 void timeMark5() { _gameCounters[5] = _frameCounter; }
160 uint32 timeElapsed()
const {
return _frameCounter - _gameCounter; }
161 uint32 timeElapsed1()
const {
return _frameCounter - _gameCounters[1]; }
162 uint32 timeElapsed2()
const {
return _frameCounter - _gameCounters[2]; }
163 uint32 timeElapsed3()
const {
return _frameCounter - _gameCounters[3]; }
164 uint32 timeElapsed4()
const {
return _frameCounter - _gameCounters[4]; }
165 uint32 timeElapsed5()
const {
return _frameCounter - _gameCounters[5]; }
166 uint32 getTicks() {
return _frameCounter; }
167 uint32 playTime()
const {
return _playTime; }
168 void setPlayTime(uint32 time) { _playTime = time; }
176 bool wait(uint numFrames,
bool interruptable =
true);
181 void ipause(uint amount);
186 void ipause5(uint amount);
191 void waitForPressAnimated();
bool isEventPending() const
Definition: events.h:146
KeyCode keycode
Definition: keyboard.h:299
Definition: detection.h:27
bool isMouse() const
Definition: events.h:57
Definition: keyboard.h:294
bool isKeyboard() const
Definition: events.h:52