[Scummvm-git-logs] scummvm master -> 7a55027e7d2d4f5912d25b523ef9831017141884
grisenti
noreply at scummvm.org
Sun Apr 9 07:45:21 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7a55027e7d HPL1: rename iKeyboard to Keyboard
Commit: 7a55027e7d2d4f5912d25b523ef9831017141884
https://github.com/scummvm/scummvm/commit/7a55027e7d2d4f5912d25b523ef9831017141884
Author: grisenti (emanuele at grisenti.net)
Date: 2023-04-09T09:45:01+02:00
Commit Message:
HPL1: rename iKeyboard to Keyboard
Changed paths:
engines/hpl1/engine/input/Input.cpp
engines/hpl1/engine/input/Input.h
engines/hpl1/engine/input/Keyboard.cpp
engines/hpl1/engine/input/Keyboard.h
engines/hpl1/engine/input/LowLevelInput.cpp
engines/hpl1/engine/input/LowLevelInput.h
diff --git a/engines/hpl1/engine/input/Input.cpp b/engines/hpl1/engine/input/Input.cpp
index 219d29e9b23..2fa0a3893a7 100644
--- a/engines/hpl1/engine/input/Input.cpp
+++ b/engines/hpl1/engine/input/Input.cpp
@@ -140,7 +140,7 @@ bool cInput::DoubleTriggerd(tString asName, float afLimit) {
//-----------------------------------------------------------------------
-iKeyboard *cInput::GetKeyboard() {
+Keyboard *cInput::GetKeyboard() {
return mpKeyboard;
}
diff --git a/engines/hpl1/engine/input/Input.h b/engines/hpl1/engine/input/Input.h
index 4313cb477c7..8f8b71cc6c4 100644
--- a/engines/hpl1/engine/input/Input.h
+++ b/engines/hpl1/engine/input/Input.h
@@ -37,7 +37,7 @@
namespace hpl {
-class iKeyboard;
+class Keyboard;
class iMouse;
class LowLevelInput;
class iInputDevice;
@@ -99,7 +99,7 @@ public:
*
* \return currently used keyboard
*/
- iKeyboard *GetKeyboard();
+ Keyboard *GetKeyboard();
/**
*
@@ -142,7 +142,7 @@ private:
LowLevelInput *mpLowLevelInput;
iMouse *mpMouse;
- iKeyboard *mpKeyboard;
+ Keyboard *mpKeyboard;
};
} // namespace hpl
diff --git a/engines/hpl1/engine/input/Keyboard.cpp b/engines/hpl1/engine/input/Keyboard.cpp
index 69b268d89cc..3c06cb81f3e 100644
--- a/engines/hpl1/engine/input/Keyboard.cpp
+++ b/engines/hpl1/engine/input/Keyboard.cpp
@@ -33,7 +33,7 @@ namespace hpl {
//-----------------------------------------------------------------------
-iKeyboard::iKeyboard(LowLevelInput *lowLevelInput) : iInputDevice("Keyboard", eInputDeviceType_Keyboard) {
+Keyboard::Keyboard(LowLevelInput *lowLevelInput) : iInputDevice("Keyboard", eInputDeviceType_Keyboard) {
_lowLevelSystem = lowLevelInput;
_downKeys.set_size(eKey_LastEnum);
@@ -327,7 +327,7 @@ static eKeyModifier convertModifiers(const int mods) {
return out;
}
-void iKeyboard::processEvent(const Common::Event &ev) {
+void Keyboard::processEvent(const Common::Event &ev) {
if (ev.type != Common::EVENT_KEYDOWN && ev.type != Common::EVENT_KEYUP)
return;
@@ -340,7 +340,7 @@ void iKeyboard::processEvent(const Common::Event &ev) {
_downKeys.unset(key);
}
-void iKeyboard::Update() {
+void Keyboard::Update() {
_pressedKeys.clear();
for (const Common::Event &ev : _lowLevelSystem->_events)
processEvent(ev);
@@ -348,37 +348,37 @@ void iKeyboard::Update() {
//-----------------------------------------------------------------------
-bool iKeyboard::KeyIsDown(eKey key) {
+bool Keyboard::KeyIsDown(eKey key) {
return _downKeys.get(key);
}
//-----------------------------------------------------------------------
-cKeyPress iKeyboard::GetKey() {
+cKeyPress Keyboard::GetKey() {
return _pressedKeys.pop();
}
//-----------------------------------------------------------------------
-bool iKeyboard::KeyIsPressed() {
+bool Keyboard::KeyIsPressed() {
return _pressedKeys.empty() == false;
}
//-----------------------------------------------------------------------
-eKeyModifier iKeyboard::GetModifier() {
+eKeyModifier Keyboard::GetModifier() {
return _modifiers;
}
//-----------------------------------------------------------------------
-tString iKeyboard::KeyToString(eKey) {
+tString Keyboard::KeyToString(eKey) {
return "None";
}
//-----------------------------------------------------------------------
-eKey iKeyboard::StringToKey(tString) {
+eKey Keyboard::StringToKey(tString) {
return eKey_NONE;
}
diff --git a/engines/hpl1/engine/input/Keyboard.h b/engines/hpl1/engine/input/Keyboard.h
index bba8117b120..40611e2e095 100644
--- a/engines/hpl1/engine/input/Keyboard.h
+++ b/engines/hpl1/engine/input/Keyboard.h
@@ -42,9 +42,9 @@ namespace hpl {
class LowLevelInput;
-class iKeyboard : public iInputDevice {
+class Keyboard : public iInputDevice {
public:
- iKeyboard(LowLevelInput *);
+ Keyboard(LowLevelInput *);
/**
*
diff --git a/engines/hpl1/engine/input/LowLevelInput.cpp b/engines/hpl1/engine/input/LowLevelInput.cpp
index 21d24738da7..45fb53d5c22 100644
--- a/engines/hpl1/engine/input/LowLevelInput.cpp
+++ b/engines/hpl1/engine/input/LowLevelInput.cpp
@@ -70,8 +70,8 @@ iMouse *LowLevelInput::CreateMouse() {
//-----------------------------------------------------------------------
-iKeyboard *LowLevelInput::CreateKeyboard() {
- return hplNew(iKeyboard, (this));
+Keyboard *LowLevelInput::CreateKeyboard() {
+ return hplNew(Keyboard, (this));
}
//-----------------------------------------------------------------------
diff --git a/engines/hpl1/engine/input/LowLevelInput.h b/engines/hpl1/engine/input/LowLevelInput.h
index e1c2704f0e7..92d323ac005 100644
--- a/engines/hpl1/engine/input/LowLevelInput.h
+++ b/engines/hpl1/engine/input/LowLevelInput.h
@@ -34,11 +34,11 @@
namespace hpl {
class iMouse;
-class iKeyboard;
+class Keyboard;
class iLowLevelGraphics;
class LowLevelInput {
- friend class iKeyboard;
+ friend class Keyboard;
friend class cMouseSDL;
public:
@@ -59,7 +59,7 @@ public:
void EndInputUpdate();
iMouse *CreateMouse();
- iKeyboard *CreateKeyboard();
+ Keyboard *CreateKeyboard();
private:
Common::Array<Common::Event> _events;
More information about the Scummvm-git-logs
mailing list