X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fdisplay_effect.cpp;h=c2b1538d6fb17503dd387e11d71b20fb14b5980e;hb=f3e5e57c9996168a4889ae8e195be25f8b7e629b;hp=ffa154dc983852ab75785c1364c736446e6524a2;hpb=61fefdd27bed4650cfb515f2511c4fb3de393193;p=supertux.git diff --git a/src/object/display_effect.cpp b/src/object/display_effect.cpp index ffa154dc9..c2b1538d6 100644 --- a/src/object/display_effect.cpp +++ b/src/object/display_effect.cpp @@ -3,6 +3,7 @@ #include #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 (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) {