29e61974c7f29d13916768593bdb94fcba65069d
[supertux.git] / src / src / scripting / wrapper.cpp
1 /**
2  * WARNING: This file is automatically generated from:
3  *  'src/scripting/wrapper.interface.hpp'
4  * DO NOT CHANGE
5  */
6 #include <config.h>
7
8 #include <new>
9 #include <assert.h>
10 #include <string>
11 #include <sstream>
12 #include <squirrel.h>
13 #include "squirrel_error.hpp"
14 #include "wrapper.interface.hpp"
15
16 namespace Scripting
17 {
18 namespace Wrapper
19 {
20
21 static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
22 {
23   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (ptr);
24   delete _this;
25   return 0;
26 }
27
28 static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
29 {
30   SQUserPointer data;
31   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
32     sq_throwerror(vm, _SC("'fade_out' called without instance"));
33     return SQ_ERROR;
34   }
35   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
36   SQFloat arg0;
37   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
38     sq_throwerror(vm, _SC("Argument 1 not a float"));
39     return SQ_ERROR;
40   }
41
42   try {
43     _this->fade_out(static_cast<float> (arg0));
44
45     return 0;
46
47   } catch(std::exception& e) {
48     sq_throwerror(vm, e.what());
49     return SQ_ERROR;
50   } catch(...) {
51     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
52     return SQ_ERROR;
53   }
54
55 }
56
57 static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
58 {
59   SQUserPointer data;
60   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
61     sq_throwerror(vm, _SC("'fade_in' called without instance"));
62     return SQ_ERROR;
63   }
64   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
65   SQFloat arg0;
66   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
67     sq_throwerror(vm, _SC("Argument 1 not a float"));
68     return SQ_ERROR;
69   }
70
71   try {
72     _this->fade_in(static_cast<float> (arg0));
73
74     return 0;
75
76   } catch(std::exception& e) {
77     sq_throwerror(vm, e.what());
78     return SQ_ERROR;
79   } catch(...) {
80     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
81     return SQ_ERROR;
82   }
83
84 }
85
86 static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
87 {
88   SQUserPointer data;
89   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
90     sq_throwerror(vm, _SC("'set_black' called without instance"));
91     return SQ_ERROR;
92   }
93   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
94   SQBool arg0;
95   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
96     sq_throwerror(vm, _SC("Argument 1 not a bool"));
97     return SQ_ERROR;
98   }
99
100   try {
101     _this->set_black(arg0 == SQTrue);
102
103     return 0;
104
105   } catch(std::exception& e) {
106     sq_throwerror(vm, e.what());
107     return SQ_ERROR;
108   } catch(...) {
109     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
110     return SQ_ERROR;
111   }
112
113 }
114
115 static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
116 {
117   SQUserPointer data;
118   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
119     sq_throwerror(vm, _SC("'is_black' called without instance"));
120     return SQ_ERROR;
121   }
122   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
123
124   try {
125     bool return_value = _this->is_black();
126
127     sq_pushbool(vm, return_value);
128     return 1;
129
130   } catch(std::exception& e) {
131     sq_throwerror(vm, e.what());
132     return SQ_ERROR;
133   } catch(...) {
134     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
135     return SQ_ERROR;
136   }
137
138 }
139
140 static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
141 {
142   SQUserPointer data;
143   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
144     sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
145     return SQ_ERROR;
146   }
147   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
148   SQFloat arg0;
149   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
150     sq_throwerror(vm, _SC("Argument 1 not a float"));
151     return SQ_ERROR;
152   }
153
154   try {
155     _this->sixteen_to_nine(static_cast<float> (arg0));
156
157     return 0;
158
159   } catch(std::exception& e) {
160     sq_throwerror(vm, e.what());
161     return SQ_ERROR;
162   } catch(...) {
163     sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
164     return SQ_ERROR;
165   }
166
167 }
168
169 static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
170 {
171   SQUserPointer data;
172   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
173     sq_throwerror(vm, _SC("'four_to_three' called without instance"));
174     return SQ_ERROR;
175   }
176   Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
177   SQFloat arg0;
178   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
179     sq_throwerror(vm, _SC("Argument 1 not a float"));
180     return SQ_ERROR;
181   }
182
183   try {
184     _this->four_to_three(static_cast<float> (arg0));
185
186     return 0;
187
188   } catch(std::exception& e) {
189     sq_throwerror(vm, e.what());
190     return SQ_ERROR;
191   } catch(...) {
192     sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
193     return SQ_ERROR;
194   }
195
196 }
197
198 static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
199 {
200   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (ptr);
201   delete _this;
202   return 0;
203 }
204
205 static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
206 {
207   SQUserPointer data;
208   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
209     sq_throwerror(vm, _SC("'reload_config' called without instance"));
210     return SQ_ERROR;
211   }
212   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
213
214   try {
215     _this->reload_config();
216
217     return 0;
218
219   } catch(std::exception& e) {
220     sq_throwerror(vm, e.what());
221     return SQ_ERROR;
222   } catch(...) {
223     sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
224     return SQ_ERROR;
225   }
226
227 }
228
229 static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
230 {
231   SQUserPointer data;
232   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
233     sq_throwerror(vm, _SC("'shake' called without instance"));
234     return SQ_ERROR;
235   }
236   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
237   SQFloat arg0;
238   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
239     sq_throwerror(vm, _SC("Argument 1 not a float"));
240     return SQ_ERROR;
241   }
242   SQFloat arg1;
243   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
244     sq_throwerror(vm, _SC("Argument 2 not a float"));
245     return SQ_ERROR;
246   }
247   SQFloat arg2;
248   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
249     sq_throwerror(vm, _SC("Argument 3 not a float"));
250     return SQ_ERROR;
251   }
252
253   try {
254     _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
255
256     return 0;
257
258   } catch(std::exception& e) {
259     sq_throwerror(vm, e.what());
260     return SQ_ERROR;
261   } catch(...) {
262     sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
263     return SQ_ERROR;
264   }
265
266 }
267
268 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
269 {
270   SQUserPointer data;
271   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
272     sq_throwerror(vm, _SC("'set_pos' called without instance"));
273     return SQ_ERROR;
274   }
275   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
276   SQFloat arg0;
277   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
278     sq_throwerror(vm, _SC("Argument 1 not a float"));
279     return SQ_ERROR;
280   }
281   SQFloat arg1;
282   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
283     sq_throwerror(vm, _SC("Argument 2 not a float"));
284     return SQ_ERROR;
285   }
286
287   try {
288     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
289
290     return 0;
291
292   } catch(std::exception& e) {
293     sq_throwerror(vm, e.what());
294     return SQ_ERROR;
295   } catch(...) {
296     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
297     return SQ_ERROR;
298   }
299
300 }
301
302 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
303 {
304   SQUserPointer data;
305   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
306     sq_throwerror(vm, _SC("'set_mode' called without instance"));
307     return SQ_ERROR;
308   }
309   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
310   const SQChar* arg0;
311   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
312     sq_throwerror(vm, _SC("Argument 1 not a string"));
313     return SQ_ERROR;
314   }
315
316   try {
317     _this->set_mode(arg0);
318
319     return 0;
320
321   } catch(std::exception& e) {
322     sq_throwerror(vm, e.what());
323     return SQ_ERROR;
324   } catch(...) {
325     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
326     return SQ_ERROR;
327   }
328
329 }
330
331 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
332 {
333   SQUserPointer data;
334   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
335     sq_throwerror(vm, _SC("'scroll_to' called without instance"));
336     return SQ_ERROR;
337   }
338   Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
339   SQFloat arg0;
340   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
341     sq_throwerror(vm, _SC("Argument 1 not a float"));
342     return SQ_ERROR;
343   }
344   SQFloat arg1;
345   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
346     sq_throwerror(vm, _SC("Argument 2 not a float"));
347     return SQ_ERROR;
348   }
349   SQFloat arg2;
350   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
351     sq_throwerror(vm, _SC("Argument 3 not a float"));
352     return SQ_ERROR;
353   }
354
355   try {
356     _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
357
358     return 0;
359
360   } catch(std::exception& e) {
361     sq_throwerror(vm, e.what());
362     return SQ_ERROR;
363   } catch(...) {
364     sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
365     return SQ_ERROR;
366   }
367
368 }
369
370 static SQInteger Level_release_hook(SQUserPointer ptr, SQInteger )
371 {
372   Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (ptr);
373   delete _this;
374   return 0;
375 }
376
377 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
378 {
379   SQUserPointer data;
380   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
381     sq_throwerror(vm, _SC("'finish' called without instance"));
382     return SQ_ERROR;
383   }
384   Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
385   SQBool arg0;
386   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
387     sq_throwerror(vm, _SC("Argument 1 not a bool"));
388     return SQ_ERROR;
389   }
390
391   try {
392     _this->finish(arg0 == SQTrue);
393
394     return 0;
395
396   } catch(std::exception& e) {
397     sq_throwerror(vm, e.what());
398     return SQ_ERROR;
399   } catch(...) {
400     sq_throwerror(vm, _SC("Unexpected exception while executing function 'finish'"));
401     return SQ_ERROR;
402   }
403
404 }
405
406 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
407 {
408   SQUserPointer data;
409   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
410     sq_throwerror(vm, _SC("'spawn' called without instance"));
411     return SQ_ERROR;
412   }
413   Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
414   const SQChar* arg0;
415   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
416     sq_throwerror(vm, _SC("Argument 1 not a string"));
417     return SQ_ERROR;
418   }
419   const SQChar* arg1;
420   if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
421     sq_throwerror(vm, _SC("Argument 2 not a string"));
422     return SQ_ERROR;
423   }
424
425   try {
426     _this->spawn(arg0, arg1);
427
428     return 0;
429
430   } catch(std::exception& e) {
431     sq_throwerror(vm, e.what());
432     return SQ_ERROR;
433   } catch(...) {
434     sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn'"));
435     return SQ_ERROR;
436   }
437
438 }
439
440 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
441 {
442   SQUserPointer data;
443   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
444     sq_throwerror(vm, _SC("'flip_vertically' called without instance"));
445     return SQ_ERROR;
446   }
447   Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
448
449   try {
450     _this->flip_vertically();
451
452     return 0;
453
454   } catch(std::exception& e) {
455     sq_throwerror(vm, e.what());
456     return SQ_ERROR;
457   } catch(...) {
458     sq_throwerror(vm, _SC("Unexpected exception while executing function 'flip_vertically'"));
459     return SQ_ERROR;
460   }
461
462 }
463
464 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
465 {
466   SQUserPointer data;
467   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
468     sq_throwerror(vm, _SC("'toggle_pause' called without instance"));
469     return SQ_ERROR;
470   }
471   Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
472
473   try {
474     _this->toggle_pause();
475
476     return 0;
477
478   } catch(std::exception& e) {
479     sq_throwerror(vm, e.what());
480     return SQ_ERROR;
481   } catch(...) {
482     sq_throwerror(vm, _SC("Unexpected exception while executing function 'toggle_pause'"));
483     return SQ_ERROR;
484   }
485
486 }
487
488 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
489 {
490   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
491   delete _this;
492   return 0;
493 }
494
495 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
496 {
497   SQUserPointer data;
498   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
499     sq_throwerror(vm, _SC("'set_action' called without instance"));
500     return SQ_ERROR;
501   }
502   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
503   const SQChar* arg0;
504   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
505     sq_throwerror(vm, _SC("Argument 1 not a string"));
506     return SQ_ERROR;
507   }
508
509   try {
510     _this->set_action(arg0);
511
512     return 0;
513
514   } catch(std::exception& e) {
515     sq_throwerror(vm, e.what());
516     return SQ_ERROR;
517   } catch(...) {
518     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
519     return SQ_ERROR;
520   }
521
522 }
523
524 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
525 {
526   SQUserPointer data;
527   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
528     sq_throwerror(vm, _SC("'get_action' called without instance"));
529     return SQ_ERROR;
530   }
531   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
532
533   try {
534     std::string return_value = _this->get_action();
535
536     sq_pushstring(vm, return_value.c_str(), return_value.size());
537     return 1;
538
539   } catch(std::exception& e) {
540     sq_throwerror(vm, e.what());
541     return SQ_ERROR;
542   } catch(...) {
543     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
544     return SQ_ERROR;
545   }
546
547 }
548
549 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
550 {
551   SQUserPointer data;
552   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
553     sq_throwerror(vm, _SC("'move' called without instance"));
554     return SQ_ERROR;
555   }
556   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
557   SQFloat arg0;
558   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
559     sq_throwerror(vm, _SC("Argument 1 not a float"));
560     return SQ_ERROR;
561   }
562   SQFloat arg1;
563   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
564     sq_throwerror(vm, _SC("Argument 2 not a float"));
565     return SQ_ERROR;
566   }
567
568   try {
569     _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
570
571     return 0;
572
573   } catch(std::exception& e) {
574     sq_throwerror(vm, e.what());
575     return SQ_ERROR;
576   } catch(...) {
577     sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
578     return SQ_ERROR;
579   }
580
581 }
582
583 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
584 {
585   SQUserPointer data;
586   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
587     sq_throwerror(vm, _SC("'set_pos' called without instance"));
588     return SQ_ERROR;
589   }
590   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
591   SQFloat arg0;
592   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
593     sq_throwerror(vm, _SC("Argument 1 not a float"));
594     return SQ_ERROR;
595   }
596   SQFloat arg1;
597   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
598     sq_throwerror(vm, _SC("Argument 2 not a float"));
599     return SQ_ERROR;
600   }
601
602   try {
603     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
604
605     return 0;
606
607   } catch(std::exception& e) {
608     sq_throwerror(vm, e.what());
609     return SQ_ERROR;
610   } catch(...) {
611     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
612     return SQ_ERROR;
613   }
614
615 }
616
617 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
618 {
619   SQUserPointer data;
620   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
621     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
622     return SQ_ERROR;
623   }
624   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
625
626   try {
627     float return_value = _this->get_pos_x();
628
629     sq_pushfloat(vm, return_value);
630     return 1;
631
632   } catch(std::exception& e) {
633     sq_throwerror(vm, e.what());
634     return SQ_ERROR;
635   } catch(...) {
636     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
637     return SQ_ERROR;
638   }
639
640 }
641
642 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
643 {
644   SQUserPointer data;
645   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
646     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
647     return SQ_ERROR;
648   }
649   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
650
651   try {
652     float return_value = _this->get_pos_y();
653
654     sq_pushfloat(vm, return_value);
655     return 1;
656
657   } catch(std::exception& e) {
658     sq_throwerror(vm, e.what());
659     return SQ_ERROR;
660   } catch(...) {
661     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
662     return SQ_ERROR;
663   }
664
665 }
666
667 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
668 {
669   SQUserPointer data;
670   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
671     sq_throwerror(vm, _SC("'set_velocity' called without instance"));
672     return SQ_ERROR;
673   }
674   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
675   SQFloat arg0;
676   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
677     sq_throwerror(vm, _SC("Argument 1 not a float"));
678     return SQ_ERROR;
679   }
680   SQFloat arg1;
681   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
682     sq_throwerror(vm, _SC("Argument 2 not a float"));
683     return SQ_ERROR;
684   }
685
686   try {
687     _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
688
689     return 0;
690
691   } catch(std::exception& e) {
692     sq_throwerror(vm, e.what());
693     return SQ_ERROR;
694   } catch(...) {
695     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
696     return SQ_ERROR;
697   }
698
699 }
700
701 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
702 {
703   SQUserPointer data;
704   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
705     sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
706     return SQ_ERROR;
707   }
708   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
709
710   try {
711     float return_value = _this->get_velocity_x();
712
713     sq_pushfloat(vm, return_value);
714     return 1;
715
716   } catch(std::exception& e) {
717     sq_throwerror(vm, e.what());
718     return SQ_ERROR;
719   } catch(...) {
720     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
721     return SQ_ERROR;
722   }
723
724 }
725
726 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
727 {
728   SQUserPointer data;
729   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
730     sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
731     return SQ_ERROR;
732   }
733   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
734
735   try {
736     float return_value = _this->get_velocity_y();
737
738     sq_pushfloat(vm, return_value);
739     return 1;
740
741   } catch(std::exception& e) {
742     sq_throwerror(vm, e.what());
743     return SQ_ERROR;
744   } catch(...) {
745     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
746     return SQ_ERROR;
747   }
748
749 }
750
751 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
752 {
753   SQUserPointer data;
754   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
755     sq_throwerror(vm, _SC("'set_visible' called without instance"));
756     return SQ_ERROR;
757   }
758   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
759   SQBool arg0;
760   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
761     sq_throwerror(vm, _SC("Argument 1 not a bool"));
762     return SQ_ERROR;
763   }
764
765   try {
766     _this->set_visible(arg0 == SQTrue);
767
768     return 0;
769
770   } catch(std::exception& e) {
771     sq_throwerror(vm, e.what());
772     return SQ_ERROR;
773   } catch(...) {
774     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
775     return SQ_ERROR;
776   }
777
778 }
779
780 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
781 {
782   SQUserPointer data;
783   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
784     sq_throwerror(vm, _SC("'is_visible' called without instance"));
785     return SQ_ERROR;
786   }
787   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
788
789   try {
790     bool return_value = _this->is_visible();
791
792     sq_pushbool(vm, return_value);
793     return 1;
794
795   } catch(std::exception& e) {
796     sq_throwerror(vm, e.what());
797     return SQ_ERROR;
798   } catch(...) {
799     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
800     return SQ_ERROR;
801   }
802
803 }
804
805 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
806 {
807   SQUserPointer data;
808   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
809     sq_throwerror(vm, _SC("'set_solid' called without instance"));
810     return SQ_ERROR;
811   }
812   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
813   SQBool arg0;
814   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
815     sq_throwerror(vm, _SC("Argument 1 not a bool"));
816     return SQ_ERROR;
817   }
818
819   try {
820     _this->set_solid(arg0 == SQTrue);
821
822     return 0;
823
824   } catch(std::exception& e) {
825     sq_throwerror(vm, e.what());
826     return SQ_ERROR;
827   } catch(...) {
828     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
829     return SQ_ERROR;
830   }
831
832 }
833
834 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
835 {
836   SQUserPointer data;
837   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
838     sq_throwerror(vm, _SC("'is_solid' called without instance"));
839     return SQ_ERROR;
840   }
841   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
842
843   try {
844     bool return_value = _this->is_solid();
845
846     sq_pushbool(vm, return_value);
847     return 1;
848
849   } catch(std::exception& e) {
850     sq_throwerror(vm, e.what());
851     return SQ_ERROR;
852   } catch(...) {
853     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
854     return SQ_ERROR;
855   }
856
857 }
858
859 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
860 {
861   SQUserPointer data;
862   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
863     sq_throwerror(vm, _SC("'get_name' called without instance"));
864     return SQ_ERROR;
865   }
866   Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
867
868   try {
869     std::string return_value = _this->get_name();
870
871     sq_pushstring(vm, return_value.c_str(), return_value.size());
872     return 1;
873
874   } catch(std::exception& e) {
875     sq_throwerror(vm, e.what());
876     return SQ_ERROR;
877   } catch(...) {
878     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
879     return SQ_ERROR;
880   }
881
882 }
883
884 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
885 {
886   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
887   delete _this;
888   return 0;
889 }
890
891 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
892 {
893   SQUserPointer data;
894   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
895     sq_throwerror(vm, _SC("'set_text' called without instance"));
896     return SQ_ERROR;
897   }
898   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
899   const SQChar* arg0;
900   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
901     sq_throwerror(vm, _SC("Argument 1 not a string"));
902     return SQ_ERROR;
903   }
904
905   try {
906     _this->set_text(arg0);
907
908     return 0;
909
910   } catch(std::exception& e) {
911     sq_throwerror(vm, e.what());
912     return SQ_ERROR;
913   } catch(...) {
914     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
915     return SQ_ERROR;
916   }
917
918 }
919
920 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
921 {
922   SQUserPointer data;
923   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
924     sq_throwerror(vm, _SC("'set_font' called without instance"));
925     return SQ_ERROR;
926   }
927   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
928   const SQChar* arg0;
929   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
930     sq_throwerror(vm, _SC("Argument 1 not a string"));
931     return SQ_ERROR;
932   }
933
934   try {
935     _this->set_font(arg0);
936
937     return 0;
938
939   } catch(std::exception& e) {
940     sq_throwerror(vm, e.what());
941     return SQ_ERROR;
942   } catch(...) {
943     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
944     return SQ_ERROR;
945   }
946
947 }
948
949 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
950 {
951   SQUserPointer data;
952   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
953     sq_throwerror(vm, _SC("'fade_in' called without instance"));
954     return SQ_ERROR;
955   }
956   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
957   SQFloat arg0;
958   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
959     sq_throwerror(vm, _SC("Argument 1 not a float"));
960     return SQ_ERROR;
961   }
962
963   try {
964     _this->fade_in(static_cast<float> (arg0));
965
966     return 0;
967
968   } catch(std::exception& e) {
969     sq_throwerror(vm, e.what());
970     return SQ_ERROR;
971   } catch(...) {
972     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
973     return SQ_ERROR;
974   }
975
976 }
977
978 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
979 {
980   SQUserPointer data;
981   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
982     sq_throwerror(vm, _SC("'fade_out' called without instance"));
983     return SQ_ERROR;
984   }
985   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
986   SQFloat arg0;
987   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
988     sq_throwerror(vm, _SC("Argument 1 not a float"));
989     return SQ_ERROR;
990   }
991
992   try {
993     _this->fade_out(static_cast<float> (arg0));
994
995     return 0;
996
997   } catch(std::exception& e) {
998     sq_throwerror(vm, e.what());
999     return SQ_ERROR;
1000   } catch(...) {
1001     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1002     return SQ_ERROR;
1003   }
1004
1005 }
1006
1007 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
1008 {
1009   SQUserPointer data;
1010   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1011     sq_throwerror(vm, _SC("'set_visible' called without instance"));
1012     return SQ_ERROR;
1013   }
1014   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1015   SQBool arg0;
1016   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1017     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1018     return SQ_ERROR;
1019   }
1020
1021   try {
1022     _this->set_visible(arg0 == SQTrue);
1023
1024     return 0;
1025
1026   } catch(std::exception& e) {
1027     sq_throwerror(vm, e.what());
1028     return SQ_ERROR;
1029   } catch(...) {
1030     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1031     return SQ_ERROR;
1032   }
1033
1034 }
1035
1036 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
1037 {
1038   SQUserPointer data;
1039   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1040     sq_throwerror(vm, _SC("'set_centered' called without instance"));
1041     return SQ_ERROR;
1042   }
1043   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1044   SQBool arg0;
1045   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1046     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1047     return SQ_ERROR;
1048   }
1049
1050   try {
1051     _this->set_centered(arg0 == SQTrue);
1052
1053     return 0;
1054
1055   } catch(std::exception& e) {
1056     sq_throwerror(vm, e.what());
1057     return SQ_ERROR;
1058   } catch(...) {
1059     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
1060     return SQ_ERROR;
1061   }
1062
1063 }
1064
1065 static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
1066 {
1067   SQUserPointer data;
1068   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1069     sq_throwerror(vm, _SC("'set_pos' called without instance"));
1070     return SQ_ERROR;
1071   }
1072   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1073   SQFloat arg0;
1074   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1075     sq_throwerror(vm, _SC("Argument 1 not a float"));
1076     return SQ_ERROR;
1077   }
1078   SQFloat arg1;
1079   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1080     sq_throwerror(vm, _SC("Argument 2 not a float"));
1081     return SQ_ERROR;
1082   }
1083
1084   try {
1085     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1086
1087     return 0;
1088
1089   } catch(std::exception& e) {
1090     sq_throwerror(vm, e.what());
1091     return SQ_ERROR;
1092   } catch(...) {
1093     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1094     return SQ_ERROR;
1095   }
1096
1097 }
1098
1099 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
1100 {
1101   SQUserPointer data;
1102   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1103     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1104     return SQ_ERROR;
1105   }
1106   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1107
1108   try {
1109     float return_value = _this->get_pos_x();
1110
1111     sq_pushfloat(vm, return_value);
1112     return 1;
1113
1114   } catch(std::exception& e) {
1115     sq_throwerror(vm, e.what());
1116     return SQ_ERROR;
1117   } catch(...) {
1118     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1119     return SQ_ERROR;
1120   }
1121
1122 }
1123
1124 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
1125 {
1126   SQUserPointer data;
1127   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1128     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1129     return SQ_ERROR;
1130   }
1131   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1132
1133   try {
1134     float return_value = _this->get_pos_y();
1135
1136     sq_pushfloat(vm, return_value);
1137     return 1;
1138
1139   } catch(std::exception& e) {
1140     sq_throwerror(vm, e.what());
1141     return SQ_ERROR;
1142   } catch(...) {
1143     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1144     return SQ_ERROR;
1145   }
1146
1147 }
1148
1149 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
1150 {
1151   SQUserPointer data;
1152   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1153     sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1154     return SQ_ERROR;
1155   }
1156   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1157   SQInteger arg0;
1158   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1159     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1160     return SQ_ERROR;
1161   }
1162
1163   try {
1164     _this->set_anchor_point(static_cast<int> (arg0));
1165
1166     return 0;
1167
1168   } catch(std::exception& e) {
1169     sq_throwerror(vm, e.what());
1170     return SQ_ERROR;
1171   } catch(...) {
1172     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1173     return SQ_ERROR;
1174   }
1175
1176 }
1177
1178 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
1179 {
1180   SQUserPointer data;
1181   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1182     sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1183     return SQ_ERROR;
1184   }
1185   Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1186
1187   try {
1188     int return_value = _this->get_anchor_point();
1189
1190     sq_pushinteger(vm, return_value);
1191     return 1;
1192
1193   } catch(std::exception& e) {
1194     sq_throwerror(vm, e.what());
1195     return SQ_ERROR;
1196   } catch(...) {
1197     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1198     return SQ_ERROR;
1199   }
1200
1201 }
1202
1203 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1204 {
1205   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
1206   delete _this;
1207   return 0;
1208 }
1209
1210 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1211 {
1212   SQUserPointer data;
1213   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1214     sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1215     return SQ_ERROR;
1216   }
1217   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1218   const SQChar* arg0;
1219   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1220     sq_throwerror(vm, _SC("Argument 1 not a string"));
1221     return SQ_ERROR;
1222   }
1223
1224   try {
1225     bool return_value = _this->add_bonus(arg0);
1226
1227     sq_pushbool(vm, return_value);
1228     return 1;
1229
1230   } catch(std::exception& e) {
1231     sq_throwerror(vm, e.what());
1232     return SQ_ERROR;
1233   } catch(...) {
1234     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1235     return SQ_ERROR;
1236   }
1237
1238 }
1239
1240 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1241 {
1242   SQUserPointer data;
1243   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1244     sq_throwerror(vm, _SC("'add_coins' called without instance"));
1245     return SQ_ERROR;
1246   }
1247   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1248   SQInteger arg0;
1249   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1250     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1251     return SQ_ERROR;
1252   }
1253
1254   try {
1255     _this->add_coins(static_cast<int> (arg0));
1256
1257     return 0;
1258
1259   } catch(std::exception& e) {
1260     sq_throwerror(vm, e.what());
1261     return SQ_ERROR;
1262   } catch(...) {
1263     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1264     return SQ_ERROR;
1265   }
1266
1267 }
1268
1269 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1270 {
1271   SQUserPointer data;
1272   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1273     sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1274     return SQ_ERROR;
1275   }
1276   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1277
1278   try {
1279     _this->make_invincible();
1280
1281     return 0;
1282
1283   } catch(std::exception& e) {
1284     sq_throwerror(vm, e.what());
1285     return SQ_ERROR;
1286   } catch(...) {
1287     sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1288     return SQ_ERROR;
1289   }
1290
1291 }
1292
1293 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1294 {
1295   SQUserPointer data;
1296   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1297     sq_throwerror(vm, _SC("'deactivate' called without instance"));
1298     return SQ_ERROR;
1299   }
1300   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1301
1302   try {
1303     _this->deactivate();
1304
1305     return 0;
1306
1307   } catch(std::exception& e) {
1308     sq_throwerror(vm, e.what());
1309     return SQ_ERROR;
1310   } catch(...) {
1311     sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1312     return SQ_ERROR;
1313   }
1314
1315 }
1316
1317 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1318 {
1319   SQUserPointer data;
1320   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1321     sq_throwerror(vm, _SC("'activate' called without instance"));
1322     return SQ_ERROR;
1323   }
1324   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1325
1326   try {
1327     _this->activate();
1328
1329     return 0;
1330
1331   } catch(std::exception& e) {
1332     sq_throwerror(vm, e.what());
1333     return SQ_ERROR;
1334   } catch(...) {
1335     sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1336     return SQ_ERROR;
1337   }
1338
1339 }
1340
1341 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1342 {
1343   SQUserPointer data;
1344   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1345     sq_throwerror(vm, _SC("'walk' called without instance"));
1346     return SQ_ERROR;
1347   }
1348   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1349   SQFloat arg0;
1350   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1351     sq_throwerror(vm, _SC("Argument 1 not a float"));
1352     return SQ_ERROR;
1353   }
1354
1355   try {
1356     _this->walk(static_cast<float> (arg0));
1357
1358     return 0;
1359
1360   } catch(std::exception& e) {
1361     sq_throwerror(vm, e.what());
1362     return SQ_ERROR;
1363   } catch(...) {
1364     sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1365     return SQ_ERROR;
1366   }
1367
1368 }
1369
1370 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1371 {
1372   SQUserPointer data;
1373   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1374     sq_throwerror(vm, _SC("'set_visible' called without instance"));
1375     return SQ_ERROR;
1376   }
1377   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1378   SQBool arg0;
1379   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1380     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1381     return SQ_ERROR;
1382   }
1383
1384   try {
1385     _this->set_visible(arg0 == SQTrue);
1386
1387     return 0;
1388
1389   } catch(std::exception& e) {
1390     sq_throwerror(vm, e.what());
1391     return SQ_ERROR;
1392   } catch(...) {
1393     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1394     return SQ_ERROR;
1395   }
1396
1397 }
1398
1399 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1400 {
1401   SQUserPointer data;
1402   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1403     sq_throwerror(vm, _SC("'get_visible' called without instance"));
1404     return SQ_ERROR;
1405   }
1406   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1407
1408   try {
1409     bool return_value = _this->get_visible();
1410
1411     sq_pushbool(vm, return_value);
1412     return 1;
1413
1414   } catch(std::exception& e) {
1415     sq_throwerror(vm, e.what());
1416     return SQ_ERROR;
1417   } catch(...) {
1418     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1419     return SQ_ERROR;
1420   }
1421
1422 }
1423
1424 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1425 {
1426   SQUserPointer data;
1427   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1428     sq_throwerror(vm, _SC("'kill' called without instance"));
1429     return SQ_ERROR;
1430   }
1431   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1432   SQBool arg0;
1433   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1434     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1435     return SQ_ERROR;
1436   }
1437
1438   try {
1439     _this->kill(arg0 == SQTrue);
1440
1441     return 0;
1442
1443   } catch(std::exception& e) {
1444     sq_throwerror(vm, e.what());
1445     return SQ_ERROR;
1446   } catch(...) {
1447     sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1448     return SQ_ERROR;
1449   }
1450
1451 }
1452
1453 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1454 {
1455   SQUserPointer data;
1456   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1457     sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1458     return SQ_ERROR;
1459   }
1460   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1461   SQBool arg0;
1462   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1463     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1464     return SQ_ERROR;
1465   }
1466
1467   try {
1468     _this->set_ghost_mode(arg0 == SQTrue);
1469
1470     return 0;
1471
1472   } catch(std::exception& e) {
1473     sq_throwerror(vm, e.what());
1474     return SQ_ERROR;
1475   } catch(...) {
1476     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1477     return SQ_ERROR;
1478   }
1479
1480 }
1481
1482 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1483 {
1484   SQUserPointer data;
1485   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1486     sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1487     return SQ_ERROR;
1488   }
1489   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1490
1491   try {
1492     bool return_value = _this->get_ghost_mode();
1493
1494     sq_pushbool(vm, return_value);
1495     return 1;
1496
1497   } catch(std::exception& e) {
1498     sq_throwerror(vm, e.what());
1499     return SQ_ERROR;
1500   } catch(...) {
1501     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1502     return SQ_ERROR;
1503   }
1504
1505 }
1506
1507 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1508 {
1509   SQUserPointer data;
1510   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1511     sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1512     return SQ_ERROR;
1513   }
1514   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1515
1516   try {
1517     _this->do_cheer();
1518
1519     return 0;
1520
1521   } catch(std::exception& e) {
1522     sq_throwerror(vm, e.what());
1523     return SQ_ERROR;
1524   } catch(...) {
1525     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1526     return SQ_ERROR;
1527   }
1528
1529 }
1530
1531 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1532 {
1533   SQUserPointer data;
1534   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1535     sq_throwerror(vm, _SC("'do_duck' called without instance"));
1536     return SQ_ERROR;
1537   }
1538   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1539
1540   try {
1541     _this->do_duck();
1542
1543     return 0;
1544
1545   } catch(std::exception& e) {
1546     sq_throwerror(vm, e.what());
1547     return SQ_ERROR;
1548   } catch(...) {
1549     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1550     return SQ_ERROR;
1551   }
1552
1553 }
1554
1555 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1556 {
1557   SQUserPointer data;
1558   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1559     sq_throwerror(vm, _SC("'do_standup' called without instance"));
1560     return SQ_ERROR;
1561   }
1562   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1563
1564   try {
1565     _this->do_standup();
1566
1567     return 0;
1568
1569   } catch(std::exception& e) {
1570     sq_throwerror(vm, e.what());
1571     return SQ_ERROR;
1572   } catch(...) {
1573     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1574     return SQ_ERROR;
1575   }
1576
1577 }
1578
1579 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1580 {
1581   SQUserPointer data;
1582   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1583     sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1584     return SQ_ERROR;
1585   }
1586   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1587
1588   try {
1589     _this->do_backflip();
1590
1591     return 0;
1592
1593   } catch(std::exception& e) {
1594     sq_throwerror(vm, e.what());
1595     return SQ_ERROR;
1596   } catch(...) {
1597     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1598     return SQ_ERROR;
1599   }
1600
1601 }
1602
1603 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1604 {
1605   SQUserPointer data;
1606   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1607     sq_throwerror(vm, _SC("'do_jump' called without instance"));
1608     return SQ_ERROR;
1609   }
1610   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1611   SQFloat arg0;
1612   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1613     sq_throwerror(vm, _SC("Argument 1 not a float"));
1614     return SQ_ERROR;
1615   }
1616
1617   try {
1618     _this->do_jump(static_cast<float> (arg0));
1619
1620     return 0;
1621
1622   } catch(std::exception& e) {
1623     sq_throwerror(vm, e.what());
1624     return SQ_ERROR;
1625   } catch(...) {
1626     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1627     return SQ_ERROR;
1628   }
1629
1630 }
1631
1632 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1633 {
1634   SQUserPointer data;
1635   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1636     sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1637     return SQ_ERROR;
1638   }
1639   Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1640   const SQChar* arg0;
1641   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1642     sq_throwerror(vm, _SC("Argument 1 not a string"));
1643     return SQ_ERROR;
1644   }
1645
1646   try {
1647     _this->trigger_sequence(arg0);
1648
1649     return 0;
1650
1651   } catch(std::exception& e) {
1652     sq_throwerror(vm, e.what());
1653     return SQ_ERROR;
1654   } catch(...) {
1655     sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1656     return SQ_ERROR;
1657   }
1658
1659 }
1660
1661 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1662 {
1663   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1664   delete _this;
1665   return 0;
1666 }
1667
1668 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1669 {
1670   const SQChar* arg0;
1671   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1672     sq_throwerror(vm, _SC("Argument 1 not a string"));
1673     return SQ_ERROR;
1674   }
1675
1676   try {
1677     Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1678   if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1679     sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1680     return SQ_ERROR;
1681   }
1682   sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1683
1684     return 0;
1685
1686   } catch(std::exception& e) {
1687     sq_throwerror(vm, e.what());
1688     return SQ_ERROR;
1689   } catch(...) {
1690     sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1691     return SQ_ERROR;
1692   }
1693
1694 }
1695
1696 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1697 {
1698   SQUserPointer data;
1699   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1700     sq_throwerror(vm, _SC("'set_layer' called without instance"));
1701     return SQ_ERROR;
1702   }
1703   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1704   SQInteger arg0;
1705   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1706     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1707     return SQ_ERROR;
1708   }
1709
1710   try {
1711     _this->set_layer(static_cast<int> (arg0));
1712
1713     return 0;
1714
1715   } catch(std::exception& e) {
1716     sq_throwerror(vm, e.what());
1717     return SQ_ERROR;
1718   } catch(...) {
1719     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1720     return SQ_ERROR;
1721   }
1722
1723 }
1724
1725 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1726 {
1727   SQUserPointer data;
1728   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1729     sq_throwerror(vm, _SC("'get_layer' called without instance"));
1730     return SQ_ERROR;
1731   }
1732   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1733
1734   try {
1735     int return_value = _this->get_layer();
1736
1737     sq_pushinteger(vm, return_value);
1738     return 1;
1739
1740   } catch(std::exception& e) {
1741     sq_throwerror(vm, e.what());
1742     return SQ_ERROR;
1743   } catch(...) {
1744     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1745     return SQ_ERROR;
1746   }
1747
1748 }
1749
1750 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1751 {
1752   SQUserPointer data;
1753   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1754     sq_throwerror(vm, _SC("'set_pos' called without instance"));
1755     return SQ_ERROR;
1756   }
1757   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1758   SQFloat arg0;
1759   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1760     sq_throwerror(vm, _SC("Argument 1 not a float"));
1761     return SQ_ERROR;
1762   }
1763   SQFloat arg1;
1764   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1765     sq_throwerror(vm, _SC("Argument 2 not a float"));
1766     return SQ_ERROR;
1767   }
1768
1769   try {
1770     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1771
1772     return 0;
1773
1774   } catch(std::exception& e) {
1775     sq_throwerror(vm, e.what());
1776     return SQ_ERROR;
1777   } catch(...) {
1778     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1779     return SQ_ERROR;
1780   }
1781
1782 }
1783
1784 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1785 {
1786   SQUserPointer data;
1787   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1788     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1789     return SQ_ERROR;
1790   }
1791   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1792
1793   try {
1794     float return_value = _this->get_pos_x();
1795
1796     sq_pushfloat(vm, return_value);
1797     return 1;
1798
1799   } catch(std::exception& e) {
1800     sq_throwerror(vm, e.what());
1801     return SQ_ERROR;
1802   } catch(...) {
1803     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1804     return SQ_ERROR;
1805   }
1806
1807 }
1808
1809 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1810 {
1811   SQUserPointer data;
1812   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1813     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1814     return SQ_ERROR;
1815   }
1816   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1817
1818   try {
1819     float return_value = _this->get_pos_y();
1820
1821     sq_pushfloat(vm, return_value);
1822     return 1;
1823
1824   } catch(std::exception& e) {
1825     sq_throwerror(vm, e.what());
1826     return SQ_ERROR;
1827   } catch(...) {
1828     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1829     return SQ_ERROR;
1830   }
1831
1832 }
1833
1834 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1835 {
1836   SQUserPointer data;
1837   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1838     sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1839     return SQ_ERROR;
1840   }
1841   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1842   SQInteger arg0;
1843   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1844     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1845     return SQ_ERROR;
1846   }
1847
1848   try {
1849     _this->set_anchor_point(static_cast<int> (arg0));
1850
1851     return 0;
1852
1853   } catch(std::exception& e) {
1854     sq_throwerror(vm, e.what());
1855     return SQ_ERROR;
1856   } catch(...) {
1857     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1858     return SQ_ERROR;
1859   }
1860
1861 }
1862
1863 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1864 {
1865   SQUserPointer data;
1866   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1867     sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1868     return SQ_ERROR;
1869   }
1870   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1871
1872   try {
1873     int return_value = _this->get_anchor_point();
1874
1875     sq_pushinteger(vm, return_value);
1876     return 1;
1877
1878   } catch(std::exception& e) {
1879     sq_throwerror(vm, e.what());
1880     return SQ_ERROR;
1881   } catch(...) {
1882     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1883     return SQ_ERROR;
1884   }
1885
1886 }
1887
1888 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1889 {
1890   SQUserPointer data;
1891   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1892     sq_throwerror(vm, _SC("'set_visible' called without instance"));
1893     return SQ_ERROR;
1894   }
1895   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1896   SQBool arg0;
1897   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1898     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1899     return SQ_ERROR;
1900   }
1901
1902   try {
1903     _this->set_visible(arg0 == SQTrue);
1904
1905     return 0;
1906
1907   } catch(std::exception& e) {
1908     sq_throwerror(vm, e.what());
1909     return SQ_ERROR;
1910   } catch(...) {
1911     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1912     return SQ_ERROR;
1913   }
1914
1915 }
1916
1917 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1918 {
1919   SQUserPointer data;
1920   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1921     sq_throwerror(vm, _SC("'get_visible' called without instance"));
1922     return SQ_ERROR;
1923   }
1924   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1925
1926   try {
1927     bool return_value = _this->get_visible();
1928
1929     sq_pushbool(vm, return_value);
1930     return 1;
1931
1932   } catch(std::exception& e) {
1933     sq_throwerror(vm, e.what());
1934     return SQ_ERROR;
1935   } catch(...) {
1936     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1937     return SQ_ERROR;
1938   }
1939
1940 }
1941
1942 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
1943 {
1944   SQUserPointer data;
1945   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1946     sq_throwerror(vm, _SC("'set_action' called without instance"));
1947     return SQ_ERROR;
1948   }
1949   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1950   const SQChar* arg0;
1951   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1952     sq_throwerror(vm, _SC("Argument 1 not a string"));
1953     return SQ_ERROR;
1954   }
1955
1956   try {
1957     _this->set_action(arg0);
1958
1959     return 0;
1960
1961   } catch(std::exception& e) {
1962     sq_throwerror(vm, e.what());
1963     return SQ_ERROR;
1964   } catch(...) {
1965     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1966     return SQ_ERROR;
1967   }
1968
1969 }
1970
1971 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
1972 {
1973   SQUserPointer data;
1974   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1975     sq_throwerror(vm, _SC("'get_action' called without instance"));
1976     return SQ_ERROR;
1977   }
1978   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1979
1980   try {
1981     std::string return_value = _this->get_action();
1982
1983     sq_pushstring(vm, return_value.c_str(), return_value.size());
1984     return 1;
1985
1986   } catch(std::exception& e) {
1987     sq_throwerror(vm, e.what());
1988     return SQ_ERROR;
1989   } catch(...) {
1990     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1991     return SQ_ERROR;
1992   }
1993
1994 }
1995
1996 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
1997 {
1998   SQUserPointer data;
1999   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2000     sq_throwerror(vm, _SC("'fade_in' called without instance"));
2001     return SQ_ERROR;
2002   }
2003   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2004   SQFloat arg0;
2005   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2006     sq_throwerror(vm, _SC("Argument 1 not a float"));
2007     return SQ_ERROR;
2008   }
2009
2010   try {
2011     _this->fade_in(static_cast<float> (arg0));
2012
2013     return 0;
2014
2015   } catch(std::exception& e) {
2016     sq_throwerror(vm, e.what());
2017     return SQ_ERROR;
2018   } catch(...) {
2019     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
2020     return SQ_ERROR;
2021   }
2022
2023 }
2024
2025 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
2026 {
2027   SQUserPointer data;
2028   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2029     sq_throwerror(vm, _SC("'fade_out' called without instance"));
2030     return SQ_ERROR;
2031   }
2032   Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2033   SQFloat arg0;
2034   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2035     sq_throwerror(vm, _SC("Argument 1 not a float"));
2036     return SQ_ERROR;
2037   }
2038
2039   try {
2040     _this->fade_out(static_cast<float> (arg0));
2041
2042     return 0;
2043
2044   } catch(std::exception& e) {
2045     sq_throwerror(vm, e.what());
2046     return SQ_ERROR;
2047   } catch(...) {
2048     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
2049     return SQ_ERROR;
2050   }
2051
2052 }
2053
2054 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
2055 {
2056   Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
2057   delete _this;
2058   return 0;
2059 }
2060
2061 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
2062 {
2063   SQUserPointer data;
2064   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2065     sq_throwerror(vm, _SC("'goto_node' called without instance"));
2066     return SQ_ERROR;
2067   }
2068   Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2069   SQInteger arg0;
2070   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2071     sq_throwerror(vm, _SC("Argument 1 not an integer"));
2072     return SQ_ERROR;
2073   }
2074
2075   try {
2076     _this->goto_node(static_cast<int> (arg0));
2077
2078     return 0;
2079
2080   } catch(std::exception& e) {
2081     sq_throwerror(vm, e.what());
2082     return SQ_ERROR;
2083   } catch(...) {
2084     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2085     return SQ_ERROR;
2086   }
2087
2088 }
2089
2090 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
2091 {
2092   SQUserPointer data;
2093   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2094     sq_throwerror(vm, _SC("'start_moving' called without instance"));
2095     return SQ_ERROR;
2096   }
2097   Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2098
2099   try {
2100     _this->start_moving();
2101
2102     return 0;
2103
2104   } catch(std::exception& e) {
2105     sq_throwerror(vm, e.what());
2106     return SQ_ERROR;
2107   } catch(...) {
2108     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2109     return SQ_ERROR;
2110   }
2111
2112 }
2113
2114 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
2115 {
2116   SQUserPointer data;
2117   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2118     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2119     return SQ_ERROR;
2120   }
2121   Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2122
2123   try {
2124     _this->stop_moving();
2125
2126     return 0;
2127
2128   } catch(std::exception& e) {
2129     sq_throwerror(vm, e.what());
2130     return SQ_ERROR;
2131   } catch(...) {
2132     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2133     return SQ_ERROR;
2134   }
2135
2136 }
2137
2138 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
2139 {
2140   Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
2141   delete _this;
2142   return 0;
2143 }
2144
2145 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
2146 {
2147   SQUserPointer data;
2148   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2149     sq_throwerror(vm, _SC("'get_burning' called without instance"));
2150     return SQ_ERROR;
2151   }
2152   Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2153
2154   try {
2155     bool return_value = _this->get_burning();
2156
2157     sq_pushbool(vm, return_value);
2158     return 1;
2159
2160   } catch(std::exception& e) {
2161     sq_throwerror(vm, e.what());
2162     return SQ_ERROR;
2163   } catch(...) {
2164     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2165     return SQ_ERROR;
2166   }
2167
2168 }
2169
2170 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2171 {
2172   SQUserPointer data;
2173   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2174     sq_throwerror(vm, _SC("'set_burning' called without instance"));
2175     return SQ_ERROR;
2176   }
2177   Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2178   SQBool arg0;
2179   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2180     sq_throwerror(vm, _SC("Argument 1 not a bool"));
2181     return SQ_ERROR;
2182   }
2183
2184   try {
2185     _this->set_burning(arg0 == SQTrue);
2186
2187     return 0;
2188
2189   } catch(std::exception& e) {
2190     sq_throwerror(vm, e.what());
2191     return SQ_ERROR;
2192   } catch(...) {
2193     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2194     return SQ_ERROR;
2195   }
2196
2197 }
2198
2199 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2200 {
2201   Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2202   delete _this;
2203   return 0;
2204 }
2205
2206 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2207 {
2208   SQUserPointer data;
2209   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2210     sq_throwerror(vm, _SC("'start' called without instance"));
2211     return SQ_ERROR;
2212   }
2213   Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2214
2215   try {
2216     _this->start();
2217
2218     return 0;
2219
2220   } catch(std::exception& e) {
2221     sq_throwerror(vm, e.what());
2222     return SQ_ERROR;
2223   } catch(...) {
2224     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2225     return SQ_ERROR;
2226   }
2227
2228 }
2229
2230 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2231 {
2232   SQUserPointer data;
2233   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2234     sq_throwerror(vm, _SC("'stop' called without instance"));
2235     return SQ_ERROR;
2236   }
2237   Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2238
2239   try {
2240     _this->stop();
2241
2242     return 0;
2243
2244   } catch(std::exception& e) {
2245     sq_throwerror(vm, e.what());
2246     return SQ_ERROR;
2247   } catch(...) {
2248     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2249     return SQ_ERROR;
2250   }
2251
2252 }
2253
2254 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2255 {
2256   Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2257   delete _this;
2258   return 0;
2259 }
2260
2261 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2262 {
2263   SQUserPointer data;
2264   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2265     sq_throwerror(vm, _SC("'set_pos' called without instance"));
2266     return SQ_ERROR;
2267   }
2268   Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2269   SQFloat arg0;
2270   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2271     sq_throwerror(vm, _SC("Argument 1 not a float"));
2272     return SQ_ERROR;
2273   }
2274   SQFloat arg1;
2275   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2276     sq_throwerror(vm, _SC("Argument 2 not a float"));
2277     return SQ_ERROR;
2278   }
2279
2280   try {
2281     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2282
2283     return 0;
2284
2285   } catch(std::exception& e) {
2286     sq_throwerror(vm, e.what());
2287     return SQ_ERROR;
2288   } catch(...) {
2289     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2290     return SQ_ERROR;
2291   }
2292
2293 }
2294
2295 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2296 {
2297   SQUserPointer data;
2298   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2299     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2300     return SQ_ERROR;
2301   }
2302   Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2303
2304   try {
2305     float return_value = _this->get_pos_x();
2306
2307     sq_pushfloat(vm, return_value);
2308     return 1;
2309
2310   } catch(std::exception& e) {
2311     sq_throwerror(vm, e.what());
2312     return SQ_ERROR;
2313   } catch(...) {
2314     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2315     return SQ_ERROR;
2316   }
2317
2318 }
2319
2320 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2321 {
2322   SQUserPointer data;
2323   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2324     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2325     return SQ_ERROR;
2326   }
2327   Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2328
2329   try {
2330     float return_value = _this->get_pos_y();
2331
2332     sq_pushfloat(vm, return_value);
2333     return 1;
2334
2335   } catch(std::exception& e) {
2336     sq_throwerror(vm, e.what());
2337     return SQ_ERROR;
2338   } catch(...) {
2339     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2340     return SQ_ERROR;
2341   }
2342
2343 }
2344
2345 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2346 {
2347   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2348   delete _this;
2349   return 0;
2350 }
2351
2352 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2353 {
2354   SQUserPointer data;
2355   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2356     sq_throwerror(vm, _SC("'start' called without instance"));
2357     return SQ_ERROR;
2358   }
2359   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2360
2361   try {
2362     _this->start();
2363
2364     return 0;
2365
2366   } catch(std::exception& e) {
2367     sq_throwerror(vm, e.what());
2368     return SQ_ERROR;
2369   } catch(...) {
2370     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2371     return SQ_ERROR;
2372   }
2373
2374 }
2375
2376 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2377 {
2378   SQUserPointer data;
2379   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2380     sq_throwerror(vm, _SC("'stop' called without instance"));
2381     return SQ_ERROR;
2382   }
2383   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2384
2385   try {
2386     _this->stop();
2387
2388     return 0;
2389
2390   } catch(std::exception& e) {
2391     sq_throwerror(vm, e.what());
2392     return SQ_ERROR;
2393   } catch(...) {
2394     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2395     return SQ_ERROR;
2396   }
2397
2398 }
2399
2400 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2401 {
2402   SQUserPointer data;
2403   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2404     sq_throwerror(vm, _SC("'thunder' called without instance"));
2405     return SQ_ERROR;
2406   }
2407   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2408
2409   try {
2410     _this->thunder();
2411
2412     return 0;
2413
2414   } catch(std::exception& e) {
2415     sq_throwerror(vm, e.what());
2416     return SQ_ERROR;
2417   } catch(...) {
2418     sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2419     return SQ_ERROR;
2420   }
2421
2422 }
2423
2424 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2425 {
2426   SQUserPointer data;
2427   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2428     sq_throwerror(vm, _SC("'lightning' called without instance"));
2429     return SQ_ERROR;
2430   }
2431   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2432
2433   try {
2434     _this->lightning();
2435
2436     return 0;
2437
2438   } catch(std::exception& e) {
2439     sq_throwerror(vm, e.what());
2440     return SQ_ERROR;
2441   } catch(...) {
2442     sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2443     return SQ_ERROR;
2444   }
2445
2446 }
2447
2448 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2449 {
2450   SQUserPointer data;
2451   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2452     sq_throwerror(vm, _SC("'flash' called without instance"));
2453     return SQ_ERROR;
2454   }
2455   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2456
2457   try {
2458     _this->flash();
2459
2460     return 0;
2461
2462   } catch(std::exception& e) {
2463     sq_throwerror(vm, e.what());
2464     return SQ_ERROR;
2465   } catch(...) {
2466     sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2467     return SQ_ERROR;
2468   }
2469
2470 }
2471
2472 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2473 {
2474   SQUserPointer data;
2475   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2476     sq_throwerror(vm, _SC("'electrify' called without instance"));
2477     return SQ_ERROR;
2478   }
2479   Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2480
2481   try {
2482     _this->electrify();
2483
2484     return 0;
2485
2486   } catch(std::exception& e) {
2487     sq_throwerror(vm, e.what());
2488     return SQ_ERROR;
2489   } catch(...) {
2490     sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2491     return SQ_ERROR;
2492   }
2493
2494 }
2495
2496 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2497 {
2498   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2499   delete _this;
2500   return 0;
2501 }
2502
2503 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2504 {
2505   SQUserPointer data;
2506   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2507     sq_throwerror(vm, _SC("'goto_node' called without instance"));
2508     return SQ_ERROR;
2509   }
2510   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2511   SQInteger arg0;
2512   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2513     sq_throwerror(vm, _SC("Argument 1 not an integer"));
2514     return SQ_ERROR;
2515   }
2516
2517   try {
2518     _this->goto_node(static_cast<int> (arg0));
2519
2520     return 0;
2521
2522   } catch(std::exception& e) {
2523     sq_throwerror(vm, e.what());
2524     return SQ_ERROR;
2525   } catch(...) {
2526     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2527     return SQ_ERROR;
2528   }
2529
2530 }
2531
2532 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2533 {
2534   SQUserPointer data;
2535   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2536     sq_throwerror(vm, _SC("'start_moving' called without instance"));
2537     return SQ_ERROR;
2538   }
2539   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2540
2541   try {
2542     _this->start_moving();
2543
2544     return 0;
2545
2546   } catch(std::exception& e) {
2547     sq_throwerror(vm, e.what());
2548     return SQ_ERROR;
2549   } catch(...) {
2550     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2551     return SQ_ERROR;
2552   }
2553
2554 }
2555
2556 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2557 {
2558   SQUserPointer data;
2559   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2560     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2561     return SQ_ERROR;
2562   }
2563   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2564
2565   try {
2566     _this->stop_moving();
2567
2568     return 0;
2569
2570   } catch(std::exception& e) {
2571     sq_throwerror(vm, e.what());
2572     return SQ_ERROR;
2573   } catch(...) {
2574     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2575     return SQ_ERROR;
2576   }
2577
2578 }
2579
2580 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2581 {
2582   SQUserPointer data;
2583   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2584     sq_throwerror(vm, _SC("'fade' called without instance"));
2585     return SQ_ERROR;
2586   }
2587   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2588   SQFloat arg0;
2589   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2590     sq_throwerror(vm, _SC("Argument 1 not a float"));
2591     return SQ_ERROR;
2592   }
2593   SQFloat arg1;
2594   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2595     sq_throwerror(vm, _SC("Argument 2 not a float"));
2596     return SQ_ERROR;
2597   }
2598
2599   try {
2600     _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2601
2602     return 0;
2603
2604   } catch(std::exception& e) {
2605     sq_throwerror(vm, e.what());
2606     return SQ_ERROR;
2607   } catch(...) {
2608     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2609     return SQ_ERROR;
2610   }
2611
2612 }
2613
2614 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2615 {
2616   SQUserPointer data;
2617   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2618     sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2619     return SQ_ERROR;
2620   }
2621   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2622   SQFloat arg0;
2623   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2624     sq_throwerror(vm, _SC("Argument 1 not a float"));
2625     return SQ_ERROR;
2626   }
2627
2628   try {
2629     _this->set_alpha(static_cast<float> (arg0));
2630
2631     return 0;
2632
2633   } catch(std::exception& e) {
2634     sq_throwerror(vm, e.what());
2635     return SQ_ERROR;
2636   } catch(...) {
2637     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2638     return SQ_ERROR;
2639   }
2640
2641 }
2642
2643 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2644 {
2645   SQUserPointer data;
2646   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2647     sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2648     return SQ_ERROR;
2649   }
2650   Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2651
2652   try {
2653     float return_value = _this->get_alpha();
2654
2655     sq_pushfloat(vm, return_value);
2656     return 1;
2657
2658   } catch(std::exception& e) {
2659     sq_throwerror(vm, e.what());
2660     return SQ_ERROR;
2661   } catch(...) {
2662     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2663     return SQ_ERROR;
2664   }
2665
2666 }
2667
2668 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2669 {
2670   Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2671   delete _this;
2672   return 0;
2673 }
2674
2675 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2676 {
2677   SQUserPointer data;
2678   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2679     sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2680     return SQ_ERROR;
2681   }
2682   Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2683   SQFloat arg0;
2684   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2685     sq_throwerror(vm, _SC("Argument 1 not a float"));
2686     return SQ_ERROR;
2687   }
2688   SQFloat arg1;
2689   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2690     sq_throwerror(vm, _SC("Argument 2 not a float"));
2691     return SQ_ERROR;
2692   }
2693   SQFloat arg2;
2694   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2695     sq_throwerror(vm, _SC("Argument 3 not a float"));
2696     return SQ_ERROR;
2697   }
2698
2699   try {
2700     _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2701
2702     return 0;
2703
2704   } catch(std::exception& e) {
2705     sq_throwerror(vm, e.what());
2706     return SQ_ERROR;
2707   } catch(...) {
2708     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2709     return SQ_ERROR;
2710   }
2711
2712 }
2713
2714 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2715 {
2716   SQUserPointer data;
2717   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2718     sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2719     return SQ_ERROR;
2720   }
2721   Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2722
2723   try {
2724     float return_value = _this->get_ambient_red();
2725
2726     sq_pushfloat(vm, return_value);
2727     return 1;
2728
2729   } catch(std::exception& e) {
2730     sq_throwerror(vm, e.what());
2731     return SQ_ERROR;
2732   } catch(...) {
2733     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2734     return SQ_ERROR;
2735   }
2736
2737 }
2738
2739 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2740 {
2741   SQUserPointer data;
2742   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2743     sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2744     return SQ_ERROR;
2745   }
2746   Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2747
2748   try {
2749     float return_value = _this->get_ambient_green();
2750
2751     sq_pushfloat(vm, return_value);
2752     return 1;
2753
2754   } catch(std::exception& e) {
2755     sq_throwerror(vm, e.what());
2756     return SQ_ERROR;
2757   } catch(...) {
2758     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2759     return SQ_ERROR;
2760   }
2761
2762 }
2763
2764 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2765 {
2766   SQUserPointer data;
2767   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2768     sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2769     return SQ_ERROR;
2770   }
2771   Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2772
2773   try {
2774     float return_value = _this->get_ambient_blue();
2775
2776     sq_pushfloat(vm, return_value);
2777     return 1;
2778
2779   } catch(std::exception& e) {
2780     sq_throwerror(vm, e.what());
2781     return SQ_ERROR;
2782   } catch(...) {
2783     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2784     return SQ_ERROR;
2785   }
2786
2787 }
2788
2789 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2790 {
2791   Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2792   delete _this;
2793   return 0;
2794 }
2795
2796 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2797 {
2798   SQUserPointer data;
2799   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2800     sq_throwerror(vm, _SC("'start' called without instance"));
2801     return SQ_ERROR;
2802   }
2803   Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2804
2805   try {
2806     _this->start();
2807
2808     return 0;
2809
2810   } catch(std::exception& e) {
2811     sq_throwerror(vm, e.what());
2812     return SQ_ERROR;
2813   } catch(...) {
2814     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2815     return SQ_ERROR;
2816   }
2817
2818 }
2819
2820 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2821 {
2822   SQUserPointer data;
2823   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2824     sq_throwerror(vm, _SC("'stop' called without instance"));
2825     return SQ_ERROR;
2826   }
2827   Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2828
2829   try {
2830     _this->stop();
2831
2832     return 0;
2833
2834   } catch(std::exception& e) {
2835     sq_throwerror(vm, e.what());
2836     return SQ_ERROR;
2837   } catch(...) {
2838     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2839     return SQ_ERROR;
2840   }
2841
2842 }
2843
2844 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2845 {
2846   SQUserPointer data;
2847   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2848     sq_throwerror(vm, _SC("'get_time' called without instance"));
2849     return SQ_ERROR;
2850   }
2851   Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2852
2853   try {
2854     float return_value = _this->get_time();
2855
2856     sq_pushfloat(vm, return_value);
2857     return 1;
2858
2859   } catch(std::exception& e) {
2860     sq_throwerror(vm, e.what());
2861     return SQ_ERROR;
2862   } catch(...) {
2863     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2864     return SQ_ERROR;
2865   }
2866
2867 }
2868
2869 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2870 {
2871   SQUserPointer data;
2872   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2873     sq_throwerror(vm, _SC("'set_time' called without instance"));
2874     return SQ_ERROR;
2875   }
2876   Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2877   SQFloat arg0;
2878   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2879     sq_throwerror(vm, _SC("Argument 1 not a float"));
2880     return SQ_ERROR;
2881   }
2882
2883   try {
2884     _this->set_time(static_cast<float> (arg0));
2885
2886     return 0;
2887
2888   } catch(std::exception& e) {
2889     sq_throwerror(vm, e.what());
2890     return SQ_ERROR;
2891   } catch(...) {
2892     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2893     return SQ_ERROR;
2894   }
2895
2896 }
2897
2898 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
2899 {
2900   Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (ptr);
2901   delete _this;
2902   return 0;
2903 }
2904
2905 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
2906 {
2907   SQUserPointer data;
2908   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2909     sq_throwerror(vm, _SC("'goto_node' called without instance"));
2910     return SQ_ERROR;
2911   }
2912   Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2913   SQInteger arg0;
2914   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2915     sq_throwerror(vm, _SC("Argument 1 not an integer"));
2916     return SQ_ERROR;
2917   }
2918
2919   try {
2920     _this->goto_node(static_cast<int> (arg0));
2921
2922     return 0;
2923
2924   } catch(std::exception& e) {
2925     sq_throwerror(vm, e.what());
2926     return SQ_ERROR;
2927   } catch(...) {
2928     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2929     return SQ_ERROR;
2930   }
2931
2932 }
2933
2934 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
2935 {
2936   SQUserPointer data;
2937   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2938     sq_throwerror(vm, _SC("'set_state' called without instance"));
2939     return SQ_ERROR;
2940   }
2941   Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2942   const SQChar* arg0;
2943   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2944     sq_throwerror(vm, _SC("Argument 1 not a string"));
2945     return SQ_ERROR;
2946   }
2947
2948   try {
2949     _this->set_state(arg0);
2950
2951     return 0;
2952
2953   } catch(std::exception& e) {
2954     sq_throwerror(vm, e.what());
2955     return SQ_ERROR;
2956   } catch(...) {
2957     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
2958     return SQ_ERROR;
2959   }
2960
2961 }
2962
2963 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
2964 {
2965   SQUserPointer data;
2966   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2967     sq_throwerror(vm, _SC("'start_moving' called without instance"));
2968     return SQ_ERROR;
2969   }
2970   Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2971
2972   try {
2973     _this->start_moving();
2974
2975     return 0;
2976
2977   } catch(std::exception& e) {
2978     sq_throwerror(vm, e.what());
2979     return SQ_ERROR;
2980   } catch(...) {
2981     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2982     return SQ_ERROR;
2983   }
2984
2985 }
2986
2987 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
2988 {
2989   SQUserPointer data;
2990   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2991     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2992     return SQ_ERROR;
2993   }
2994   Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2995
2996   try {
2997     _this->stop_moving();
2998
2999     return 0;
3000
3001   } catch(std::exception& e) {
3002     sq_throwerror(vm, e.what());
3003     return SQ_ERROR;
3004   } catch(...) {
3005     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
3006     return SQ_ERROR;
3007   }
3008
3009 }
3010
3011 static SQInteger display_wrapper(HSQUIRRELVM vm)
3012 {
3013   return Scripting::display(vm);
3014 }
3015
3016 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
3017 {
3018   HSQUIRRELVM arg0 = vm;
3019
3020   try {
3021     Scripting::print_stacktrace(arg0);
3022
3023     return 0;
3024
3025   } catch(std::exception& e) {
3026     sq_throwerror(vm, e.what());
3027     return SQ_ERROR;
3028   } catch(...) {
3029     sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
3030     return SQ_ERROR;
3031   }
3032
3033 }
3034
3035 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
3036 {
3037   return Scripting::get_current_thread(vm);
3038 }
3039
3040 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
3041 {
3042   const SQChar* arg0;
3043   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3044     sq_throwerror(vm, _SC("Argument 1 not a string"));
3045     return SQ_ERROR;
3046   }
3047
3048   try {
3049     Scripting::display_text_file(arg0);
3050
3051     return 0;
3052
3053   } catch(std::exception& e) {
3054     sq_throwerror(vm, e.what());
3055     return SQ_ERROR;
3056   } catch(...) {
3057     sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
3058     return SQ_ERROR;
3059   }
3060
3061 }
3062
3063 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
3064 {
3065   const SQChar* arg0;
3066   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3067     sq_throwerror(vm, _SC("Argument 1 not a string"));
3068     return SQ_ERROR;
3069   }
3070
3071   try {
3072     Scripting::load_worldmap(arg0);
3073
3074     return 0;
3075
3076   } catch(std::exception& e) {
3077     sq_throwerror(vm, e.what());
3078     return SQ_ERROR;
3079   } catch(...) {
3080     sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
3081     return SQ_ERROR;
3082   }
3083
3084 }
3085
3086 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
3087 {
3088   const SQChar* arg0;
3089   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3090     sq_throwerror(vm, _SC("Argument 1 not a string"));
3091     return SQ_ERROR;
3092   }
3093
3094   try {
3095     Scripting::load_level(arg0);
3096
3097     return 0;
3098
3099   } catch(std::exception& e) {
3100     sq_throwerror(vm, e.what());
3101     return SQ_ERROR;
3102   } catch(...) {
3103     sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
3104     return SQ_ERROR;
3105   }
3106
3107 }
3108
3109 static SQInteger wait_wrapper(HSQUIRRELVM vm)
3110 {
3111   HSQUIRRELVM arg0 = vm;
3112   SQFloat arg1;
3113   if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
3114     sq_throwerror(vm, _SC("Argument 1 not a float"));
3115     return SQ_ERROR;
3116   }
3117
3118   try {
3119     Scripting::wait(arg0, static_cast<float> (arg1));
3120
3121     return sq_suspendvm(vm);
3122
3123   } catch(std::exception& e) {
3124     sq_throwerror(vm, e.what());
3125     return SQ_ERROR;
3126   } catch(...) {
3127     sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
3128     return SQ_ERROR;
3129   }
3130
3131 }
3132
3133 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
3134 {
3135   HSQUIRRELVM arg0 = vm;
3136
3137   try {
3138     Scripting::wait_for_screenswitch(arg0);
3139
3140     return sq_suspendvm(vm);
3141
3142   } catch(std::exception& e) {
3143     sq_throwerror(vm, e.what());
3144     return SQ_ERROR;
3145   } catch(...) {
3146     sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
3147     return SQ_ERROR;
3148   }
3149
3150 }
3151
3152 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
3153 {
3154   (void) vm;
3155
3156   try {
3157     Scripting::exit_screen();
3158
3159     return 0;
3160
3161   } catch(std::exception& e) {
3162     sq_throwerror(vm, e.what());
3163     return SQ_ERROR;
3164   } catch(...) {
3165     sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
3166     return SQ_ERROR;
3167   }
3168
3169 }
3170
3171 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
3172 {
3173   SQFloat arg0;
3174   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3175     sq_throwerror(vm, _SC("Argument 1 not a float"));
3176     return SQ_ERROR;
3177   }
3178
3179   try {
3180     Scripting::fadeout_screen(static_cast<float> (arg0));
3181
3182     return 0;
3183
3184   } catch(std::exception& e) {
3185     sq_throwerror(vm, e.what());
3186     return SQ_ERROR;
3187   } catch(...) {
3188     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
3189     return SQ_ERROR;
3190   }
3191
3192 }
3193
3194 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
3195 {
3196   SQFloat arg0;
3197   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3198     sq_throwerror(vm, _SC("Argument 1 not a float"));
3199     return SQ_ERROR;
3200   }
3201   SQFloat arg1;
3202   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3203     sq_throwerror(vm, _SC("Argument 2 not a float"));
3204     return SQ_ERROR;
3205   }
3206   SQFloat arg2;
3207   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3208     sq_throwerror(vm, _SC("Argument 3 not a float"));
3209     return SQ_ERROR;
3210   }
3211
3212   try {
3213     Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3214
3215     return 0;
3216
3217   } catch(std::exception& e) {
3218     sq_throwerror(vm, e.what());
3219     return SQ_ERROR;
3220   } catch(...) {
3221     sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
3222     return SQ_ERROR;
3223   }
3224
3225 }
3226
3227 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
3228 {
3229   (void) vm;
3230
3231   try {
3232     Scripting::abort_screenfade();
3233
3234     return 0;
3235
3236   } catch(std::exception& e) {
3237     sq_throwerror(vm, e.what());
3238     return SQ_ERROR;
3239   } catch(...) {
3240     sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
3241     return SQ_ERROR;
3242   }
3243
3244 }
3245
3246 static SQInteger translate_wrapper(HSQUIRRELVM vm)
3247 {
3248   const SQChar* arg0;
3249   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3250     sq_throwerror(vm, _SC("Argument 1 not a string"));
3251     return SQ_ERROR;
3252   }
3253
3254   try {
3255     std::string return_value = Scripting::translate(arg0);
3256
3257     sq_pushstring(vm, return_value.c_str(), return_value.size());
3258     return 1;
3259
3260   } catch(std::exception& e) {
3261     sq_throwerror(vm, e.what());
3262     return SQ_ERROR;
3263   } catch(...) {
3264     sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3265     return SQ_ERROR;
3266   }
3267
3268 }
3269
3270 static SQInteger import_wrapper(HSQUIRRELVM vm)
3271 {
3272   HSQUIRRELVM arg0 = vm;
3273   const SQChar* arg1;
3274   if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3275     sq_throwerror(vm, _SC("Argument 1 not a string"));
3276     return SQ_ERROR;
3277   }
3278
3279   try {
3280     Scripting::import(arg0, arg1);
3281
3282     return 0;
3283
3284   } catch(std::exception& e) {
3285     sq_throwerror(vm, e.what());
3286     return SQ_ERROR;
3287   } catch(...) {
3288     sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3289     return SQ_ERROR;
3290   }
3291
3292 }
3293
3294 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3295 {
3296   (void) vm;
3297
3298   try {
3299     Scripting::save_state();
3300
3301     return 0;
3302
3303   } catch(std::exception& e) {
3304     sq_throwerror(vm, e.what());
3305     return SQ_ERROR;
3306   } catch(...) {
3307     sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3308     return SQ_ERROR;
3309   }
3310
3311 }
3312
3313 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3314 {
3315   (void) vm;
3316
3317   try {
3318     Scripting::update_worldmap();
3319
3320     return 0;
3321
3322   } catch(std::exception& e) {
3323     sq_throwerror(vm, e.what());
3324     return SQ_ERROR;
3325   } catch(...) {
3326     sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3327     return SQ_ERROR;
3328   }
3329
3330 }
3331
3332 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3333 {
3334   SQBool arg0;
3335   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3336     sq_throwerror(vm, _SC("Argument 1 not a bool"));
3337     return SQ_ERROR;
3338   }
3339
3340   try {
3341     Scripting::debug_collrects(arg0 == SQTrue);
3342
3343     return 0;
3344
3345   } catch(std::exception& e) {
3346     sq_throwerror(vm, e.what());
3347     return SQ_ERROR;
3348   } catch(...) {
3349     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3350     return SQ_ERROR;
3351   }
3352
3353 }
3354
3355 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3356 {
3357   SQBool arg0;
3358   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3359     sq_throwerror(vm, _SC("Argument 1 not a bool"));
3360     return SQ_ERROR;
3361   }
3362
3363   try {
3364     Scripting::debug_show_fps(arg0 == SQTrue);
3365
3366     return 0;
3367
3368   } catch(std::exception& e) {
3369     sq_throwerror(vm, e.what());
3370     return SQ_ERROR;
3371   } catch(...) {
3372     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3373     return SQ_ERROR;
3374   }
3375
3376 }
3377
3378 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3379 {
3380   SQBool arg0;
3381   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3382     sq_throwerror(vm, _SC("Argument 1 not a bool"));
3383     return SQ_ERROR;
3384   }
3385
3386   try {
3387     Scripting::debug_draw_solids_only(arg0 == SQTrue);
3388
3389     return 0;
3390
3391   } catch(std::exception& e) {
3392     sq_throwerror(vm, e.what());
3393     return SQ_ERROR;
3394   } catch(...) {
3395     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3396     return SQ_ERROR;
3397   }
3398
3399 }
3400
3401 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3402 {
3403   const SQChar* arg0;
3404   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3405     sq_throwerror(vm, _SC("Argument 1 not a string"));
3406     return SQ_ERROR;
3407   }
3408
3409   try {
3410     Scripting::play_music(arg0);
3411
3412     return 0;
3413
3414   } catch(std::exception& e) {
3415     sq_throwerror(vm, e.what());
3416     return SQ_ERROR;
3417   } catch(...) {
3418     sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3419     return SQ_ERROR;
3420   }
3421
3422 }
3423
3424 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3425 {
3426   const SQChar* arg0;
3427   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3428     sq_throwerror(vm, _SC("Argument 1 not a string"));
3429     return SQ_ERROR;
3430   }
3431
3432   try {
3433     Scripting::play_sound(arg0);
3434
3435     return 0;
3436
3437   } catch(std::exception& e) {
3438     sq_throwerror(vm, e.what());
3439     return SQ_ERROR;
3440   } catch(...) {
3441     sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3442     return SQ_ERROR;
3443   }
3444
3445 }
3446
3447 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3448 {
3449   (void) vm;
3450
3451   try {
3452     Scripting::grease();
3453
3454     return 0;
3455
3456   } catch(std::exception& e) {
3457     sq_throwerror(vm, e.what());
3458     return SQ_ERROR;
3459   } catch(...) {
3460     sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3461     return SQ_ERROR;
3462   }
3463
3464 }
3465
3466 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3467 {
3468   (void) vm;
3469
3470   try {
3471     Scripting::invincible();
3472
3473     return 0;
3474
3475   } catch(std::exception& e) {
3476     sq_throwerror(vm, e.what());
3477     return SQ_ERROR;
3478   } catch(...) {
3479     sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3480     return SQ_ERROR;
3481   }
3482
3483 }
3484
3485 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3486 {
3487   (void) vm;
3488
3489   try {
3490     Scripting::ghost();
3491
3492     return 0;
3493
3494   } catch(std::exception& e) {
3495     sq_throwerror(vm, e.what());
3496     return SQ_ERROR;
3497   } catch(...) {
3498     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3499     return SQ_ERROR;
3500   }
3501
3502 }
3503
3504 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3505 {
3506   (void) vm;
3507
3508   try {
3509     Scripting::mortal();
3510
3511     return 0;
3512
3513   } catch(std::exception& e) {
3514     sq_throwerror(vm, e.what());
3515     return SQ_ERROR;
3516   } catch(...) {
3517     sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3518     return SQ_ERROR;
3519   }
3520
3521 }
3522
3523 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3524 {
3525   (void) vm;
3526
3527   try {
3528     Scripting::restart();
3529
3530     return 0;
3531
3532   } catch(std::exception& e) {
3533     sq_throwerror(vm, e.what());
3534     return SQ_ERROR;
3535   } catch(...) {
3536     sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3537     return SQ_ERROR;
3538   }
3539
3540 }
3541
3542 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3543 {
3544   (void) vm;
3545
3546   try {
3547     Scripting::whereami();
3548
3549     return 0;
3550
3551   } catch(std::exception& e) {
3552     sq_throwerror(vm, e.what());
3553     return SQ_ERROR;
3554   } catch(...) {
3555     sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3556     return SQ_ERROR;
3557   }
3558
3559 }
3560
3561 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3562 {
3563   (void) vm;
3564
3565   try {
3566     Scripting::gotoend();
3567
3568     return 0;
3569
3570   } catch(std::exception& e) {
3571     sq_throwerror(vm, e.what());
3572     return SQ_ERROR;
3573   } catch(...) {
3574     sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3575     return SQ_ERROR;
3576   }
3577
3578 }
3579
3580 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3581 {
3582   (void) vm;
3583
3584   try {
3585     Scripting::camera();
3586
3587     return 0;
3588
3589   } catch(std::exception& e) {
3590     sq_throwerror(vm, e.what());
3591     return SQ_ERROR;
3592   } catch(...) {
3593     sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3594     return SQ_ERROR;
3595   }
3596
3597 }
3598
3599 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3600 {
3601   (void) vm;
3602
3603   try {
3604     Scripting::quit();
3605
3606     return 0;
3607
3608   } catch(std::exception& e) {
3609     sq_throwerror(vm, e.what());
3610     return SQ_ERROR;
3611   } catch(...) {
3612     sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3613     return SQ_ERROR;
3614   }
3615
3616 }
3617
3618 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3619 {
3620
3621   try {
3622     int return_value = Scripting::rand();
3623
3624     sq_pushinteger(vm, return_value);
3625     return 1;
3626
3627   } catch(std::exception& e) {
3628     sq_throwerror(vm, e.what());
3629     return SQ_ERROR;
3630   } catch(...) {
3631     sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3632     return SQ_ERROR;
3633   }
3634
3635 }
3636
3637 } // end of namespace Wrapper
3638 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3639 {
3640   using namespace Wrapper;
3641
3642   sq_pushroottable(v);
3643   sq_pushstring(v, "DisplayEffect", -1);
3644   if(SQ_FAILED(sq_get(v, -2))) {
3645     std::ostringstream msg;
3646     msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3647     throw SquirrelError(v, msg.str());
3648   }
3649
3650   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3651     std::ostringstream msg;
3652     msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3653     throw SquirrelError(v, msg.str());
3654   }
3655   sq_remove(v, -2); // remove object name
3656
3657   if(setup_releasehook) {
3658     sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3659   }
3660
3661   sq_remove(v, -2); // remove root table
3662 }
3663
3664 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3665 {
3666   using namespace Wrapper;
3667
3668   sq_pushroottable(v);
3669   sq_pushstring(v, "Camera", -1);
3670   if(SQ_FAILED(sq_get(v, -2))) {
3671     std::ostringstream msg;
3672     msg << "Couldn't resolved squirrel type 'Camera'";
3673     throw SquirrelError(v, msg.str());
3674   }
3675
3676   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3677     std::ostringstream msg;
3678     msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3679     throw SquirrelError(v, msg.str());
3680   }
3681   sq_remove(v, -2); // remove object name
3682
3683   if(setup_releasehook) {
3684     sq_setreleasehook(v, -1, Camera_release_hook);
3685   }
3686
3687   sq_remove(v, -2); // remove root table
3688 }
3689
3690 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3691 {
3692   using namespace Wrapper;
3693
3694   sq_pushroottable(v);
3695   sq_pushstring(v, "Level", -1);
3696   if(SQ_FAILED(sq_get(v, -2))) {
3697     std::ostringstream msg;
3698     msg << "Couldn't resolved squirrel type 'Level'";
3699     throw SquirrelError(v, msg.str());
3700   }
3701
3702   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3703     std::ostringstream msg;
3704     msg << "Couldn't setup squirrel instance for object of type 'Level'";
3705     throw SquirrelError(v, msg.str());
3706   }
3707   sq_remove(v, -2); // remove object name
3708
3709   if(setup_releasehook) {
3710     sq_setreleasehook(v, -1, Level_release_hook);
3711   }
3712
3713   sq_remove(v, -2); // remove root table
3714 }
3715
3716 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3717 {
3718   using namespace Wrapper;
3719
3720   sq_pushroottable(v);
3721   sq_pushstring(v, "ScriptedObject", -1);
3722   if(SQ_FAILED(sq_get(v, -2))) {
3723     std::ostringstream msg;
3724     msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3725     throw SquirrelError(v, msg.str());
3726   }
3727
3728   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3729     std::ostringstream msg;
3730     msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3731     throw SquirrelError(v, msg.str());
3732   }
3733   sq_remove(v, -2); // remove object name
3734
3735   if(setup_releasehook) {
3736     sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3737   }
3738
3739   sq_remove(v, -2); // remove root table
3740 }
3741
3742 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3743 {
3744   using namespace Wrapper;
3745
3746   sq_pushroottable(v);
3747   sq_pushstring(v, "Text", -1);
3748   if(SQ_FAILED(sq_get(v, -2))) {
3749     std::ostringstream msg;
3750     msg << "Couldn't resolved squirrel type 'Text'";
3751     throw SquirrelError(v, msg.str());
3752   }
3753
3754   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3755     std::ostringstream msg;
3756     msg << "Couldn't setup squirrel instance for object of type 'Text'";
3757     throw SquirrelError(v, msg.str());
3758   }
3759   sq_remove(v, -2); // remove object name
3760
3761   if(setup_releasehook) {
3762     sq_setreleasehook(v, -1, Text_release_hook);
3763   }
3764
3765   sq_remove(v, -2); // remove root table
3766 }
3767
3768 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3769 {
3770   using namespace Wrapper;
3771
3772   sq_pushroottable(v);
3773   sq_pushstring(v, "Player", -1);
3774   if(SQ_FAILED(sq_get(v, -2))) {
3775     std::ostringstream msg;
3776     msg << "Couldn't resolved squirrel type 'Player'";
3777     throw SquirrelError(v, msg.str());
3778   }
3779
3780   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3781     std::ostringstream msg;
3782     msg << "Couldn't setup squirrel instance for object of type 'Player'";
3783     throw SquirrelError(v, msg.str());
3784   }
3785   sq_remove(v, -2); // remove object name
3786
3787   if(setup_releasehook) {
3788     sq_setreleasehook(v, -1, Player_release_hook);
3789   }
3790
3791   sq_remove(v, -2); // remove root table
3792 }
3793
3794 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3795 {
3796   using namespace Wrapper;
3797
3798   sq_pushroottable(v);
3799   sq_pushstring(v, "FloatingImage", -1);
3800   if(SQ_FAILED(sq_get(v, -2))) {
3801     std::ostringstream msg;
3802     msg << "Couldn't resolved squirrel type 'FloatingImage'";
3803     throw SquirrelError(v, msg.str());
3804   }
3805
3806   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3807     std::ostringstream msg;
3808     msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3809     throw SquirrelError(v, msg.str());
3810   }
3811   sq_remove(v, -2); // remove object name
3812
3813   if(setup_releasehook) {
3814     sq_setreleasehook(v, -1, FloatingImage_release_hook);
3815   }
3816
3817   sq_remove(v, -2); // remove root table
3818 }
3819
3820 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3821 {
3822   using namespace Wrapper;
3823
3824   sq_pushroottable(v);
3825   sq_pushstring(v, "Platform", -1);
3826   if(SQ_FAILED(sq_get(v, -2))) {
3827     std::ostringstream msg;
3828     msg << "Couldn't resolved squirrel type 'Platform'";
3829     throw SquirrelError(v, msg.str());
3830   }
3831
3832   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3833     std::ostringstream msg;
3834     msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3835     throw SquirrelError(v, msg.str());
3836   }
3837   sq_remove(v, -2); // remove object name
3838
3839   if(setup_releasehook) {
3840     sq_setreleasehook(v, -1, Platform_release_hook);
3841   }
3842
3843   sq_remove(v, -2); // remove root table
3844 }
3845
3846 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3847 {
3848   using namespace Wrapper;
3849
3850   sq_pushroottable(v);
3851   sq_pushstring(v, "Candle", -1);
3852   if(SQ_FAILED(sq_get(v, -2))) {
3853     std::ostringstream msg;
3854     msg << "Couldn't resolved squirrel type 'Candle'";
3855     throw SquirrelError(v, msg.str());
3856   }
3857
3858   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3859     std::ostringstream msg;
3860     msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3861     throw SquirrelError(v, msg.str());
3862   }
3863   sq_remove(v, -2); // remove object name
3864
3865   if(setup_releasehook) {
3866     sq_setreleasehook(v, -1, Candle_release_hook);
3867   }
3868
3869   sq_remove(v, -2); // remove root table
3870 }
3871
3872 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3873 {
3874   using namespace Wrapper;
3875
3876   sq_pushroottable(v);
3877   sq_pushstring(v, "Wind", -1);
3878   if(SQ_FAILED(sq_get(v, -2))) {
3879     std::ostringstream msg;
3880     msg << "Couldn't resolved squirrel type 'Wind'";
3881     throw SquirrelError(v, msg.str());
3882   }
3883
3884   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3885     std::ostringstream msg;
3886     msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3887     throw SquirrelError(v, msg.str());
3888   }
3889   sq_remove(v, -2); // remove object name
3890
3891   if(setup_releasehook) {
3892     sq_setreleasehook(v, -1, Wind_release_hook);
3893   }
3894
3895   sq_remove(v, -2); // remove root table
3896 }
3897
3898 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3899 {
3900   using namespace Wrapper;
3901
3902   sq_pushroottable(v);
3903   sq_pushstring(v, "AmbientSound", -1);
3904   if(SQ_FAILED(sq_get(v, -2))) {
3905     std::ostringstream msg;
3906     msg << "Couldn't resolved squirrel type 'AmbientSound'";
3907     throw SquirrelError(v, msg.str());
3908   }
3909
3910   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3911     std::ostringstream msg;
3912     msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3913     throw SquirrelError(v, msg.str());
3914   }
3915   sq_remove(v, -2); // remove object name
3916
3917   if(setup_releasehook) {
3918     sq_setreleasehook(v, -1, AmbientSound_release_hook);
3919   }
3920
3921   sq_remove(v, -2); // remove root table
3922 }
3923
3924 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3925 {
3926   using namespace Wrapper;
3927
3928   sq_pushroottable(v);
3929   sq_pushstring(v, "Thunderstorm", -1);
3930   if(SQ_FAILED(sq_get(v, -2))) {
3931     std::ostringstream msg;
3932     msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3933     throw SquirrelError(v, msg.str());
3934   }
3935
3936   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3937     std::ostringstream msg;
3938     msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3939     throw SquirrelError(v, msg.str());
3940   }
3941   sq_remove(v, -2); // remove object name
3942
3943   if(setup_releasehook) {
3944     sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3945   }
3946
3947   sq_remove(v, -2); // remove root table
3948 }
3949
3950 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3951 {
3952   using namespace Wrapper;
3953
3954   sq_pushroottable(v);
3955   sq_pushstring(v, "TileMap", -1);
3956   if(SQ_FAILED(sq_get(v, -2))) {
3957     std::ostringstream msg;
3958     msg << "Couldn't resolved squirrel type 'TileMap'";
3959     throw SquirrelError(v, msg.str());
3960   }
3961
3962   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3963     std::ostringstream msg;
3964     msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3965     throw SquirrelError(v, msg.str());
3966   }
3967   sq_remove(v, -2); // remove object name
3968
3969   if(setup_releasehook) {
3970     sq_setreleasehook(v, -1, TileMap_release_hook);
3971   }
3972
3973   sq_remove(v, -2); // remove root table
3974 }
3975
3976 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3977 {
3978   using namespace Wrapper;
3979
3980   sq_pushroottable(v);
3981   sq_pushstring(v, "SSector", -1);
3982   if(SQ_FAILED(sq_get(v, -2))) {
3983     std::ostringstream msg;
3984     msg << "Couldn't resolved squirrel type 'SSector'";
3985     throw SquirrelError(v, msg.str());
3986   }
3987
3988   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3989     std::ostringstream msg;
3990     msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3991     throw SquirrelError(v, msg.str());
3992   }
3993   sq_remove(v, -2); // remove object name
3994
3995   if(setup_releasehook) {
3996     sq_setreleasehook(v, -1, SSector_release_hook);
3997   }
3998
3999   sq_remove(v, -2); // remove root table
4000 }
4001
4002 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
4003 {
4004   using namespace Wrapper;
4005
4006   sq_pushroottable(v);
4007   sq_pushstring(v, "LevelTime", -1);
4008   if(SQ_FAILED(sq_get(v, -2))) {
4009     std::ostringstream msg;
4010     msg << "Couldn't resolved squirrel type 'LevelTime'";
4011     throw SquirrelError(v, msg.str());
4012   }
4013
4014   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4015     std::ostringstream msg;
4016     msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
4017     throw SquirrelError(v, msg.str());
4018   }
4019   sq_remove(v, -2); // remove object name
4020
4021   if(setup_releasehook) {
4022     sq_setreleasehook(v, -1, LevelTime_release_hook);
4023   }
4024
4025   sq_remove(v, -2); // remove root table
4026 }
4027
4028 void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook)
4029 {
4030   using namespace Wrapper;
4031
4032   sq_pushroottable(v);
4033   sq_pushstring(v, "WillOWisp", -1);
4034   if(SQ_FAILED(sq_get(v, -2))) {
4035     std::ostringstream msg;
4036     msg << "Couldn't resolved squirrel type 'WillOWisp'";
4037     throw SquirrelError(v, msg.str());
4038   }
4039
4040   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4041     std::ostringstream msg;
4042     msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
4043     throw SquirrelError(v, msg.str());
4044   }
4045   sq_remove(v, -2); // remove object name
4046
4047   if(setup_releasehook) {
4048     sq_setreleasehook(v, -1, WillOWisp_release_hook);
4049   }
4050
4051   sq_remove(v, -2); // remove root table
4052 }
4053
4054 void register_supertux_wrapper(HSQUIRRELVM v)
4055 {
4056   using namespace Wrapper;
4057
4058   sq_pushstring(v, "ANCHOR_TOP", -1);
4059   sq_pushinteger(v, 16);
4060   if(SQ_FAILED(sq_createslot(v, -3))) {
4061     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
4062   }
4063
4064   sq_pushstring(v, "ANCHOR_BOTTOM", -1);
4065   sq_pushinteger(v, 32);
4066   if(SQ_FAILED(sq_createslot(v, -3))) {
4067     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
4068   }
4069
4070   sq_pushstring(v, "ANCHOR_LEFT", -1);
4071   sq_pushinteger(v, 1);
4072   if(SQ_FAILED(sq_createslot(v, -3))) {
4073     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
4074   }
4075
4076   sq_pushstring(v, "ANCHOR_RIGHT", -1);
4077   sq_pushinteger(v, 2);
4078   if(SQ_FAILED(sq_createslot(v, -3))) {
4079     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
4080   }
4081
4082   sq_pushstring(v, "ANCHOR_MIDDLE", -1);
4083   sq_pushinteger(v, 0);
4084   if(SQ_FAILED(sq_createslot(v, -3))) {
4085     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
4086   }
4087
4088   sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
4089   sq_pushinteger(v, 17);
4090   if(SQ_FAILED(sq_createslot(v, -3))) {
4091     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
4092   }
4093
4094   sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
4095   sq_pushinteger(v, 18);
4096   if(SQ_FAILED(sq_createslot(v, -3))) {
4097     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
4098   }
4099
4100   sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
4101   sq_pushinteger(v, 33);
4102   if(SQ_FAILED(sq_createslot(v, -3))) {
4103     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
4104   }
4105
4106   sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
4107   sq_pushinteger(v, 34);
4108   if(SQ_FAILED(sq_createslot(v, -3))) {
4109     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
4110   }
4111
4112   sq_pushstring(v, "display", -1);
4113   sq_newclosure(v, &display_wrapper, 0);
4114   if(SQ_FAILED(sq_createslot(v, -3))) {
4115     throw SquirrelError(v, "Couldn't register function 'display'");
4116   }
4117
4118   sq_pushstring(v, "print_stacktrace", -1);
4119   sq_newclosure(v, &print_stacktrace_wrapper, 0);
4120   if(SQ_FAILED(sq_createslot(v, -3))) {
4121     throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
4122   }
4123
4124   sq_pushstring(v, "get_current_thread", -1);
4125   sq_newclosure(v, &get_current_thread_wrapper, 0);
4126   if(SQ_FAILED(sq_createslot(v, -3))) {
4127     throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
4128   }
4129
4130   sq_pushstring(v, "display_text_file", -1);
4131   sq_newclosure(v, &display_text_file_wrapper, 0);
4132   if(SQ_FAILED(sq_createslot(v, -3))) {
4133     throw SquirrelError(v, "Couldn't register function 'display_text_file'");
4134   }
4135
4136   sq_pushstring(v, "load_worldmap", -1);
4137   sq_newclosure(v, &load_worldmap_wrapper, 0);
4138   if(SQ_FAILED(sq_createslot(v, -3))) {
4139     throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
4140   }
4141
4142   sq_pushstring(v, "load_level", -1);
4143   sq_newclosure(v, &load_level_wrapper, 0);
4144   if(SQ_FAILED(sq_createslot(v, -3))) {
4145     throw SquirrelError(v, "Couldn't register function 'load_level'");
4146   }
4147
4148   sq_pushstring(v, "wait", -1);
4149   sq_newclosure(v, &wait_wrapper, 0);
4150   if(SQ_FAILED(sq_createslot(v, -3))) {
4151     throw SquirrelError(v, "Couldn't register function 'wait'");
4152   }
4153
4154   sq_pushstring(v, "wait_for_screenswitch", -1);
4155   sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
4156   if(SQ_FAILED(sq_createslot(v, -3))) {
4157     throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
4158   }
4159
4160   sq_pushstring(v, "exit_screen", -1);
4161   sq_newclosure(v, &exit_screen_wrapper, 0);
4162   if(SQ_FAILED(sq_createslot(v, -3))) {
4163     throw SquirrelError(v, "Couldn't register function 'exit_screen'");
4164   }
4165
4166   sq_pushstring(v, "fadeout_screen", -1);
4167   sq_newclosure(v, &fadeout_screen_wrapper, 0);
4168   if(SQ_FAILED(sq_createslot(v, -3))) {
4169     throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
4170   }
4171
4172   sq_pushstring(v, "shrink_screen", -1);
4173   sq_newclosure(v, &shrink_screen_wrapper, 0);
4174   if(SQ_FAILED(sq_createslot(v, -3))) {
4175     throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
4176   }
4177
4178   sq_pushstring(v, "abort_screenfade", -1);
4179   sq_newclosure(v, &abort_screenfade_wrapper, 0);
4180   if(SQ_FAILED(sq_createslot(v, -3))) {
4181     throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
4182   }
4183
4184   sq_pushstring(v, "translate", -1);
4185   sq_newclosure(v, &translate_wrapper, 0);
4186   if(SQ_FAILED(sq_createslot(v, -3))) {
4187     throw SquirrelError(v, "Couldn't register function 'translate'");
4188   }
4189
4190   sq_pushstring(v, "import", -1);
4191   sq_newclosure(v, &import_wrapper, 0);
4192   if(SQ_FAILED(sq_createslot(v, -3))) {
4193     throw SquirrelError(v, "Couldn't register function 'import'");
4194   }
4195
4196   sq_pushstring(v, "save_state", -1);
4197   sq_newclosure(v, &save_state_wrapper, 0);
4198   if(SQ_FAILED(sq_createslot(v, -3))) {
4199     throw SquirrelError(v, "Couldn't register function 'save_state'");
4200   }
4201
4202   sq_pushstring(v, "update_worldmap", -1);
4203   sq_newclosure(v, &update_worldmap_wrapper, 0);
4204   if(SQ_FAILED(sq_createslot(v, -3))) {
4205     throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
4206   }
4207
4208   sq_pushstring(v, "debug_collrects", -1);
4209   sq_newclosure(v, &debug_collrects_wrapper, 0);
4210   if(SQ_FAILED(sq_createslot(v, -3))) {
4211     throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
4212   }
4213
4214   sq_pushstring(v, "debug_show_fps", -1);
4215   sq_newclosure(v, &debug_show_fps_wrapper, 0);
4216   if(SQ_FAILED(sq_createslot(v, -3))) {
4217     throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
4218   }
4219
4220   sq_pushstring(v, "debug_draw_solids_only", -1);
4221   sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
4222   if(SQ_FAILED(sq_createslot(v, -3))) {
4223     throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
4224   }
4225
4226   sq_pushstring(v, "play_music", -1);
4227   sq_newclosure(v, &play_music_wrapper, 0);
4228   if(SQ_FAILED(sq_createslot(v, -3))) {
4229     throw SquirrelError(v, "Couldn't register function 'play_music'");
4230   }
4231
4232   sq_pushstring(v, "play_sound", -1);
4233   sq_newclosure(v, &play_sound_wrapper, 0);
4234   if(SQ_FAILED(sq_createslot(v, -3))) {
4235     throw SquirrelError(v, "Couldn't register function 'play_sound'");
4236   }
4237
4238   sq_pushstring(v, "grease", -1);
4239   sq_newclosure(v, &grease_wrapper, 0);
4240   if(SQ_FAILED(sq_createslot(v, -3))) {
4241     throw SquirrelError(v, "Couldn't register function 'grease'");
4242   }
4243
4244   sq_pushstring(v, "invincible", -1);
4245   sq_newclosure(v, &invincible_wrapper, 0);
4246   if(SQ_FAILED(sq_createslot(v, -3))) {
4247     throw SquirrelError(v, "Couldn't register function 'invincible'");
4248   }
4249
4250   sq_pushstring(v, "ghost", -1);
4251   sq_newclosure(v, &ghost_wrapper, 0);
4252   if(SQ_FAILED(sq_createslot(v, -3))) {
4253     throw SquirrelError(v, "Couldn't register function 'ghost'");
4254   }
4255
4256   sq_pushstring(v, "mortal", -1);
4257   sq_newclosure(v, &mortal_wrapper, 0);
4258   if(SQ_FAILED(sq_createslot(v, -3))) {
4259     throw SquirrelError(v, "Couldn't register function 'mortal'");
4260   }
4261
4262   sq_pushstring(v, "restart", -1);
4263   sq_newclosure(v, &restart_wrapper, 0);
4264   if(SQ_FAILED(sq_createslot(v, -3))) {
4265     throw SquirrelError(v, "Couldn't register function 'restart'");
4266   }
4267
4268   sq_pushstring(v, "whereami", -1);
4269   sq_newclosure(v, &whereami_wrapper, 0);
4270   if(SQ_FAILED(sq_createslot(v, -3))) {
4271     throw SquirrelError(v, "Couldn't register function 'whereami'");
4272   }
4273
4274   sq_pushstring(v, "gotoend", -1);
4275   sq_newclosure(v, &gotoend_wrapper, 0);
4276   if(SQ_FAILED(sq_createslot(v, -3))) {
4277     throw SquirrelError(v, "Couldn't register function 'gotoend'");
4278   }
4279
4280   sq_pushstring(v, "camera", -1);
4281   sq_newclosure(v, &camera_wrapper, 0);
4282   if(SQ_FAILED(sq_createslot(v, -3))) {
4283     throw SquirrelError(v, "Couldn't register function 'camera'");
4284   }
4285
4286   sq_pushstring(v, "quit", -1);
4287   sq_newclosure(v, &quit_wrapper, 0);
4288   if(SQ_FAILED(sq_createslot(v, -3))) {
4289     throw SquirrelError(v, "Couldn't register function 'quit'");
4290   }
4291
4292   sq_pushstring(v, "rand", -1);
4293   sq_newclosure(v, &rand_wrapper, 0);
4294   if(SQ_FAILED(sq_createslot(v, -3))) {
4295     throw SquirrelError(v, "Couldn't register function 'rand'");
4296   }
4297
4298   // Register class DisplayEffect
4299   sq_pushstring(v, "DisplayEffect", -1);
4300   if(sq_newclass(v, SQFalse) < 0) {
4301     std::ostringstream msg;
4302     msg << "Couldn't create new class 'DisplayEffect'";
4303     throw SquirrelError(v, msg.str());
4304   }
4305   sq_pushstring(v, "fade_out", -1);
4306   sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4307   if(SQ_FAILED(sq_createslot(v, -3))) {
4308     throw SquirrelError(v, "Couldn't register function 'fade_out'");
4309   }
4310
4311   sq_pushstring(v, "fade_in", -1);
4312   sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4313   if(SQ_FAILED(sq_createslot(v, -3))) {
4314     throw SquirrelError(v, "Couldn't register function 'fade_in'");
4315   }
4316
4317   sq_pushstring(v, "set_black", -1);
4318   sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4319   if(SQ_FAILED(sq_createslot(v, -3))) {
4320     throw SquirrelError(v, "Couldn't register function 'set_black'");
4321   }
4322
4323   sq_pushstring(v, "is_black", -1);
4324   sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4325   if(SQ_FAILED(sq_createslot(v, -3))) {
4326     throw SquirrelError(v, "Couldn't register function 'is_black'");
4327   }
4328
4329   sq_pushstring(v, "sixteen_to_nine", -1);
4330   sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4331   if(SQ_FAILED(sq_createslot(v, -3))) {
4332     throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4333   }
4334
4335   sq_pushstring(v, "four_to_three", -1);
4336   sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4337   if(SQ_FAILED(sq_createslot(v, -3))) {
4338     throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4339   }
4340
4341   if(SQ_FAILED(sq_createslot(v, -3))) {
4342     throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4343   }
4344
4345   // Register class Camera
4346   sq_pushstring(v, "Camera", -1);
4347   if(sq_newclass(v, SQFalse) < 0) {
4348     std::ostringstream msg;
4349     msg << "Couldn't create new class 'Camera'";
4350     throw SquirrelError(v, msg.str());
4351   }
4352   sq_pushstring(v, "reload_config", -1);
4353   sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4354   if(SQ_FAILED(sq_createslot(v, -3))) {
4355     throw SquirrelError(v, "Couldn't register function 'reload_config'");
4356   }
4357
4358   sq_pushstring(v, "shake", -1);
4359   sq_newclosure(v, &Camera_shake_wrapper, 0);
4360   if(SQ_FAILED(sq_createslot(v, -3))) {
4361     throw SquirrelError(v, "Couldn't register function 'shake'");
4362   }
4363
4364   sq_pushstring(v, "set_pos", -1);
4365   sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4366   if(SQ_FAILED(sq_createslot(v, -3))) {
4367     throw SquirrelError(v, "Couldn't register function 'set_pos'");
4368   }
4369
4370   sq_pushstring(v, "set_mode", -1);
4371   sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4372   if(SQ_FAILED(sq_createslot(v, -3))) {
4373     throw SquirrelError(v, "Couldn't register function 'set_mode'");
4374   }
4375
4376   sq_pushstring(v, "scroll_to", -1);
4377   sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4378   if(SQ_FAILED(sq_createslot(v, -3))) {
4379     throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4380   }
4381
4382   if(SQ_FAILED(sq_createslot(v, -3))) {
4383     throw SquirrelError(v, "Couldn't register class 'Camera'");
4384   }
4385
4386   // Register class Level
4387   sq_pushstring(v, "Level", -1);
4388   if(sq_newclass(v, SQFalse) < 0) {
4389     std::ostringstream msg;
4390     msg << "Couldn't create new class 'Level'";
4391     throw SquirrelError(v, msg.str());
4392   }
4393   sq_pushstring(v, "finish", -1);
4394   sq_newclosure(v, &Level_finish_wrapper, 0);
4395   if(SQ_FAILED(sq_createslot(v, -3))) {
4396     throw SquirrelError(v, "Couldn't register function 'finish'");
4397   }
4398
4399   sq_pushstring(v, "spawn", -1);
4400   sq_newclosure(v, &Level_spawn_wrapper, 0);
4401   if(SQ_FAILED(sq_createslot(v, -3))) {
4402     throw SquirrelError(v, "Couldn't register function 'spawn'");
4403   }
4404
4405   sq_pushstring(v, "flip_vertically", -1);
4406   sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4407   if(SQ_FAILED(sq_createslot(v, -3))) {
4408     throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4409   }
4410
4411   sq_pushstring(v, "toggle_pause", -1);
4412   sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4413   if(SQ_FAILED(sq_createslot(v, -3))) {
4414     throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4415   }
4416
4417   if(SQ_FAILED(sq_createslot(v, -3))) {
4418     throw SquirrelError(v, "Couldn't register class 'Level'");
4419   }
4420
4421   // Register class ScriptedObject
4422   sq_pushstring(v, "ScriptedObject", -1);
4423   if(sq_newclass(v, SQFalse) < 0) {
4424     std::ostringstream msg;
4425     msg << "Couldn't create new class 'ScriptedObject'";
4426     throw SquirrelError(v, msg.str());
4427   }
4428   sq_pushstring(v, "set_action", -1);
4429   sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4430   if(SQ_FAILED(sq_createslot(v, -3))) {
4431     throw SquirrelError(v, "Couldn't register function 'set_action'");
4432   }
4433
4434   sq_pushstring(v, "get_action", -1);
4435   sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4436   if(SQ_FAILED(sq_createslot(v, -3))) {
4437     throw SquirrelError(v, "Couldn't register function 'get_action'");
4438   }
4439
4440   sq_pushstring(v, "move", -1);
4441   sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4442   if(SQ_FAILED(sq_createslot(v, -3))) {
4443     throw SquirrelError(v, "Couldn't register function 'move'");
4444   }
4445
4446   sq_pushstring(v, "set_pos", -1);
4447   sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4448   if(SQ_FAILED(sq_createslot(v, -3))) {
4449     throw SquirrelError(v, "Couldn't register function 'set_pos'");
4450   }
4451
4452   sq_pushstring(v, "get_pos_x", -1);
4453   sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4454   if(SQ_FAILED(sq_createslot(v, -3))) {
4455     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4456   }
4457
4458   sq_pushstring(v, "get_pos_y", -1);
4459   sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4460   if(SQ_FAILED(sq_createslot(v, -3))) {
4461     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4462   }
4463
4464   sq_pushstring(v, "set_velocity", -1);
4465   sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4466   if(SQ_FAILED(sq_createslot(v, -3))) {
4467     throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4468   }
4469
4470   sq_pushstring(v, "get_velocity_x", -1);
4471   sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4472   if(SQ_FAILED(sq_createslot(v, -3))) {
4473     throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4474   }
4475
4476   sq_pushstring(v, "get_velocity_y", -1);
4477   sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4478   if(SQ_FAILED(sq_createslot(v, -3))) {
4479     throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4480   }
4481
4482   sq_pushstring(v, "set_visible", -1);
4483   sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4484   if(SQ_FAILED(sq_createslot(v, -3))) {
4485     throw SquirrelError(v, "Couldn't register function 'set_visible'");
4486   }
4487
4488   sq_pushstring(v, "is_visible", -1);
4489   sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4490   if(SQ_FAILED(sq_createslot(v, -3))) {
4491     throw SquirrelError(v, "Couldn't register function 'is_visible'");
4492   }
4493
4494   sq_pushstring(v, "set_solid", -1);
4495   sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4496   if(SQ_FAILED(sq_createslot(v, -3))) {
4497     throw SquirrelError(v, "Couldn't register function 'set_solid'");
4498   }
4499
4500   sq_pushstring(v, "is_solid", -1);
4501   sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4502   if(SQ_FAILED(sq_createslot(v, -3))) {
4503     throw SquirrelError(v, "Couldn't register function 'is_solid'");
4504   }
4505
4506   sq_pushstring(v, "get_name", -1);
4507   sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4508   if(SQ_FAILED(sq_createslot(v, -3))) {
4509     throw SquirrelError(v, "Couldn't register function 'get_name'");
4510   }
4511
4512   if(SQ_FAILED(sq_createslot(v, -3))) {
4513     throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4514   }
4515
4516   // Register class Text
4517   sq_pushstring(v, "Text", -1);
4518   if(sq_newclass(v, SQFalse) < 0) {
4519     std::ostringstream msg;
4520     msg << "Couldn't create new class 'Text'";
4521     throw SquirrelError(v, msg.str());
4522   }
4523   sq_pushstring(v, "set_text", -1);
4524   sq_newclosure(v, &Text_set_text_wrapper, 0);
4525   if(SQ_FAILED(sq_createslot(v, -3))) {
4526     throw SquirrelError(v, "Couldn't register function 'set_text'");
4527   }
4528
4529   sq_pushstring(v, "set_font", -1);
4530   sq_newclosure(v, &Text_set_font_wrapper, 0);
4531   if(SQ_FAILED(sq_createslot(v, -3))) {
4532     throw SquirrelError(v, "Couldn't register function 'set_font'");
4533   }
4534
4535   sq_pushstring(v, "fade_in", -1);
4536   sq_newclosure(v, &Text_fade_in_wrapper, 0);
4537   if(SQ_FAILED(sq_createslot(v, -3))) {
4538     throw SquirrelError(v, "Couldn't register function 'fade_in'");
4539   }
4540
4541   sq_pushstring(v, "fade_out", -1);
4542   sq_newclosure(v, &Text_fade_out_wrapper, 0);
4543   if(SQ_FAILED(sq_createslot(v, -3))) {
4544     throw SquirrelError(v, "Couldn't register function 'fade_out'");
4545   }
4546
4547   sq_pushstring(v, "set_visible", -1);
4548   sq_newclosure(v, &Text_set_visible_wrapper, 0);
4549   if(SQ_FAILED(sq_createslot(v, -3))) {
4550     throw SquirrelError(v, "Couldn't register function 'set_visible'");
4551   }
4552
4553   sq_pushstring(v, "set_centered", -1);
4554   sq_newclosure(v, &Text_set_centered_wrapper, 0);
4555   if(SQ_FAILED(sq_createslot(v, -3))) {
4556     throw SquirrelError(v, "Couldn't register function 'set_centered'");
4557   }
4558
4559   sq_pushstring(v, "set_pos", -1);
4560   sq_newclosure(v, &Text_set_pos_wrapper, 0);
4561   if(SQ_FAILED(sq_createslot(v, -3))) {
4562     throw SquirrelError(v, "Couldn't register function 'set_pos'");
4563   }
4564
4565   sq_pushstring(v, "get_pos_x", -1);
4566   sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
4567   if(SQ_FAILED(sq_createslot(v, -3))) {
4568     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4569   }
4570
4571   sq_pushstring(v, "get_pos_y", -1);
4572   sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
4573   if(SQ_FAILED(sq_createslot(v, -3))) {
4574     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4575   }
4576
4577   sq_pushstring(v, "set_anchor_point", -1);
4578   sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
4579   if(SQ_FAILED(sq_createslot(v, -3))) {
4580     throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4581   }
4582
4583   sq_pushstring(v, "get_anchor_point", -1);
4584   sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
4585   if(SQ_FAILED(sq_createslot(v, -3))) {
4586     throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4587   }
4588
4589   if(SQ_FAILED(sq_createslot(v, -3))) {
4590     throw SquirrelError(v, "Couldn't register class 'Text'");
4591   }
4592
4593   // Register class Player
4594   sq_pushstring(v, "Player", -1);
4595   if(sq_newclass(v, SQFalse) < 0) {
4596     std::ostringstream msg;
4597     msg << "Couldn't create new class 'Player'";
4598     throw SquirrelError(v, msg.str());
4599   }
4600   sq_pushstring(v, "add_bonus", -1);
4601   sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4602   if(SQ_FAILED(sq_createslot(v, -3))) {
4603     throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4604   }
4605
4606   sq_pushstring(v, "add_coins", -1);
4607   sq_newclosure(v, &Player_add_coins_wrapper, 0);
4608   if(SQ_FAILED(sq_createslot(v, -3))) {
4609     throw SquirrelError(v, "Couldn't register function 'add_coins'");
4610   }
4611
4612   sq_pushstring(v, "make_invincible", -1);
4613   sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4614   if(SQ_FAILED(sq_createslot(v, -3))) {
4615     throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4616   }
4617
4618   sq_pushstring(v, "deactivate", -1);
4619   sq_newclosure(v, &Player_deactivate_wrapper, 0);
4620   if(SQ_FAILED(sq_createslot(v, -3))) {
4621     throw SquirrelError(v, "Couldn't register function 'deactivate'");
4622   }
4623
4624   sq_pushstring(v, "activate", -1);
4625   sq_newclosure(v, &Player_activate_wrapper, 0);
4626   if(SQ_FAILED(sq_createslot(v, -3))) {
4627     throw SquirrelError(v, "Couldn't register function 'activate'");
4628   }
4629
4630   sq_pushstring(v, "walk", -1);
4631   sq_newclosure(v, &Player_walk_wrapper, 0);
4632   if(SQ_FAILED(sq_createslot(v, -3))) {
4633     throw SquirrelError(v, "Couldn't register function 'walk'");
4634   }
4635
4636   sq_pushstring(v, "set_visible", -1);
4637   sq_newclosure(v, &Player_set_visible_wrapper, 0);
4638   if(SQ_FAILED(sq_createslot(v, -3))) {
4639     throw SquirrelError(v, "Couldn't register function 'set_visible'");
4640   }
4641
4642   sq_pushstring(v, "get_visible", -1);
4643   sq_newclosure(v, &Player_get_visible_wrapper, 0);
4644   if(SQ_FAILED(sq_createslot(v, -3))) {
4645     throw SquirrelError(v, "Couldn't register function 'get_visible'");
4646   }
4647
4648   sq_pushstring(v, "kill", -1);
4649   sq_newclosure(v, &Player_kill_wrapper, 0);
4650   if(SQ_FAILED(sq_createslot(v, -3))) {
4651     throw SquirrelError(v, "Couldn't register function 'kill'");
4652   }
4653
4654   sq_pushstring(v, "set_ghost_mode", -1);
4655   sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4656   if(SQ_FAILED(sq_createslot(v, -3))) {
4657     throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4658   }
4659
4660   sq_pushstring(v, "get_ghost_mode", -1);
4661   sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4662   if(SQ_FAILED(sq_createslot(v, -3))) {
4663     throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4664   }
4665
4666   sq_pushstring(v, "do_cheer", -1);
4667   sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4668   if(SQ_FAILED(sq_createslot(v, -3))) {
4669     throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4670   }
4671
4672   sq_pushstring(v, "do_duck", -1);
4673   sq_newclosure(v, &Player_do_duck_wrapper, 0);
4674   if(SQ_FAILED(sq_createslot(v, -3))) {
4675     throw SquirrelError(v, "Couldn't register function 'do_duck'");
4676   }
4677
4678   sq_pushstring(v, "do_standup", -1);
4679   sq_newclosure(v, &Player_do_standup_wrapper, 0);
4680   if(SQ_FAILED(sq_createslot(v, -3))) {
4681     throw SquirrelError(v, "Couldn't register function 'do_standup'");
4682   }
4683
4684   sq_pushstring(v, "do_backflip", -1);
4685   sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4686   if(SQ_FAILED(sq_createslot(v, -3))) {
4687     throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4688   }
4689
4690   sq_pushstring(v, "do_jump", -1);
4691   sq_newclosure(v, &Player_do_jump_wrapper, 0);
4692   if(SQ_FAILED(sq_createslot(v, -3))) {
4693     throw SquirrelError(v, "Couldn't register function 'do_jump'");
4694   }
4695
4696   sq_pushstring(v, "trigger_sequence", -1);
4697   sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4698   if(SQ_FAILED(sq_createslot(v, -3))) {
4699     throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4700   }
4701
4702   if(SQ_FAILED(sq_createslot(v, -3))) {
4703     throw SquirrelError(v, "Couldn't register class 'Player'");
4704   }
4705
4706   // Register class FloatingImage
4707   sq_pushstring(v, "FloatingImage", -1);
4708   if(sq_newclass(v, SQFalse) < 0) {
4709     std::ostringstream msg;
4710     msg << "Couldn't create new class 'FloatingImage'";
4711     throw SquirrelError(v, msg.str());
4712   }
4713   sq_pushstring(v, "constructor", -1);
4714   sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4715   if(SQ_FAILED(sq_createslot(v, -3))) {
4716     throw SquirrelError(v, "Couldn't register function 'constructor'");
4717   }
4718
4719   sq_pushstring(v, "set_layer", -1);
4720   sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4721   if(SQ_FAILED(sq_createslot(v, -3))) {
4722     throw SquirrelError(v, "Couldn't register function 'set_layer'");
4723   }
4724
4725   sq_pushstring(v, "get_layer", -1);
4726   sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4727   if(SQ_FAILED(sq_createslot(v, -3))) {
4728     throw SquirrelError(v, "Couldn't register function 'get_layer'");
4729   }
4730
4731   sq_pushstring(v, "set_pos", -1);
4732   sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4733   if(SQ_FAILED(sq_createslot(v, -3))) {
4734     throw SquirrelError(v, "Couldn't register function 'set_pos'");
4735   }
4736
4737   sq_pushstring(v, "get_pos_x", -1);
4738   sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4739   if(SQ_FAILED(sq_createslot(v, -3))) {
4740     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4741   }
4742
4743   sq_pushstring(v, "get_pos_y", -1);
4744   sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4745   if(SQ_FAILED(sq_createslot(v, -3))) {
4746     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4747   }
4748
4749   sq_pushstring(v, "set_anchor_point", -1);
4750   sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4751   if(SQ_FAILED(sq_createslot(v, -3))) {
4752     throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4753   }
4754
4755   sq_pushstring(v, "get_anchor_point", -1);
4756   sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4757   if(SQ_FAILED(sq_createslot(v, -3))) {
4758     throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4759   }
4760
4761   sq_pushstring(v, "set_visible", -1);
4762   sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4763   if(SQ_FAILED(sq_createslot(v, -3))) {
4764     throw SquirrelError(v, "Couldn't register function 'set_visible'");
4765   }
4766
4767   sq_pushstring(v, "get_visible", -1);
4768   sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4769   if(SQ_FAILED(sq_createslot(v, -3))) {
4770     throw SquirrelError(v, "Couldn't register function 'get_visible'");
4771   }
4772
4773   sq_pushstring(v, "set_action", -1);
4774   sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4775   if(SQ_FAILED(sq_createslot(v, -3))) {
4776     throw SquirrelError(v, "Couldn't register function 'set_action'");
4777   }
4778
4779   sq_pushstring(v, "get_action", -1);
4780   sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4781   if(SQ_FAILED(sq_createslot(v, -3))) {
4782     throw SquirrelError(v, "Couldn't register function 'get_action'");
4783   }
4784
4785   sq_pushstring(v, "fade_in", -1);
4786   sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4787   if(SQ_FAILED(sq_createslot(v, -3))) {
4788     throw SquirrelError(v, "Couldn't register function 'fade_in'");
4789   }
4790
4791   sq_pushstring(v, "fade_out", -1);
4792   sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4793   if(SQ_FAILED(sq_createslot(v, -3))) {
4794     throw SquirrelError(v, "Couldn't register function 'fade_out'");
4795   }
4796
4797   if(SQ_FAILED(sq_createslot(v, -3))) {
4798     throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4799   }
4800
4801   // Register class Platform
4802   sq_pushstring(v, "Platform", -1);
4803   if(sq_newclass(v, SQFalse) < 0) {
4804     std::ostringstream msg;
4805     msg << "Couldn't create new class 'Platform'";
4806     throw SquirrelError(v, msg.str());
4807   }
4808   sq_pushstring(v, "goto_node", -1);
4809   sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4810   if(SQ_FAILED(sq_createslot(v, -3))) {
4811     throw SquirrelError(v, "Couldn't register function 'goto_node'");
4812   }
4813
4814   sq_pushstring(v, "start_moving", -1);
4815   sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4816   if(SQ_FAILED(sq_createslot(v, -3))) {
4817     throw SquirrelError(v, "Couldn't register function 'start_moving'");
4818   }
4819
4820   sq_pushstring(v, "stop_moving", -1);
4821   sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4822   if(SQ_FAILED(sq_createslot(v, -3))) {
4823     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4824   }
4825
4826   if(SQ_FAILED(sq_createslot(v, -3))) {
4827     throw SquirrelError(v, "Couldn't register class 'Platform'");
4828   }
4829
4830   // Register class Candle
4831   sq_pushstring(v, "Candle", -1);
4832   if(sq_newclass(v, SQFalse) < 0) {
4833     std::ostringstream msg;
4834     msg << "Couldn't create new class 'Candle'";
4835     throw SquirrelError(v, msg.str());
4836   }
4837   sq_pushstring(v, "get_burning", -1);
4838   sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4839   if(SQ_FAILED(sq_createslot(v, -3))) {
4840     throw SquirrelError(v, "Couldn't register function 'get_burning'");
4841   }
4842
4843   sq_pushstring(v, "set_burning", -1);
4844   sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4845   if(SQ_FAILED(sq_createslot(v, -3))) {
4846     throw SquirrelError(v, "Couldn't register function 'set_burning'");
4847   }
4848
4849   if(SQ_FAILED(sq_createslot(v, -3))) {
4850     throw SquirrelError(v, "Couldn't register class 'Candle'");
4851   }
4852
4853   // Register class Wind
4854   sq_pushstring(v, "Wind", -1);
4855   if(sq_newclass(v, SQFalse) < 0) {
4856     std::ostringstream msg;
4857     msg << "Couldn't create new class 'Wind'";
4858     throw SquirrelError(v, msg.str());
4859   }
4860   sq_pushstring(v, "start", -1);
4861   sq_newclosure(v, &Wind_start_wrapper, 0);
4862   if(SQ_FAILED(sq_createslot(v, -3))) {
4863     throw SquirrelError(v, "Couldn't register function 'start'");
4864   }
4865
4866   sq_pushstring(v, "stop", -1);
4867   sq_newclosure(v, &Wind_stop_wrapper, 0);
4868   if(SQ_FAILED(sq_createslot(v, -3))) {
4869     throw SquirrelError(v, "Couldn't register function 'stop'");
4870   }
4871
4872   if(SQ_FAILED(sq_createslot(v, -3))) {
4873     throw SquirrelError(v, "Couldn't register class 'Wind'");
4874   }
4875
4876   // Register class AmbientSound
4877   sq_pushstring(v, "AmbientSound", -1);
4878   if(sq_newclass(v, SQFalse) < 0) {
4879     std::ostringstream msg;
4880     msg << "Couldn't create new class 'AmbientSound'";
4881     throw SquirrelError(v, msg.str());
4882   }
4883   sq_pushstring(v, "set_pos", -1);
4884   sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4885   if(SQ_FAILED(sq_createslot(v, -3))) {
4886     throw SquirrelError(v, "Couldn't register function 'set_pos'");
4887   }
4888
4889   sq_pushstring(v, "get_pos_x", -1);
4890   sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4891   if(SQ_FAILED(sq_createslot(v, -3))) {
4892     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4893   }
4894
4895   sq_pushstring(v, "get_pos_y", -1);
4896   sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4897   if(SQ_FAILED(sq_createslot(v, -3))) {
4898     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4899   }
4900
4901   if(SQ_FAILED(sq_createslot(v, -3))) {
4902     throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4903   }
4904
4905   // Register class Thunderstorm
4906   sq_pushstring(v, "Thunderstorm", -1);
4907   if(sq_newclass(v, SQFalse) < 0) {
4908     std::ostringstream msg;
4909     msg << "Couldn't create new class 'Thunderstorm'";
4910     throw SquirrelError(v, msg.str());
4911   }
4912   sq_pushstring(v, "start", -1);
4913   sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4914   if(SQ_FAILED(sq_createslot(v, -3))) {
4915     throw SquirrelError(v, "Couldn't register function 'start'");
4916   }
4917
4918   sq_pushstring(v, "stop", -1);
4919   sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4920   if(SQ_FAILED(sq_createslot(v, -3))) {
4921     throw SquirrelError(v, "Couldn't register function 'stop'");
4922   }
4923
4924   sq_pushstring(v, "thunder", -1);
4925   sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4926   if(SQ_FAILED(sq_createslot(v, -3))) {
4927     throw SquirrelError(v, "Couldn't register function 'thunder'");
4928   }
4929
4930   sq_pushstring(v, "lightning", -1);
4931   sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4932   if(SQ_FAILED(sq_createslot(v, -3))) {
4933     throw SquirrelError(v, "Couldn't register function 'lightning'");
4934   }
4935
4936   sq_pushstring(v, "flash", -1);
4937   sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4938   if(SQ_FAILED(sq_createslot(v, -3))) {
4939     throw SquirrelError(v, "Couldn't register function 'flash'");
4940   }
4941
4942   sq_pushstring(v, "electrify", -1);
4943   sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4944   if(SQ_FAILED(sq_createslot(v, -3))) {
4945     throw SquirrelError(v, "Couldn't register function 'electrify'");
4946   }
4947
4948   if(SQ_FAILED(sq_createslot(v, -3))) {
4949     throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4950   }
4951
4952   // Register class TileMap
4953   sq_pushstring(v, "TileMap", -1);
4954   if(sq_newclass(v, SQFalse) < 0) {
4955     std::ostringstream msg;
4956     msg << "Couldn't create new class 'TileMap'";
4957     throw SquirrelError(v, msg.str());
4958   }
4959   sq_pushstring(v, "goto_node", -1);
4960   sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4961   if(SQ_FAILED(sq_createslot(v, -3))) {
4962     throw SquirrelError(v, "Couldn't register function 'goto_node'");
4963   }
4964
4965   sq_pushstring(v, "start_moving", -1);
4966   sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4967   if(SQ_FAILED(sq_createslot(v, -3))) {
4968     throw SquirrelError(v, "Couldn't register function 'start_moving'");
4969   }
4970
4971   sq_pushstring(v, "stop_moving", -1);
4972   sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4973   if(SQ_FAILED(sq_createslot(v, -3))) {
4974     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4975   }
4976
4977   sq_pushstring(v, "fade", -1);
4978   sq_newclosure(v, &TileMap_fade_wrapper, 0);
4979   if(SQ_FAILED(sq_createslot(v, -3))) {
4980     throw SquirrelError(v, "Couldn't register function 'fade'");
4981   }
4982
4983   sq_pushstring(v, "set_alpha", -1);
4984   sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
4985   if(SQ_FAILED(sq_createslot(v, -3))) {
4986     throw SquirrelError(v, "Couldn't register function 'set_alpha'");
4987   }
4988
4989   sq_pushstring(v, "get_alpha", -1);
4990   sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
4991   if(SQ_FAILED(sq_createslot(v, -3))) {
4992     throw SquirrelError(v, "Couldn't register function 'get_alpha'");
4993   }
4994
4995   if(SQ_FAILED(sq_createslot(v, -3))) {
4996     throw SquirrelError(v, "Couldn't register class 'TileMap'");
4997   }
4998
4999   // Register class SSector
5000   sq_pushstring(v, "SSector", -1);
5001   if(sq_newclass(v, SQFalse) < 0) {
5002     std::ostringstream msg;
5003     msg << "Couldn't create new class 'SSector'";
5004     throw SquirrelError(v, msg.str());
5005   }
5006   sq_pushstring(v, "set_ambient_light", -1);
5007   sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
5008   if(SQ_FAILED(sq_createslot(v, -3))) {
5009     throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
5010   }
5011
5012   sq_pushstring(v, "get_ambient_red", -1);
5013   sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
5014   if(SQ_FAILED(sq_createslot(v, -3))) {
5015     throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
5016   }
5017
5018   sq_pushstring(v, "get_ambient_green", -1);
5019   sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
5020   if(SQ_FAILED(sq_createslot(v, -3))) {
5021     throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
5022   }
5023
5024   sq_pushstring(v, "get_ambient_blue", -1);
5025   sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
5026   if(SQ_FAILED(sq_createslot(v, -3))) {
5027     throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
5028   }
5029
5030   if(SQ_FAILED(sq_createslot(v, -3))) {
5031     throw SquirrelError(v, "Couldn't register class 'SSector'");
5032   }
5033
5034   // Register class LevelTime
5035   sq_pushstring(v, "LevelTime", -1);
5036   if(sq_newclass(v, SQFalse) < 0) {
5037     std::ostringstream msg;
5038     msg << "Couldn't create new class 'LevelTime'";
5039     throw SquirrelError(v, msg.str());
5040   }
5041   sq_pushstring(v, "start", -1);
5042   sq_newclosure(v, &LevelTime_start_wrapper, 0);
5043   if(SQ_FAILED(sq_createslot(v, -3))) {
5044     throw SquirrelError(v, "Couldn't register function 'start'");
5045   }
5046
5047   sq_pushstring(v, "stop", -1);
5048   sq_newclosure(v, &LevelTime_stop_wrapper, 0);
5049   if(SQ_FAILED(sq_createslot(v, -3))) {
5050     throw SquirrelError(v, "Couldn't register function 'stop'");
5051   }
5052
5053   sq_pushstring(v, "get_time", -1);
5054   sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
5055   if(SQ_FAILED(sq_createslot(v, -3))) {
5056     throw SquirrelError(v, "Couldn't register function 'get_time'");
5057   }
5058
5059   sq_pushstring(v, "set_time", -1);
5060   sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
5061   if(SQ_FAILED(sq_createslot(v, -3))) {
5062     throw SquirrelError(v, "Couldn't register function 'set_time'");
5063   }
5064
5065   if(SQ_FAILED(sq_createslot(v, -3))) {
5066     throw SquirrelError(v, "Couldn't register class 'LevelTime'");
5067   }
5068
5069   // Register class WillOWisp
5070   sq_pushstring(v, "WillOWisp", -1);
5071   if(sq_newclass(v, SQFalse) < 0) {
5072     std::ostringstream msg;
5073     msg << "Couldn't create new class 'WillOWisp'";
5074     throw SquirrelError(v, msg.str());
5075   }
5076   sq_pushstring(v, "goto_node", -1);
5077   sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
5078   if(SQ_FAILED(sq_createslot(v, -3))) {
5079     throw SquirrelError(v, "Couldn't register function 'goto_node'");
5080   }
5081
5082   sq_pushstring(v, "set_state", -1);
5083   sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
5084   if(SQ_FAILED(sq_createslot(v, -3))) {
5085     throw SquirrelError(v, "Couldn't register function 'set_state'");
5086   }
5087
5088   sq_pushstring(v, "start_moving", -1);
5089   sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
5090   if(SQ_FAILED(sq_createslot(v, -3))) {
5091     throw SquirrelError(v, "Couldn't register function 'start_moving'");
5092   }
5093
5094   sq_pushstring(v, "stop_moving", -1);
5095   sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
5096   if(SQ_FAILED(sq_createslot(v, -3))) {
5097     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5098   }
5099
5100   if(SQ_FAILED(sq_createslot(v, -3))) {
5101     throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
5102   }
5103
5104 }
5105
5106 } // end of namespace Scripting