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 Text_set_pos_wrapper(HSQUIRRELVM vm)
1068 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1069 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1072 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1074 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1075 sq_throwerror(vm, _SC("Argument 1 not a float"));
1079 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1080 sq_throwerror(vm, _SC("Argument 2 not a float"));
1085 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1089 } catch(std::exception& e) {
1090 sq_throwerror(vm, e.what());
1093 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1099 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
1102 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1103 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1106 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1109 float return_value = _this->get_pos_x();
1111 sq_pushfloat(vm, return_value);
1114 } catch(std::exception& e) {
1115 sq_throwerror(vm, e.what());
1118 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1124 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
1127 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1128 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1131 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1134 float return_value = _this->get_pos_y();
1136 sq_pushfloat(vm, return_value);
1139 } catch(std::exception& e) {
1140 sq_throwerror(vm, e.what());
1143 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1149 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
1152 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1153 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1156 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1158 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1159 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1164 _this->set_anchor_point(static_cast<int> (arg0));
1168 } catch(std::exception& e) {
1169 sq_throwerror(vm, e.what());
1172 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1178 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
1181 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1182 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1185 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1188 int return_value = _this->get_anchor_point();
1190 sq_pushinteger(vm, return_value);
1193 } catch(std::exception& e) {
1194 sq_throwerror(vm, e.what());
1197 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1203 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1205 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
1210 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1213 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1214 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1217 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1219 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1220 sq_throwerror(vm, _SC("Argument 1 not a string"));
1225 bool return_value = _this->add_bonus(arg0);
1227 sq_pushbool(vm, return_value);
1230 } catch(std::exception& e) {
1231 sq_throwerror(vm, e.what());
1234 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1240 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1243 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1244 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1247 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1249 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1250 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1255 _this->add_coins(static_cast<int> (arg0));
1259 } catch(std::exception& e) {
1260 sq_throwerror(vm, e.what());
1263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1269 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1273 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1276 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1279 _this->make_invincible();
1283 } catch(std::exception& e) {
1284 sq_throwerror(vm, e.what());
1287 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1293 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1296 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1297 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1300 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1303 _this->deactivate();
1307 } catch(std::exception& e) {
1308 sq_throwerror(vm, e.what());
1311 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1317 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1320 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1321 sq_throwerror(vm, _SC("'activate' called without instance"));
1324 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1331 } catch(std::exception& e) {
1332 sq_throwerror(vm, e.what());
1335 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1341 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1344 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1345 sq_throwerror(vm, _SC("'walk' called without instance"));
1348 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1350 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1351 sq_throwerror(vm, _SC("Argument 1 not a float"));
1356 _this->walk(static_cast<float> (arg0));
1360 } catch(std::exception& e) {
1361 sq_throwerror(vm, e.what());
1364 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1370 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1373 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1374 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1377 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1379 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1380 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1385 _this->set_visible(arg0 == SQTrue);
1389 } catch(std::exception& e) {
1390 sq_throwerror(vm, e.what());
1393 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1399 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1402 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1403 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1406 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1409 bool return_value = _this->get_visible();
1411 sq_pushbool(vm, return_value);
1414 } catch(std::exception& e) {
1415 sq_throwerror(vm, e.what());
1418 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1424 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1427 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1428 sq_throwerror(vm, _SC("'kill' called without instance"));
1431 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1433 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1434 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1439 _this->kill(arg0 == SQTrue);
1443 } catch(std::exception& e) {
1444 sq_throwerror(vm, e.what());
1447 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1453 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1456 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1457 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1460 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1462 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1463 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1468 _this->set_ghost_mode(arg0 == SQTrue);
1472 } catch(std::exception& e) {
1473 sq_throwerror(vm, e.what());
1476 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1482 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1485 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1486 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1489 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1492 bool return_value = _this->get_ghost_mode();
1494 sq_pushbool(vm, return_value);
1497 } catch(std::exception& e) {
1498 sq_throwerror(vm, e.what());
1501 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1507 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1510 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1511 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1514 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1521 } catch(std::exception& e) {
1522 sq_throwerror(vm, e.what());
1525 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1531 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1534 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1535 sq_throwerror(vm, _SC("'do_duck' called without instance"));
1538 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1545 } catch(std::exception& e) {
1546 sq_throwerror(vm, e.what());
1549 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1555 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1558 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1559 sq_throwerror(vm, _SC("'do_standup' called without instance"));
1562 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1565 _this->do_standup();
1569 } catch(std::exception& e) {
1570 sq_throwerror(vm, e.what());
1573 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1579 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1582 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1583 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1586 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1589 _this->do_backflip();
1593 } catch(std::exception& e) {
1594 sq_throwerror(vm, e.what());
1597 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1603 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1606 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1607 sq_throwerror(vm, _SC("'do_jump' called without instance"));
1610 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1612 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1613 sq_throwerror(vm, _SC("Argument 1 not a float"));
1618 _this->do_jump(static_cast<float> (arg0));
1622 } catch(std::exception& e) {
1623 sq_throwerror(vm, e.what());
1626 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1632 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1635 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1636 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1639 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1641 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1642 sq_throwerror(vm, _SC("Argument 1 not a string"));
1647 _this->trigger_sequence(arg0);
1651 } catch(std::exception& e) {
1652 sq_throwerror(vm, e.what());
1655 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1661 static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
1664 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1665 sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
1668 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1670 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1671 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1676 _this->use_scripting_controller(arg0 == SQTrue);
1680 } catch(std::exception& e) {
1681 sq_throwerror(vm, e.what());
1684 sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
1690 static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
1693 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1694 sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
1697 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1699 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1700 sq_throwerror(vm, _SC("Argument 1 not a string"));
1704 if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
1705 sq_throwerror(vm, _SC("Argument 2 not a bool"));
1710 _this->do_scripting_controller(arg0, arg1 == SQTrue);
1714 } catch(std::exception& e) {
1715 sq_throwerror(vm, e.what());
1718 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
1724 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1726 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1731 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1734 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1735 sq_throwerror(vm, _SC("Argument 1 not a string"));
1740 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1741 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1742 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1745 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1749 } catch(std::exception& e) {
1750 sq_throwerror(vm, e.what());
1753 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1759 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1762 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1763 sq_throwerror(vm, _SC("'set_layer' called without instance"));
1766 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1768 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1769 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1774 _this->set_layer(static_cast<int> (arg0));
1778 } catch(std::exception& e) {
1779 sq_throwerror(vm, e.what());
1782 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1788 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1791 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1792 sq_throwerror(vm, _SC("'get_layer' called without instance"));
1795 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1798 int return_value = _this->get_layer();
1800 sq_pushinteger(vm, return_value);
1803 } catch(std::exception& e) {
1804 sq_throwerror(vm, e.what());
1807 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1813 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1816 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1817 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1820 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1822 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1823 sq_throwerror(vm, _SC("Argument 1 not a float"));
1827 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1828 sq_throwerror(vm, _SC("Argument 2 not a float"));
1833 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1837 } catch(std::exception& e) {
1838 sq_throwerror(vm, e.what());
1841 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1847 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1850 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1851 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1854 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1857 float return_value = _this->get_pos_x();
1859 sq_pushfloat(vm, return_value);
1862 } catch(std::exception& e) {
1863 sq_throwerror(vm, e.what());
1866 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1872 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1875 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1876 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1879 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1882 float return_value = _this->get_pos_y();
1884 sq_pushfloat(vm, return_value);
1887 } catch(std::exception& e) {
1888 sq_throwerror(vm, e.what());
1891 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1897 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1900 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1901 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1904 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1906 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1907 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1912 _this->set_anchor_point(static_cast<int> (arg0));
1916 } catch(std::exception& e) {
1917 sq_throwerror(vm, e.what());
1920 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1926 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1929 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1930 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1933 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1936 int return_value = _this->get_anchor_point();
1938 sq_pushinteger(vm, return_value);
1941 } catch(std::exception& e) {
1942 sq_throwerror(vm, e.what());
1945 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1951 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1954 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1955 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1958 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1960 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1961 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1966 _this->set_visible(arg0 == SQTrue);
1970 } catch(std::exception& e) {
1971 sq_throwerror(vm, e.what());
1974 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1980 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1983 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1984 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1987 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1990 bool return_value = _this->get_visible();
1992 sq_pushbool(vm, return_value);
1995 } catch(std::exception& e) {
1996 sq_throwerror(vm, e.what());
1999 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
2005 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
2008 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2009 sq_throwerror(vm, _SC("'set_action' called without instance"));
2012 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2014 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2015 sq_throwerror(vm, _SC("Argument 1 not a string"));
2020 _this->set_action(arg0);
2024 } catch(std::exception& e) {
2025 sq_throwerror(vm, e.what());
2028 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
2034 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
2037 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2038 sq_throwerror(vm, _SC("'get_action' called without instance"));
2041 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2044 std::string return_value = _this->get_action();
2046 sq_pushstring(vm, return_value.c_str(), return_value.size());
2049 } catch(std::exception& e) {
2050 sq_throwerror(vm, e.what());
2053 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
2059 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
2062 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2063 sq_throwerror(vm, _SC("'fade_in' called without instance"));
2066 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2068 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2069 sq_throwerror(vm, _SC("Argument 1 not a float"));
2074 _this->fade_in(static_cast<float> (arg0));
2078 } catch(std::exception& e) {
2079 sq_throwerror(vm, e.what());
2082 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
2088 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
2091 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2092 sq_throwerror(vm, _SC("'fade_out' called without instance"));
2095 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2097 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2098 sq_throwerror(vm, _SC("Argument 1 not a float"));
2103 _this->fade_out(static_cast<float> (arg0));
2107 } catch(std::exception& e) {
2108 sq_throwerror(vm, e.what());
2111 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
2117 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
2119 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
2124 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
2127 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2128 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2131 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2133 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2134 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2139 _this->goto_node(static_cast<int> (arg0));
2143 } catch(std::exception& e) {
2144 sq_throwerror(vm, e.what());
2147 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2153 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
2156 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2157 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2160 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2163 _this->start_moving();
2167 } catch(std::exception& e) {
2168 sq_throwerror(vm, e.what());
2171 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2177 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
2180 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2181 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2184 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2187 _this->stop_moving();
2191 } catch(std::exception& e) {
2192 sq_throwerror(vm, e.what());
2195 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2201 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
2203 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
2208 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
2211 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2212 sq_throwerror(vm, _SC("'get_burning' called without instance"));
2215 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2218 bool return_value = _this->get_burning();
2220 sq_pushbool(vm, return_value);
2223 } catch(std::exception& e) {
2224 sq_throwerror(vm, e.what());
2227 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2233 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2236 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2237 sq_throwerror(vm, _SC("'set_burning' called without instance"));
2240 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2242 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2243 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2248 _this->set_burning(arg0 == SQTrue);
2252 } catch(std::exception& e) {
2253 sq_throwerror(vm, e.what());
2256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2262 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2264 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2269 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2273 sq_throwerror(vm, _SC("'start' called without instance"));
2276 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2283 } catch(std::exception& e) {
2284 sq_throwerror(vm, e.what());
2287 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2293 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2296 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2297 sq_throwerror(vm, _SC("'stop' called without instance"));
2300 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2307 } catch(std::exception& e) {
2308 sq_throwerror(vm, e.what());
2311 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2317 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2319 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2324 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2327 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2328 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2331 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2333 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2334 sq_throwerror(vm, _SC("Argument 1 not a float"));
2338 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2339 sq_throwerror(vm, _SC("Argument 2 not a float"));
2344 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2348 } catch(std::exception& e) {
2349 sq_throwerror(vm, e.what());
2352 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2358 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2361 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2362 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2365 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2368 float return_value = _this->get_pos_x();
2370 sq_pushfloat(vm, return_value);
2373 } catch(std::exception& e) {
2374 sq_throwerror(vm, e.what());
2377 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2383 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2386 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2387 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2390 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2393 float return_value = _this->get_pos_y();
2395 sq_pushfloat(vm, return_value);
2398 } catch(std::exception& e) {
2399 sq_throwerror(vm, e.what());
2402 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2408 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2410 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2415 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2418 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2419 sq_throwerror(vm, _SC("'start' called without instance"));
2422 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2429 } catch(std::exception& e) {
2430 sq_throwerror(vm, e.what());
2433 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2439 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2442 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2443 sq_throwerror(vm, _SC("'stop' called without instance"));
2446 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2453 } catch(std::exception& e) {
2454 sq_throwerror(vm, e.what());
2457 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2463 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2466 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2467 sq_throwerror(vm, _SC("'thunder' called without instance"));
2470 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2477 } catch(std::exception& e) {
2478 sq_throwerror(vm, e.what());
2481 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2487 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2490 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2491 sq_throwerror(vm, _SC("'lightning' called without instance"));
2494 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2501 } catch(std::exception& e) {
2502 sq_throwerror(vm, e.what());
2505 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2511 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2514 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2515 sq_throwerror(vm, _SC("'flash' called without instance"));
2518 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2525 } catch(std::exception& e) {
2526 sq_throwerror(vm, e.what());
2529 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2535 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2538 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2539 sq_throwerror(vm, _SC("'electrify' called without instance"));
2542 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2549 } catch(std::exception& e) {
2550 sq_throwerror(vm, e.what());
2553 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2559 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2561 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2566 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2569 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2570 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2573 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2575 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2576 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2581 _this->goto_node(static_cast<int> (arg0));
2585 } catch(std::exception& e) {
2586 sq_throwerror(vm, e.what());
2589 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2595 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2598 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2599 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2602 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2605 _this->start_moving();
2609 } catch(std::exception& e) {
2610 sq_throwerror(vm, e.what());
2613 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2619 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2622 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2623 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2626 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2629 _this->stop_moving();
2633 } catch(std::exception& e) {
2634 sq_throwerror(vm, e.what());
2637 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2643 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2646 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2647 sq_throwerror(vm, _SC("'fade' called without instance"));
2650 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2652 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2653 sq_throwerror(vm, _SC("Argument 1 not a float"));
2657 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2658 sq_throwerror(vm, _SC("Argument 2 not a float"));
2663 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2667 } catch(std::exception& e) {
2668 sq_throwerror(vm, e.what());
2671 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2677 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2680 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2681 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2684 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2686 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2687 sq_throwerror(vm, _SC("Argument 1 not a float"));
2692 _this->set_alpha(static_cast<float> (arg0));
2696 } catch(std::exception& e) {
2697 sq_throwerror(vm, e.what());
2700 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2706 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2709 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2710 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2713 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2716 float return_value = _this->get_alpha();
2718 sq_pushfloat(vm, return_value);
2721 } catch(std::exception& e) {
2722 sq_throwerror(vm, e.what());
2725 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2731 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2733 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2738 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2741 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2742 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2745 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2747 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2748 sq_throwerror(vm, _SC("Argument 1 not a float"));
2752 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2753 sq_throwerror(vm, _SC("Argument 2 not a float"));
2757 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2758 sq_throwerror(vm, _SC("Argument 3 not a float"));
2763 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2767 } catch(std::exception& e) {
2768 sq_throwerror(vm, e.what());
2771 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2777 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2780 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2781 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2784 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2787 float return_value = _this->get_ambient_red();
2789 sq_pushfloat(vm, return_value);
2792 } catch(std::exception& e) {
2793 sq_throwerror(vm, e.what());
2796 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2802 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2805 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2806 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2809 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2812 float return_value = _this->get_ambient_green();
2814 sq_pushfloat(vm, return_value);
2817 } catch(std::exception& e) {
2818 sq_throwerror(vm, e.what());
2821 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2827 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2830 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2831 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2834 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2837 float return_value = _this->get_ambient_blue();
2839 sq_pushfloat(vm, return_value);
2842 } catch(std::exception& e) {
2843 sq_throwerror(vm, e.what());
2846 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2852 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2854 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2859 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2862 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2863 sq_throwerror(vm, _SC("'start' called without instance"));
2866 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2873 } catch(std::exception& e) {
2874 sq_throwerror(vm, e.what());
2877 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2883 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2886 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2887 sq_throwerror(vm, _SC("'stop' called without instance"));
2890 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2897 } catch(std::exception& e) {
2898 sq_throwerror(vm, e.what());
2901 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2907 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2910 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2911 sq_throwerror(vm, _SC("'get_time' called without instance"));
2914 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2917 float return_value = _this->get_time();
2919 sq_pushfloat(vm, return_value);
2922 } catch(std::exception& e) {
2923 sq_throwerror(vm, e.what());
2926 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2932 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2935 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2936 sq_throwerror(vm, _SC("'set_time' called without instance"));
2939 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2941 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2942 sq_throwerror(vm, _SC("Argument 1 not a float"));
2947 _this->set_time(static_cast<float> (arg0));
2951 } catch(std::exception& e) {
2952 sq_throwerror(vm, e.what());
2955 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2961 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
2963 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (ptr);
2968 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
2971 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2972 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2975 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2977 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2978 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2983 _this->goto_node(static_cast<int> (arg0));
2987 } catch(std::exception& e) {
2988 sq_throwerror(vm, e.what());
2991 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2997 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
3000 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3001 sq_throwerror(vm, _SC("'set_state' called without instance"));
3004 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3006 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3007 sq_throwerror(vm, _SC("Argument 1 not a string"));
3012 _this->set_state(arg0);
3016 } catch(std::exception& e) {
3017 sq_throwerror(vm, e.what());
3020 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
3026 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
3029 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3030 sq_throwerror(vm, _SC("'start_moving' called without instance"));
3033 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3036 _this->start_moving();
3040 } catch(std::exception& e) {
3041 sq_throwerror(vm, e.what());
3044 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
3050 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
3053 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3054 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
3057 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3060 _this->stop_moving();
3064 } catch(std::exception& e) {
3065 sq_throwerror(vm, e.what());
3068 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
3074 static SQInteger display_wrapper(HSQUIRRELVM vm)
3076 return Scripting::display(vm);
3079 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
3081 HSQUIRRELVM arg0 = vm;
3084 Scripting::print_stacktrace(arg0);
3088 } catch(std::exception& e) {
3089 sq_throwerror(vm, e.what());
3092 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
3098 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
3100 return Scripting::get_current_thread(vm);
3103 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
3106 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3107 sq_throwerror(vm, _SC("Argument 1 not a string"));
3112 Scripting::display_text_file(arg0);
3116 } catch(std::exception& e) {
3117 sq_throwerror(vm, e.what());
3120 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
3126 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
3129 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3130 sq_throwerror(vm, _SC("Argument 1 not a string"));
3135 Scripting::load_worldmap(arg0);
3139 } catch(std::exception& e) {
3140 sq_throwerror(vm, e.what());
3143 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
3149 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
3152 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3153 sq_throwerror(vm, _SC("Argument 1 not a string"));
3158 Scripting::load_level(arg0);
3162 } catch(std::exception& e) {
3163 sq_throwerror(vm, e.what());
3166 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
3172 static SQInteger wait_wrapper(HSQUIRRELVM vm)
3174 HSQUIRRELVM arg0 = vm;
3176 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
3177 sq_throwerror(vm, _SC("Argument 1 not a float"));
3182 Scripting::wait(arg0, static_cast<float> (arg1));
3184 return sq_suspendvm(vm);
3186 } catch(std::exception& e) {
3187 sq_throwerror(vm, e.what());
3190 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
3196 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
3198 HSQUIRRELVM arg0 = vm;
3201 Scripting::wait_for_screenswitch(arg0);
3203 return sq_suspendvm(vm);
3205 } catch(std::exception& e) {
3206 sq_throwerror(vm, e.what());
3209 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
3215 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
3220 Scripting::exit_screen();
3224 } catch(std::exception& e) {
3225 sq_throwerror(vm, e.what());
3228 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
3234 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
3237 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3238 sq_throwerror(vm, _SC("Argument 1 not a float"));
3243 Scripting::fadeout_screen(static_cast<float> (arg0));
3247 } catch(std::exception& e) {
3248 sq_throwerror(vm, e.what());
3251 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
3257 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
3260 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3261 sq_throwerror(vm, _SC("Argument 1 not a float"));
3265 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3266 sq_throwerror(vm, _SC("Argument 2 not a float"));
3270 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3271 sq_throwerror(vm, _SC("Argument 3 not a float"));
3276 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3280 } catch(std::exception& e) {
3281 sq_throwerror(vm, e.what());
3284 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
3290 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
3295 Scripting::abort_screenfade();
3299 } catch(std::exception& e) {
3300 sq_throwerror(vm, e.what());
3303 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
3309 static SQInteger translate_wrapper(HSQUIRRELVM vm)
3312 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3313 sq_throwerror(vm, _SC("Argument 1 not a string"));
3318 std::string return_value = Scripting::translate(arg0);
3320 sq_pushstring(vm, return_value.c_str(), return_value.size());
3323 } catch(std::exception& e) {
3324 sq_throwerror(vm, e.what());
3327 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3333 static SQInteger import_wrapper(HSQUIRRELVM vm)
3335 HSQUIRRELVM arg0 = vm;
3337 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3338 sq_throwerror(vm, _SC("Argument 1 not a string"));
3343 Scripting::import(arg0, arg1);
3347 } catch(std::exception& e) {
3348 sq_throwerror(vm, e.what());
3351 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3357 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3362 Scripting::save_state();
3366 } catch(std::exception& e) {
3367 sq_throwerror(vm, e.what());
3370 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3376 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3381 Scripting::update_worldmap();
3385 } catch(std::exception& e) {
3386 sq_throwerror(vm, e.what());
3389 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3395 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3398 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3399 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3404 Scripting::debug_collrects(arg0 == SQTrue);
3408 } catch(std::exception& e) {
3409 sq_throwerror(vm, e.what());
3412 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3418 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3421 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3422 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3427 Scripting::debug_show_fps(arg0 == SQTrue);
3431 } catch(std::exception& e) {
3432 sq_throwerror(vm, e.what());
3435 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3441 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3444 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3445 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3450 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3454 } catch(std::exception& e) {
3455 sq_throwerror(vm, e.what());
3458 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3464 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3467 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3468 sq_throwerror(vm, _SC("Argument 1 not a string"));
3473 Scripting::play_music(arg0);
3477 } catch(std::exception& e) {
3478 sq_throwerror(vm, e.what());
3481 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3487 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3490 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3491 sq_throwerror(vm, _SC("Argument 1 not a string"));
3496 Scripting::play_sound(arg0);
3500 } catch(std::exception& e) {
3501 sq_throwerror(vm, e.what());
3504 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3510 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3515 Scripting::grease();
3519 } catch(std::exception& e) {
3520 sq_throwerror(vm, e.what());
3523 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3529 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3534 Scripting::invincible();
3538 } catch(std::exception& e) {
3539 sq_throwerror(vm, e.what());
3542 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3548 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3557 } catch(std::exception& e) {
3558 sq_throwerror(vm, e.what());
3561 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3567 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3572 Scripting::mortal();
3576 } catch(std::exception& e) {
3577 sq_throwerror(vm, e.what());
3580 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3586 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3591 Scripting::restart();
3595 } catch(std::exception& e) {
3596 sq_throwerror(vm, e.what());
3599 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3605 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3610 Scripting::whereami();
3614 } catch(std::exception& e) {
3615 sq_throwerror(vm, e.what());
3618 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3624 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3629 Scripting::gotoend();
3633 } catch(std::exception& e) {
3634 sq_throwerror(vm, e.what());
3637 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3643 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3648 Scripting::camera();
3652 } catch(std::exception& e) {
3653 sq_throwerror(vm, e.what());
3656 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3662 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3671 } catch(std::exception& e) {
3672 sq_throwerror(vm, e.what());
3675 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3681 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3685 int return_value = Scripting::rand();
3687 sq_pushinteger(vm, return_value);
3690 } catch(std::exception& e) {
3691 sq_throwerror(vm, e.what());
3694 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3700 } // end of namespace Wrapper
3701 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3703 using namespace Wrapper;
3705 sq_pushroottable(v);
3706 sq_pushstring(v, "DisplayEffect", -1);
3707 if(SQ_FAILED(sq_get(v, -2))) {
3708 std::ostringstream msg;
3709 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3710 throw SquirrelError(v, msg.str());
3713 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3714 std::ostringstream msg;
3715 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3716 throw SquirrelError(v, msg.str());
3718 sq_remove(v, -2); // remove object name
3720 if(setup_releasehook) {
3721 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3724 sq_remove(v, -2); // remove root table
3727 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3729 using namespace Wrapper;
3731 sq_pushroottable(v);
3732 sq_pushstring(v, "Camera", -1);
3733 if(SQ_FAILED(sq_get(v, -2))) {
3734 std::ostringstream msg;
3735 msg << "Couldn't resolved squirrel type 'Camera'";
3736 throw SquirrelError(v, msg.str());
3739 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3740 std::ostringstream msg;
3741 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3742 throw SquirrelError(v, msg.str());
3744 sq_remove(v, -2); // remove object name
3746 if(setup_releasehook) {
3747 sq_setreleasehook(v, -1, Camera_release_hook);
3750 sq_remove(v, -2); // remove root table
3753 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3755 using namespace Wrapper;
3757 sq_pushroottable(v);
3758 sq_pushstring(v, "Level", -1);
3759 if(SQ_FAILED(sq_get(v, -2))) {
3760 std::ostringstream msg;
3761 msg << "Couldn't resolved squirrel type 'Level'";
3762 throw SquirrelError(v, msg.str());
3765 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3766 std::ostringstream msg;
3767 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3768 throw SquirrelError(v, msg.str());
3770 sq_remove(v, -2); // remove object name
3772 if(setup_releasehook) {
3773 sq_setreleasehook(v, -1, Level_release_hook);
3776 sq_remove(v, -2); // remove root table
3779 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3781 using namespace Wrapper;
3783 sq_pushroottable(v);
3784 sq_pushstring(v, "ScriptedObject", -1);
3785 if(SQ_FAILED(sq_get(v, -2))) {
3786 std::ostringstream msg;
3787 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3788 throw SquirrelError(v, msg.str());
3791 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3792 std::ostringstream msg;
3793 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3794 throw SquirrelError(v, msg.str());
3796 sq_remove(v, -2); // remove object name
3798 if(setup_releasehook) {
3799 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3802 sq_remove(v, -2); // remove root table
3805 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3807 using namespace Wrapper;
3809 sq_pushroottable(v);
3810 sq_pushstring(v, "Text", -1);
3811 if(SQ_FAILED(sq_get(v, -2))) {
3812 std::ostringstream msg;
3813 msg << "Couldn't resolved squirrel type 'Text'";
3814 throw SquirrelError(v, msg.str());
3817 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3818 std::ostringstream msg;
3819 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3820 throw SquirrelError(v, msg.str());
3822 sq_remove(v, -2); // remove object name
3824 if(setup_releasehook) {
3825 sq_setreleasehook(v, -1, Text_release_hook);
3828 sq_remove(v, -2); // remove root table
3831 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3833 using namespace Wrapper;
3835 sq_pushroottable(v);
3836 sq_pushstring(v, "Player", -1);
3837 if(SQ_FAILED(sq_get(v, -2))) {
3838 std::ostringstream msg;
3839 msg << "Couldn't resolved squirrel type 'Player'";
3840 throw SquirrelError(v, msg.str());
3843 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3844 std::ostringstream msg;
3845 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3846 throw SquirrelError(v, msg.str());
3848 sq_remove(v, -2); // remove object name
3850 if(setup_releasehook) {
3851 sq_setreleasehook(v, -1, Player_release_hook);
3854 sq_remove(v, -2); // remove root table
3857 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3859 using namespace Wrapper;
3861 sq_pushroottable(v);
3862 sq_pushstring(v, "FloatingImage", -1);
3863 if(SQ_FAILED(sq_get(v, -2))) {
3864 std::ostringstream msg;
3865 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3866 throw SquirrelError(v, msg.str());
3869 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3870 std::ostringstream msg;
3871 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3872 throw SquirrelError(v, msg.str());
3874 sq_remove(v, -2); // remove object name
3876 if(setup_releasehook) {
3877 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3880 sq_remove(v, -2); // remove root table
3883 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3885 using namespace Wrapper;
3887 sq_pushroottable(v);
3888 sq_pushstring(v, "Platform", -1);
3889 if(SQ_FAILED(sq_get(v, -2))) {
3890 std::ostringstream msg;
3891 msg << "Couldn't resolved squirrel type 'Platform'";
3892 throw SquirrelError(v, msg.str());
3895 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3896 std::ostringstream msg;
3897 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3898 throw SquirrelError(v, msg.str());
3900 sq_remove(v, -2); // remove object name
3902 if(setup_releasehook) {
3903 sq_setreleasehook(v, -1, Platform_release_hook);
3906 sq_remove(v, -2); // remove root table
3909 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3911 using namespace Wrapper;
3913 sq_pushroottable(v);
3914 sq_pushstring(v, "Candle", -1);
3915 if(SQ_FAILED(sq_get(v, -2))) {
3916 std::ostringstream msg;
3917 msg << "Couldn't resolved squirrel type 'Candle'";
3918 throw SquirrelError(v, msg.str());
3921 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3922 std::ostringstream msg;
3923 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3924 throw SquirrelError(v, msg.str());
3926 sq_remove(v, -2); // remove object name
3928 if(setup_releasehook) {
3929 sq_setreleasehook(v, -1, Candle_release_hook);
3932 sq_remove(v, -2); // remove root table
3935 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3937 using namespace Wrapper;
3939 sq_pushroottable(v);
3940 sq_pushstring(v, "Wind", -1);
3941 if(SQ_FAILED(sq_get(v, -2))) {
3942 std::ostringstream msg;
3943 msg << "Couldn't resolved squirrel type 'Wind'";
3944 throw SquirrelError(v, msg.str());
3947 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3948 std::ostringstream msg;
3949 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3950 throw SquirrelError(v, msg.str());
3952 sq_remove(v, -2); // remove object name
3954 if(setup_releasehook) {
3955 sq_setreleasehook(v, -1, Wind_release_hook);
3958 sq_remove(v, -2); // remove root table
3961 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3963 using namespace Wrapper;
3965 sq_pushroottable(v);
3966 sq_pushstring(v, "AmbientSound", -1);
3967 if(SQ_FAILED(sq_get(v, -2))) {
3968 std::ostringstream msg;
3969 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3970 throw SquirrelError(v, msg.str());
3973 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3974 std::ostringstream msg;
3975 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3976 throw SquirrelError(v, msg.str());
3978 sq_remove(v, -2); // remove object name
3980 if(setup_releasehook) {
3981 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3984 sq_remove(v, -2); // remove root table
3987 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3989 using namespace Wrapper;
3991 sq_pushroottable(v);
3992 sq_pushstring(v, "Thunderstorm", -1);
3993 if(SQ_FAILED(sq_get(v, -2))) {
3994 std::ostringstream msg;
3995 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3996 throw SquirrelError(v, msg.str());
3999 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4000 std::ostringstream msg;
4001 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
4002 throw SquirrelError(v, msg.str());
4004 sq_remove(v, -2); // remove object name
4006 if(setup_releasehook) {
4007 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
4010 sq_remove(v, -2); // remove root table
4013 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
4015 using namespace Wrapper;
4017 sq_pushroottable(v);
4018 sq_pushstring(v, "TileMap", -1);
4019 if(SQ_FAILED(sq_get(v, -2))) {
4020 std::ostringstream msg;
4021 msg << "Couldn't resolved squirrel type 'TileMap'";
4022 throw SquirrelError(v, msg.str());
4025 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4026 std::ostringstream msg;
4027 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
4028 throw SquirrelError(v, msg.str());
4030 sq_remove(v, -2); // remove object name
4032 if(setup_releasehook) {
4033 sq_setreleasehook(v, -1, TileMap_release_hook);
4036 sq_remove(v, -2); // remove root table
4039 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
4041 using namespace Wrapper;
4043 sq_pushroottable(v);
4044 sq_pushstring(v, "SSector", -1);
4045 if(SQ_FAILED(sq_get(v, -2))) {
4046 std::ostringstream msg;
4047 msg << "Couldn't resolved squirrel type 'SSector'";
4048 throw SquirrelError(v, msg.str());
4051 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4052 std::ostringstream msg;
4053 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
4054 throw SquirrelError(v, msg.str());
4056 sq_remove(v, -2); // remove object name
4058 if(setup_releasehook) {
4059 sq_setreleasehook(v, -1, SSector_release_hook);
4062 sq_remove(v, -2); // remove root table
4065 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
4067 using namespace Wrapper;
4069 sq_pushroottable(v);
4070 sq_pushstring(v, "LevelTime", -1);
4071 if(SQ_FAILED(sq_get(v, -2))) {
4072 std::ostringstream msg;
4073 msg << "Couldn't resolved squirrel type 'LevelTime'";
4074 throw SquirrelError(v, msg.str());
4077 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4078 std::ostringstream msg;
4079 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
4080 throw SquirrelError(v, msg.str());
4082 sq_remove(v, -2); // remove object name
4084 if(setup_releasehook) {
4085 sq_setreleasehook(v, -1, LevelTime_release_hook);
4088 sq_remove(v, -2); // remove root table
4091 void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook)
4093 using namespace Wrapper;
4095 sq_pushroottable(v);
4096 sq_pushstring(v, "WillOWisp", -1);
4097 if(SQ_FAILED(sq_get(v, -2))) {
4098 std::ostringstream msg;
4099 msg << "Couldn't resolved squirrel type 'WillOWisp'";
4100 throw SquirrelError(v, msg.str());
4103 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4104 std::ostringstream msg;
4105 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
4106 throw SquirrelError(v, msg.str());
4108 sq_remove(v, -2); // remove object name
4110 if(setup_releasehook) {
4111 sq_setreleasehook(v, -1, WillOWisp_release_hook);
4114 sq_remove(v, -2); // remove root table
4117 void register_supertux_wrapper(HSQUIRRELVM v)
4119 using namespace Wrapper;
4121 sq_pushstring(v, "ANCHOR_TOP", -1);
4122 sq_pushinteger(v, 16);
4123 if(SQ_FAILED(sq_createslot(v, -3))) {
4124 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
4127 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
4128 sq_pushinteger(v, 32);
4129 if(SQ_FAILED(sq_createslot(v, -3))) {
4130 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
4133 sq_pushstring(v, "ANCHOR_LEFT", -1);
4134 sq_pushinteger(v, 1);
4135 if(SQ_FAILED(sq_createslot(v, -3))) {
4136 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
4139 sq_pushstring(v, "ANCHOR_RIGHT", -1);
4140 sq_pushinteger(v, 2);
4141 if(SQ_FAILED(sq_createslot(v, -3))) {
4142 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
4145 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
4146 sq_pushinteger(v, 0);
4147 if(SQ_FAILED(sq_createslot(v, -3))) {
4148 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
4151 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
4152 sq_pushinteger(v, 17);
4153 if(SQ_FAILED(sq_createslot(v, -3))) {
4154 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
4157 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
4158 sq_pushinteger(v, 18);
4159 if(SQ_FAILED(sq_createslot(v, -3))) {
4160 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
4163 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
4164 sq_pushinteger(v, 33);
4165 if(SQ_FAILED(sq_createslot(v, -3))) {
4166 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
4169 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
4170 sq_pushinteger(v, 34);
4171 if(SQ_FAILED(sq_createslot(v, -3))) {
4172 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
4175 sq_pushstring(v, "display", -1);
4176 sq_newclosure(v, &display_wrapper, 0);
4177 if(SQ_FAILED(sq_createslot(v, -3))) {
4178 throw SquirrelError(v, "Couldn't register function 'display'");
4181 sq_pushstring(v, "print_stacktrace", -1);
4182 sq_newclosure(v, &print_stacktrace_wrapper, 0);
4183 if(SQ_FAILED(sq_createslot(v, -3))) {
4184 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
4187 sq_pushstring(v, "get_current_thread", -1);
4188 sq_newclosure(v, &get_current_thread_wrapper, 0);
4189 if(SQ_FAILED(sq_createslot(v, -3))) {
4190 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
4193 sq_pushstring(v, "display_text_file", -1);
4194 sq_newclosure(v, &display_text_file_wrapper, 0);
4195 if(SQ_FAILED(sq_createslot(v, -3))) {
4196 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
4199 sq_pushstring(v, "load_worldmap", -1);
4200 sq_newclosure(v, &load_worldmap_wrapper, 0);
4201 if(SQ_FAILED(sq_createslot(v, -3))) {
4202 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
4205 sq_pushstring(v, "load_level", -1);
4206 sq_newclosure(v, &load_level_wrapper, 0);
4207 if(SQ_FAILED(sq_createslot(v, -3))) {
4208 throw SquirrelError(v, "Couldn't register function 'load_level'");
4211 sq_pushstring(v, "wait", -1);
4212 sq_newclosure(v, &wait_wrapper, 0);
4213 if(SQ_FAILED(sq_createslot(v, -3))) {
4214 throw SquirrelError(v, "Couldn't register function 'wait'");
4217 sq_pushstring(v, "wait_for_screenswitch", -1);
4218 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
4219 if(SQ_FAILED(sq_createslot(v, -3))) {
4220 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
4223 sq_pushstring(v, "exit_screen", -1);
4224 sq_newclosure(v, &exit_screen_wrapper, 0);
4225 if(SQ_FAILED(sq_createslot(v, -3))) {
4226 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
4229 sq_pushstring(v, "fadeout_screen", -1);
4230 sq_newclosure(v, &fadeout_screen_wrapper, 0);
4231 if(SQ_FAILED(sq_createslot(v, -3))) {
4232 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
4235 sq_pushstring(v, "shrink_screen", -1);
4236 sq_newclosure(v, &shrink_screen_wrapper, 0);
4237 if(SQ_FAILED(sq_createslot(v, -3))) {
4238 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
4241 sq_pushstring(v, "abort_screenfade", -1);
4242 sq_newclosure(v, &abort_screenfade_wrapper, 0);
4243 if(SQ_FAILED(sq_createslot(v, -3))) {
4244 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
4247 sq_pushstring(v, "translate", -1);
4248 sq_newclosure(v, &translate_wrapper, 0);
4249 if(SQ_FAILED(sq_createslot(v, -3))) {
4250 throw SquirrelError(v, "Couldn't register function 'translate'");
4253 sq_pushstring(v, "import", -1);
4254 sq_newclosure(v, &import_wrapper, 0);
4255 if(SQ_FAILED(sq_createslot(v, -3))) {
4256 throw SquirrelError(v, "Couldn't register function 'import'");
4259 sq_pushstring(v, "save_state", -1);
4260 sq_newclosure(v, &save_state_wrapper, 0);
4261 if(SQ_FAILED(sq_createslot(v, -3))) {
4262 throw SquirrelError(v, "Couldn't register function 'save_state'");
4265 sq_pushstring(v, "update_worldmap", -1);
4266 sq_newclosure(v, &update_worldmap_wrapper, 0);
4267 if(SQ_FAILED(sq_createslot(v, -3))) {
4268 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
4271 sq_pushstring(v, "debug_collrects", -1);
4272 sq_newclosure(v, &debug_collrects_wrapper, 0);
4273 if(SQ_FAILED(sq_createslot(v, -3))) {
4274 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
4277 sq_pushstring(v, "debug_show_fps", -1);
4278 sq_newclosure(v, &debug_show_fps_wrapper, 0);
4279 if(SQ_FAILED(sq_createslot(v, -3))) {
4280 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
4283 sq_pushstring(v, "debug_draw_solids_only", -1);
4284 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
4285 if(SQ_FAILED(sq_createslot(v, -3))) {
4286 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
4289 sq_pushstring(v, "play_music", -1);
4290 sq_newclosure(v, &play_music_wrapper, 0);
4291 if(SQ_FAILED(sq_createslot(v, -3))) {
4292 throw SquirrelError(v, "Couldn't register function 'play_music'");
4295 sq_pushstring(v, "play_sound", -1);
4296 sq_newclosure(v, &play_sound_wrapper, 0);
4297 if(SQ_FAILED(sq_createslot(v, -3))) {
4298 throw SquirrelError(v, "Couldn't register function 'play_sound'");
4301 sq_pushstring(v, "grease", -1);
4302 sq_newclosure(v, &grease_wrapper, 0);
4303 if(SQ_FAILED(sq_createslot(v, -3))) {
4304 throw SquirrelError(v, "Couldn't register function 'grease'");
4307 sq_pushstring(v, "invincible", -1);
4308 sq_newclosure(v, &invincible_wrapper, 0);
4309 if(SQ_FAILED(sq_createslot(v, -3))) {
4310 throw SquirrelError(v, "Couldn't register function 'invincible'");
4313 sq_pushstring(v, "ghost", -1);
4314 sq_newclosure(v, &ghost_wrapper, 0);
4315 if(SQ_FAILED(sq_createslot(v, -3))) {
4316 throw SquirrelError(v, "Couldn't register function 'ghost'");
4319 sq_pushstring(v, "mortal", -1);
4320 sq_newclosure(v, &mortal_wrapper, 0);
4321 if(SQ_FAILED(sq_createslot(v, -3))) {
4322 throw SquirrelError(v, "Couldn't register function 'mortal'");
4325 sq_pushstring(v, "restart", -1);
4326 sq_newclosure(v, &restart_wrapper, 0);
4327 if(SQ_FAILED(sq_createslot(v, -3))) {
4328 throw SquirrelError(v, "Couldn't register function 'restart'");
4331 sq_pushstring(v, "whereami", -1);
4332 sq_newclosure(v, &whereami_wrapper, 0);
4333 if(SQ_FAILED(sq_createslot(v, -3))) {
4334 throw SquirrelError(v, "Couldn't register function 'whereami'");
4337 sq_pushstring(v, "gotoend", -1);
4338 sq_newclosure(v, &gotoend_wrapper, 0);
4339 if(SQ_FAILED(sq_createslot(v, -3))) {
4340 throw SquirrelError(v, "Couldn't register function 'gotoend'");
4343 sq_pushstring(v, "camera", -1);
4344 sq_newclosure(v, &camera_wrapper, 0);
4345 if(SQ_FAILED(sq_createslot(v, -3))) {
4346 throw SquirrelError(v, "Couldn't register function 'camera'");
4349 sq_pushstring(v, "quit", -1);
4350 sq_newclosure(v, &quit_wrapper, 0);
4351 if(SQ_FAILED(sq_createslot(v, -3))) {
4352 throw SquirrelError(v, "Couldn't register function 'quit'");
4355 sq_pushstring(v, "rand", -1);
4356 sq_newclosure(v, &rand_wrapper, 0);
4357 if(SQ_FAILED(sq_createslot(v, -3))) {
4358 throw SquirrelError(v, "Couldn't register function 'rand'");
4361 // Register class DisplayEffect
4362 sq_pushstring(v, "DisplayEffect", -1);
4363 if(sq_newclass(v, SQFalse) < 0) {
4364 std::ostringstream msg;
4365 msg << "Couldn't create new class 'DisplayEffect'";
4366 throw SquirrelError(v, msg.str());
4368 sq_pushstring(v, "fade_out", -1);
4369 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4370 if(SQ_FAILED(sq_createslot(v, -3))) {
4371 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4374 sq_pushstring(v, "fade_in", -1);
4375 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4376 if(SQ_FAILED(sq_createslot(v, -3))) {
4377 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4380 sq_pushstring(v, "set_black", -1);
4381 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4382 if(SQ_FAILED(sq_createslot(v, -3))) {
4383 throw SquirrelError(v, "Couldn't register function 'set_black'");
4386 sq_pushstring(v, "is_black", -1);
4387 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4388 if(SQ_FAILED(sq_createslot(v, -3))) {
4389 throw SquirrelError(v, "Couldn't register function 'is_black'");
4392 sq_pushstring(v, "sixteen_to_nine", -1);
4393 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4394 if(SQ_FAILED(sq_createslot(v, -3))) {
4395 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4398 sq_pushstring(v, "four_to_three", -1);
4399 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4400 if(SQ_FAILED(sq_createslot(v, -3))) {
4401 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4404 if(SQ_FAILED(sq_createslot(v, -3))) {
4405 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4408 // Register class Camera
4409 sq_pushstring(v, "Camera", -1);
4410 if(sq_newclass(v, SQFalse) < 0) {
4411 std::ostringstream msg;
4412 msg << "Couldn't create new class 'Camera'";
4413 throw SquirrelError(v, msg.str());
4415 sq_pushstring(v, "reload_config", -1);
4416 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4417 if(SQ_FAILED(sq_createslot(v, -3))) {
4418 throw SquirrelError(v, "Couldn't register function 'reload_config'");
4421 sq_pushstring(v, "shake", -1);
4422 sq_newclosure(v, &Camera_shake_wrapper, 0);
4423 if(SQ_FAILED(sq_createslot(v, -3))) {
4424 throw SquirrelError(v, "Couldn't register function 'shake'");
4427 sq_pushstring(v, "set_pos", -1);
4428 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4429 if(SQ_FAILED(sq_createslot(v, -3))) {
4430 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4433 sq_pushstring(v, "set_mode", -1);
4434 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4435 if(SQ_FAILED(sq_createslot(v, -3))) {
4436 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4439 sq_pushstring(v, "scroll_to", -1);
4440 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4441 if(SQ_FAILED(sq_createslot(v, -3))) {
4442 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4445 if(SQ_FAILED(sq_createslot(v, -3))) {
4446 throw SquirrelError(v, "Couldn't register class 'Camera'");
4449 // Register class Level
4450 sq_pushstring(v, "Level", -1);
4451 if(sq_newclass(v, SQFalse) < 0) {
4452 std::ostringstream msg;
4453 msg << "Couldn't create new class 'Level'";
4454 throw SquirrelError(v, msg.str());
4456 sq_pushstring(v, "finish", -1);
4457 sq_newclosure(v, &Level_finish_wrapper, 0);
4458 if(SQ_FAILED(sq_createslot(v, -3))) {
4459 throw SquirrelError(v, "Couldn't register function 'finish'");
4462 sq_pushstring(v, "spawn", -1);
4463 sq_newclosure(v, &Level_spawn_wrapper, 0);
4464 if(SQ_FAILED(sq_createslot(v, -3))) {
4465 throw SquirrelError(v, "Couldn't register function 'spawn'");
4468 sq_pushstring(v, "flip_vertically", -1);
4469 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4470 if(SQ_FAILED(sq_createslot(v, -3))) {
4471 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4474 sq_pushstring(v, "toggle_pause", -1);
4475 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4476 if(SQ_FAILED(sq_createslot(v, -3))) {
4477 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4480 if(SQ_FAILED(sq_createslot(v, -3))) {
4481 throw SquirrelError(v, "Couldn't register class 'Level'");
4484 // Register class ScriptedObject
4485 sq_pushstring(v, "ScriptedObject", -1);
4486 if(sq_newclass(v, SQFalse) < 0) {
4487 std::ostringstream msg;
4488 msg << "Couldn't create new class 'ScriptedObject'";
4489 throw SquirrelError(v, msg.str());
4491 sq_pushstring(v, "set_action", -1);
4492 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4493 if(SQ_FAILED(sq_createslot(v, -3))) {
4494 throw SquirrelError(v, "Couldn't register function 'set_action'");
4497 sq_pushstring(v, "get_action", -1);
4498 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4499 if(SQ_FAILED(sq_createslot(v, -3))) {
4500 throw SquirrelError(v, "Couldn't register function 'get_action'");
4503 sq_pushstring(v, "move", -1);
4504 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4505 if(SQ_FAILED(sq_createslot(v, -3))) {
4506 throw SquirrelError(v, "Couldn't register function 'move'");
4509 sq_pushstring(v, "set_pos", -1);
4510 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4511 if(SQ_FAILED(sq_createslot(v, -3))) {
4512 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4515 sq_pushstring(v, "get_pos_x", -1);
4516 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4517 if(SQ_FAILED(sq_createslot(v, -3))) {
4518 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4521 sq_pushstring(v, "get_pos_y", -1);
4522 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4523 if(SQ_FAILED(sq_createslot(v, -3))) {
4524 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4527 sq_pushstring(v, "set_velocity", -1);
4528 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4529 if(SQ_FAILED(sq_createslot(v, -3))) {
4530 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4533 sq_pushstring(v, "get_velocity_x", -1);
4534 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4535 if(SQ_FAILED(sq_createslot(v, -3))) {
4536 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4539 sq_pushstring(v, "get_velocity_y", -1);
4540 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4541 if(SQ_FAILED(sq_createslot(v, -3))) {
4542 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4545 sq_pushstring(v, "set_visible", -1);
4546 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4547 if(SQ_FAILED(sq_createslot(v, -3))) {
4548 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4551 sq_pushstring(v, "is_visible", -1);
4552 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4553 if(SQ_FAILED(sq_createslot(v, -3))) {
4554 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4557 sq_pushstring(v, "set_solid", -1);
4558 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4559 if(SQ_FAILED(sq_createslot(v, -3))) {
4560 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4563 sq_pushstring(v, "is_solid", -1);
4564 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4565 if(SQ_FAILED(sq_createslot(v, -3))) {
4566 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4569 sq_pushstring(v, "get_name", -1);
4570 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4571 if(SQ_FAILED(sq_createslot(v, -3))) {
4572 throw SquirrelError(v, "Couldn't register function 'get_name'");
4575 if(SQ_FAILED(sq_createslot(v, -3))) {
4576 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4579 // Register class Text
4580 sq_pushstring(v, "Text", -1);
4581 if(sq_newclass(v, SQFalse) < 0) {
4582 std::ostringstream msg;
4583 msg << "Couldn't create new class 'Text'";
4584 throw SquirrelError(v, msg.str());
4586 sq_pushstring(v, "set_text", -1);
4587 sq_newclosure(v, &Text_set_text_wrapper, 0);
4588 if(SQ_FAILED(sq_createslot(v, -3))) {
4589 throw SquirrelError(v, "Couldn't register function 'set_text'");
4592 sq_pushstring(v, "set_font", -1);
4593 sq_newclosure(v, &Text_set_font_wrapper, 0);
4594 if(SQ_FAILED(sq_createslot(v, -3))) {
4595 throw SquirrelError(v, "Couldn't register function 'set_font'");
4598 sq_pushstring(v, "fade_in", -1);
4599 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4600 if(SQ_FAILED(sq_createslot(v, -3))) {
4601 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4604 sq_pushstring(v, "fade_out", -1);
4605 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4606 if(SQ_FAILED(sq_createslot(v, -3))) {
4607 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4610 sq_pushstring(v, "set_visible", -1);
4611 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4612 if(SQ_FAILED(sq_createslot(v, -3))) {
4613 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4616 sq_pushstring(v, "set_centered", -1);
4617 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4618 if(SQ_FAILED(sq_createslot(v, -3))) {
4619 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4622 sq_pushstring(v, "set_pos", -1);
4623 sq_newclosure(v, &Text_set_pos_wrapper, 0);
4624 if(SQ_FAILED(sq_createslot(v, -3))) {
4625 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4628 sq_pushstring(v, "get_pos_x", -1);
4629 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
4630 if(SQ_FAILED(sq_createslot(v, -3))) {
4631 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4634 sq_pushstring(v, "get_pos_y", -1);
4635 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
4636 if(SQ_FAILED(sq_createslot(v, -3))) {
4637 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4640 sq_pushstring(v, "set_anchor_point", -1);
4641 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
4642 if(SQ_FAILED(sq_createslot(v, -3))) {
4643 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4646 sq_pushstring(v, "get_anchor_point", -1);
4647 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
4648 if(SQ_FAILED(sq_createslot(v, -3))) {
4649 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4652 if(SQ_FAILED(sq_createslot(v, -3))) {
4653 throw SquirrelError(v, "Couldn't register class 'Text'");
4656 // Register class Player
4657 sq_pushstring(v, "Player", -1);
4658 if(sq_newclass(v, SQFalse) < 0) {
4659 std::ostringstream msg;
4660 msg << "Couldn't create new class 'Player'";
4661 throw SquirrelError(v, msg.str());
4663 sq_pushstring(v, "add_bonus", -1);
4664 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4665 if(SQ_FAILED(sq_createslot(v, -3))) {
4666 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4669 sq_pushstring(v, "add_coins", -1);
4670 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4671 if(SQ_FAILED(sq_createslot(v, -3))) {
4672 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4675 sq_pushstring(v, "make_invincible", -1);
4676 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4677 if(SQ_FAILED(sq_createslot(v, -3))) {
4678 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4681 sq_pushstring(v, "deactivate", -1);
4682 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4683 if(SQ_FAILED(sq_createslot(v, -3))) {
4684 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4687 sq_pushstring(v, "activate", -1);
4688 sq_newclosure(v, &Player_activate_wrapper, 0);
4689 if(SQ_FAILED(sq_createslot(v, -3))) {
4690 throw SquirrelError(v, "Couldn't register function 'activate'");
4693 sq_pushstring(v, "walk", -1);
4694 sq_newclosure(v, &Player_walk_wrapper, 0);
4695 if(SQ_FAILED(sq_createslot(v, -3))) {
4696 throw SquirrelError(v, "Couldn't register function 'walk'");
4699 sq_pushstring(v, "set_visible", -1);
4700 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4701 if(SQ_FAILED(sq_createslot(v, -3))) {
4702 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4705 sq_pushstring(v, "get_visible", -1);
4706 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4707 if(SQ_FAILED(sq_createslot(v, -3))) {
4708 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4711 sq_pushstring(v, "kill", -1);
4712 sq_newclosure(v, &Player_kill_wrapper, 0);
4713 if(SQ_FAILED(sq_createslot(v, -3))) {
4714 throw SquirrelError(v, "Couldn't register function 'kill'");
4717 sq_pushstring(v, "set_ghost_mode", -1);
4718 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4719 if(SQ_FAILED(sq_createslot(v, -3))) {
4720 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4723 sq_pushstring(v, "get_ghost_mode", -1);
4724 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4725 if(SQ_FAILED(sq_createslot(v, -3))) {
4726 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4729 sq_pushstring(v, "do_cheer", -1);
4730 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4731 if(SQ_FAILED(sq_createslot(v, -3))) {
4732 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4735 sq_pushstring(v, "do_duck", -1);
4736 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4737 if(SQ_FAILED(sq_createslot(v, -3))) {
4738 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4741 sq_pushstring(v, "do_standup", -1);
4742 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4743 if(SQ_FAILED(sq_createslot(v, -3))) {
4744 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4747 sq_pushstring(v, "do_backflip", -1);
4748 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4749 if(SQ_FAILED(sq_createslot(v, -3))) {
4750 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4753 sq_pushstring(v, "do_jump", -1);
4754 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4755 if(SQ_FAILED(sq_createslot(v, -3))) {
4756 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4759 sq_pushstring(v, "trigger_sequence", -1);
4760 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4761 if(SQ_FAILED(sq_createslot(v, -3))) {
4762 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4765 sq_pushstring(v, "use_scripting_controller", -1);
4766 sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
4767 if(SQ_FAILED(sq_createslot(v, -3))) {
4768 throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
4771 sq_pushstring(v, "do_scripting_controller", -1);
4772 sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
4773 if(SQ_FAILED(sq_createslot(v, -3))) {
4774 throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
4777 if(SQ_FAILED(sq_createslot(v, -3))) {
4778 throw SquirrelError(v, "Couldn't register class 'Player'");
4781 // Register class FloatingImage
4782 sq_pushstring(v, "FloatingImage", -1);
4783 if(sq_newclass(v, SQFalse) < 0) {
4784 std::ostringstream msg;
4785 msg << "Couldn't create new class 'FloatingImage'";
4786 throw SquirrelError(v, msg.str());
4788 sq_pushstring(v, "constructor", -1);
4789 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4790 if(SQ_FAILED(sq_createslot(v, -3))) {
4791 throw SquirrelError(v, "Couldn't register function 'constructor'");
4794 sq_pushstring(v, "set_layer", -1);
4795 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4796 if(SQ_FAILED(sq_createslot(v, -3))) {
4797 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4800 sq_pushstring(v, "get_layer", -1);
4801 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4802 if(SQ_FAILED(sq_createslot(v, -3))) {
4803 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4806 sq_pushstring(v, "set_pos", -1);
4807 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4808 if(SQ_FAILED(sq_createslot(v, -3))) {
4809 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4812 sq_pushstring(v, "get_pos_x", -1);
4813 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4814 if(SQ_FAILED(sq_createslot(v, -3))) {
4815 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4818 sq_pushstring(v, "get_pos_y", -1);
4819 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4820 if(SQ_FAILED(sq_createslot(v, -3))) {
4821 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4824 sq_pushstring(v, "set_anchor_point", -1);
4825 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4826 if(SQ_FAILED(sq_createslot(v, -3))) {
4827 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4830 sq_pushstring(v, "get_anchor_point", -1);
4831 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4832 if(SQ_FAILED(sq_createslot(v, -3))) {
4833 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4836 sq_pushstring(v, "set_visible", -1);
4837 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4838 if(SQ_FAILED(sq_createslot(v, -3))) {
4839 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4842 sq_pushstring(v, "get_visible", -1);
4843 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4844 if(SQ_FAILED(sq_createslot(v, -3))) {
4845 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4848 sq_pushstring(v, "set_action", -1);
4849 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4850 if(SQ_FAILED(sq_createslot(v, -3))) {
4851 throw SquirrelError(v, "Couldn't register function 'set_action'");
4854 sq_pushstring(v, "get_action", -1);
4855 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4856 if(SQ_FAILED(sq_createslot(v, -3))) {
4857 throw SquirrelError(v, "Couldn't register function 'get_action'");
4860 sq_pushstring(v, "fade_in", -1);
4861 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4862 if(SQ_FAILED(sq_createslot(v, -3))) {
4863 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4866 sq_pushstring(v, "fade_out", -1);
4867 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4868 if(SQ_FAILED(sq_createslot(v, -3))) {
4869 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4872 if(SQ_FAILED(sq_createslot(v, -3))) {
4873 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4876 // Register class Platform
4877 sq_pushstring(v, "Platform", -1);
4878 if(sq_newclass(v, SQFalse) < 0) {
4879 std::ostringstream msg;
4880 msg << "Couldn't create new class 'Platform'";
4881 throw SquirrelError(v, msg.str());
4883 sq_pushstring(v, "goto_node", -1);
4884 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4885 if(SQ_FAILED(sq_createslot(v, -3))) {
4886 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4889 sq_pushstring(v, "start_moving", -1);
4890 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4891 if(SQ_FAILED(sq_createslot(v, -3))) {
4892 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4895 sq_pushstring(v, "stop_moving", -1);
4896 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4897 if(SQ_FAILED(sq_createslot(v, -3))) {
4898 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4901 if(SQ_FAILED(sq_createslot(v, -3))) {
4902 throw SquirrelError(v, "Couldn't register class 'Platform'");
4905 // Register class Candle
4906 sq_pushstring(v, "Candle", -1);
4907 if(sq_newclass(v, SQFalse) < 0) {
4908 std::ostringstream msg;
4909 msg << "Couldn't create new class 'Candle'";
4910 throw SquirrelError(v, msg.str());
4912 sq_pushstring(v, "get_burning", -1);
4913 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4914 if(SQ_FAILED(sq_createslot(v, -3))) {
4915 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4918 sq_pushstring(v, "set_burning", -1);
4919 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4920 if(SQ_FAILED(sq_createslot(v, -3))) {
4921 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4924 if(SQ_FAILED(sq_createslot(v, -3))) {
4925 throw SquirrelError(v, "Couldn't register class 'Candle'");
4928 // Register class Wind
4929 sq_pushstring(v, "Wind", -1);
4930 if(sq_newclass(v, SQFalse) < 0) {
4931 std::ostringstream msg;
4932 msg << "Couldn't create new class 'Wind'";
4933 throw SquirrelError(v, msg.str());
4935 sq_pushstring(v, "start", -1);
4936 sq_newclosure(v, &Wind_start_wrapper, 0);
4937 if(SQ_FAILED(sq_createslot(v, -3))) {
4938 throw SquirrelError(v, "Couldn't register function 'start'");
4941 sq_pushstring(v, "stop", -1);
4942 sq_newclosure(v, &Wind_stop_wrapper, 0);
4943 if(SQ_FAILED(sq_createslot(v, -3))) {
4944 throw SquirrelError(v, "Couldn't register function 'stop'");
4947 if(SQ_FAILED(sq_createslot(v, -3))) {
4948 throw SquirrelError(v, "Couldn't register class 'Wind'");
4951 // Register class AmbientSound
4952 sq_pushstring(v, "AmbientSound", -1);
4953 if(sq_newclass(v, SQFalse) < 0) {
4954 std::ostringstream msg;
4955 msg << "Couldn't create new class 'AmbientSound'";
4956 throw SquirrelError(v, msg.str());
4958 sq_pushstring(v, "set_pos", -1);
4959 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4960 if(SQ_FAILED(sq_createslot(v, -3))) {
4961 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4964 sq_pushstring(v, "get_pos_x", -1);
4965 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4966 if(SQ_FAILED(sq_createslot(v, -3))) {
4967 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4970 sq_pushstring(v, "get_pos_y", -1);
4971 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4972 if(SQ_FAILED(sq_createslot(v, -3))) {
4973 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4976 if(SQ_FAILED(sq_createslot(v, -3))) {
4977 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4980 // Register class Thunderstorm
4981 sq_pushstring(v, "Thunderstorm", -1);
4982 if(sq_newclass(v, SQFalse) < 0) {
4983 std::ostringstream msg;
4984 msg << "Couldn't create new class 'Thunderstorm'";
4985 throw SquirrelError(v, msg.str());
4987 sq_pushstring(v, "start", -1);
4988 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4989 if(SQ_FAILED(sq_createslot(v, -3))) {
4990 throw SquirrelError(v, "Couldn't register function 'start'");
4993 sq_pushstring(v, "stop", -1);
4994 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4995 if(SQ_FAILED(sq_createslot(v, -3))) {
4996 throw SquirrelError(v, "Couldn't register function 'stop'");
4999 sq_pushstring(v, "thunder", -1);
5000 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
5001 if(SQ_FAILED(sq_createslot(v, -3))) {
5002 throw SquirrelError(v, "Couldn't register function 'thunder'");
5005 sq_pushstring(v, "lightning", -1);
5006 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
5007 if(SQ_FAILED(sq_createslot(v, -3))) {
5008 throw SquirrelError(v, "Couldn't register function 'lightning'");
5011 sq_pushstring(v, "flash", -1);
5012 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
5013 if(SQ_FAILED(sq_createslot(v, -3))) {
5014 throw SquirrelError(v, "Couldn't register function 'flash'");
5017 sq_pushstring(v, "electrify", -1);
5018 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
5019 if(SQ_FAILED(sq_createslot(v, -3))) {
5020 throw SquirrelError(v, "Couldn't register function 'electrify'");
5023 if(SQ_FAILED(sq_createslot(v, -3))) {
5024 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
5027 // Register class TileMap
5028 sq_pushstring(v, "TileMap", -1);
5029 if(sq_newclass(v, SQFalse) < 0) {
5030 std::ostringstream msg;
5031 msg << "Couldn't create new class 'TileMap'";
5032 throw SquirrelError(v, msg.str());
5034 sq_pushstring(v, "goto_node", -1);
5035 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
5036 if(SQ_FAILED(sq_createslot(v, -3))) {
5037 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5040 sq_pushstring(v, "start_moving", -1);
5041 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
5042 if(SQ_FAILED(sq_createslot(v, -3))) {
5043 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5046 sq_pushstring(v, "stop_moving", -1);
5047 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
5048 if(SQ_FAILED(sq_createslot(v, -3))) {
5049 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5052 sq_pushstring(v, "fade", -1);
5053 sq_newclosure(v, &TileMap_fade_wrapper, 0);
5054 if(SQ_FAILED(sq_createslot(v, -3))) {
5055 throw SquirrelError(v, "Couldn't register function 'fade'");
5058 sq_pushstring(v, "set_alpha", -1);
5059 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
5060 if(SQ_FAILED(sq_createslot(v, -3))) {
5061 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
5064 sq_pushstring(v, "get_alpha", -1);
5065 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
5066 if(SQ_FAILED(sq_createslot(v, -3))) {
5067 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
5070 if(SQ_FAILED(sq_createslot(v, -3))) {
5071 throw SquirrelError(v, "Couldn't register class 'TileMap'");
5074 // Register class SSector
5075 sq_pushstring(v, "SSector", -1);
5076 if(sq_newclass(v, SQFalse) < 0) {
5077 std::ostringstream msg;
5078 msg << "Couldn't create new class 'SSector'";
5079 throw SquirrelError(v, msg.str());
5081 sq_pushstring(v, "set_ambient_light", -1);
5082 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
5083 if(SQ_FAILED(sq_createslot(v, -3))) {
5084 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
5087 sq_pushstring(v, "get_ambient_red", -1);
5088 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
5089 if(SQ_FAILED(sq_createslot(v, -3))) {
5090 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
5093 sq_pushstring(v, "get_ambient_green", -1);
5094 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
5095 if(SQ_FAILED(sq_createslot(v, -3))) {
5096 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
5099 sq_pushstring(v, "get_ambient_blue", -1);
5100 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
5101 if(SQ_FAILED(sq_createslot(v, -3))) {
5102 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
5105 if(SQ_FAILED(sq_createslot(v, -3))) {
5106 throw SquirrelError(v, "Couldn't register class 'SSector'");
5109 // Register class LevelTime
5110 sq_pushstring(v, "LevelTime", -1);
5111 if(sq_newclass(v, SQFalse) < 0) {
5112 std::ostringstream msg;
5113 msg << "Couldn't create new class 'LevelTime'";
5114 throw SquirrelError(v, msg.str());
5116 sq_pushstring(v, "start", -1);
5117 sq_newclosure(v, &LevelTime_start_wrapper, 0);
5118 if(SQ_FAILED(sq_createslot(v, -3))) {
5119 throw SquirrelError(v, "Couldn't register function 'start'");
5122 sq_pushstring(v, "stop", -1);
5123 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
5124 if(SQ_FAILED(sq_createslot(v, -3))) {
5125 throw SquirrelError(v, "Couldn't register function 'stop'");
5128 sq_pushstring(v, "get_time", -1);
5129 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
5130 if(SQ_FAILED(sq_createslot(v, -3))) {
5131 throw SquirrelError(v, "Couldn't register function 'get_time'");
5134 sq_pushstring(v, "set_time", -1);
5135 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
5136 if(SQ_FAILED(sq_createslot(v, -3))) {
5137 throw SquirrelError(v, "Couldn't register function 'set_time'");
5140 if(SQ_FAILED(sq_createslot(v, -3))) {
5141 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
5144 // Register class WillOWisp
5145 sq_pushstring(v, "WillOWisp", -1);
5146 if(sq_newclass(v, SQFalse) < 0) {
5147 std::ostringstream msg;
5148 msg << "Couldn't create new class 'WillOWisp'";
5149 throw SquirrelError(v, msg.str());
5151 sq_pushstring(v, "goto_node", -1);
5152 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
5153 if(SQ_FAILED(sq_createslot(v, -3))) {
5154 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5157 sq_pushstring(v, "set_state", -1);
5158 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
5159 if(SQ_FAILED(sq_createslot(v, -3))) {
5160 throw SquirrelError(v, "Couldn't register function 'set_state'");
5163 sq_pushstring(v, "start_moving", -1);
5164 sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
5165 if(SQ_FAILED(sq_createslot(v, -3))) {
5166 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5169 sq_pushstring(v, "stop_moving", -1);
5170 sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
5171 if(SQ_FAILED(sq_createslot(v, -3))) {
5172 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5175 if(SQ_FAILED(sq_createslot(v, -3))) {
5176 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
5181 } // end of namespace Scripting