aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/graphicengine_script.cpp
diff options
context:
space:
mode:
authorMax Horn2010-10-28 00:25:33 +0000
committerMax Horn2010-10-28 00:25:33 +0000
commitcf3551525f4583ec8a5feb231cb25d81a9722853 (patch)
tree6c7fc224aa21aecb8027efcf2fbeb3d4e6eef3e8 /engines/sword25/gfx/graphicengine_script.cpp
parent7e1d78cab1f25bf15c67d523dab1891067bd07f7 (diff)
downloadscummvm-rg350-cf3551525f4583ec8a5feb231cb25d81a9722853.tar.gz
scummvm-rg350-cf3551525f4583ec8a5feb231cb25d81a9722853.tar.bz2
scummvm-rg350-cf3551525f4583ec8a5feb231cb25d81a9722853.zip
SWORD25: Get rid of CallbackRegistry
svn-id: r53898
Diffstat (limited to 'engines/sword25/gfx/graphicengine_script.cpp')
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index b2a6309e48..0814a23871 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -34,7 +34,6 @@
#include "sword25/kernel/common.h"
#include "sword25/kernel/kernel.h"
-#include "sword25/kernel/callbackregistry.h"
#include "sword25/script/script.h"
#include "sword25/script/luabindhelper.h"
#include "sword25/script/luacallback.h"
@@ -621,15 +620,19 @@ static int ro_addAnimation(lua_State *L) {
lua_setmetatable(L, -2);
// Alle Animationscallbacks registrieren.
- animationPtr->registerDeleteCallback(animationDeleteCallback, animationPtr->getHandle());
- animationPtr->registerLoopPointCallback(animationLoopPointCallback, animationPtr->getHandle());
- animationPtr->registerActionCallback(animationActionCallback, animationPtr->getHandle());
+ animationPtr->setCallbacks();
} else
lua_pushnil(L);
return 1;
}
+void Animation::setCallbacks() {
+ _actionCallback = animationActionCallback;
+ _loopPointCallback = animationLoopPointCallback;
+ _deleteCallback = animationDeleteCallback;
+}
+
static const luaL_reg RENDEROBJECT_METHODS[] = {
{"AddAnimation", ro_addAnimation},
{"AddText", ro_addText},
@@ -1288,10 +1291,6 @@ 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;
}