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 SSector_release_hook(SQUserPointer ptr, SQInteger )
2444 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2449 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2452 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2453 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2456 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2458 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2459 sq_throwerror(vm, _SC("Argument 1 not a float"));
2463 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2464 sq_throwerror(vm, _SC("Argument 2 not a float"));
2468 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2469 sq_throwerror(vm, _SC("Argument 3 not a float"));
2474 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2478 } catch(std::exception& e) {
2479 sq_throwerror(vm, e.what());
2482 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2488 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2491 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2492 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2495 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2498 float return_value = _this->get_ambient_red();
2500 sq_pushfloat(vm, return_value);
2503 } catch(std::exception& e) {
2504 sq_throwerror(vm, e.what());
2507 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2513 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2516 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2517 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2520 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2523 float return_value = _this->get_ambient_green();
2525 sq_pushfloat(vm, return_value);
2528 } catch(std::exception& e) {
2529 sq_throwerror(vm, e.what());
2532 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2538 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2541 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2542 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2545 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2548 float return_value = _this->get_ambient_blue();
2550 sq_pushfloat(vm, return_value);
2553 } catch(std::exception& e) {
2554 sq_throwerror(vm, e.what());
2557 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2563 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2565 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2570 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2573 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2574 sq_throwerror(vm, _SC("'start' called without instance"));
2577 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2584 } catch(std::exception& e) {
2585 sq_throwerror(vm, e.what());
2588 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2594 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2597 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2598 sq_throwerror(vm, _SC("'stop' called without instance"));
2601 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2608 } catch(std::exception& e) {
2609 sq_throwerror(vm, e.what());
2612 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2618 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2621 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2622 sq_throwerror(vm, _SC("'get_time' called without instance"));
2625 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2628 float return_value = _this->get_time();
2630 sq_pushfloat(vm, return_value);
2633 } catch(std::exception& e) {
2634 sq_throwerror(vm, e.what());
2637 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2643 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2646 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2647 sq_throwerror(vm, _SC("'set_time' called without instance"));
2650 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2652 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2653 sq_throwerror(vm, _SC("Argument 1 not a float"));
2658 _this->set_time(static_cast<float> (arg0));
2662 } catch(std::exception& e) {
2663 sq_throwerror(vm, e.what());
2666 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2672 static SQInteger display_wrapper(HSQUIRRELVM vm)
2674 return Scripting::display(vm);
2677 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
2679 HSQUIRRELVM arg0 = vm;
2682 Scripting::print_stacktrace(arg0);
2686 } catch(std::exception& e) {
2687 sq_throwerror(vm, e.what());
2690 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
2696 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
2698 return Scripting::get_current_thread(vm);
2701 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
2704 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2705 sq_throwerror(vm, _SC("Argument 1 not a string"));
2710 Scripting::display_text_file(arg0);
2714 } catch(std::exception& e) {
2715 sq_throwerror(vm, e.what());
2718 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
2724 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
2727 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2728 sq_throwerror(vm, _SC("Argument 1 not a string"));
2733 Scripting::load_worldmap(arg0);
2737 } catch(std::exception& e) {
2738 sq_throwerror(vm, e.what());
2741 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
2747 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
2750 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2751 sq_throwerror(vm, _SC("Argument 1 not a string"));
2756 Scripting::load_level(arg0);
2760 } catch(std::exception& e) {
2761 sq_throwerror(vm, e.what());
2764 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
2770 static SQInteger wait_wrapper(HSQUIRRELVM vm)
2772 HSQUIRRELVM arg0 = vm;
2774 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
2775 sq_throwerror(vm, _SC("Argument 1 not a float"));
2780 Scripting::wait(arg0, static_cast<float> (arg1));
2782 return sq_suspendvm(vm);
2784 } catch(std::exception& e) {
2785 sq_throwerror(vm, e.what());
2788 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
2794 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
2796 HSQUIRRELVM arg0 = vm;
2799 Scripting::wait_for_screenswitch(arg0);
2801 return sq_suspendvm(vm);
2803 } catch(std::exception& e) {
2804 sq_throwerror(vm, e.what());
2807 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
2813 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
2818 Scripting::exit_screen();
2822 } catch(std::exception& e) {
2823 sq_throwerror(vm, e.what());
2826 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
2832 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
2835 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2836 sq_throwerror(vm, _SC("Argument 1 not a float"));
2841 Scripting::fadeout_screen(static_cast<float> (arg0));
2845 } catch(std::exception& e) {
2846 sq_throwerror(vm, e.what());
2849 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
2855 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
2858 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2859 sq_throwerror(vm, _SC("Argument 1 not a float"));
2863 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2864 sq_throwerror(vm, _SC("Argument 2 not a float"));
2868 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2869 sq_throwerror(vm, _SC("Argument 3 not a float"));
2874 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2878 } catch(std::exception& e) {
2879 sq_throwerror(vm, e.what());
2882 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
2888 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
2893 Scripting::abort_screenfade();
2897 } catch(std::exception& e) {
2898 sq_throwerror(vm, e.what());
2901 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
2907 static SQInteger translate_wrapper(HSQUIRRELVM vm)
2910 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2911 sq_throwerror(vm, _SC("Argument 1 not a string"));
2916 std::string return_value = Scripting::translate(arg0);
2918 sq_pushstring(vm, return_value.c_str(), return_value.size());
2921 } catch(std::exception& e) {
2922 sq_throwerror(vm, e.what());
2925 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
2931 static SQInteger import_wrapper(HSQUIRRELVM vm)
2933 HSQUIRRELVM arg0 = vm;
2935 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
2936 sq_throwerror(vm, _SC("Argument 1 not a string"));
2941 Scripting::import(arg0, arg1);
2945 } catch(std::exception& e) {
2946 sq_throwerror(vm, e.what());
2949 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
2955 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
2960 Scripting::save_state();
2964 } catch(std::exception& e) {
2965 sq_throwerror(vm, e.what());
2968 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
2974 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
2979 Scripting::update_worldmap();
2983 } catch(std::exception& e) {
2984 sq_throwerror(vm, e.what());
2987 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
2993 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
2996 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2997 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3002 Scripting::debug_collrects(arg0 == SQTrue);
3006 } catch(std::exception& e) {
3007 sq_throwerror(vm, e.what());
3010 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3016 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3019 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3020 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3025 Scripting::debug_show_fps(arg0 == SQTrue);
3029 } catch(std::exception& e) {
3030 sq_throwerror(vm, e.what());
3033 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3039 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3042 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3043 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3048 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3052 } catch(std::exception& e) {
3053 sq_throwerror(vm, e.what());
3056 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3062 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3065 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3066 sq_throwerror(vm, _SC("Argument 1 not a string"));
3071 Scripting::play_music(arg0);
3075 } catch(std::exception& e) {
3076 sq_throwerror(vm, e.what());
3079 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3085 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3088 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3089 sq_throwerror(vm, _SC("Argument 1 not a string"));
3094 Scripting::play_sound(arg0);
3098 } catch(std::exception& e) {
3099 sq_throwerror(vm, e.what());
3102 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3108 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3113 Scripting::grease();
3117 } catch(std::exception& e) {
3118 sq_throwerror(vm, e.what());
3121 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3127 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3132 Scripting::invincible();
3136 } catch(std::exception& e) {
3137 sq_throwerror(vm, e.what());
3140 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3146 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3155 } catch(std::exception& e) {
3156 sq_throwerror(vm, e.what());
3159 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3165 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3170 Scripting::mortal();
3174 } catch(std::exception& e) {
3175 sq_throwerror(vm, e.what());
3178 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3184 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3189 Scripting::restart();
3193 } catch(std::exception& e) {
3194 sq_throwerror(vm, e.what());
3197 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3203 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3208 Scripting::whereami();
3212 } catch(std::exception& e) {
3213 sq_throwerror(vm, e.what());
3216 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3222 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3227 Scripting::gotoend();
3231 } catch(std::exception& e) {
3232 sq_throwerror(vm, e.what());
3235 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3241 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3246 Scripting::camera();
3250 } catch(std::exception& e) {
3251 sq_throwerror(vm, e.what());
3254 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3260 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3269 } catch(std::exception& e) {
3270 sq_throwerror(vm, e.what());
3273 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3279 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3283 int return_value = Scripting::rand();
3285 sq_pushinteger(vm, return_value);
3288 } catch(std::exception& e) {
3289 sq_throwerror(vm, e.what());
3292 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3298 } // end of namespace Wrapper
3299 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3301 using namespace Wrapper;
3303 sq_pushroottable(v);
3304 sq_pushstring(v, "DisplayEffect", -1);
3305 if(SQ_FAILED(sq_get(v, -2))) {
3306 std::ostringstream msg;
3307 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3308 throw SquirrelError(v, msg.str());
3311 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3312 std::ostringstream msg;
3313 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3314 throw SquirrelError(v, msg.str());
3316 sq_remove(v, -2); // remove object name
3318 if(setup_releasehook) {
3319 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3322 sq_remove(v, -2); // remove root table
3325 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3327 using namespace Wrapper;
3329 sq_pushroottable(v);
3330 sq_pushstring(v, "Camera", -1);
3331 if(SQ_FAILED(sq_get(v, -2))) {
3332 std::ostringstream msg;
3333 msg << "Couldn't resolved squirrel type 'Camera'";
3334 throw SquirrelError(v, msg.str());
3337 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3338 std::ostringstream msg;
3339 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3340 throw SquirrelError(v, msg.str());
3342 sq_remove(v, -2); // remove object name
3344 if(setup_releasehook) {
3345 sq_setreleasehook(v, -1, Camera_release_hook);
3348 sq_remove(v, -2); // remove root table
3351 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3353 using namespace Wrapper;
3355 sq_pushroottable(v);
3356 sq_pushstring(v, "Level", -1);
3357 if(SQ_FAILED(sq_get(v, -2))) {
3358 std::ostringstream msg;
3359 msg << "Couldn't resolved squirrel type 'Level'";
3360 throw SquirrelError(v, msg.str());
3363 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3364 std::ostringstream msg;
3365 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3366 throw SquirrelError(v, msg.str());
3368 sq_remove(v, -2); // remove object name
3370 if(setup_releasehook) {
3371 sq_setreleasehook(v, -1, Level_release_hook);
3374 sq_remove(v, -2); // remove root table
3377 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3379 using namespace Wrapper;
3381 sq_pushroottable(v);
3382 sq_pushstring(v, "ScriptedObject", -1);
3383 if(SQ_FAILED(sq_get(v, -2))) {
3384 std::ostringstream msg;
3385 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3386 throw SquirrelError(v, msg.str());
3389 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3390 std::ostringstream msg;
3391 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3392 throw SquirrelError(v, msg.str());
3394 sq_remove(v, -2); // remove object name
3396 if(setup_releasehook) {
3397 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3400 sq_remove(v, -2); // remove root table
3403 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3405 using namespace Wrapper;
3407 sq_pushroottable(v);
3408 sq_pushstring(v, "Text", -1);
3409 if(SQ_FAILED(sq_get(v, -2))) {
3410 std::ostringstream msg;
3411 msg << "Couldn't resolved squirrel type 'Text'";
3412 throw SquirrelError(v, msg.str());
3415 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3416 std::ostringstream msg;
3417 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3418 throw SquirrelError(v, msg.str());
3420 sq_remove(v, -2); // remove object name
3422 if(setup_releasehook) {
3423 sq_setreleasehook(v, -1, Text_release_hook);
3426 sq_remove(v, -2); // remove root table
3429 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3431 using namespace Wrapper;
3433 sq_pushroottable(v);
3434 sq_pushstring(v, "Player", -1);
3435 if(SQ_FAILED(sq_get(v, -2))) {
3436 std::ostringstream msg;
3437 msg << "Couldn't resolved squirrel type 'Player'";
3438 throw SquirrelError(v, msg.str());
3441 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3442 std::ostringstream msg;
3443 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3444 throw SquirrelError(v, msg.str());
3446 sq_remove(v, -2); // remove object name
3448 if(setup_releasehook) {
3449 sq_setreleasehook(v, -1, Player_release_hook);
3452 sq_remove(v, -2); // remove root table
3455 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3457 using namespace Wrapper;
3459 sq_pushroottable(v);
3460 sq_pushstring(v, "FloatingImage", -1);
3461 if(SQ_FAILED(sq_get(v, -2))) {
3462 std::ostringstream msg;
3463 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3464 throw SquirrelError(v, msg.str());
3467 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3468 std::ostringstream msg;
3469 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3470 throw SquirrelError(v, msg.str());
3472 sq_remove(v, -2); // remove object name
3474 if(setup_releasehook) {
3475 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3478 sq_remove(v, -2); // remove root table
3481 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3483 using namespace Wrapper;
3485 sq_pushroottable(v);
3486 sq_pushstring(v, "Platform", -1);
3487 if(SQ_FAILED(sq_get(v, -2))) {
3488 std::ostringstream msg;
3489 msg << "Couldn't resolved squirrel type 'Platform'";
3490 throw SquirrelError(v, msg.str());
3493 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3494 std::ostringstream msg;
3495 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3496 throw SquirrelError(v, msg.str());
3498 sq_remove(v, -2); // remove object name
3500 if(setup_releasehook) {
3501 sq_setreleasehook(v, -1, Platform_release_hook);
3504 sq_remove(v, -2); // remove root table
3507 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3509 using namespace Wrapper;
3511 sq_pushroottable(v);
3512 sq_pushstring(v, "Candle", -1);
3513 if(SQ_FAILED(sq_get(v, -2))) {
3514 std::ostringstream msg;
3515 msg << "Couldn't resolved squirrel type 'Candle'";
3516 throw SquirrelError(v, msg.str());
3519 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3520 std::ostringstream msg;
3521 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3522 throw SquirrelError(v, msg.str());
3524 sq_remove(v, -2); // remove object name
3526 if(setup_releasehook) {
3527 sq_setreleasehook(v, -1, Candle_release_hook);
3530 sq_remove(v, -2); // remove root table
3533 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3535 using namespace Wrapper;
3537 sq_pushroottable(v);
3538 sq_pushstring(v, "Wind", -1);
3539 if(SQ_FAILED(sq_get(v, -2))) {
3540 std::ostringstream msg;
3541 msg << "Couldn't resolved squirrel type 'Wind'";
3542 throw SquirrelError(v, msg.str());
3545 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3546 std::ostringstream msg;
3547 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3548 throw SquirrelError(v, msg.str());
3550 sq_remove(v, -2); // remove object name
3552 if(setup_releasehook) {
3553 sq_setreleasehook(v, -1, Wind_release_hook);
3556 sq_remove(v, -2); // remove root table
3559 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3561 using namespace Wrapper;
3563 sq_pushroottable(v);
3564 sq_pushstring(v, "AmbientSound", -1);
3565 if(SQ_FAILED(sq_get(v, -2))) {
3566 std::ostringstream msg;
3567 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3568 throw SquirrelError(v, msg.str());
3571 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3572 std::ostringstream msg;
3573 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3574 throw SquirrelError(v, msg.str());
3576 sq_remove(v, -2); // remove object name
3578 if(setup_releasehook) {
3579 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3582 sq_remove(v, -2); // remove root table
3585 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3587 using namespace Wrapper;
3589 sq_pushroottable(v);
3590 sq_pushstring(v, "Thunderstorm", -1);
3591 if(SQ_FAILED(sq_get(v, -2))) {
3592 std::ostringstream msg;
3593 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3594 throw SquirrelError(v, msg.str());
3597 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3598 std::ostringstream msg;
3599 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3600 throw SquirrelError(v, msg.str());
3602 sq_remove(v, -2); // remove object name
3604 if(setup_releasehook) {
3605 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3608 sq_remove(v, -2); // remove root table
3611 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3613 using namespace Wrapper;
3615 sq_pushroottable(v);
3616 sq_pushstring(v, "TileMap", -1);
3617 if(SQ_FAILED(sq_get(v, -2))) {
3618 std::ostringstream msg;
3619 msg << "Couldn't resolved squirrel type 'TileMap'";
3620 throw SquirrelError(v, msg.str());
3623 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3624 std::ostringstream msg;
3625 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3626 throw SquirrelError(v, msg.str());
3628 sq_remove(v, -2); // remove object name
3630 if(setup_releasehook) {
3631 sq_setreleasehook(v, -1, TileMap_release_hook);
3634 sq_remove(v, -2); // remove root table
3637 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3639 using namespace Wrapper;
3641 sq_pushroottable(v);
3642 sq_pushstring(v, "SSector", -1);
3643 if(SQ_FAILED(sq_get(v, -2))) {
3644 std::ostringstream msg;
3645 msg << "Couldn't resolved squirrel type 'SSector'";
3646 throw SquirrelError(v, msg.str());
3649 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3650 std::ostringstream msg;
3651 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3652 throw SquirrelError(v, msg.str());
3654 sq_remove(v, -2); // remove object name
3656 if(setup_releasehook) {
3657 sq_setreleasehook(v, -1, SSector_release_hook);
3660 sq_remove(v, -2); // remove root table
3663 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3665 using namespace Wrapper;
3667 sq_pushroottable(v);
3668 sq_pushstring(v, "LevelTime", -1);
3669 if(SQ_FAILED(sq_get(v, -2))) {
3670 std::ostringstream msg;
3671 msg << "Couldn't resolved squirrel type 'LevelTime'";
3672 throw SquirrelError(v, msg.str());
3675 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3676 std::ostringstream msg;
3677 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3678 throw SquirrelError(v, msg.str());
3680 sq_remove(v, -2); // remove object name
3682 if(setup_releasehook) {
3683 sq_setreleasehook(v, -1, LevelTime_release_hook);
3686 sq_remove(v, -2); // remove root table
3689 void register_supertux_wrapper(HSQUIRRELVM v)
3691 using namespace Wrapper;
3693 sq_pushstring(v, "ANCHOR_TOP", -1);
3694 sq_pushinteger(v, 16);
3695 if(SQ_FAILED(sq_createslot(v, -3))) {
3696 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
3699 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
3700 sq_pushinteger(v, 32);
3701 if(SQ_FAILED(sq_createslot(v, -3))) {
3702 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
3705 sq_pushstring(v, "ANCHOR_LEFT", -1);
3706 sq_pushinteger(v, 1);
3707 if(SQ_FAILED(sq_createslot(v, -3))) {
3708 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
3711 sq_pushstring(v, "ANCHOR_RIGHT", -1);
3712 sq_pushinteger(v, 2);
3713 if(SQ_FAILED(sq_createslot(v, -3))) {
3714 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
3717 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
3718 sq_pushinteger(v, 0);
3719 if(SQ_FAILED(sq_createslot(v, -3))) {
3720 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
3723 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
3724 sq_pushinteger(v, 17);
3725 if(SQ_FAILED(sq_createslot(v, -3))) {
3726 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
3729 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
3730 sq_pushinteger(v, 18);
3731 if(SQ_FAILED(sq_createslot(v, -3))) {
3732 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
3735 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
3736 sq_pushinteger(v, 33);
3737 if(SQ_FAILED(sq_createslot(v, -3))) {
3738 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
3741 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
3742 sq_pushinteger(v, 34);
3743 if(SQ_FAILED(sq_createslot(v, -3))) {
3744 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
3747 sq_pushstring(v, "display", -1);
3748 sq_newclosure(v, &display_wrapper, 0);
3749 if(SQ_FAILED(sq_createslot(v, -3))) {
3750 throw SquirrelError(v, "Couldn't register function 'display'");
3753 sq_pushstring(v, "print_stacktrace", -1);
3754 sq_newclosure(v, &print_stacktrace_wrapper, 0);
3755 if(SQ_FAILED(sq_createslot(v, -3))) {
3756 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
3759 sq_pushstring(v, "get_current_thread", -1);
3760 sq_newclosure(v, &get_current_thread_wrapper, 0);
3761 if(SQ_FAILED(sq_createslot(v, -3))) {
3762 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
3765 sq_pushstring(v, "display_text_file", -1);
3766 sq_newclosure(v, &display_text_file_wrapper, 0);
3767 if(SQ_FAILED(sq_createslot(v, -3))) {
3768 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
3771 sq_pushstring(v, "load_worldmap", -1);
3772 sq_newclosure(v, &load_worldmap_wrapper, 0);
3773 if(SQ_FAILED(sq_createslot(v, -3))) {
3774 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
3777 sq_pushstring(v, "load_level", -1);
3778 sq_newclosure(v, &load_level_wrapper, 0);
3779 if(SQ_FAILED(sq_createslot(v, -3))) {
3780 throw SquirrelError(v, "Couldn't register function 'load_level'");
3783 sq_pushstring(v, "wait", -1);
3784 sq_newclosure(v, &wait_wrapper, 0);
3785 if(SQ_FAILED(sq_createslot(v, -3))) {
3786 throw SquirrelError(v, "Couldn't register function 'wait'");
3789 sq_pushstring(v, "wait_for_screenswitch", -1);
3790 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
3791 if(SQ_FAILED(sq_createslot(v, -3))) {
3792 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
3795 sq_pushstring(v, "exit_screen", -1);
3796 sq_newclosure(v, &exit_screen_wrapper, 0);
3797 if(SQ_FAILED(sq_createslot(v, -3))) {
3798 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
3801 sq_pushstring(v, "fadeout_screen", -1);
3802 sq_newclosure(v, &fadeout_screen_wrapper, 0);
3803 if(SQ_FAILED(sq_createslot(v, -3))) {
3804 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
3807 sq_pushstring(v, "shrink_screen", -1);
3808 sq_newclosure(v, &shrink_screen_wrapper, 0);
3809 if(SQ_FAILED(sq_createslot(v, -3))) {
3810 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
3813 sq_pushstring(v, "abort_screenfade", -1);
3814 sq_newclosure(v, &abort_screenfade_wrapper, 0);
3815 if(SQ_FAILED(sq_createslot(v, -3))) {
3816 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
3819 sq_pushstring(v, "translate", -1);
3820 sq_newclosure(v, &translate_wrapper, 0);
3821 if(SQ_FAILED(sq_createslot(v, -3))) {
3822 throw SquirrelError(v, "Couldn't register function 'translate'");
3825 sq_pushstring(v, "import", -1);
3826 sq_newclosure(v, &import_wrapper, 0);
3827 if(SQ_FAILED(sq_createslot(v, -3))) {
3828 throw SquirrelError(v, "Couldn't register function 'import'");
3831 sq_pushstring(v, "save_state", -1);
3832 sq_newclosure(v, &save_state_wrapper, 0);
3833 if(SQ_FAILED(sq_createslot(v, -3))) {
3834 throw SquirrelError(v, "Couldn't register function 'save_state'");
3837 sq_pushstring(v, "update_worldmap", -1);
3838 sq_newclosure(v, &update_worldmap_wrapper, 0);
3839 if(SQ_FAILED(sq_createslot(v, -3))) {
3840 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
3843 sq_pushstring(v, "debug_collrects", -1);
3844 sq_newclosure(v, &debug_collrects_wrapper, 0);
3845 if(SQ_FAILED(sq_createslot(v, -3))) {
3846 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
3849 sq_pushstring(v, "debug_show_fps", -1);
3850 sq_newclosure(v, &debug_show_fps_wrapper, 0);
3851 if(SQ_FAILED(sq_createslot(v, -3))) {
3852 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
3855 sq_pushstring(v, "debug_draw_solids_only", -1);
3856 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
3857 if(SQ_FAILED(sq_createslot(v, -3))) {
3858 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
3861 sq_pushstring(v, "play_music", -1);
3862 sq_newclosure(v, &play_music_wrapper, 0);
3863 if(SQ_FAILED(sq_createslot(v, -3))) {
3864 throw SquirrelError(v, "Couldn't register function 'play_music'");
3867 sq_pushstring(v, "play_sound", -1);
3868 sq_newclosure(v, &play_sound_wrapper, 0);
3869 if(SQ_FAILED(sq_createslot(v, -3))) {
3870 throw SquirrelError(v, "Couldn't register function 'play_sound'");
3873 sq_pushstring(v, "grease", -1);
3874 sq_newclosure(v, &grease_wrapper, 0);
3875 if(SQ_FAILED(sq_createslot(v, -3))) {
3876 throw SquirrelError(v, "Couldn't register function 'grease'");
3879 sq_pushstring(v, "invincible", -1);
3880 sq_newclosure(v, &invincible_wrapper, 0);
3881 if(SQ_FAILED(sq_createslot(v, -3))) {
3882 throw SquirrelError(v, "Couldn't register function 'invincible'");
3885 sq_pushstring(v, "ghost", -1);
3886 sq_newclosure(v, &ghost_wrapper, 0);
3887 if(SQ_FAILED(sq_createslot(v, -3))) {
3888 throw SquirrelError(v, "Couldn't register function 'ghost'");
3891 sq_pushstring(v, "mortal", -1);
3892 sq_newclosure(v, &mortal_wrapper, 0);
3893 if(SQ_FAILED(sq_createslot(v, -3))) {
3894 throw SquirrelError(v, "Couldn't register function 'mortal'");
3897 sq_pushstring(v, "restart", -1);
3898 sq_newclosure(v, &restart_wrapper, 0);
3899 if(SQ_FAILED(sq_createslot(v, -3))) {
3900 throw SquirrelError(v, "Couldn't register function 'restart'");
3903 sq_pushstring(v, "whereami", -1);
3904 sq_newclosure(v, &whereami_wrapper, 0);
3905 if(SQ_FAILED(sq_createslot(v, -3))) {
3906 throw SquirrelError(v, "Couldn't register function 'whereami'");
3909 sq_pushstring(v, "gotoend", -1);
3910 sq_newclosure(v, &gotoend_wrapper, 0);
3911 if(SQ_FAILED(sq_createslot(v, -3))) {
3912 throw SquirrelError(v, "Couldn't register function 'gotoend'");
3915 sq_pushstring(v, "camera", -1);
3916 sq_newclosure(v, &camera_wrapper, 0);
3917 if(SQ_FAILED(sq_createslot(v, -3))) {
3918 throw SquirrelError(v, "Couldn't register function 'camera'");
3921 sq_pushstring(v, "quit", -1);
3922 sq_newclosure(v, &quit_wrapper, 0);
3923 if(SQ_FAILED(sq_createslot(v, -3))) {
3924 throw SquirrelError(v, "Couldn't register function 'quit'");
3927 sq_pushstring(v, "rand", -1);
3928 sq_newclosure(v, &rand_wrapper, 0);
3929 if(SQ_FAILED(sq_createslot(v, -3))) {
3930 throw SquirrelError(v, "Couldn't register function 'rand'");
3933 // Register class DisplayEffect
3934 sq_pushstring(v, "DisplayEffect", -1);
3935 if(sq_newclass(v, SQFalse) < 0) {
3936 std::ostringstream msg;
3937 msg << "Couldn't create new class 'DisplayEffect'";
3938 throw SquirrelError(v, msg.str());
3940 sq_pushstring(v, "fade_out", -1);
3941 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
3942 if(SQ_FAILED(sq_createslot(v, -3))) {
3943 throw SquirrelError(v, "Couldn't register function 'fade_out'");
3946 sq_pushstring(v, "fade_in", -1);
3947 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
3948 if(SQ_FAILED(sq_createslot(v, -3))) {
3949 throw SquirrelError(v, "Couldn't register function 'fade_in'");
3952 sq_pushstring(v, "set_black", -1);
3953 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
3954 if(SQ_FAILED(sq_createslot(v, -3))) {
3955 throw SquirrelError(v, "Couldn't register function 'set_black'");
3958 sq_pushstring(v, "is_black", -1);
3959 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
3960 if(SQ_FAILED(sq_createslot(v, -3))) {
3961 throw SquirrelError(v, "Couldn't register function 'is_black'");
3964 sq_pushstring(v, "sixteen_to_nine", -1);
3965 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
3966 if(SQ_FAILED(sq_createslot(v, -3))) {
3967 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
3970 sq_pushstring(v, "four_to_three", -1);
3971 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
3972 if(SQ_FAILED(sq_createslot(v, -3))) {
3973 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
3976 if(SQ_FAILED(sq_createslot(v, -3))) {
3977 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
3980 // Register class Camera
3981 sq_pushstring(v, "Camera", -1);
3982 if(sq_newclass(v, SQFalse) < 0) {
3983 std::ostringstream msg;
3984 msg << "Couldn't create new class 'Camera'";
3985 throw SquirrelError(v, msg.str());
3987 sq_pushstring(v, "reload_config", -1);
3988 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
3989 if(SQ_FAILED(sq_createslot(v, -3))) {
3990 throw SquirrelError(v, "Couldn't register function 'reload_config'");
3993 sq_pushstring(v, "shake", -1);
3994 sq_newclosure(v, &Camera_shake_wrapper, 0);
3995 if(SQ_FAILED(sq_createslot(v, -3))) {
3996 throw SquirrelError(v, "Couldn't register function 'shake'");
3999 sq_pushstring(v, "set_pos", -1);
4000 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4001 if(SQ_FAILED(sq_createslot(v, -3))) {
4002 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4005 sq_pushstring(v, "set_mode", -1);
4006 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4007 if(SQ_FAILED(sq_createslot(v, -3))) {
4008 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4011 sq_pushstring(v, "scroll_to", -1);
4012 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4013 if(SQ_FAILED(sq_createslot(v, -3))) {
4014 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4017 if(SQ_FAILED(sq_createslot(v, -3))) {
4018 throw SquirrelError(v, "Couldn't register class 'Camera'");
4021 // Register class Level
4022 sq_pushstring(v, "Level", -1);
4023 if(sq_newclass(v, SQFalse) < 0) {
4024 std::ostringstream msg;
4025 msg << "Couldn't create new class 'Level'";
4026 throw SquirrelError(v, msg.str());
4028 sq_pushstring(v, "finish", -1);
4029 sq_newclosure(v, &Level_finish_wrapper, 0);
4030 if(SQ_FAILED(sq_createslot(v, -3))) {
4031 throw SquirrelError(v, "Couldn't register function 'finish'");
4034 sq_pushstring(v, "spawn", -1);
4035 sq_newclosure(v, &Level_spawn_wrapper, 0);
4036 if(SQ_FAILED(sq_createslot(v, -3))) {
4037 throw SquirrelError(v, "Couldn't register function 'spawn'");
4040 sq_pushstring(v, "flip_vertically", -1);
4041 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4042 if(SQ_FAILED(sq_createslot(v, -3))) {
4043 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4046 sq_pushstring(v, "toggle_pause", -1);
4047 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4048 if(SQ_FAILED(sq_createslot(v, -3))) {
4049 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4052 if(SQ_FAILED(sq_createslot(v, -3))) {
4053 throw SquirrelError(v, "Couldn't register class 'Level'");
4056 // Register class ScriptedObject
4057 sq_pushstring(v, "ScriptedObject", -1);
4058 if(sq_newclass(v, SQFalse) < 0) {
4059 std::ostringstream msg;
4060 msg << "Couldn't create new class 'ScriptedObject'";
4061 throw SquirrelError(v, msg.str());
4063 sq_pushstring(v, "set_action", -1);
4064 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4065 if(SQ_FAILED(sq_createslot(v, -3))) {
4066 throw SquirrelError(v, "Couldn't register function 'set_action'");
4069 sq_pushstring(v, "get_action", -1);
4070 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4071 if(SQ_FAILED(sq_createslot(v, -3))) {
4072 throw SquirrelError(v, "Couldn't register function 'get_action'");
4075 sq_pushstring(v, "move", -1);
4076 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4077 if(SQ_FAILED(sq_createslot(v, -3))) {
4078 throw SquirrelError(v, "Couldn't register function 'move'");
4081 sq_pushstring(v, "set_pos", -1);
4082 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4083 if(SQ_FAILED(sq_createslot(v, -3))) {
4084 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4087 sq_pushstring(v, "get_pos_x", -1);
4088 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4089 if(SQ_FAILED(sq_createslot(v, -3))) {
4090 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4093 sq_pushstring(v, "get_pos_y", -1);
4094 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4095 if(SQ_FAILED(sq_createslot(v, -3))) {
4096 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4099 sq_pushstring(v, "set_velocity", -1);
4100 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4101 if(SQ_FAILED(sq_createslot(v, -3))) {
4102 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4105 sq_pushstring(v, "get_velocity_x", -1);
4106 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4107 if(SQ_FAILED(sq_createslot(v, -3))) {
4108 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4111 sq_pushstring(v, "get_velocity_y", -1);
4112 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4113 if(SQ_FAILED(sq_createslot(v, -3))) {
4114 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4117 sq_pushstring(v, "set_visible", -1);
4118 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4119 if(SQ_FAILED(sq_createslot(v, -3))) {
4120 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4123 sq_pushstring(v, "is_visible", -1);
4124 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4125 if(SQ_FAILED(sq_createslot(v, -3))) {
4126 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4129 sq_pushstring(v, "set_solid", -1);
4130 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4131 if(SQ_FAILED(sq_createslot(v, -3))) {
4132 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4135 sq_pushstring(v, "is_solid", -1);
4136 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4137 if(SQ_FAILED(sq_createslot(v, -3))) {
4138 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4141 sq_pushstring(v, "get_name", -1);
4142 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4143 if(SQ_FAILED(sq_createslot(v, -3))) {
4144 throw SquirrelError(v, "Couldn't register function 'get_name'");
4147 if(SQ_FAILED(sq_createslot(v, -3))) {
4148 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4151 // Register class Text
4152 sq_pushstring(v, "Text", -1);
4153 if(sq_newclass(v, SQFalse) < 0) {
4154 std::ostringstream msg;
4155 msg << "Couldn't create new class 'Text'";
4156 throw SquirrelError(v, msg.str());
4158 sq_pushstring(v, "set_text", -1);
4159 sq_newclosure(v, &Text_set_text_wrapper, 0);
4160 if(SQ_FAILED(sq_createslot(v, -3))) {
4161 throw SquirrelError(v, "Couldn't register function 'set_text'");
4164 sq_pushstring(v, "set_font", -1);
4165 sq_newclosure(v, &Text_set_font_wrapper, 0);
4166 if(SQ_FAILED(sq_createslot(v, -3))) {
4167 throw SquirrelError(v, "Couldn't register function 'set_font'");
4170 sq_pushstring(v, "fade_in", -1);
4171 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4172 if(SQ_FAILED(sq_createslot(v, -3))) {
4173 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4176 sq_pushstring(v, "fade_out", -1);
4177 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4178 if(SQ_FAILED(sq_createslot(v, -3))) {
4179 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4182 sq_pushstring(v, "set_visible", -1);
4183 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4184 if(SQ_FAILED(sq_createslot(v, -3))) {
4185 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4188 sq_pushstring(v, "set_centered", -1);
4189 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4190 if(SQ_FAILED(sq_createslot(v, -3))) {
4191 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4194 if(SQ_FAILED(sq_createslot(v, -3))) {
4195 throw SquirrelError(v, "Couldn't register class 'Text'");
4198 // Register class Player
4199 sq_pushstring(v, "Player", -1);
4200 if(sq_newclass(v, SQFalse) < 0) {
4201 std::ostringstream msg;
4202 msg << "Couldn't create new class 'Player'";
4203 throw SquirrelError(v, msg.str());
4205 sq_pushstring(v, "add_bonus", -1);
4206 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4207 if(SQ_FAILED(sq_createslot(v, -3))) {
4208 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4211 sq_pushstring(v, "add_coins", -1);
4212 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4213 if(SQ_FAILED(sq_createslot(v, -3))) {
4214 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4217 sq_pushstring(v, "make_invincible", -1);
4218 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4219 if(SQ_FAILED(sq_createslot(v, -3))) {
4220 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4223 sq_pushstring(v, "deactivate", -1);
4224 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4225 if(SQ_FAILED(sq_createslot(v, -3))) {
4226 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4229 sq_pushstring(v, "activate", -1);
4230 sq_newclosure(v, &Player_activate_wrapper, 0);
4231 if(SQ_FAILED(sq_createslot(v, -3))) {
4232 throw SquirrelError(v, "Couldn't register function 'activate'");
4235 sq_pushstring(v, "walk", -1);
4236 sq_newclosure(v, &Player_walk_wrapper, 0);
4237 if(SQ_FAILED(sq_createslot(v, -3))) {
4238 throw SquirrelError(v, "Couldn't register function 'walk'");
4241 sq_pushstring(v, "set_visible", -1);
4242 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4243 if(SQ_FAILED(sq_createslot(v, -3))) {
4244 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4247 sq_pushstring(v, "get_visible", -1);
4248 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4249 if(SQ_FAILED(sq_createslot(v, -3))) {
4250 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4253 sq_pushstring(v, "kill", -1);
4254 sq_newclosure(v, &Player_kill_wrapper, 0);
4255 if(SQ_FAILED(sq_createslot(v, -3))) {
4256 throw SquirrelError(v, "Couldn't register function 'kill'");
4259 sq_pushstring(v, "set_ghost_mode", -1);
4260 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4261 if(SQ_FAILED(sq_createslot(v, -3))) {
4262 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4265 sq_pushstring(v, "get_ghost_mode", -1);
4266 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4267 if(SQ_FAILED(sq_createslot(v, -3))) {
4268 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4271 sq_pushstring(v, "do_cheer", -1);
4272 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4273 if(SQ_FAILED(sq_createslot(v, -3))) {
4274 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4277 sq_pushstring(v, "do_duck", -1);
4278 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4279 if(SQ_FAILED(sq_createslot(v, -3))) {
4280 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4283 sq_pushstring(v, "do_standup", -1);
4284 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4285 if(SQ_FAILED(sq_createslot(v, -3))) {
4286 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4289 sq_pushstring(v, "do_backflip", -1);
4290 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4291 if(SQ_FAILED(sq_createslot(v, -3))) {
4292 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4295 sq_pushstring(v, "do_jump", -1);
4296 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4297 if(SQ_FAILED(sq_createslot(v, -3))) {
4298 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4301 sq_pushstring(v, "trigger_sequence", -1);
4302 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4303 if(SQ_FAILED(sq_createslot(v, -3))) {
4304 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4307 if(SQ_FAILED(sq_createslot(v, -3))) {
4308 throw SquirrelError(v, "Couldn't register class 'Player'");
4311 // Register class FloatingImage
4312 sq_pushstring(v, "FloatingImage", -1);
4313 if(sq_newclass(v, SQFalse) < 0) {
4314 std::ostringstream msg;
4315 msg << "Couldn't create new class 'FloatingImage'";
4316 throw SquirrelError(v, msg.str());
4318 sq_pushstring(v, "constructor", -1);
4319 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4320 if(SQ_FAILED(sq_createslot(v, -3))) {
4321 throw SquirrelError(v, "Couldn't register function 'constructor'");
4324 sq_pushstring(v, "set_layer", -1);
4325 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4326 if(SQ_FAILED(sq_createslot(v, -3))) {
4327 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4330 sq_pushstring(v, "get_layer", -1);
4331 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4332 if(SQ_FAILED(sq_createslot(v, -3))) {
4333 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4336 sq_pushstring(v, "set_pos", -1);
4337 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4338 if(SQ_FAILED(sq_createslot(v, -3))) {
4339 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4342 sq_pushstring(v, "get_pos_x", -1);
4343 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4344 if(SQ_FAILED(sq_createslot(v, -3))) {
4345 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4348 sq_pushstring(v, "get_pos_y", -1);
4349 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4350 if(SQ_FAILED(sq_createslot(v, -3))) {
4351 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4354 sq_pushstring(v, "set_anchor_point", -1);
4355 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4356 if(SQ_FAILED(sq_createslot(v, -3))) {
4357 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4360 sq_pushstring(v, "get_anchor_point", -1);
4361 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4362 if(SQ_FAILED(sq_createslot(v, -3))) {
4363 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4366 sq_pushstring(v, "set_visible", -1);
4367 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4368 if(SQ_FAILED(sq_createslot(v, -3))) {
4369 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4372 sq_pushstring(v, "get_visible", -1);
4373 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4374 if(SQ_FAILED(sq_createslot(v, -3))) {
4375 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4378 sq_pushstring(v, "set_action", -1);
4379 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4380 if(SQ_FAILED(sq_createslot(v, -3))) {
4381 throw SquirrelError(v, "Couldn't register function 'set_action'");
4384 sq_pushstring(v, "get_action", -1);
4385 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4386 if(SQ_FAILED(sq_createslot(v, -3))) {
4387 throw SquirrelError(v, "Couldn't register function 'get_action'");
4390 sq_pushstring(v, "fade_in", -1);
4391 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4392 if(SQ_FAILED(sq_createslot(v, -3))) {
4393 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4396 sq_pushstring(v, "fade_out", -1);
4397 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4398 if(SQ_FAILED(sq_createslot(v, -3))) {
4399 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4402 if(SQ_FAILED(sq_createslot(v, -3))) {
4403 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4406 // Register class Platform
4407 sq_pushstring(v, "Platform", -1);
4408 if(sq_newclass(v, SQFalse) < 0) {
4409 std::ostringstream msg;
4410 msg << "Couldn't create new class 'Platform'";
4411 throw SquirrelError(v, msg.str());
4413 sq_pushstring(v, "goto_node", -1);
4414 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4415 if(SQ_FAILED(sq_createslot(v, -3))) {
4416 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4419 sq_pushstring(v, "start_moving", -1);
4420 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4421 if(SQ_FAILED(sq_createslot(v, -3))) {
4422 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4425 sq_pushstring(v, "stop_moving", -1);
4426 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4427 if(SQ_FAILED(sq_createslot(v, -3))) {
4428 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4431 if(SQ_FAILED(sq_createslot(v, -3))) {
4432 throw SquirrelError(v, "Couldn't register class 'Platform'");
4435 // Register class Candle
4436 sq_pushstring(v, "Candle", -1);
4437 if(sq_newclass(v, SQFalse) < 0) {
4438 std::ostringstream msg;
4439 msg << "Couldn't create new class 'Candle'";
4440 throw SquirrelError(v, msg.str());
4442 sq_pushstring(v, "get_burning", -1);
4443 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4444 if(SQ_FAILED(sq_createslot(v, -3))) {
4445 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4448 sq_pushstring(v, "set_burning", -1);
4449 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4450 if(SQ_FAILED(sq_createslot(v, -3))) {
4451 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4454 if(SQ_FAILED(sq_createslot(v, -3))) {
4455 throw SquirrelError(v, "Couldn't register class 'Candle'");
4458 // Register class Wind
4459 sq_pushstring(v, "Wind", -1);
4460 if(sq_newclass(v, SQFalse) < 0) {
4461 std::ostringstream msg;
4462 msg << "Couldn't create new class 'Wind'";
4463 throw SquirrelError(v, msg.str());
4465 sq_pushstring(v, "start", -1);
4466 sq_newclosure(v, &Wind_start_wrapper, 0);
4467 if(SQ_FAILED(sq_createslot(v, -3))) {
4468 throw SquirrelError(v, "Couldn't register function 'start'");
4471 sq_pushstring(v, "stop", -1);
4472 sq_newclosure(v, &Wind_stop_wrapper, 0);
4473 if(SQ_FAILED(sq_createslot(v, -3))) {
4474 throw SquirrelError(v, "Couldn't register function 'stop'");
4477 if(SQ_FAILED(sq_createslot(v, -3))) {
4478 throw SquirrelError(v, "Couldn't register class 'Wind'");
4481 // Register class AmbientSound
4482 sq_pushstring(v, "AmbientSound", -1);
4483 if(sq_newclass(v, SQFalse) < 0) {
4484 std::ostringstream msg;
4485 msg << "Couldn't create new class 'AmbientSound'";
4486 throw SquirrelError(v, msg.str());
4488 sq_pushstring(v, "set_pos", -1);
4489 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4490 if(SQ_FAILED(sq_createslot(v, -3))) {
4491 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4494 sq_pushstring(v, "get_pos_x", -1);
4495 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4496 if(SQ_FAILED(sq_createslot(v, -3))) {
4497 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4500 sq_pushstring(v, "get_pos_y", -1);
4501 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4502 if(SQ_FAILED(sq_createslot(v, -3))) {
4503 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4506 if(SQ_FAILED(sq_createslot(v, -3))) {
4507 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4510 // Register class Thunderstorm
4511 sq_pushstring(v, "Thunderstorm", -1);
4512 if(sq_newclass(v, SQFalse) < 0) {
4513 std::ostringstream msg;
4514 msg << "Couldn't create new class 'Thunderstorm'";
4515 throw SquirrelError(v, msg.str());
4517 sq_pushstring(v, "start", -1);
4518 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4519 if(SQ_FAILED(sq_createslot(v, -3))) {
4520 throw SquirrelError(v, "Couldn't register function 'start'");
4523 sq_pushstring(v, "stop", -1);
4524 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4525 if(SQ_FAILED(sq_createslot(v, -3))) {
4526 throw SquirrelError(v, "Couldn't register function 'stop'");
4529 sq_pushstring(v, "thunder", -1);
4530 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4531 if(SQ_FAILED(sq_createslot(v, -3))) {
4532 throw SquirrelError(v, "Couldn't register function 'thunder'");
4535 sq_pushstring(v, "lightning", -1);
4536 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4537 if(SQ_FAILED(sq_createslot(v, -3))) {
4538 throw SquirrelError(v, "Couldn't register function 'lightning'");
4541 sq_pushstring(v, "flash", -1);
4542 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4543 if(SQ_FAILED(sq_createslot(v, -3))) {
4544 throw SquirrelError(v, "Couldn't register function 'flash'");
4547 sq_pushstring(v, "electrify", -1);
4548 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4549 if(SQ_FAILED(sq_createslot(v, -3))) {
4550 throw SquirrelError(v, "Couldn't register function 'electrify'");
4553 if(SQ_FAILED(sq_createslot(v, -3))) {
4554 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4557 // Register class TileMap
4558 sq_pushstring(v, "TileMap", -1);
4559 if(sq_newclass(v, SQFalse) < 0) {
4560 std::ostringstream msg;
4561 msg << "Couldn't create new class 'TileMap'";
4562 throw SquirrelError(v, msg.str());
4564 sq_pushstring(v, "goto_node", -1);
4565 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4566 if(SQ_FAILED(sq_createslot(v, -3))) {
4567 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4570 sq_pushstring(v, "start_moving", -1);
4571 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4572 if(SQ_FAILED(sq_createslot(v, -3))) {
4573 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4576 sq_pushstring(v, "stop_moving", -1);
4577 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4578 if(SQ_FAILED(sq_createslot(v, -3))) {
4579 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4582 if(SQ_FAILED(sq_createslot(v, -3))) {
4583 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4586 // Register class SSector
4587 sq_pushstring(v, "SSector", -1);
4588 if(sq_newclass(v, SQFalse) < 0) {
4589 std::ostringstream msg;
4590 msg << "Couldn't create new class 'SSector'";
4591 throw SquirrelError(v, msg.str());
4593 sq_pushstring(v, "set_ambient_light", -1);
4594 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4595 if(SQ_FAILED(sq_createslot(v, -3))) {
4596 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4599 sq_pushstring(v, "get_ambient_red", -1);
4600 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4601 if(SQ_FAILED(sq_createslot(v, -3))) {
4602 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4605 sq_pushstring(v, "get_ambient_green", -1);
4606 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4607 if(SQ_FAILED(sq_createslot(v, -3))) {
4608 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4611 sq_pushstring(v, "get_ambient_blue", -1);
4612 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4613 if(SQ_FAILED(sq_createslot(v, -3))) {
4614 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4617 if(SQ_FAILED(sq_createslot(v, -3))) {
4618 throw SquirrelError(v, "Couldn't register class 'SSector'");
4621 // Register class LevelTime
4622 sq_pushstring(v, "LevelTime", -1);
4623 if(sq_newclass(v, SQFalse) < 0) {
4624 std::ostringstream msg;
4625 msg << "Couldn't create new class 'LevelTime'";
4626 throw SquirrelError(v, msg.str());
4628 sq_pushstring(v, "start", -1);
4629 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4630 if(SQ_FAILED(sq_createslot(v, -3))) {
4631 throw SquirrelError(v, "Couldn't register function 'start'");
4634 sq_pushstring(v, "stop", -1);
4635 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4636 if(SQ_FAILED(sq_createslot(v, -3))) {
4637 throw SquirrelError(v, "Couldn't register function 'stop'");
4640 sq_pushstring(v, "get_time", -1);
4641 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4642 if(SQ_FAILED(sq_createslot(v, -3))) {
4643 throw SquirrelError(v, "Couldn't register function 'get_time'");
4646 sq_pushstring(v, "set_time", -1);
4647 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
4648 if(SQ_FAILED(sq_createslot(v, -3))) {
4649 throw SquirrelError(v, "Couldn't register function 'set_time'");
4652 if(SQ_FAILED(sq_createslot(v, -3))) {
4653 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
4658 } // end of namespace Scripting