Major rewrite of scripting support:
[supertux.git] / src / object / display_effect.cpp
index ffa154d..c2b1538 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <assert.h>
 #include "video/drawing_context.hpp"
+#include "scripting/wrapper_util.hpp"
 #include "main.hpp"
 
 static const float BORDER_SIZE = 75;
@@ -19,6 +20,23 @@ DisplayEffect::~DisplayEffect()
 }
 
 void
+DisplayEffect::expose(HSQUIRRELVM vm, int table_idx)
+{
+  Scripting::DisplayEffect* interface = static_cast<Scripting::DisplayEffect*> (this);
+  expose_object(vm, table_idx, interface, "Effect", false);
+}
+
+void
+DisplayEffect::unexpose(HSQUIRRELVM vm, int table_idx)
+{
+  try {
+    Scripting::unexpose_object(vm, table_idx, "Effect");
+  } catch(...) {
+    // for now...
+  }
+}
+
+void
 DisplayEffect::update(float elapsed_time)
 {
     switch(screen_fade) {