X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fwrapper.cpp;h=512c55c1049887bf7272c32137779305d2784a38;hb=8f82a8e619346be81a3c1bf943baf68953f1f4e7;hp=50734e10874cb99e2ce8852ddb8e5d065bc35b2d;hpb=43c0eee23cceb62937e75c1652bb50572b854c8b;p=supertux.git diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp index 50734e108..512c55c10 100644 --- a/src/scripting/wrapper.cpp +++ b/src/scripting/wrapper.cpp @@ -15,16 +15,14 @@ namespace SquirrelWrapper { -using namespace Scripting; - static int DisplayEffect_release_hook(SQUserPointer ptr, int ) { - DisplayEffect* _this = reinterpret_cast (ptr); + Scripting::DisplayEffect* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, DisplayEffect* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook) { sq_pushstring(v, "DisplayEffect", -1); if(sq_get(v, -2) < 0) { @@ -93,12 +91,12 @@ static int DisplayEffect_is_black_wrapper(HSQUIRRELVM v) static int Camera_release_hook(SQUserPointer ptr, int ) { - Camera* _this = reinterpret_cast (ptr); + Scripting::Camera* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, Camera* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook) { sq_pushstring(v, "Camera", -1); if(sq_get(v, -2) < 0) { @@ -162,12 +160,12 @@ static int Camera_set_mode_wrapper(HSQUIRRELVM v) static int Level_release_hook(SQUserPointer ptr, int ) { - Level* _this = reinterpret_cast (ptr); + Scripting::Level* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, Level* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook) { sq_pushstring(v, "Level", -1); if(sq_get(v, -2) < 0) { @@ -223,12 +221,12 @@ static int Level_flip_vertically_wrapper(HSQUIRRELVM v) static int ScriptedObject_release_hook(SQUserPointer ptr, int ) { - ScriptedObject* _this = reinterpret_cast (ptr); + Scripting::ScriptedObject* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, ScriptedObject* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook) { sq_pushstring(v, "ScriptedObject", -1); if(sq_get(v, -2) < 0) { @@ -393,12 +391,12 @@ static int ScriptedObject_get_name_wrapper(HSQUIRRELVM v) static int Sound_release_hook(SQUserPointer ptr, int ) { - Sound* _this = reinterpret_cast (ptr); + Scripting::Sound* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, Sound* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::Sound* object, bool setup_releasehook) { sq_pushstring(v, "Sound", -1); if(sq_get(v, -2) < 0) { @@ -444,12 +442,12 @@ static int Sound_play_wrapper(HSQUIRRELVM v) static int Text_release_hook(SQUserPointer ptr, int ) { - Text* _this = reinterpret_cast (ptr); + Scripting::Text* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, Text* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook) { sq_pushstring(v, "Text", -1); if(sq_get(v, -2) < 0) { @@ -531,12 +529,12 @@ static int Text_set_visible_wrapper(HSQUIRRELVM v) static int Player_release_hook(SQUserPointer ptr, int ) { - Player* _this = reinterpret_cast (ptr); + Scripting::Player* _this = reinterpret_cast (ptr); delete _this; return 0; } -void create_squirrel_instance(HSQUIRRELVM v, Player* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook) { sq_pushstring(v, "Player", -1); if(sq_get(v, -2) < 0) {