From: Patrik Gornicz Date: Fri, 29 Aug 2008 03:58:13 +0000 (-0400) Subject: change to SDLKey type X-Git-Tag: v0.07~24 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?p=physics.git;a=commitdiff_plain;h=d6ce2baff0c3bfe8dce98d9b9325f84add6a2e72 change to SDLKey type --- diff --git a/src/input/inputManager.cpp b/src/input/inputManager.cpp index ebbd72e..3ecb477 100644 --- a/src/input/inputManager.cpp +++ b/src/input/inputManager.cpp @@ -93,20 +93,20 @@ bool input::mouseRight() return state & SDL_BUTTON(3); } -bool input::isPressed(Uint8 key) +bool input::isPressed(SDLKey key) { return keyState[key] == isP || keyState[key] == wasP; } -bool input::isReleased(Uint8 key) +bool input::isReleased(SDLKey key) { return keyState[key] == isR || keyState[key] == wasR; } -bool input::wasPressed(Uint8 key) +bool input::wasPressed(SDLKey key) { return keyState[key] == wasP; } -bool input::wasReleased(Uint8 key) +bool input::wasReleased(SDLKey key) { return keyState[key] == wasR; } diff --git a/src/input/inputManager.h b/src/input/inputManager.h index 13b6583..829dbc3 100644 --- a/src/input/inputManager.h +++ b/src/input/inputManager.h @@ -36,11 +36,11 @@ namespace input bool mouseLeft(); bool mouseRight(); - bool isPressed(Uint8); - bool isReleased(Uint8); + bool isPressed(SDLKey); + bool isReleased(SDLKey); - bool wasPressed(Uint8); - bool wasReleased(Uint8); + bool wasPressed(SDLKey); + bool wasReleased(SDLKey); } #endif // INPUT_H