aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/input
diff options
context:
space:
mode:
authorEugene Sandulenko2010-09-02 12:14:04 +0000
committerEugene Sandulenko2010-10-12 23:30:00 +0000
commit086f5961b6575c50bb386750b6e9a3ed1efdd8cd (patch)
tree75c532790d67ccd3b8fdc5c371a3ce3bf0705dca /engines/sword25/input
parent0cdb2ded85d17150cb108a5d63dd8957c29af2a5 (diff)
downloadscummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.tar.gz
scummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.tar.bz2
scummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.zip
SWORD25: unsigned int -> uint
svn-id: r53309
Diffstat (limited to 'engines/sword25/input')
-rw-r--r--engines/sword25/input/inputengine.h4
-rw-r--r--engines/sword25/input/inputengine_script.cpp4
-rw-r--r--engines/sword25/input/scummvminput.cpp14
-rw-r--r--engines/sword25/input/scummvminput.h10
4 files changed, 16 insertions, 16 deletions
diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h
index f604311384..ba683443dd 100644
--- a/engines/sword25/input/inputengine.h
+++ b/engines/sword25/input/inputengine.h
@@ -243,7 +243,7 @@ public:
* @param KeyCode The key code to be checked
* @return Returns true if the given key is done, otherwise false.
*/
- virtual bool IsKeyDown(unsigned int KeyCode) = 0;
+ virtual bool IsKeyDown(uint KeyCode) = 0;
/**
* Returns true if a certain key was pushed and released.
@@ -253,7 +253,7 @@ public:
* strings that users type.
* @param KeyCode The key code to be checked
*/
- virtual bool WasKeyDown(unsigned int KeyCode) = 0;
+ virtual bool WasKeyDown(uint KeyCode) = 0;
typedef CallbackPtr CharacterCallback;
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index ef443a62d3..d3092af794 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -210,7 +210,7 @@ static int GetMouseY(lua_State *L) {
static int IsKeyDown(lua_State *L) {
InputEngine *pIE = GetIE();
- lua_pushbooleancpp(L, pIE->IsKeyDown((unsigned int) luaL_checknumber(L, 1)));
+ lua_pushbooleancpp(L, pIE->IsKeyDown((uint) luaL_checknumber(L, 1)));
return 1;
}
@@ -219,7 +219,7 @@ static int IsKeyDown(lua_State *L) {
static int WasKeyDown(lua_State *L) {
InputEngine *pIE = GetIE();
- lua_pushbooleancpp(L, pIE->WasKeyDown((unsigned int) luaL_checknumber(L, 1)));
+ lua_pushbooleancpp(L, pIE->WasKeyDown((uint) luaL_checknumber(L, 1)));
return 1;
}
diff --git a/engines/sword25/input/scummvminput.cpp b/engines/sword25/input/scummvminput.cpp
index b1ef1c8869..0b8f4fbb66 100644
--- a/engines/sword25/input/scummvminput.cpp
+++ b/engines/sword25/input/scummvminput.cpp
@@ -161,7 +161,7 @@ void ScummVMInput::TestForLeftDoubleClick() {
// Only bother checking for a double click if the left mouse button was clicked
if (WasLeftMouseDown()) {
// Get the time now
- unsigned int Now = Kernel::GetInstance()->GetMilliTicks();
+ uint Now = Kernel::GetInstance()->GetMilliTicks();
// A double click is signalled if
// 1. The two clicks are close enough together
@@ -224,13 +224,13 @@ int ScummVMInput::GetMouseY() {
// -----------------------------------------------------------------------------
-bool ScummVMInput::IsKeyDown(unsigned int KeyCode) {
+bool ScummVMInput::IsKeyDown(uint KeyCode) {
return (m_KeyboardState[m_CurrentState][KeyCode] & 0x80) != 0;
}
// -----------------------------------------------------------------------------
-bool ScummVMInput::WasKeyDown(unsigned int KeyCode) {
+bool ScummVMInput::WasKeyDown(uint KeyCode) {
return ((m_KeyboardState[m_CurrentState][KeyCode] & 0x80) == 0) &&
((m_KeyboardState[m_CurrentState ^ 1][KeyCode] & 0x80) != 0);
}
@@ -370,11 +370,11 @@ bool ScummVMInput::Unpersist(InputPersistenceBlock &Reader) {
m_CommandCallbacks.clear();
// Anzahl an Command-Callbacks lesen.
- unsigned int CommandCallbackCount;
+ uint CommandCallbackCount;
Reader.Read(CommandCallbackCount);
// Alle Command-Callbacks wieder herstellen.
- for (unsigned int i = 0; i < CommandCallbackCount; ++i) {
+ for (uint i = 0; i < CommandCallbackCount; ++i) {
Common::String CallbackFunctionName;
Reader.Read(CallbackFunctionName);
@@ -386,11 +386,11 @@ bool ScummVMInput::Unpersist(InputPersistenceBlock &Reader) {
m_CharacterCallbacks.clear();
// Anzahl an Character-Callbacks lesen.
- unsigned int CharacterCallbackCount;
+ uint CharacterCallbackCount;
Reader.Read(CharacterCallbackCount);
// Alle Character-Callbacks wieder herstellen.
- for (unsigned int i = 0; i < CharacterCallbackCount; ++i) {
+ for (uint i = 0; i < CharacterCallbackCount; ++i) {
Common::String CallbackFunctionName;
Reader.Read(CallbackFunctionName);
diff --git a/engines/sword25/input/scummvminput.h b/engines/sword25/input/scummvminput.h
index 9bf1c45daa..23ab179a64 100644
--- a/engines/sword25/input/scummvminput.h
+++ b/engines/sword25/input/scummvminput.h
@@ -61,8 +61,8 @@ public:
virtual bool IsLeftDoubleClick();
virtual int GetMouseX();
virtual int GetMouseY();
- virtual bool IsKeyDown(unsigned int KeyCode);
- virtual bool WasKeyDown(unsigned int KeyCode);
+ virtual bool IsKeyDown(uint KeyCode);
+ virtual bool WasKeyDown(uint KeyCode);
virtual void SetMouseX(int PosX);
virtual void SetMouseY(int PosY);
virtual bool RegisterCharacterCallback(CallbackPtr Callback);
@@ -82,16 +82,16 @@ private:
byte m_KeyboardState[2][256];
bool m_LeftMouseState[2];
bool m_RightMouseState[2];
- unsigned int m_CurrentState;
+ uint m_CurrentState;
int m_MouseX;
int m_MouseY;
bool m_LeftMouseDown;
bool m_RightMouseDown;
bool m_LeftDoubleClick;
- unsigned int m_DoubleClickTime;
+ uint m_DoubleClickTime;
int m_DoubleClickRectWidth;
int m_DoubleClickRectHeight;
- unsigned int m_LastLeftClickTime;
+ uint m_LastLeftClickTime;
int m_LastLeftClickMouseX;
int m_LastLeftClickMouseY;
Common::List<CommandCallback> m_CommandCallbacks;