From d6ce2baff0c3bfe8dce98d9b9325f84add6a2e72 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Thu, 28 Aug 2008 23:58:13 -0400 Subject: [PATCH] change to SDLKey type --- src/input/inputManager.cpp | 8 ++++---- src/input/inputManager.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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 -- 2.10.2