aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/events.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-19 07:37:55 -0400
committerPaul Gilbert2015-05-19 07:37:55 -0400
commit1df183ffcb08a69ed414afd69284a0596fee4e82 (patch)
treef1129f74eb64fd57cb4aac40836303ac6a495bbe /engines/sherlock/events.cpp
parent0faf1c0b8f5c52cde1addae3e14469fc5fa9b9a2 (diff)
downloadscummvm-rg350-1df183ffcb08a69ed414afd69284a0596fee4e82.tar.gz
scummvm-rg350-1df183ffcb08a69ed414afd69284a0596fee4e82.tar.bz2
scummvm-rg350-1df183ffcb08a69ed414afd69284a0596fee4e82.zip
SHERLOCK: Move method comments from cpp to headers
Diffstat (limited to 'engines/sherlock/events.cpp')
-rw-r--r--engines/sherlock/events.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 9d9c764fe5..38093a6c72 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -48,9 +48,6 @@ Events::~Events() {
delete _cursorImages;
}
-/**
- * Load a set of cursors from the specified file
- */
void Events::loadCursors(const Common::String &filename) {
hideCursor();
delete _cursorImages;
@@ -59,9 +56,6 @@ void Events::loadCursors(const Common::String &filename) {
_cursorId = INVALID_CURSOR;
}
-/**
- * Set the cursor to show
- */
void Events::setCursor(CursorId cursorId) {
if (cursorId == _cursorId)
return;
@@ -74,53 +68,31 @@ void Events::setCursor(CursorId cursorId) {
setCursor(s);
}
-/**
- * Set the cursor to show from a passed frame
- */
void Events::setCursor(const Graphics::Surface &src) {
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, 0, 0, 0xff);
showCursor();
}
-/**
- * Show the mouse cursor
- */
void Events::showCursor() {
CursorMan.showMouse(true);
}
-/**
- * Hide the mouse cursor
- */
void Events::hideCursor() {
CursorMan.showMouse(false);
}
-/**
- * Returns the cursor
- */
CursorId Events::getCursor() const {
return _cursorId;
}
-/**
- * Returns true if the mouse cursor is visible
- */
bool Events::isCursorVisible() const {
return CursorMan.isVisible();
}
-/**
- * Move the mouse
- */
void Events::moveMouse(const Common::Point &pt) {
g_system->warpMouse(pt.x, pt.y);
}
-
-/**
- * Check for any pending events
- */
void Events::pollEvents() {
checkForNextFrameCounter();
@@ -162,18 +134,11 @@ void Events::pollEvents() {
}
}
-/**
- * Poll for events and introduce a small delay, to allow the system to
- * yield to other running programs
- */
void Events::pollEventsAndWait() {
pollEvents();
g_system->delayMillis(10);
}
-/**
- * Check whether it's time to display the next screen frame
- */
bool Events::checkForNextFrameCounter() {
// Check for next game frame
uint32 milli = g_system->getMillis();
@@ -193,23 +158,14 @@ bool Events::checkForNextFrameCounter() {
return false;
}
-/**
- * Get the current mouse position
- */
Common::Point Events::mousePos() const {
return g_system->getEventManager()->getMousePos();
}
-/**
- * Get a pending keypress
- */
Common::KeyState Events::getKey() {
return _pendingKeys.pop();
}
-/**
- * Clear any current keypress or mouse click
- */
void Events::clearEvents() {
_pendingKeys.clear();
_mouseButtons = 0;
@@ -218,24 +174,15 @@ void Events::clearEvents() {
_oldButtons = _oldRightButton = false;
}
-/**
- * Clear any pending keyboard inputs
- */
void Events::clearKeyboard() {
_pendingKeys.clear();
}
-/**
- * Delay for a given number of game frames, where each frame is 1/60th of a second
- */
void Events::wait(int numFrames) {
uint32 totalMilli = numFrames * 1000 / GAME_FRAME_RATE;
delay(totalMilli);
}
-/**
- * Does a delay of the specified number of milliseconds
- */
bool Events::delay(uint32 time, bool interruptable) {
// Different handling for really short versus extended times
if (time < 10) {
@@ -265,12 +212,6 @@ bool Events::delay(uint32 time, bool interruptable) {
}
}
-/**
- * Sets the pressed and released button flags on the raw button state previously set in pollEvents calls.
- * @remarks The events manager has separate variables for the raw immediate and old button state
- * versus the current buttons states for the frame. This method is expected to be called only once
- * per game frame
- */
void Events::setButtonState() {
_released = _rightReleased = false;
if (_mouseButtons & 1)
@@ -290,9 +231,6 @@ void Events::setButtonState() {
}
}
-/**
- * Checks to see to see if a key or a mouse button is pressed.
- */
bool Events::checkInput() {
setButtonState();
return kbHit() || _pressed || _released || _rightPressed || _rightReleased;