2 * WARNING: This file is automatically generated from:
3 * 'src/scripting/wrapper.interface.hpp'
13 #include "squirrel_error.hpp"
14 #include "wrapper.interface.hpp"
21 static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
23 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (ptr);
28 static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
31 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
32 sq_throwerror(vm, _SC("'fade_out' called without instance"));
35 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
37 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
38 sq_throwerror(vm, _SC("Argument 1 not a float"));
43 _this->fade_out(static_cast<float> (arg0));
47 } catch(std::exception& e) {
48 sq_throwerror(vm, e.what());
51 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
57 static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
60 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
61 sq_throwerror(vm, _SC("'fade_in' called without instance"));
64 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
66 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
67 sq_throwerror(vm, _SC("Argument 1 not a float"));
72 _this->fade_in(static_cast<float> (arg0));
76 } catch(std::exception& e) {
77 sq_throwerror(vm, e.what());
80 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
86 static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
89 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
90 sq_throwerror(vm, _SC("'set_black' called without instance"));
93 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
95 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
96 sq_throwerror(vm, _SC("Argument 1 not a bool"));
101 _this->set_black(arg0 == SQTrue);
105 } catch(std::exception& e) {
106 sq_throwerror(vm, e.what());
109 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
115 static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
118 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
119 sq_throwerror(vm, _SC("'is_black' called without instance"));
122 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
125 bool return_value = _this->is_black();
127 sq_pushbool(vm, return_value);
130 } catch(std::exception& e) {
131 sq_throwerror(vm, e.what());
134 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
140 static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
143 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
144 sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
147 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
149 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
150 sq_throwerror(vm, _SC("Argument 1 not a float"));
155 _this->sixteen_to_nine(static_cast<float> (arg0));
159 } catch(std::exception& e) {
160 sq_throwerror(vm, e.what());
163 sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
169 static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
172 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
173 sq_throwerror(vm, _SC("'four_to_three' called without instance"));
176 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
178 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
179 sq_throwerror(vm, _SC("Argument 1 not a float"));
184 _this->four_to_three(static_cast<float> (arg0));
188 } catch(std::exception& e) {
189 sq_throwerror(vm, e.what());
192 sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
198 static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
200 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (ptr);
205 static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
208 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
209 sq_throwerror(vm, _SC("'reload_config' called without instance"));
212 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
215 _this->reload_config();
219 } catch(std::exception& e) {
220 sq_throwerror(vm, e.what());
223 sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
229 static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
232 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
233 sq_throwerror(vm, _SC("'shake' called without instance"));
236 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
238 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
239 sq_throwerror(vm, _SC("Argument 1 not a float"));
243 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
244 sq_throwerror(vm, _SC("Argument 2 not a float"));
248 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
249 sq_throwerror(vm, _SC("Argument 3 not a float"));
254 _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
258 } catch(std::exception& e) {
259 sq_throwerror(vm, e.what());
262 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
268 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
271 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
272 sq_throwerror(vm, _SC("'set_pos' called without instance"));
275 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
277 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
278 sq_throwerror(vm, _SC("Argument 1 not a float"));
282 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
283 sq_throwerror(vm, _SC("Argument 2 not a float"));
288 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
292 } catch(std::exception& e) {
293 sq_throwerror(vm, e.what());
296 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
302 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
305 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
306 sq_throwerror(vm, _SC("'set_mode' called without instance"));
309 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
311 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
312 sq_throwerror(vm, _SC("Argument 1 not a string"));
317 _this->set_mode(arg0);
321 } catch(std::exception& e) {
322 sq_throwerror(vm, e.what());
325 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
331 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
334 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
335 sq_throwerror(vm, _SC("'scroll_to' called without instance"));
338 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
340 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
341 sq_throwerror(vm, _SC("Argument 1 not a float"));
345 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
346 sq_throwerror(vm, _SC("Argument 2 not a float"));
350 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
351 sq_throwerror(vm, _SC("Argument 3 not a float"));
356 _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
360 } catch(std::exception& e) {
361 sq_throwerror(vm, e.what());
364 sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
370 static SQInteger Level_release_hook(SQUserPointer ptr, SQInteger )
372 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (ptr);
377 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
380 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
381 sq_throwerror(vm, _SC("'finish' called without instance"));
384 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
386 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
387 sq_throwerror(vm, _SC("Argument 1 not a bool"));
392 _this->finish(arg0 == SQTrue);
396 } catch(std::exception& e) {
397 sq_throwerror(vm, e.what());
400 sq_throwerror(vm, _SC("Unexpected exception while executing function 'finish'"));
406 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
409 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
410 sq_throwerror(vm, _SC("'spawn' called without instance"));
413 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
415 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
416 sq_throwerror(vm, _SC("Argument 1 not a string"));
420 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
421 sq_throwerror(vm, _SC("Argument 2 not a string"));
426 _this->spawn(arg0, arg1);
430 } catch(std::exception& e) {
431 sq_throwerror(vm, e.what());
434 sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn'"));
440 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
443 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
444 sq_throwerror(vm, _SC("'flip_vertically' called without instance"));
447 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
450 _this->flip_vertically();
454 } catch(std::exception& e) {
455 sq_throwerror(vm, e.what());
458 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flip_vertically'"));
464 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
467 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
468 sq_throwerror(vm, _SC("'toggle_pause' called without instance"));
471 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
474 _this->toggle_pause();
478 } catch(std::exception& e) {
479 sq_throwerror(vm, e.what());
482 sq_throwerror(vm, _SC("Unexpected exception while executing function 'toggle_pause'"));
488 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
490 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
495 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
498 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
499 sq_throwerror(vm, _SC("'set_action' called without instance"));
502 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
504 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
505 sq_throwerror(vm, _SC("Argument 1 not a string"));
510 _this->set_action(arg0);
514 } catch(std::exception& e) {
515 sq_throwerror(vm, e.what());
518 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
524 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
527 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
528 sq_throwerror(vm, _SC("'get_action' called without instance"));
531 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
534 std::string return_value = _this->get_action();
536 sq_pushstring(vm, return_value.c_str(), return_value.size());
539 } catch(std::exception& e) {
540 sq_throwerror(vm, e.what());
543 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
549 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
552 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
553 sq_throwerror(vm, _SC("'move' called without instance"));
556 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
558 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
559 sq_throwerror(vm, _SC("Argument 1 not a float"));
563 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
564 sq_throwerror(vm, _SC("Argument 2 not a float"));
569 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
573 } catch(std::exception& e) {
574 sq_throwerror(vm, e.what());
577 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
583 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
586 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
587 sq_throwerror(vm, _SC("'set_pos' called without instance"));
590 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
592 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
593 sq_throwerror(vm, _SC("Argument 1 not a float"));
597 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
598 sq_throwerror(vm, _SC("Argument 2 not a float"));
603 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
607 } catch(std::exception& e) {
608 sq_throwerror(vm, e.what());
611 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
617 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
620 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
621 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
624 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
627 float return_value = _this->get_pos_x();
629 sq_pushfloat(vm, return_value);
632 } catch(std::exception& e) {
633 sq_throwerror(vm, e.what());
636 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
642 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
645 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
646 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
649 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
652 float return_value = _this->get_pos_y();
654 sq_pushfloat(vm, return_value);
657 } catch(std::exception& e) {
658 sq_throwerror(vm, e.what());
661 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
667 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
670 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
671 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
674 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
676 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
677 sq_throwerror(vm, _SC("Argument 1 not a float"));
681 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
682 sq_throwerror(vm, _SC("Argument 2 not a float"));
687 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
691 } catch(std::exception& e) {
692 sq_throwerror(vm, e.what());
695 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
701 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
704 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
705 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
708 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
711 float return_value = _this->get_velocity_x();
713 sq_pushfloat(vm, return_value);
716 } catch(std::exception& e) {
717 sq_throwerror(vm, e.what());
720 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
726 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
729 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
730 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
733 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
736 float return_value = _this->get_velocity_y();
738 sq_pushfloat(vm, return_value);
741 } catch(std::exception& e) {
742 sq_throwerror(vm, e.what());
745 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
751 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
754 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
755 sq_throwerror(vm, _SC("'set_visible' called without instance"));
758 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
760 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
761 sq_throwerror(vm, _SC("Argument 1 not a bool"));
766 _this->set_visible(arg0 == SQTrue);
770 } catch(std::exception& e) {
771 sq_throwerror(vm, e.what());
774 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
780 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
783 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
784 sq_throwerror(vm, _SC("'is_visible' called without instance"));
787 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
790 bool return_value = _this->is_visible();
792 sq_pushbool(vm, return_value);
795 } catch(std::exception& e) {
796 sq_throwerror(vm, e.what());
799 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
805 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
808 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
809 sq_throwerror(vm, _SC("'set_solid' called without instance"));
812 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
814 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
815 sq_throwerror(vm, _SC("Argument 1 not a bool"));
820 _this->set_solid(arg0 == SQTrue);
824 } catch(std::exception& e) {
825 sq_throwerror(vm, e.what());
828 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
834 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
837 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
838 sq_throwerror(vm, _SC("'is_solid' called without instance"));
841 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
844 bool return_value = _this->is_solid();
846 sq_pushbool(vm, return_value);
849 } catch(std::exception& e) {
850 sq_throwerror(vm, e.what());
853 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
859 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
862 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
863 sq_throwerror(vm, _SC("'get_name' called without instance"));
866 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
869 std::string return_value = _this->get_name();
871 sq_pushstring(vm, return_value.c_str(), return_value.size());
874 } catch(std::exception& e) {
875 sq_throwerror(vm, e.what());
878 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
884 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
886 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
891 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
894 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
895 sq_throwerror(vm, _SC("'set_text' called without instance"));
898 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
900 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
901 sq_throwerror(vm, _SC("Argument 1 not a string"));
906 _this->set_text(arg0);
910 } catch(std::exception& e) {
911 sq_throwerror(vm, e.what());
914 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
920 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
923 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
924 sq_throwerror(vm, _SC("'set_font' called without instance"));
927 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
929 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
930 sq_throwerror(vm, _SC("Argument 1 not a string"));
935 _this->set_font(arg0);
939 } catch(std::exception& e) {
940 sq_throwerror(vm, e.what());
943 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
949 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
952 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
953 sq_throwerror(vm, _SC("'fade_in' called without instance"));
956 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
958 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
959 sq_throwerror(vm, _SC("Argument 1 not a float"));
964 _this->fade_in(static_cast<float> (arg0));
968 } catch(std::exception& e) {
969 sq_throwerror(vm, e.what());
972 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
978 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
981 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
982 sq_throwerror(vm, _SC("'fade_out' called without instance"));
985 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
987 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
988 sq_throwerror(vm, _SC("Argument 1 not a float"));
993 _this->fade_out(static_cast<float> (arg0));
997 } catch(std::exception& e) {
998 sq_throwerror(vm, e.what());
1001 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1007 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
1010 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1011 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1014 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1016 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1017 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1022 _this->set_visible(arg0 == SQTrue);
1026 } catch(std::exception& e) {
1027 sq_throwerror(vm, e.what());
1030 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1036 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
1039 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1040 sq_throwerror(vm, _SC("'set_centered' called without instance"));
1043 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1045 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1046 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1051 _this->set_centered(arg0 == SQTrue);
1055 } catch(std::exception& e) {
1056 sq_throwerror(vm, e.what());
1059 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
1065 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1067 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
1072 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1075 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1076 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1079 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1081 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1082 sq_throwerror(vm, _SC("Argument 1 not a string"));
1087 bool return_value = _this->add_bonus(arg0);
1089 sq_pushbool(vm, return_value);
1092 } catch(std::exception& e) {
1093 sq_throwerror(vm, e.what());
1096 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1102 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1105 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1106 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1109 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1111 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1112 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1117 _this->add_coins(static_cast<int> (arg0));
1121 } catch(std::exception& e) {
1122 sq_throwerror(vm, e.what());
1125 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1131 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1134 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1135 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1138 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1141 _this->make_invincible();
1145 } catch(std::exception& e) {
1146 sq_throwerror(vm, e.what());
1149 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1155 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1158 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1159 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1162 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1165 _this->deactivate();
1169 } catch(std::exception& e) {
1170 sq_throwerror(vm, e.what());
1173 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1179 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1182 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1183 sq_throwerror(vm, _SC("'activate' called without instance"));
1186 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1193 } catch(std::exception& e) {
1194 sq_throwerror(vm, e.what());
1197 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1203 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1206 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1207 sq_throwerror(vm, _SC("'walk' called without instance"));
1210 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1212 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1213 sq_throwerror(vm, _SC("Argument 1 not a float"));
1218 _this->walk(static_cast<float> (arg0));
1222 } catch(std::exception& e) {
1223 sq_throwerror(vm, e.what());
1226 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1232 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1235 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1236 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1239 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1241 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1242 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1247 _this->set_visible(arg0 == SQTrue);
1251 } catch(std::exception& e) {
1252 sq_throwerror(vm, e.what());
1255 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1261 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1264 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1265 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1268 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1271 bool return_value = _this->get_visible();
1273 sq_pushbool(vm, return_value);
1276 } catch(std::exception& e) {
1277 sq_throwerror(vm, e.what());
1280 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1286 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1289 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1290 sq_throwerror(vm, _SC("'kill' called without instance"));
1293 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1295 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1296 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1301 _this->kill(arg0 == SQTrue);
1305 } catch(std::exception& e) {
1306 sq_throwerror(vm, e.what());
1309 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1315 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1318 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1319 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1322 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1324 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1325 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1330 _this->set_ghost_mode(arg0 == SQTrue);
1334 } catch(std::exception& e) {
1335 sq_throwerror(vm, e.what());
1338 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1344 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1347 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1348 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1351 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1354 bool return_value = _this->get_ghost_mode();
1356 sq_pushbool(vm, return_value);
1359 } catch(std::exception& e) {
1360 sq_throwerror(vm, e.what());
1363 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1369 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1372 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1373 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1376 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1383 } catch(std::exception& e) {
1384 sq_throwerror(vm, e.what());
1387 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1393 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1396 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1397 sq_throwerror(vm, _SC("'do_duck' called without instance"));
1400 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1407 } catch(std::exception& e) {
1408 sq_throwerror(vm, e.what());
1411 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1417 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1420 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1421 sq_throwerror(vm, _SC("'do_standup' called without instance"));
1424 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1427 _this->do_standup();
1431 } catch(std::exception& e) {
1432 sq_throwerror(vm, e.what());
1435 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1441 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1444 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1445 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1448 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1451 _this->do_backflip();
1455 } catch(std::exception& e) {
1456 sq_throwerror(vm, e.what());
1459 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1465 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1468 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1469 sq_throwerror(vm, _SC("'do_jump' called without instance"));
1472 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1474 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1475 sq_throwerror(vm, _SC("Argument 1 not a float"));
1480 _this->do_jump(static_cast<float> (arg0));
1484 } catch(std::exception& e) {
1485 sq_throwerror(vm, e.what());
1488 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1494 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1497 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1498 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1501 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1503 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1504 sq_throwerror(vm, _SC("Argument 1 not a string"));
1509 _this->trigger_sequence(arg0);
1513 } catch(std::exception& e) {
1514 sq_throwerror(vm, e.what());
1517 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1523 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1525 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1530 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1533 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1534 sq_throwerror(vm, _SC("Argument 1 not a string"));
1539 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1540 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1541 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1544 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1548 } catch(std::exception& e) {
1549 sq_throwerror(vm, e.what());
1552 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1558 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1561 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1562 sq_throwerror(vm, _SC("'set_layer' called without instance"));
1565 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1567 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1568 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1573 _this->set_layer(static_cast<int> (arg0));
1577 } catch(std::exception& e) {
1578 sq_throwerror(vm, e.what());
1581 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1587 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1590 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1591 sq_throwerror(vm, _SC("'get_layer' called without instance"));
1594 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1597 int return_value = _this->get_layer();
1599 sq_pushinteger(vm, return_value);
1602 } catch(std::exception& e) {
1603 sq_throwerror(vm, e.what());
1606 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1612 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1615 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1616 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1619 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1621 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1622 sq_throwerror(vm, _SC("Argument 1 not a float"));
1626 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1627 sq_throwerror(vm, _SC("Argument 2 not a float"));
1632 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1636 } catch(std::exception& e) {
1637 sq_throwerror(vm, e.what());
1640 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1646 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1649 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1650 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1653 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1656 float return_value = _this->get_pos_x();
1658 sq_pushfloat(vm, return_value);
1661 } catch(std::exception& e) {
1662 sq_throwerror(vm, e.what());
1665 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1671 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1674 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1675 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1678 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1681 float return_value = _this->get_pos_y();
1683 sq_pushfloat(vm, return_value);
1686 } catch(std::exception& e) {
1687 sq_throwerror(vm, e.what());
1690 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1696 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1699 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1700 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1703 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1705 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1706 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1711 _this->set_anchor_point(static_cast<int> (arg0));
1715 } catch(std::exception& e) {
1716 sq_throwerror(vm, e.what());
1719 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1725 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1728 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1729 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1732 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1735 int return_value = _this->get_anchor_point();
1737 sq_pushinteger(vm, return_value);
1740 } catch(std::exception& e) {
1741 sq_throwerror(vm, e.what());
1744 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1750 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1753 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1754 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1757 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1759 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1760 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1765 _this->set_visible(arg0 == SQTrue);
1769 } catch(std::exception& e) {
1770 sq_throwerror(vm, e.what());
1773 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1779 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1782 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1783 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1786 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1789 bool return_value = _this->get_visible();
1791 sq_pushbool(vm, return_value);
1794 } catch(std::exception& e) {
1795 sq_throwerror(vm, e.what());
1798 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1804 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
1807 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1808 sq_throwerror(vm, _SC("'set_action' called without instance"));
1811 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1813 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1814 sq_throwerror(vm, _SC("Argument 1 not a string"));
1819 _this->set_action(arg0);
1823 } catch(std::exception& e) {
1824 sq_throwerror(vm, e.what());
1827 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1833 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
1836 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1837 sq_throwerror(vm, _SC("'get_action' called without instance"));
1840 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1843 std::string return_value = _this->get_action();
1845 sq_pushstring(vm, return_value.c_str(), return_value.size());
1848 } catch(std::exception& e) {
1849 sq_throwerror(vm, e.what());
1852 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1858 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
1861 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1862 sq_throwerror(vm, _SC("'fade_in' called without instance"));
1865 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1867 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1868 sq_throwerror(vm, _SC("Argument 1 not a float"));
1873 _this->fade_in(static_cast<float> (arg0));
1877 } catch(std::exception& e) {
1878 sq_throwerror(vm, e.what());
1881 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
1887 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
1890 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1891 sq_throwerror(vm, _SC("'fade_out' called without instance"));
1894 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1896 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1897 sq_throwerror(vm, _SC("Argument 1 not a float"));
1902 _this->fade_out(static_cast<float> (arg0));
1906 } catch(std::exception& e) {
1907 sq_throwerror(vm, e.what());
1910 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1916 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
1918 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
1923 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
1926 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1927 sq_throwerror(vm, _SC("'goto_node' called without instance"));
1930 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1932 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1933 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1938 _this->goto_node(static_cast<int> (arg0));
1942 } catch(std::exception& e) {
1943 sq_throwerror(vm, e.what());
1946 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
1952 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
1955 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1956 sq_throwerror(vm, _SC("'start_moving' called without instance"));
1959 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1962 _this->start_moving();
1966 } catch(std::exception& e) {
1967 sq_throwerror(vm, e.what());
1970 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
1976 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
1979 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1980 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
1983 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1986 _this->stop_moving();
1990 } catch(std::exception& e) {
1991 sq_throwerror(vm, e.what());
1994 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2000 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
2002 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
2007 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
2010 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2011 sq_throwerror(vm, _SC("'get_burning' called without instance"));
2014 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2017 bool return_value = _this->get_burning();
2019 sq_pushbool(vm, return_value);
2022 } catch(std::exception& e) {
2023 sq_throwerror(vm, e.what());
2026 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2032 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2035 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2036 sq_throwerror(vm, _SC("'set_burning' called without instance"));
2039 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2041 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2042 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2047 _this->set_burning(arg0 == SQTrue);
2051 } catch(std::exception& e) {
2052 sq_throwerror(vm, e.what());
2055 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2061 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2063 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2068 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2071 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2072 sq_throwerror(vm, _SC("'start' called without instance"));
2075 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2082 } catch(std::exception& e) {
2083 sq_throwerror(vm, e.what());
2086 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2092 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2095 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2096 sq_throwerror(vm, _SC("'stop' called without instance"));
2099 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2106 } catch(std::exception& e) {
2107 sq_throwerror(vm, e.what());
2110 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2116 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2118 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2123 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2126 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2127 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2130 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2132 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2133 sq_throwerror(vm, _SC("Argument 1 not a float"));
2137 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2138 sq_throwerror(vm, _SC("Argument 2 not a float"));
2143 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2147 } catch(std::exception& e) {
2148 sq_throwerror(vm, e.what());
2151 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2157 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2160 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2161 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2164 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2167 float return_value = _this->get_pos_x();
2169 sq_pushfloat(vm, return_value);
2172 } catch(std::exception& e) {
2173 sq_throwerror(vm, e.what());
2176 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2182 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2185 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2186 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2189 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2192 float return_value = _this->get_pos_y();
2194 sq_pushfloat(vm, return_value);
2197 } catch(std::exception& e) {
2198 sq_throwerror(vm, e.what());
2201 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2207 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2209 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2214 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2217 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2218 sq_throwerror(vm, _SC("'start' called without instance"));
2221 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2228 } catch(std::exception& e) {
2229 sq_throwerror(vm, e.what());
2232 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2238 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2241 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2242 sq_throwerror(vm, _SC("'stop' called without instance"));
2245 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2252 } catch(std::exception& e) {
2253 sq_throwerror(vm, e.what());
2256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2262 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2265 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2266 sq_throwerror(vm, _SC("'thunder' called without instance"));
2269 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2276 } catch(std::exception& e) {
2277 sq_throwerror(vm, e.what());
2280 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2286 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2289 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2290 sq_throwerror(vm, _SC("'lightning' called without instance"));
2293 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2300 } catch(std::exception& e) {
2301 sq_throwerror(vm, e.what());
2304 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2310 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2313 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2314 sq_throwerror(vm, _SC("'flash' called without instance"));
2317 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2324 } catch(std::exception& e) {
2325 sq_throwerror(vm, e.what());
2328 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2334 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2337 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2338 sq_throwerror(vm, _SC("'electrify' called without instance"));
2341 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2348 } catch(std::exception& e) {
2349 sq_throwerror(vm, e.what());
2352 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2358 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2360 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2365 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2368 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2369 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2372 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2374 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2375 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2380 _this->goto_node(static_cast<int> (arg0));
2384 } catch(std::exception& e) {
2385 sq_throwerror(vm, e.what());
2388 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2394 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2397 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2398 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2401 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2404 _this->start_moving();
2408 } catch(std::exception& e) {
2409 sq_throwerror(vm, e.what());
2412 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2418 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2421 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2422 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2425 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2428 _this->stop_moving();
2432 } catch(std::exception& e) {
2433 sq_throwerror(vm, e.what());
2436 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2442 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2445 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2446 sq_throwerror(vm, _SC("'fade' called without instance"));
2449 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2451 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2452 sq_throwerror(vm, _SC("Argument 1 not a float"));
2456 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2457 sq_throwerror(vm, _SC("Argument 2 not a float"));
2462 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2466 } catch(std::exception& e) {
2467 sq_throwerror(vm, e.what());
2470 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2476 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2479 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2480 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2483 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2485 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2486 sq_throwerror(vm, _SC("Argument 1 not a float"));
2491 _this->set_alpha(static_cast<float> (arg0));
2495 } catch(std::exception& e) {
2496 sq_throwerror(vm, e.what());
2499 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2505 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2508 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2509 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2512 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2515 float return_value = _this->get_alpha();
2517 sq_pushfloat(vm, return_value);
2520 } catch(std::exception& e) {
2521 sq_throwerror(vm, e.what());
2524 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2530 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2532 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2537 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2540 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2541 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2544 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2546 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2547 sq_throwerror(vm, _SC("Argument 1 not a float"));
2551 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2552 sq_throwerror(vm, _SC("Argument 2 not a float"));
2556 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2557 sq_throwerror(vm, _SC("Argument 3 not a float"));
2562 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2566 } catch(std::exception& e) {
2567 sq_throwerror(vm, e.what());
2570 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2576 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2579 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2580 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2583 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2586 float return_value = _this->get_ambient_red();
2588 sq_pushfloat(vm, return_value);
2591 } catch(std::exception& e) {
2592 sq_throwerror(vm, e.what());
2595 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2601 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2604 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2605 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2608 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2611 float return_value = _this->get_ambient_green();
2613 sq_pushfloat(vm, return_value);
2616 } catch(std::exception& e) {
2617 sq_throwerror(vm, e.what());
2620 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2626 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2629 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2630 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2633 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2636 float return_value = _this->get_ambient_blue();
2638 sq_pushfloat(vm, return_value);
2641 } catch(std::exception& e) {
2642 sq_throwerror(vm, e.what());
2645 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2651 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2653 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2658 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2661 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2662 sq_throwerror(vm, _SC("'start' called without instance"));
2665 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2672 } catch(std::exception& e) {
2673 sq_throwerror(vm, e.what());
2676 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2682 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2685 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2686 sq_throwerror(vm, _SC("'stop' called without instance"));
2689 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2696 } catch(std::exception& e) {
2697 sq_throwerror(vm, e.what());
2700 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2706 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2709 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2710 sq_throwerror(vm, _SC("'get_time' called without instance"));
2713 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2716 float return_value = _this->get_time();
2718 sq_pushfloat(vm, return_value);
2721 } catch(std::exception& e) {
2722 sq_throwerror(vm, e.what());
2725 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2731 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2734 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2735 sq_throwerror(vm, _SC("'set_time' called without instance"));
2738 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2740 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2741 sq_throwerror(vm, _SC("Argument 1 not a float"));
2746 _this->set_time(static_cast<float> (arg0));
2750 } catch(std::exception& e) {
2751 sq_throwerror(vm, e.what());
2754 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2760 static SQInteger display_wrapper(HSQUIRRELVM vm)
2762 return Scripting::display(vm);
2765 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
2767 HSQUIRRELVM arg0 = vm;
2770 Scripting::print_stacktrace(arg0);
2774 } catch(std::exception& e) {
2775 sq_throwerror(vm, e.what());
2778 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
2784 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
2786 return Scripting::get_current_thread(vm);
2789 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
2792 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2793 sq_throwerror(vm, _SC("Argument 1 not a string"));
2798 Scripting::display_text_file(arg0);
2802 } catch(std::exception& e) {
2803 sq_throwerror(vm, e.what());
2806 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
2812 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
2815 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2816 sq_throwerror(vm, _SC("Argument 1 not a string"));
2821 Scripting::load_worldmap(arg0);
2825 } catch(std::exception& e) {
2826 sq_throwerror(vm, e.what());
2829 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
2835 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
2838 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2839 sq_throwerror(vm, _SC("Argument 1 not a string"));
2844 Scripting::load_level(arg0);
2848 } catch(std::exception& e) {
2849 sq_throwerror(vm, e.what());
2852 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
2858 static SQInteger wait_wrapper(HSQUIRRELVM vm)
2860 HSQUIRRELVM arg0 = vm;
2862 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
2863 sq_throwerror(vm, _SC("Argument 1 not a float"));
2868 Scripting::wait(arg0, static_cast<float> (arg1));
2870 return sq_suspendvm(vm);
2872 } catch(std::exception& e) {
2873 sq_throwerror(vm, e.what());
2876 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
2882 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
2884 HSQUIRRELVM arg0 = vm;
2887 Scripting::wait_for_screenswitch(arg0);
2889 return sq_suspendvm(vm);
2891 } catch(std::exception& e) {
2892 sq_throwerror(vm, e.what());
2895 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
2901 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
2906 Scripting::exit_screen();
2910 } catch(std::exception& e) {
2911 sq_throwerror(vm, e.what());
2914 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
2920 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
2923 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2924 sq_throwerror(vm, _SC("Argument 1 not a float"));
2929 Scripting::fadeout_screen(static_cast<float> (arg0));
2933 } catch(std::exception& e) {
2934 sq_throwerror(vm, e.what());
2937 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
2943 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
2946 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2947 sq_throwerror(vm, _SC("Argument 1 not a float"));
2951 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2952 sq_throwerror(vm, _SC("Argument 2 not a float"));
2956 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2957 sq_throwerror(vm, _SC("Argument 3 not a float"));
2962 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2966 } catch(std::exception& e) {
2967 sq_throwerror(vm, e.what());
2970 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
2976 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
2981 Scripting::abort_screenfade();
2985 } catch(std::exception& e) {
2986 sq_throwerror(vm, e.what());
2989 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
2995 static SQInteger translate_wrapper(HSQUIRRELVM vm)
2998 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2999 sq_throwerror(vm, _SC("Argument 1 not a string"));
3004 std::string return_value = Scripting::translate(arg0);
3006 sq_pushstring(vm, return_value.c_str(), return_value.size());
3009 } catch(std::exception& e) {
3010 sq_throwerror(vm, e.what());
3013 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3019 static SQInteger import_wrapper(HSQUIRRELVM vm)
3021 HSQUIRRELVM arg0 = vm;
3023 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3024 sq_throwerror(vm, _SC("Argument 1 not a string"));
3029 Scripting::import(arg0, arg1);
3033 } catch(std::exception& e) {
3034 sq_throwerror(vm, e.what());
3037 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3043 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3048 Scripting::save_state();
3052 } catch(std::exception& e) {
3053 sq_throwerror(vm, e.what());
3056 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3062 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3067 Scripting::update_worldmap();
3071 } catch(std::exception& e) {
3072 sq_throwerror(vm, e.what());
3075 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3081 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3084 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3085 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3090 Scripting::debug_collrects(arg0 == SQTrue);
3094 } catch(std::exception& e) {
3095 sq_throwerror(vm, e.what());
3098 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3104 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3107 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3108 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3113 Scripting::debug_show_fps(arg0 == SQTrue);
3117 } catch(std::exception& e) {
3118 sq_throwerror(vm, e.what());
3121 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3127 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3130 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3131 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3136 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3140 } catch(std::exception& e) {
3141 sq_throwerror(vm, e.what());
3144 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3150 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3153 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3154 sq_throwerror(vm, _SC("Argument 1 not a string"));
3159 Scripting::play_music(arg0);
3163 } catch(std::exception& e) {
3164 sq_throwerror(vm, e.what());
3167 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3173 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3176 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3177 sq_throwerror(vm, _SC("Argument 1 not a string"));
3182 Scripting::play_sound(arg0);
3186 } catch(std::exception& e) {
3187 sq_throwerror(vm, e.what());
3190 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3196 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3201 Scripting::grease();
3205 } catch(std::exception& e) {
3206 sq_throwerror(vm, e.what());
3209 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3215 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3220 Scripting::invincible();
3224 } catch(std::exception& e) {
3225 sq_throwerror(vm, e.what());
3228 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3234 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3243 } catch(std::exception& e) {
3244 sq_throwerror(vm, e.what());
3247 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3253 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3258 Scripting::mortal();
3262 } catch(std::exception& e) {
3263 sq_throwerror(vm, e.what());
3266 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3272 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3277 Scripting::restart();
3281 } catch(std::exception& e) {
3282 sq_throwerror(vm, e.what());
3285 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3291 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3296 Scripting::whereami();
3300 } catch(std::exception& e) {
3301 sq_throwerror(vm, e.what());
3304 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3310 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3315 Scripting::gotoend();
3319 } catch(std::exception& e) {
3320 sq_throwerror(vm, e.what());
3323 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3329 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3334 Scripting::camera();
3338 } catch(std::exception& e) {
3339 sq_throwerror(vm, e.what());
3342 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3348 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3357 } catch(std::exception& e) {
3358 sq_throwerror(vm, e.what());
3361 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3367 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3371 int return_value = Scripting::rand();
3373 sq_pushinteger(vm, return_value);
3376 } catch(std::exception& e) {
3377 sq_throwerror(vm, e.what());
3380 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3386 } // end of namespace Wrapper
3387 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3389 using namespace Wrapper;
3391 sq_pushroottable(v);
3392 sq_pushstring(v, "DisplayEffect", -1);
3393 if(SQ_FAILED(sq_get(v, -2))) {
3394 std::ostringstream msg;
3395 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3396 throw SquirrelError(v, msg.str());
3399 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3400 std::ostringstream msg;
3401 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3402 throw SquirrelError(v, msg.str());
3404 sq_remove(v, -2); // remove object name
3406 if(setup_releasehook) {
3407 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3410 sq_remove(v, -2); // remove root table
3413 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3415 using namespace Wrapper;
3417 sq_pushroottable(v);
3418 sq_pushstring(v, "Camera", -1);
3419 if(SQ_FAILED(sq_get(v, -2))) {
3420 std::ostringstream msg;
3421 msg << "Couldn't resolved squirrel type 'Camera'";
3422 throw SquirrelError(v, msg.str());
3425 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3426 std::ostringstream msg;
3427 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3428 throw SquirrelError(v, msg.str());
3430 sq_remove(v, -2); // remove object name
3432 if(setup_releasehook) {
3433 sq_setreleasehook(v, -1, Camera_release_hook);
3436 sq_remove(v, -2); // remove root table
3439 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3441 using namespace Wrapper;
3443 sq_pushroottable(v);
3444 sq_pushstring(v, "Level", -1);
3445 if(SQ_FAILED(sq_get(v, -2))) {
3446 std::ostringstream msg;
3447 msg << "Couldn't resolved squirrel type 'Level'";
3448 throw SquirrelError(v, msg.str());
3451 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3452 std::ostringstream msg;
3453 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3454 throw SquirrelError(v, msg.str());
3456 sq_remove(v, -2); // remove object name
3458 if(setup_releasehook) {
3459 sq_setreleasehook(v, -1, Level_release_hook);
3462 sq_remove(v, -2); // remove root table
3465 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3467 using namespace Wrapper;
3469 sq_pushroottable(v);
3470 sq_pushstring(v, "ScriptedObject", -1);
3471 if(SQ_FAILED(sq_get(v, -2))) {
3472 std::ostringstream msg;
3473 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3474 throw SquirrelError(v, msg.str());
3477 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3478 std::ostringstream msg;
3479 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3480 throw SquirrelError(v, msg.str());
3482 sq_remove(v, -2); // remove object name
3484 if(setup_releasehook) {
3485 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3488 sq_remove(v, -2); // remove root table
3491 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3493 using namespace Wrapper;
3495 sq_pushroottable(v);
3496 sq_pushstring(v, "Text", -1);
3497 if(SQ_FAILED(sq_get(v, -2))) {
3498 std::ostringstream msg;
3499 msg << "Couldn't resolved squirrel type 'Text'";
3500 throw SquirrelError(v, msg.str());
3503 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3504 std::ostringstream msg;
3505 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3506 throw SquirrelError(v, msg.str());
3508 sq_remove(v, -2); // remove object name
3510 if(setup_releasehook) {
3511 sq_setreleasehook(v, -1, Text_release_hook);
3514 sq_remove(v, -2); // remove root table
3517 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3519 using namespace Wrapper;
3521 sq_pushroottable(v);
3522 sq_pushstring(v, "Player", -1);
3523 if(SQ_FAILED(sq_get(v, -2))) {
3524 std::ostringstream msg;
3525 msg << "Couldn't resolved squirrel type 'Player'";
3526 throw SquirrelError(v, msg.str());
3529 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3530 std::ostringstream msg;
3531 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3532 throw SquirrelError(v, msg.str());
3534 sq_remove(v, -2); // remove object name
3536 if(setup_releasehook) {
3537 sq_setreleasehook(v, -1, Player_release_hook);
3540 sq_remove(v, -2); // remove root table
3543 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3545 using namespace Wrapper;
3547 sq_pushroottable(v);
3548 sq_pushstring(v, "FloatingImage", -1);
3549 if(SQ_FAILED(sq_get(v, -2))) {
3550 std::ostringstream msg;
3551 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3552 throw SquirrelError(v, msg.str());
3555 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3556 std::ostringstream msg;
3557 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3558 throw SquirrelError(v, msg.str());
3560 sq_remove(v, -2); // remove object name
3562 if(setup_releasehook) {
3563 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3566 sq_remove(v, -2); // remove root table
3569 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3571 using namespace Wrapper;
3573 sq_pushroottable(v);
3574 sq_pushstring(v, "Platform", -1);
3575 if(SQ_FAILED(sq_get(v, -2))) {
3576 std::ostringstream msg;
3577 msg << "Couldn't resolved squirrel type 'Platform'";
3578 throw SquirrelError(v, msg.str());
3581 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3582 std::ostringstream msg;
3583 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3584 throw SquirrelError(v, msg.str());
3586 sq_remove(v, -2); // remove object name
3588 if(setup_releasehook) {
3589 sq_setreleasehook(v, -1, Platform_release_hook);
3592 sq_remove(v, -2); // remove root table
3595 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3597 using namespace Wrapper;
3599 sq_pushroottable(v);
3600 sq_pushstring(v, "Candle", -1);
3601 if(SQ_FAILED(sq_get(v, -2))) {
3602 std::ostringstream msg;
3603 msg << "Couldn't resolved squirrel type 'Candle'";
3604 throw SquirrelError(v, msg.str());
3607 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3608 std::ostringstream msg;
3609 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3610 throw SquirrelError(v, msg.str());
3612 sq_remove(v, -2); // remove object name
3614 if(setup_releasehook) {
3615 sq_setreleasehook(v, -1, Candle_release_hook);
3618 sq_remove(v, -2); // remove root table
3621 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3623 using namespace Wrapper;
3625 sq_pushroottable(v);
3626 sq_pushstring(v, "Wind", -1);
3627 if(SQ_FAILED(sq_get(v, -2))) {
3628 std::ostringstream msg;
3629 msg << "Couldn't resolved squirrel type 'Wind'";
3630 throw SquirrelError(v, msg.str());
3633 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3634 std::ostringstream msg;
3635 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3636 throw SquirrelError(v, msg.str());
3638 sq_remove(v, -2); // remove object name
3640 if(setup_releasehook) {
3641 sq_setreleasehook(v, -1, Wind_release_hook);
3644 sq_remove(v, -2); // remove root table
3647 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3649 using namespace Wrapper;
3651 sq_pushroottable(v);
3652 sq_pushstring(v, "AmbientSound", -1);
3653 if(SQ_FAILED(sq_get(v, -2))) {
3654 std::ostringstream msg;
3655 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3656 throw SquirrelError(v, msg.str());
3659 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3660 std::ostringstream msg;
3661 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3662 throw SquirrelError(v, msg.str());
3664 sq_remove(v, -2); // remove object name
3666 if(setup_releasehook) {
3667 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3670 sq_remove(v, -2); // remove root table
3673 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3675 using namespace Wrapper;
3677 sq_pushroottable(v);
3678 sq_pushstring(v, "Thunderstorm", -1);
3679 if(SQ_FAILED(sq_get(v, -2))) {
3680 std::ostringstream msg;
3681 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3682 throw SquirrelError(v, msg.str());
3685 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3686 std::ostringstream msg;
3687 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3688 throw SquirrelError(v, msg.str());
3690 sq_remove(v, -2); // remove object name
3692 if(setup_releasehook) {
3693 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3696 sq_remove(v, -2); // remove root table
3699 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3701 using namespace Wrapper;
3703 sq_pushroottable(v);
3704 sq_pushstring(v, "TileMap", -1);
3705 if(SQ_FAILED(sq_get(v, -2))) {
3706 std::ostringstream msg;
3707 msg << "Couldn't resolved squirrel type 'TileMap'";
3708 throw SquirrelError(v, msg.str());
3711 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3712 std::ostringstream msg;
3713 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3714 throw SquirrelError(v, msg.str());
3716 sq_remove(v, -2); // remove object name
3718 if(setup_releasehook) {
3719 sq_setreleasehook(v, -1, TileMap_release_hook);
3722 sq_remove(v, -2); // remove root table
3725 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3727 using namespace Wrapper;
3729 sq_pushroottable(v);
3730 sq_pushstring(v, "SSector", -1);
3731 if(SQ_FAILED(sq_get(v, -2))) {
3732 std::ostringstream msg;
3733 msg << "Couldn't resolved squirrel type 'SSector'";
3734 throw SquirrelError(v, msg.str());
3737 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3738 std::ostringstream msg;
3739 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3740 throw SquirrelError(v, msg.str());
3742 sq_remove(v, -2); // remove object name
3744 if(setup_releasehook) {
3745 sq_setreleasehook(v, -1, SSector_release_hook);
3748 sq_remove(v, -2); // remove root table
3751 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3753 using namespace Wrapper;
3755 sq_pushroottable(v);
3756 sq_pushstring(v, "LevelTime", -1);
3757 if(SQ_FAILED(sq_get(v, -2))) {
3758 std::ostringstream msg;
3759 msg << "Couldn't resolved squirrel type 'LevelTime'";
3760 throw SquirrelError(v, msg.str());
3763 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3764 std::ostringstream msg;
3765 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3766 throw SquirrelError(v, msg.str());
3768 sq_remove(v, -2); // remove object name
3770 if(setup_releasehook) {
3771 sq_setreleasehook(v, -1, LevelTime_release_hook);
3774 sq_remove(v, -2); // remove root table
3777 void register_supertux_wrapper(HSQUIRRELVM v)
3779 using namespace Wrapper;
3781 sq_pushstring(v, "ANCHOR_TOP", -1);
3782 sq_pushinteger(v, 16);
3783 if(SQ_FAILED(sq_createslot(v, -3))) {
3784 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
3787 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
3788 sq_pushinteger(v, 32);
3789 if(SQ_FAILED(sq_createslot(v, -3))) {
3790 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
3793 sq_pushstring(v, "ANCHOR_LEFT", -1);
3794 sq_pushinteger(v, 1);
3795 if(SQ_FAILED(sq_createslot(v, -3))) {
3796 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
3799 sq_pushstring(v, "ANCHOR_RIGHT", -1);
3800 sq_pushinteger(v, 2);
3801 if(SQ_FAILED(sq_createslot(v, -3))) {
3802 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
3805 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
3806 sq_pushinteger(v, 0);
3807 if(SQ_FAILED(sq_createslot(v, -3))) {
3808 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
3811 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
3812 sq_pushinteger(v, 17);
3813 if(SQ_FAILED(sq_createslot(v, -3))) {
3814 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
3817 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
3818 sq_pushinteger(v, 18);
3819 if(SQ_FAILED(sq_createslot(v, -3))) {
3820 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
3823 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
3824 sq_pushinteger(v, 33);
3825 if(SQ_FAILED(sq_createslot(v, -3))) {
3826 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
3829 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
3830 sq_pushinteger(v, 34);
3831 if(SQ_FAILED(sq_createslot(v, -3))) {
3832 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
3835 sq_pushstring(v, "display", -1);
3836 sq_newclosure(v, &display_wrapper, 0);
3837 if(SQ_FAILED(sq_createslot(v, -3))) {
3838 throw SquirrelError(v, "Couldn't register function 'display'");
3841 sq_pushstring(v, "print_stacktrace", -1);
3842 sq_newclosure(v, &print_stacktrace_wrapper, 0);
3843 if(SQ_FAILED(sq_createslot(v, -3))) {
3844 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
3847 sq_pushstring(v, "get_current_thread", -1);
3848 sq_newclosure(v, &get_current_thread_wrapper, 0);
3849 if(SQ_FAILED(sq_createslot(v, -3))) {
3850 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
3853 sq_pushstring(v, "display_text_file", -1);
3854 sq_newclosure(v, &display_text_file_wrapper, 0);
3855 if(SQ_FAILED(sq_createslot(v, -3))) {
3856 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
3859 sq_pushstring(v, "load_worldmap", -1);
3860 sq_newclosure(v, &load_worldmap_wrapper, 0);
3861 if(SQ_FAILED(sq_createslot(v, -3))) {
3862 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
3865 sq_pushstring(v, "load_level", -1);
3866 sq_newclosure(v, &load_level_wrapper, 0);
3867 if(SQ_FAILED(sq_createslot(v, -3))) {
3868 throw SquirrelError(v, "Couldn't register function 'load_level'");
3871 sq_pushstring(v, "wait", -1);
3872 sq_newclosure(v, &wait_wrapper, 0);
3873 if(SQ_FAILED(sq_createslot(v, -3))) {
3874 throw SquirrelError(v, "Couldn't register function 'wait'");
3877 sq_pushstring(v, "wait_for_screenswitch", -1);
3878 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
3879 if(SQ_FAILED(sq_createslot(v, -3))) {
3880 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
3883 sq_pushstring(v, "exit_screen", -1);
3884 sq_newclosure(v, &exit_screen_wrapper, 0);
3885 if(SQ_FAILED(sq_createslot(v, -3))) {
3886 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
3889 sq_pushstring(v, "fadeout_screen", -1);
3890 sq_newclosure(v, &fadeout_screen_wrapper, 0);
3891 if(SQ_FAILED(sq_createslot(v, -3))) {
3892 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
3895 sq_pushstring(v, "shrink_screen", -1);
3896 sq_newclosure(v, &shrink_screen_wrapper, 0);
3897 if(SQ_FAILED(sq_createslot(v, -3))) {
3898 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
3901 sq_pushstring(v, "abort_screenfade", -1);
3902 sq_newclosure(v, &abort_screenfade_wrapper, 0);
3903 if(SQ_FAILED(sq_createslot(v, -3))) {
3904 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
3907 sq_pushstring(v, "translate", -1);
3908 sq_newclosure(v, &translate_wrapper, 0);
3909 if(SQ_FAILED(sq_createslot(v, -3))) {
3910 throw SquirrelError(v, "Couldn't register function 'translate'");
3913 sq_pushstring(v, "import", -1);
3914 sq_newclosure(v, &import_wrapper, 0);
3915 if(SQ_FAILED(sq_createslot(v, -3))) {
3916 throw SquirrelError(v, "Couldn't register function 'import'");
3919 sq_pushstring(v, "save_state", -1);
3920 sq_newclosure(v, &save_state_wrapper, 0);
3921 if(SQ_FAILED(sq_createslot(v, -3))) {
3922 throw SquirrelError(v, "Couldn't register function 'save_state'");
3925 sq_pushstring(v, "update_worldmap", -1);
3926 sq_newclosure(v, &update_worldmap_wrapper, 0);
3927 if(SQ_FAILED(sq_createslot(v, -3))) {
3928 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
3931 sq_pushstring(v, "debug_collrects", -1);
3932 sq_newclosure(v, &debug_collrects_wrapper, 0);
3933 if(SQ_FAILED(sq_createslot(v, -3))) {
3934 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
3937 sq_pushstring(v, "debug_show_fps", -1);
3938 sq_newclosure(v, &debug_show_fps_wrapper, 0);
3939 if(SQ_FAILED(sq_createslot(v, -3))) {
3940 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
3943 sq_pushstring(v, "debug_draw_solids_only", -1);
3944 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
3945 if(SQ_FAILED(sq_createslot(v, -3))) {
3946 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
3949 sq_pushstring(v, "play_music", -1);
3950 sq_newclosure(v, &play_music_wrapper, 0);
3951 if(SQ_FAILED(sq_createslot(v, -3))) {
3952 throw SquirrelError(v, "Couldn't register function 'play_music'");
3955 sq_pushstring(v, "play_sound", -1);
3956 sq_newclosure(v, &play_sound_wrapper, 0);
3957 if(SQ_FAILED(sq_createslot(v, -3))) {
3958 throw SquirrelError(v, "Couldn't register function 'play_sound'");
3961 sq_pushstring(v, "grease", -1);
3962 sq_newclosure(v, &grease_wrapper, 0);
3963 if(SQ_FAILED(sq_createslot(v, -3))) {
3964 throw SquirrelError(v, "Couldn't register function 'grease'");
3967 sq_pushstring(v, "invincible", -1);
3968 sq_newclosure(v, &invincible_wrapper, 0);
3969 if(SQ_FAILED(sq_createslot(v, -3))) {
3970 throw SquirrelError(v, "Couldn't register function 'invincible'");
3973 sq_pushstring(v, "ghost", -1);
3974 sq_newclosure(v, &ghost_wrapper, 0);
3975 if(SQ_FAILED(sq_createslot(v, -3))) {
3976 throw SquirrelError(v, "Couldn't register function 'ghost'");
3979 sq_pushstring(v, "mortal", -1);
3980 sq_newclosure(v, &mortal_wrapper, 0);
3981 if(SQ_FAILED(sq_createslot(v, -3))) {
3982 throw SquirrelError(v, "Couldn't register function 'mortal'");
3985 sq_pushstring(v, "restart", -1);
3986 sq_newclosure(v, &restart_wrapper, 0);
3987 if(SQ_FAILED(sq_createslot(v, -3))) {
3988 throw SquirrelError(v, "Couldn't register function 'restart'");
3991 sq_pushstring(v, "whereami", -1);
3992 sq_newclosure(v, &whereami_wrapper, 0);
3993 if(SQ_FAILED(sq_createslot(v, -3))) {
3994 throw SquirrelError(v, "Couldn't register function 'whereami'");
3997 sq_pushstring(v, "gotoend", -1);
3998 sq_newclosure(v, &gotoend_wrapper, 0);
3999 if(SQ_FAILED(sq_createslot(v, -3))) {
4000 throw SquirrelError(v, "Couldn't register function 'gotoend'");
4003 sq_pushstring(v, "camera", -1);
4004 sq_newclosure(v, &camera_wrapper, 0);
4005 if(SQ_FAILED(sq_createslot(v, -3))) {
4006 throw SquirrelError(v, "Couldn't register function 'camera'");
4009 sq_pushstring(v, "quit", -1);
4010 sq_newclosure(v, &quit_wrapper, 0);
4011 if(SQ_FAILED(sq_createslot(v, -3))) {
4012 throw SquirrelError(v, "Couldn't register function 'quit'");
4015 sq_pushstring(v, "rand", -1);
4016 sq_newclosure(v, &rand_wrapper, 0);
4017 if(SQ_FAILED(sq_createslot(v, -3))) {
4018 throw SquirrelError(v, "Couldn't register function 'rand'");
4021 // Register class DisplayEffect
4022 sq_pushstring(v, "DisplayEffect", -1);
4023 if(sq_newclass(v, SQFalse) < 0) {
4024 std::ostringstream msg;
4025 msg << "Couldn't create new class 'DisplayEffect'";
4026 throw SquirrelError(v, msg.str());
4028 sq_pushstring(v, "fade_out", -1);
4029 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4030 if(SQ_FAILED(sq_createslot(v, -3))) {
4031 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4034 sq_pushstring(v, "fade_in", -1);
4035 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4036 if(SQ_FAILED(sq_createslot(v, -3))) {
4037 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4040 sq_pushstring(v, "set_black", -1);
4041 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4042 if(SQ_FAILED(sq_createslot(v, -3))) {
4043 throw SquirrelError(v, "Couldn't register function 'set_black'");
4046 sq_pushstring(v, "is_black", -1);
4047 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4048 if(SQ_FAILED(sq_createslot(v, -3))) {
4049 throw SquirrelError(v, "Couldn't register function 'is_black'");
4052 sq_pushstring(v, "sixteen_to_nine", -1);
4053 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4054 if(SQ_FAILED(sq_createslot(v, -3))) {
4055 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4058 sq_pushstring(v, "four_to_three", -1);
4059 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4060 if(SQ_FAILED(sq_createslot(v, -3))) {
4061 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4064 if(SQ_FAILED(sq_createslot(v, -3))) {
4065 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4068 // Register class Camera
4069 sq_pushstring(v, "Camera", -1);
4070 if(sq_newclass(v, SQFalse) < 0) {
4071 std::ostringstream msg;
4072 msg << "Couldn't create new class 'Camera'";
4073 throw SquirrelError(v, msg.str());
4075 sq_pushstring(v, "reload_config", -1);
4076 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4077 if(SQ_FAILED(sq_createslot(v, -3))) {
4078 throw SquirrelError(v, "Couldn't register function 'reload_config'");
4081 sq_pushstring(v, "shake", -1);
4082 sq_newclosure(v, &Camera_shake_wrapper, 0);
4083 if(SQ_FAILED(sq_createslot(v, -3))) {
4084 throw SquirrelError(v, "Couldn't register function 'shake'");
4087 sq_pushstring(v, "set_pos", -1);
4088 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4089 if(SQ_FAILED(sq_createslot(v, -3))) {
4090 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4093 sq_pushstring(v, "set_mode", -1);
4094 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4095 if(SQ_FAILED(sq_createslot(v, -3))) {
4096 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4099 sq_pushstring(v, "scroll_to", -1);
4100 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4101 if(SQ_FAILED(sq_createslot(v, -3))) {
4102 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4105 if(SQ_FAILED(sq_createslot(v, -3))) {
4106 throw SquirrelError(v, "Couldn't register class 'Camera'");
4109 // Register class Level
4110 sq_pushstring(v, "Level", -1);
4111 if(sq_newclass(v, SQFalse) < 0) {
4112 std::ostringstream msg;
4113 msg << "Couldn't create new class 'Level'";
4114 throw SquirrelError(v, msg.str());
4116 sq_pushstring(v, "finish", -1);
4117 sq_newclosure(v, &Level_finish_wrapper, 0);
4118 if(SQ_FAILED(sq_createslot(v, -3))) {
4119 throw SquirrelError(v, "Couldn't register function 'finish'");
4122 sq_pushstring(v, "spawn", -1);
4123 sq_newclosure(v, &Level_spawn_wrapper, 0);
4124 if(SQ_FAILED(sq_createslot(v, -3))) {
4125 throw SquirrelError(v, "Couldn't register function 'spawn'");
4128 sq_pushstring(v, "flip_vertically", -1);
4129 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4130 if(SQ_FAILED(sq_createslot(v, -3))) {
4131 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4134 sq_pushstring(v, "toggle_pause", -1);
4135 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4136 if(SQ_FAILED(sq_createslot(v, -3))) {
4137 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4140 if(SQ_FAILED(sq_createslot(v, -3))) {
4141 throw SquirrelError(v, "Couldn't register class 'Level'");
4144 // Register class ScriptedObject
4145 sq_pushstring(v, "ScriptedObject", -1);
4146 if(sq_newclass(v, SQFalse) < 0) {
4147 std::ostringstream msg;
4148 msg << "Couldn't create new class 'ScriptedObject'";
4149 throw SquirrelError(v, msg.str());
4151 sq_pushstring(v, "set_action", -1);
4152 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4153 if(SQ_FAILED(sq_createslot(v, -3))) {
4154 throw SquirrelError(v, "Couldn't register function 'set_action'");
4157 sq_pushstring(v, "get_action", -1);
4158 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4159 if(SQ_FAILED(sq_createslot(v, -3))) {
4160 throw SquirrelError(v, "Couldn't register function 'get_action'");
4163 sq_pushstring(v, "move", -1);
4164 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4165 if(SQ_FAILED(sq_createslot(v, -3))) {
4166 throw SquirrelError(v, "Couldn't register function 'move'");
4169 sq_pushstring(v, "set_pos", -1);
4170 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4171 if(SQ_FAILED(sq_createslot(v, -3))) {
4172 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4175 sq_pushstring(v, "get_pos_x", -1);
4176 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4177 if(SQ_FAILED(sq_createslot(v, -3))) {
4178 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4181 sq_pushstring(v, "get_pos_y", -1);
4182 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4183 if(SQ_FAILED(sq_createslot(v, -3))) {
4184 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4187 sq_pushstring(v, "set_velocity", -1);
4188 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4189 if(SQ_FAILED(sq_createslot(v, -3))) {
4190 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4193 sq_pushstring(v, "get_velocity_x", -1);
4194 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4195 if(SQ_FAILED(sq_createslot(v, -3))) {
4196 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4199 sq_pushstring(v, "get_velocity_y", -1);
4200 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4201 if(SQ_FAILED(sq_createslot(v, -3))) {
4202 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4205 sq_pushstring(v, "set_visible", -1);
4206 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4207 if(SQ_FAILED(sq_createslot(v, -3))) {
4208 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4211 sq_pushstring(v, "is_visible", -1);
4212 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4213 if(SQ_FAILED(sq_createslot(v, -3))) {
4214 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4217 sq_pushstring(v, "set_solid", -1);
4218 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4219 if(SQ_FAILED(sq_createslot(v, -3))) {
4220 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4223 sq_pushstring(v, "is_solid", -1);
4224 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4225 if(SQ_FAILED(sq_createslot(v, -3))) {
4226 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4229 sq_pushstring(v, "get_name", -1);
4230 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4231 if(SQ_FAILED(sq_createslot(v, -3))) {
4232 throw SquirrelError(v, "Couldn't register function 'get_name'");
4235 if(SQ_FAILED(sq_createslot(v, -3))) {
4236 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4239 // Register class Text
4240 sq_pushstring(v, "Text", -1);
4241 if(sq_newclass(v, SQFalse) < 0) {
4242 std::ostringstream msg;
4243 msg << "Couldn't create new class 'Text'";
4244 throw SquirrelError(v, msg.str());
4246 sq_pushstring(v, "set_text", -1);
4247 sq_newclosure(v, &Text_set_text_wrapper, 0);
4248 if(SQ_FAILED(sq_createslot(v, -3))) {
4249 throw SquirrelError(v, "Couldn't register function 'set_text'");
4252 sq_pushstring(v, "set_font", -1);
4253 sq_newclosure(v, &Text_set_font_wrapper, 0);
4254 if(SQ_FAILED(sq_createslot(v, -3))) {
4255 throw SquirrelError(v, "Couldn't register function 'set_font'");
4258 sq_pushstring(v, "fade_in", -1);
4259 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4260 if(SQ_FAILED(sq_createslot(v, -3))) {
4261 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4264 sq_pushstring(v, "fade_out", -1);
4265 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4266 if(SQ_FAILED(sq_createslot(v, -3))) {
4267 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4270 sq_pushstring(v, "set_visible", -1);
4271 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4272 if(SQ_FAILED(sq_createslot(v, -3))) {
4273 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4276 sq_pushstring(v, "set_centered", -1);
4277 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4278 if(SQ_FAILED(sq_createslot(v, -3))) {
4279 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4282 if(SQ_FAILED(sq_createslot(v, -3))) {
4283 throw SquirrelError(v, "Couldn't register class 'Text'");
4286 // Register class Player
4287 sq_pushstring(v, "Player", -1);
4288 if(sq_newclass(v, SQFalse) < 0) {
4289 std::ostringstream msg;
4290 msg << "Couldn't create new class 'Player'";
4291 throw SquirrelError(v, msg.str());
4293 sq_pushstring(v, "add_bonus", -1);
4294 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4295 if(SQ_FAILED(sq_createslot(v, -3))) {
4296 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4299 sq_pushstring(v, "add_coins", -1);
4300 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4301 if(SQ_FAILED(sq_createslot(v, -3))) {
4302 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4305 sq_pushstring(v, "make_invincible", -1);
4306 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4307 if(SQ_FAILED(sq_createslot(v, -3))) {
4308 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4311 sq_pushstring(v, "deactivate", -1);
4312 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4313 if(SQ_FAILED(sq_createslot(v, -3))) {
4314 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4317 sq_pushstring(v, "activate", -1);
4318 sq_newclosure(v, &Player_activate_wrapper, 0);
4319 if(SQ_FAILED(sq_createslot(v, -3))) {
4320 throw SquirrelError(v, "Couldn't register function 'activate'");
4323 sq_pushstring(v, "walk", -1);
4324 sq_newclosure(v, &Player_walk_wrapper, 0);
4325 if(SQ_FAILED(sq_createslot(v, -3))) {
4326 throw SquirrelError(v, "Couldn't register function 'walk'");
4329 sq_pushstring(v, "set_visible", -1);
4330 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4331 if(SQ_FAILED(sq_createslot(v, -3))) {
4332 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4335 sq_pushstring(v, "get_visible", -1);
4336 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4337 if(SQ_FAILED(sq_createslot(v, -3))) {
4338 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4341 sq_pushstring(v, "kill", -1);
4342 sq_newclosure(v, &Player_kill_wrapper, 0);
4343 if(SQ_FAILED(sq_createslot(v, -3))) {
4344 throw SquirrelError(v, "Couldn't register function 'kill'");
4347 sq_pushstring(v, "set_ghost_mode", -1);
4348 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4349 if(SQ_FAILED(sq_createslot(v, -3))) {
4350 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4353 sq_pushstring(v, "get_ghost_mode", -1);
4354 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4355 if(SQ_FAILED(sq_createslot(v, -3))) {
4356 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4359 sq_pushstring(v, "do_cheer", -1);
4360 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4361 if(SQ_FAILED(sq_createslot(v, -3))) {
4362 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4365 sq_pushstring(v, "do_duck", -1);
4366 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4367 if(SQ_FAILED(sq_createslot(v, -3))) {
4368 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4371 sq_pushstring(v, "do_standup", -1);
4372 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4373 if(SQ_FAILED(sq_createslot(v, -3))) {
4374 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4377 sq_pushstring(v, "do_backflip", -1);
4378 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4379 if(SQ_FAILED(sq_createslot(v, -3))) {
4380 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4383 sq_pushstring(v, "do_jump", -1);
4384 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4385 if(SQ_FAILED(sq_createslot(v, -3))) {
4386 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4389 sq_pushstring(v, "trigger_sequence", -1);
4390 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4391 if(SQ_FAILED(sq_createslot(v, -3))) {
4392 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4395 if(SQ_FAILED(sq_createslot(v, -3))) {
4396 throw SquirrelError(v, "Couldn't register class 'Player'");
4399 // Register class FloatingImage
4400 sq_pushstring(v, "FloatingImage", -1);
4401 if(sq_newclass(v, SQFalse) < 0) {
4402 std::ostringstream msg;
4403 msg << "Couldn't create new class 'FloatingImage'";
4404 throw SquirrelError(v, msg.str());
4406 sq_pushstring(v, "constructor", -1);
4407 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4408 if(SQ_FAILED(sq_createslot(v, -3))) {
4409 throw SquirrelError(v, "Couldn't register function 'constructor'");
4412 sq_pushstring(v, "set_layer", -1);
4413 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4414 if(SQ_FAILED(sq_createslot(v, -3))) {
4415 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4418 sq_pushstring(v, "get_layer", -1);
4419 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4420 if(SQ_FAILED(sq_createslot(v, -3))) {
4421 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4424 sq_pushstring(v, "set_pos", -1);
4425 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4426 if(SQ_FAILED(sq_createslot(v, -3))) {
4427 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4430 sq_pushstring(v, "get_pos_x", -1);
4431 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4432 if(SQ_FAILED(sq_createslot(v, -3))) {
4433 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4436 sq_pushstring(v, "get_pos_y", -1);
4437 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4438 if(SQ_FAILED(sq_createslot(v, -3))) {
4439 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4442 sq_pushstring(v, "set_anchor_point", -1);
4443 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4444 if(SQ_FAILED(sq_createslot(v, -3))) {
4445 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4448 sq_pushstring(v, "get_anchor_point", -1);
4449 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4450 if(SQ_FAILED(sq_createslot(v, -3))) {
4451 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4454 sq_pushstring(v, "set_visible", -1);
4455 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4456 if(SQ_FAILED(sq_createslot(v, -3))) {
4457 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4460 sq_pushstring(v, "get_visible", -1);
4461 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4462 if(SQ_FAILED(sq_createslot(v, -3))) {
4463 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4466 sq_pushstring(v, "set_action", -1);
4467 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4468 if(SQ_FAILED(sq_createslot(v, -3))) {
4469 throw SquirrelError(v, "Couldn't register function 'set_action'");
4472 sq_pushstring(v, "get_action", -1);
4473 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4474 if(SQ_FAILED(sq_createslot(v, -3))) {
4475 throw SquirrelError(v, "Couldn't register function 'get_action'");
4478 sq_pushstring(v, "fade_in", -1);
4479 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4480 if(SQ_FAILED(sq_createslot(v, -3))) {
4481 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4484 sq_pushstring(v, "fade_out", -1);
4485 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4486 if(SQ_FAILED(sq_createslot(v, -3))) {
4487 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4490 if(SQ_FAILED(sq_createslot(v, -3))) {
4491 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4494 // Register class Platform
4495 sq_pushstring(v, "Platform", -1);
4496 if(sq_newclass(v, SQFalse) < 0) {
4497 std::ostringstream msg;
4498 msg << "Couldn't create new class 'Platform'";
4499 throw SquirrelError(v, msg.str());
4501 sq_pushstring(v, "goto_node", -1);
4502 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4503 if(SQ_FAILED(sq_createslot(v, -3))) {
4504 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4507 sq_pushstring(v, "start_moving", -1);
4508 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4509 if(SQ_FAILED(sq_createslot(v, -3))) {
4510 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4513 sq_pushstring(v, "stop_moving", -1);
4514 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4515 if(SQ_FAILED(sq_createslot(v, -3))) {
4516 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4519 if(SQ_FAILED(sq_createslot(v, -3))) {
4520 throw SquirrelError(v, "Couldn't register class 'Platform'");
4523 // Register class Candle
4524 sq_pushstring(v, "Candle", -1);
4525 if(sq_newclass(v, SQFalse) < 0) {
4526 std::ostringstream msg;
4527 msg << "Couldn't create new class 'Candle'";
4528 throw SquirrelError(v, msg.str());
4530 sq_pushstring(v, "get_burning", -1);
4531 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4532 if(SQ_FAILED(sq_createslot(v, -3))) {
4533 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4536 sq_pushstring(v, "set_burning", -1);
4537 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4538 if(SQ_FAILED(sq_createslot(v, -3))) {
4539 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4542 if(SQ_FAILED(sq_createslot(v, -3))) {
4543 throw SquirrelError(v, "Couldn't register class 'Candle'");
4546 // Register class Wind
4547 sq_pushstring(v, "Wind", -1);
4548 if(sq_newclass(v, SQFalse) < 0) {
4549 std::ostringstream msg;
4550 msg << "Couldn't create new class 'Wind'";
4551 throw SquirrelError(v, msg.str());
4553 sq_pushstring(v, "start", -1);
4554 sq_newclosure(v, &Wind_start_wrapper, 0);
4555 if(SQ_FAILED(sq_createslot(v, -3))) {
4556 throw SquirrelError(v, "Couldn't register function 'start'");
4559 sq_pushstring(v, "stop", -1);
4560 sq_newclosure(v, &Wind_stop_wrapper, 0);
4561 if(SQ_FAILED(sq_createslot(v, -3))) {
4562 throw SquirrelError(v, "Couldn't register function 'stop'");
4565 if(SQ_FAILED(sq_createslot(v, -3))) {
4566 throw SquirrelError(v, "Couldn't register class 'Wind'");
4569 // Register class AmbientSound
4570 sq_pushstring(v, "AmbientSound", -1);
4571 if(sq_newclass(v, SQFalse) < 0) {
4572 std::ostringstream msg;
4573 msg << "Couldn't create new class 'AmbientSound'";
4574 throw SquirrelError(v, msg.str());
4576 sq_pushstring(v, "set_pos", -1);
4577 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4578 if(SQ_FAILED(sq_createslot(v, -3))) {
4579 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4582 sq_pushstring(v, "get_pos_x", -1);
4583 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4584 if(SQ_FAILED(sq_createslot(v, -3))) {
4585 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4588 sq_pushstring(v, "get_pos_y", -1);
4589 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4590 if(SQ_FAILED(sq_createslot(v, -3))) {
4591 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4594 if(SQ_FAILED(sq_createslot(v, -3))) {
4595 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4598 // Register class Thunderstorm
4599 sq_pushstring(v, "Thunderstorm", -1);
4600 if(sq_newclass(v, SQFalse) < 0) {
4601 std::ostringstream msg;
4602 msg << "Couldn't create new class 'Thunderstorm'";
4603 throw SquirrelError(v, msg.str());
4605 sq_pushstring(v, "start", -1);
4606 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4607 if(SQ_FAILED(sq_createslot(v, -3))) {
4608 throw SquirrelError(v, "Couldn't register function 'start'");
4611 sq_pushstring(v, "stop", -1);
4612 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4613 if(SQ_FAILED(sq_createslot(v, -3))) {
4614 throw SquirrelError(v, "Couldn't register function 'stop'");
4617 sq_pushstring(v, "thunder", -1);
4618 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4619 if(SQ_FAILED(sq_createslot(v, -3))) {
4620 throw SquirrelError(v, "Couldn't register function 'thunder'");
4623 sq_pushstring(v, "lightning", -1);
4624 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4625 if(SQ_FAILED(sq_createslot(v, -3))) {
4626 throw SquirrelError(v, "Couldn't register function 'lightning'");
4629 sq_pushstring(v, "flash", -1);
4630 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4631 if(SQ_FAILED(sq_createslot(v, -3))) {
4632 throw SquirrelError(v, "Couldn't register function 'flash'");
4635 sq_pushstring(v, "electrify", -1);
4636 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4637 if(SQ_FAILED(sq_createslot(v, -3))) {
4638 throw SquirrelError(v, "Couldn't register function 'electrify'");
4641 if(SQ_FAILED(sq_createslot(v, -3))) {
4642 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4645 // Register class TileMap
4646 sq_pushstring(v, "TileMap", -1);
4647 if(sq_newclass(v, SQFalse) < 0) {
4648 std::ostringstream msg;
4649 msg << "Couldn't create new class 'TileMap'";
4650 throw SquirrelError(v, msg.str());
4652 sq_pushstring(v, "goto_node", -1);
4653 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4654 if(SQ_FAILED(sq_createslot(v, -3))) {
4655 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4658 sq_pushstring(v, "start_moving", -1);
4659 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4660 if(SQ_FAILED(sq_createslot(v, -3))) {
4661 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4664 sq_pushstring(v, "stop_moving", -1);
4665 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4666 if(SQ_FAILED(sq_createslot(v, -3))) {
4667 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4670 sq_pushstring(v, "fade", -1);
4671 sq_newclosure(v, &TileMap_fade_wrapper, 0);
4672 if(SQ_FAILED(sq_createslot(v, -3))) {
4673 throw SquirrelError(v, "Couldn't register function 'fade'");
4676 sq_pushstring(v, "set_alpha", -1);
4677 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
4678 if(SQ_FAILED(sq_createslot(v, -3))) {
4679 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
4682 sq_pushstring(v, "get_alpha", -1);
4683 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
4684 if(SQ_FAILED(sq_createslot(v, -3))) {
4685 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
4688 if(SQ_FAILED(sq_createslot(v, -3))) {
4689 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4692 // Register class SSector
4693 sq_pushstring(v, "SSector", -1);
4694 if(sq_newclass(v, SQFalse) < 0) {
4695 std::ostringstream msg;
4696 msg << "Couldn't create new class 'SSector'";
4697 throw SquirrelError(v, msg.str());
4699 sq_pushstring(v, "set_ambient_light", -1);
4700 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4701 if(SQ_FAILED(sq_createslot(v, -3))) {
4702 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4705 sq_pushstring(v, "get_ambient_red", -1);
4706 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4707 if(SQ_FAILED(sq_createslot(v, -3))) {
4708 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4711 sq_pushstring(v, "get_ambient_green", -1);
4712 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4713 if(SQ_FAILED(sq_createslot(v, -3))) {
4714 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4717 sq_pushstring(v, "get_ambient_blue", -1);
4718 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4719 if(SQ_FAILED(sq_createslot(v, -3))) {
4720 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4723 if(SQ_FAILED(sq_createslot(v, -3))) {
4724 throw SquirrelError(v, "Couldn't register class 'SSector'");
4727 // Register class LevelTime
4728 sq_pushstring(v, "LevelTime", -1);
4729 if(sq_newclass(v, SQFalse) < 0) {
4730 std::ostringstream msg;
4731 msg << "Couldn't create new class 'LevelTime'";
4732 throw SquirrelError(v, msg.str());
4734 sq_pushstring(v, "start", -1);
4735 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4736 if(SQ_FAILED(sq_createslot(v, -3))) {
4737 throw SquirrelError(v, "Couldn't register function 'start'");
4740 sq_pushstring(v, "stop", -1);
4741 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4742 if(SQ_FAILED(sq_createslot(v, -3))) {
4743 throw SquirrelError(v, "Couldn't register function 'stop'");
4746 sq_pushstring(v, "get_time", -1);
4747 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4748 if(SQ_FAILED(sq_createslot(v, -3))) {
4749 throw SquirrelError(v, "Couldn't register function 'get_time'");
4752 sq_pushstring(v, "set_time", -1);
4753 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
4754 if(SQ_FAILED(sq_createslot(v, -3))) {
4755 throw SquirrelError(v, "Couldn't register function 'set_time'");
4758 if(SQ_FAILED(sq_createslot(v, -3))) {
4759 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
4764 } // end of namespace Scripting