diff options
Diffstat (limited to 'engines/sword25/gfx/graphicengine_script.cpp')
-rw-r--r-- | engines/sword25/gfx/graphicengine_script.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp index fa97b80c82..835e1e20b8 100644 --- a/engines/sword25/gfx/graphicengine_script.cpp +++ b/engines/sword25/gfx/graphicengine_script.cpp @@ -73,15 +73,6 @@ protected: static LuaCallback *loopPointCallbackPtr = 0; // FIXME: should be turned into GraphicEngine member var static ActionCallback *actionCallbackPtr = 0; // FIXME: should be turned into GraphicEngine member var - -struct CallbackfunctionRegisterer { - CallbackfunctionRegisterer() { - CallbackRegistry::instance().registerCallbackFunction("LuaLoopPointCB", (void ( *)(int))animationLoopPointCallback); - CallbackRegistry::instance().registerCallbackFunction("LuaActionCB", (void ( *)(int))animationActionCallback); - CallbackRegistry::instance().registerCallbackFunction("LuaDeleteCB", (void ( *)(int))animationDeleteCallback); - } -}; -static CallbackfunctionRegisterer Instance; } // Die Strings werden als #defines definiert um Stringkomposition zur Compilezeit zu ermöglichen. @@ -1295,6 +1286,10 @@ bool GraphicEngine::registerScriptBindings() { assert(actionCallbackPtr == 0); actionCallbackPtr = new ActionCallback(L); + CallbackRegistry::instance().registerCallbackFunction("LuaLoopPointCB", (void ( *)(int))animationLoopPointCallback); + CallbackRegistry::instance().registerCallbackFunction("LuaActionCB", (void ( *)(int))animationActionCallback); + CallbackRegistry::instance().registerCallbackFunction("LuaDeleteCB", (void ( *)(int))animationDeleteCallback); + return true; } |