diff options
author | Eugene Sandulenko | 2010-08-18 12:57:47 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:55:59 +0000 |
commit | be44216e5c1d74879d7843215ce1cd3f488b4db8 (patch) | |
tree | cd49961f2fe9b1ea641e2e57d90b3d8a315123ea /engines/sword25/input | |
parent | 485ff15d23b3ae9545f5c9df794f1326185eae7a (diff) | |
download | scummvm-rg350-be44216e5c1d74879d7843215ce1cd3f488b4db8.tar.gz scummvm-rg350-be44216e5c1d74879d7843215ce1cd3f488b4db8.tar.bz2 scummvm-rg350-be44216e5c1d74879d7843215ce1cd3f488b4db8.zip |
SWORD25: eliminated BS_ prefix in all but kernel/
svn-id: r53259
Diffstat (limited to 'engines/sword25/input')
-rw-r--r-- | engines/sword25/input/inputengine.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/input/inputengine.h | 6 | ||||
-rw-r--r-- | engines/sword25/input/inputengine_script.cpp | 56 | ||||
-rw-r--r-- | engines/sword25/input/scummvminput.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/input/scummvminput.h | 2 |
5 files changed, 34 insertions, 34 deletions
diff --git a/engines/sword25/input/inputengine.cpp b/engines/sword25/input/inputengine.cpp index 7552118e54..cd678d2d38 100644 --- a/engines/sword25/input/inputengine.cpp +++ b/engines/sword25/input/inputengine.cpp @@ -44,7 +44,7 @@ namespace Sword25 { -BS_InputEngine::BS_InputEngine(BS_Kernel *pKernel) : BS_Service(pKernel) { +InputEngine::InputEngine(BS_Kernel *pKernel) : BS_Service(pKernel) { if (!_RegisterScriptBindings()) BS_LOG_ERRORLN("Script bindings could not be registered."); else diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h index c0f2b47bf5..c3113e0319 100644 --- a/engines/sword25/input/inputengine.h +++ b/engines/sword25/input/inputengine.h @@ -55,10 +55,10 @@ namespace Sword25 { /// Class definitions -class BS_InputEngine : public BS_Service, public BS_Persistable { +class InputEngine : public BS_Service, public BS_Persistable { public: - BS_InputEngine(BS_Kernel *pKernel); - virtual ~BS_InputEngine() {}; + InputEngine(BS_Kernel *pKernel); + virtual ~InputEngine() {}; // NOTE: These codes are registered in inputengine_script.cpp // Any changes to these enums must also adjust the above file. diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp index 5827e88414..440955b7c0 100644 --- a/engines/sword25/input/inputengine_script.cpp +++ b/engines/sword25/input/inputengine_script.cpp @@ -61,9 +61,9 @@ static void TheCharacterCallback(int Character); static void TheCommandCallback(int Command); namespace { -class CharacterCallbackClass : public BS_LuaCallback { +class CharacterCallbackClass : public LuaCallback { public: - CharacterCallbackClass(lua_State *L) : BS_LuaCallback(L) {}; + CharacterCallbackClass(lua_State *L) : LuaCallback(L) {}; Common::String Character; @@ -77,13 +77,13 @@ Common::SharedPtr<CharacterCallbackClass> CharacterCallbackPtr; // ----------------------------------------------------------------------------- -class CommandCallbackClass : public BS_LuaCallback { +class CommandCallbackClass : public LuaCallback { public: - CommandCallbackClass(lua_State *L) : BS_LuaCallback(L) { - Command = BS_InputEngine::KEY_COMMAND_BACKSPACE; + CommandCallbackClass(lua_State *L) : LuaCallback(L) { + Command = InputEngine::KEY_COMMAND_BACKSPACE; } - BS_InputEngine::KEY_COMMANDS Command; + InputEngine::KEY_COMMANDS Command; protected: int PreFunctionInvokation(lua_State *L) { @@ -106,10 +106,10 @@ static CallbackfunctionRegisterer Instance; // ----------------------------------------------------------------------------- -static BS_InputEngine *GetIE() { +static InputEngine *GetIE() { BS_Kernel *pKernel = BS_Kernel::GetInstance(); BS_ASSERT(pKernel); - BS_InputEngine *pIE = static_cast<BS_InputEngine *>(pKernel->GetService("input")); + InputEngine *pIE = static_cast<InputEngine *>(pKernel->GetService("input")); BS_ASSERT(pIE); return pIE; } @@ -117,7 +117,7 @@ static BS_InputEngine *GetIE() { // ----------------------------------------------------------------------------- static int Init(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->Init()); return 1; @@ -126,7 +126,7 @@ static int Init(lua_State *L) { // ----------------------------------------------------------------------------- static int Update(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); // Beim ersten Aufruf der Update()-Methode werden die beiden Callbacks am Input-Objekt registriert. // Dieses kann nicht in _RegisterScriptBindings() passieren, da diese Funktion vom Konstruktor der abstrakten Basisklasse aufgerufen wird und die @@ -145,7 +145,7 @@ static int Update(lua_State *L) { // ----------------------------------------------------------------------------- static int IsLeftMouseDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->IsLeftMouseDown()); return 1; @@ -154,7 +154,7 @@ static int IsLeftMouseDown(lua_State *L) { // ----------------------------------------------------------------------------- static int IsRightMouseDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->IsRightMouseDown()); return 1; @@ -163,7 +163,7 @@ static int IsRightMouseDown(lua_State *L) { // ----------------------------------------------------------------------------- static int WasLeftMouseDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->WasLeftMouseDown()); return 1; @@ -172,7 +172,7 @@ static int WasLeftMouseDown(lua_State *L) { // ----------------------------------------------------------------------------- static int WasRightMouseDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->WasRightMouseDown()); return 1; @@ -181,7 +181,7 @@ static int WasRightMouseDown(lua_State *L) { // ----------------------------------------------------------------------------- static int IsLeftDoubleClick(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->IsLeftDoubleClick()); return 1; @@ -190,7 +190,7 @@ static int IsLeftDoubleClick(lua_State *L) { // ----------------------------------------------------------------------------- static int GetMouseX(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushnumber(L, pIE->GetMouseX()); return 1; @@ -199,7 +199,7 @@ static int GetMouseX(lua_State *L) { // ----------------------------------------------------------------------------- static int GetMouseY(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushnumber(L, pIE->GetMouseY()); return 1; @@ -208,7 +208,7 @@ static int GetMouseY(lua_State *L) { // ----------------------------------------------------------------------------- static int IsKeyDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->IsKeyDown((unsigned int) luaL_checknumber(L, 1))); return 1; @@ -217,7 +217,7 @@ static int IsKeyDown(lua_State *L) { // ----------------------------------------------------------------------------- static int WasKeyDown(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); lua_pushbooleancpp(L, pIE->WasKeyDown((unsigned int) luaL_checknumber(L, 1))); return 1; @@ -226,7 +226,7 @@ static int WasKeyDown(lua_State *L) { // ----------------------------------------------------------------------------- static int SetMouseX(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); pIE->SetMouseX((int) luaL_checknumber(L, 1)); return 0; @@ -235,7 +235,7 @@ static int SetMouseX(lua_State *L) { // ----------------------------------------------------------------------------- static int SetMouseY(lua_State *L) { - BS_InputEngine *pIE = GetIE(); + InputEngine *pIE = GetIE(); pIE->SetMouseY((int) luaL_checknumber(L, 1)); return 0; @@ -270,7 +270,7 @@ static int UnregisterCharacterCallback(lua_State *L) { // ----------------------------------------------------------------------------- static void TheCommandCallback(int Command) { - CommandCallbackPtr->Command = static_cast<BS_InputEngine::KEY_COMMANDS>(Command); + CommandCallbackPtr->Command = static_cast<InputEngine::KEY_COMMANDS>(Command); lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject()); CommandCallbackPtr->InvokeCallbackFunctions(L, 1); } @@ -318,8 +318,8 @@ static const luaL_reg PACKAGE_FUNCTIONS[] = { {0, 0} }; -#define X(k) {"KEY_" #k, BS_InputEngine::KEY_##k} -#define Y(k) {"KEY_COMMAND_" #k, BS_InputEngine::KEY_COMMAND_##k} +#define X(k) {"KEY_" #k, InputEngine::KEY_##k} +#define Y(k) {"KEY_COMMAND_" #k, InputEngine::KEY_COMMAND_##k} static const lua_constant_reg PACKAGE_CONSTANTS[] = { X(BACKSPACE), X(TAB), X(CLEAR), X(RETURN), X(PAUSE), X(CAPSLOCK), X(ESCAPE), X(SPACE), X(PAGEUP), X(PAGEDOWN), X(END), X(HOME), X(LEFT), X(UP), X(RIGHT), X(DOWN), X(PRINTSCREEN), X(INSERT), X(DELETE), X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(A), X(B), @@ -335,16 +335,16 @@ static const lua_constant_reg PACKAGE_CONSTANTS[] = { // ----------------------------------------------------------------------------- -bool BS_InputEngine::_RegisterScriptBindings() { +bool InputEngine::_RegisterScriptBindings() { BS_Kernel *pKernel = BS_Kernel::GetInstance(); BS_ASSERT(pKernel); - BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(pKernel->GetService("script")); + ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script")); BS_ASSERT(pScript); lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject()); BS_ASSERT(L); - if (!BS_LuaBindhelper::AddFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS)) return false; - if (!BS_LuaBindhelper::AddConstantsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_CONSTANTS)) return false; + if (!LuaBindhelper::AddFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS)) return false; + if (!LuaBindhelper::AddConstantsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_CONSTANTS)) return false; CharacterCallbackPtr = Common::SharedPtr<CharacterCallbackClass>(new CharacterCallbackClass(L)); CommandCallbackPtr = Common::SharedPtr<CommandCallbackClass>(new CommandCallbackClass(L)); diff --git a/engines/sword25/input/scummvminput.cpp b/engines/sword25/input/scummvminput.cpp index 97273dc8d5..295b1bbf40 100644 --- a/engines/sword25/input/scummvminput.cpp +++ b/engines/sword25/input/scummvminput.cpp @@ -66,7 +66,7 @@ ScummVMInput::ScummVMInput(BS_Kernel *pKernel) : m_LastLeftClickTime(0), m_LastLeftClickMouseX(0), m_LastLeftClickMouseY(0), - BS_InputEngine(pKernel) { + InputEngine(pKernel) { memset(m_KeyboardState[0], 0, sizeof(m_KeyboardState[0])); memset(m_KeyboardState[1], 0, sizeof(m_KeyboardState[1])); m_LeftMouseState[0] = false; diff --git a/engines/sword25/input/scummvminput.h b/engines/sword25/input/scummvminput.h index b7f38df603..d89248f7fb 100644 --- a/engines/sword25/input/scummvminput.h +++ b/engines/sword25/input/scummvminput.h @@ -47,7 +47,7 @@ namespace Sword25 { class BS_Kernel; /// Class definitions -class ScummVMInput : public BS_InputEngine { +class ScummVMInput : public InputEngine { public: ScummVMInput(BS_Kernel *pKernel); virtual ~ScummVMInput(); |