2 * WARNING: This file is automatically generated from './build/i686-pc-linux-gnu/debug/miniswig.tmp' - do not change
10 #include "wrapper_util.h"
11 #include "wrapper.interface.h"
13 using namespace Scripting;
15 static int Display_release_wrapper(SQUserPointer ptr, int )
17 Display* _this = reinterpret_cast<Display*> (ptr);
22 static int Display_construct_wrapper(HSQUIRRELVM v)
24 Display* _this = new Display();
25 sq_setinstanceup(v, 1, _this);
26 sq_setreleasehook(v, 1, Display_release_wrapper);
31 static int Display_set_effect_wrapper(HSQUIRRELVM v)
34 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
37 sq_getstring(v, 2, &arg0);
39 _this->set_effect(arg0);
44 static int Camera_release_wrapper(SQUserPointer ptr, int )
46 Camera* _this = reinterpret_cast<Camera*> (ptr);
51 static int Camera_construct_wrapper(HSQUIRRELVM v)
53 Camera* _this = new Camera();
54 sq_setinstanceup(v, 1, _this);
55 sq_setreleasehook(v, 1, Camera_release_wrapper);
60 static int Camera_shake_wrapper(HSQUIRRELVM v)
63 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
66 sq_getfloat(v, 2, &arg0);
68 sq_getfloat(v, 3, &arg1);
70 sq_getfloat(v, 4, &arg2);
72 _this->shake(arg0, arg1, arg2);
77 static int Camera_set_pos_wrapper(HSQUIRRELVM v)
80 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
83 sq_getfloat(v, 2, &arg0);
85 sq_getfloat(v, 3, &arg1);
87 _this->set_pos(arg0, arg1);
92 static int Camera_set_mode_wrapper(HSQUIRRELVM v)
95 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
98 sq_getstring(v, 2, &arg0);
100 _this->set_mode(arg0);
105 static int Level_release_wrapper(SQUserPointer ptr, int )
107 Level* _this = reinterpret_cast<Level*> (ptr);
112 static int Level_construct_wrapper(HSQUIRRELVM v)
114 Level* _this = new Level();
115 sq_setinstanceup(v, 1, _this);
116 sq_setreleasehook(v, 1, Level_release_wrapper);
121 static int Level_finish_wrapper(HSQUIRRELVM v)
124 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
132 static int Level_spawn_wrapper(HSQUIRRELVM v)
135 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
138 sq_getstring(v, 2, &arg0);
140 sq_getstring(v, 3, &arg1);
142 _this->spawn(arg0, arg1);
147 static int ScriptedObject_release_wrapper(SQUserPointer ptr, int )
149 ScriptedObject* _this = reinterpret_cast<ScriptedObject*> (ptr);
154 static int ScriptedObject_construct_wrapper(HSQUIRRELVM v)
156 ScriptedObject* _this = new ScriptedObject();
157 sq_setinstanceup(v, 1, _this);
158 sq_setreleasehook(v, 1, ScriptedObject_release_wrapper);
163 static int ScriptedObject_set_animation_wrapper(HSQUIRRELVM v)
165 ScriptedObject* _this;
166 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
169 sq_getstring(v, 2, &arg0);
171 _this->set_animation(arg0);
176 static int ScriptedObject_get_animation_wrapper(HSQUIRRELVM v)
178 ScriptedObject* _this;
179 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
182 std::string return_value = _this->get_animation();
184 sq_pushstring(v, return_value.c_str(), return_value.size());
188 static int ScriptedObject_move_wrapper(HSQUIRRELVM v)
190 ScriptedObject* _this;
191 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
194 sq_getfloat(v, 2, &arg0);
196 sq_getfloat(v, 3, &arg1);
198 _this->move(arg0, arg1);
203 static int ScriptedObject_set_pos_wrapper(HSQUIRRELVM v)
205 ScriptedObject* _this;
206 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
209 sq_getfloat(v, 2, &arg0);
211 sq_getfloat(v, 3, &arg1);
213 _this->set_pos(arg0, arg1);
218 static int ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM v)
220 ScriptedObject* _this;
221 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
224 float return_value = _this->get_pos_x();
226 sq_pushfloat(v, return_value);
230 static int ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM v)
232 ScriptedObject* _this;
233 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
236 float return_value = _this->get_pos_y();
238 sq_pushfloat(v, return_value);
242 static int ScriptedObject_set_velocity_wrapper(HSQUIRRELVM v)
244 ScriptedObject* _this;
245 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
248 sq_getfloat(v, 2, &arg0);
250 sq_getfloat(v, 3, &arg1);
252 _this->set_velocity(arg0, arg1);
257 static int ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM v)
259 ScriptedObject* _this;
260 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
263 float return_value = _this->get_velocity_x();
265 sq_pushfloat(v, return_value);
269 static int ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM v)
271 ScriptedObject* _this;
272 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
275 float return_value = _this->get_velocity_y();
277 sq_pushfloat(v, return_value);
281 static int Sound_release_wrapper(SQUserPointer ptr, int )
283 Sound* _this = reinterpret_cast<Sound*> (ptr);
288 static int Sound_construct_wrapper(HSQUIRRELVM v)
290 Sound* _this = new Sound();
291 sq_setinstanceup(v, 1, _this);
292 sq_setreleasehook(v, 1, Sound_release_wrapper);
297 static int Sound_play_music_wrapper(HSQUIRRELVM v)
300 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
303 sq_getstring(v, 2, &arg0);
305 _this->play_music(arg0);
310 static int Sound_play_sound_wrapper(HSQUIRRELVM v)
313 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
316 sq_getstring(v, 2, &arg0);
318 _this->play_sound(arg0);
323 static int wait_wrapper(HSQUIRRELVM v)
326 sq_getfloat(v, 2, &arg0);
328 Scripting::wait(arg0);
333 WrappedFunction supertux_global_functions[] = {
334 { "wait", &wait_wrapper },
338 static WrappedFunction supertux_Display_methods[] = {
339 { "constructor", &Display_construct_wrapper },
340 { "set_effect", &Display_set_effect_wrapper },
343 static WrappedFunction supertux_Camera_methods[] = {
344 { "constructor", &Camera_construct_wrapper },
345 { "shake", &Camera_shake_wrapper },
346 { "set_pos", &Camera_set_pos_wrapper },
347 { "set_mode", &Camera_set_mode_wrapper },
350 static WrappedFunction supertux_Level_methods[] = {
351 { "constructor", &Level_construct_wrapper },
352 { "finish", &Level_finish_wrapper },
353 { "spawn", &Level_spawn_wrapper },
356 static WrappedFunction supertux_ScriptedObject_methods[] = {
357 { "constructor", &ScriptedObject_construct_wrapper },
358 { "set_animation", &ScriptedObject_set_animation_wrapper },
359 { "get_animation", &ScriptedObject_get_animation_wrapper },
360 { "move", &ScriptedObject_move_wrapper },
361 { "set_pos", &ScriptedObject_set_pos_wrapper },
362 { "get_pos_x", &ScriptedObject_get_pos_x_wrapper },
363 { "get_pos_y", &ScriptedObject_get_pos_y_wrapper },
364 { "set_velocity", &ScriptedObject_set_velocity_wrapper },
365 { "get_velocity_x", &ScriptedObject_get_velocity_x_wrapper },
366 { "get_velocity_y", &ScriptedObject_get_velocity_y_wrapper },
369 static WrappedFunction supertux_Sound_methods[] = {
370 { "constructor", &Sound_construct_wrapper },
371 { "play_music", &Sound_play_music_wrapper },
372 { "play_sound", &Sound_play_sound_wrapper },
375 WrappedClass supertux_classes[] = {
376 { "Display", supertux_Display_methods },
377 { "Camera", supertux_Camera_methods },
378 { "Level", supertux_Level_methods },
379 { "ScriptedObject", supertux_ScriptedObject_methods },
380 { "Sound", supertux_Sound_methods },