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 FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1663 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1668 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1671 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1672 sq_throwerror(vm, _SC("Argument 1 not a string"));
1677 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1678 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1679 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1682 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1686 } catch(std::exception& e) {
1687 sq_throwerror(vm, e.what());
1690 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1696 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1699 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1700 sq_throwerror(vm, _SC("'set_layer' called without instance"));
1703 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1705 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1706 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1711 _this->set_layer(static_cast<int> (arg0));
1715 } catch(std::exception& e) {
1716 sq_throwerror(vm, e.what());
1719 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1725 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1728 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1729 sq_throwerror(vm, _SC("'get_layer' called without instance"));
1732 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1735 int return_value = _this->get_layer();
1737 sq_pushinteger(vm, return_value);
1740 } catch(std::exception& e) {
1741 sq_throwerror(vm, e.what());
1744 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1750 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1753 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1754 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1757 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1759 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1760 sq_throwerror(vm, _SC("Argument 1 not a float"));
1764 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1765 sq_throwerror(vm, _SC("Argument 2 not a float"));
1770 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1774 } catch(std::exception& e) {
1775 sq_throwerror(vm, e.what());
1778 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1784 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1787 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1788 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1791 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1794 float return_value = _this->get_pos_x();
1796 sq_pushfloat(vm, return_value);
1799 } catch(std::exception& e) {
1800 sq_throwerror(vm, e.what());
1803 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1809 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1812 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1813 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1816 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1819 float return_value = _this->get_pos_y();
1821 sq_pushfloat(vm, return_value);
1824 } catch(std::exception& e) {
1825 sq_throwerror(vm, e.what());
1828 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1834 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1837 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1838 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1841 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1843 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1844 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1849 _this->set_anchor_point(static_cast<int> (arg0));
1853 } catch(std::exception& e) {
1854 sq_throwerror(vm, e.what());
1857 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1863 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1866 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1867 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1870 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1873 int return_value = _this->get_anchor_point();
1875 sq_pushinteger(vm, return_value);
1878 } catch(std::exception& e) {
1879 sq_throwerror(vm, e.what());
1882 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1888 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1891 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1892 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1895 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1897 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1898 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1903 _this->set_visible(arg0 == SQTrue);
1907 } catch(std::exception& e) {
1908 sq_throwerror(vm, e.what());
1911 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1917 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1920 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1921 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1924 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1927 bool return_value = _this->get_visible();
1929 sq_pushbool(vm, return_value);
1932 } catch(std::exception& e) {
1933 sq_throwerror(vm, e.what());
1936 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1942 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
1945 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1946 sq_throwerror(vm, _SC("'set_action' called without instance"));
1949 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1951 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1952 sq_throwerror(vm, _SC("Argument 1 not a string"));
1957 _this->set_action(arg0);
1961 } catch(std::exception& e) {
1962 sq_throwerror(vm, e.what());
1965 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1971 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
1974 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1975 sq_throwerror(vm, _SC("'get_action' called without instance"));
1978 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1981 std::string return_value = _this->get_action();
1983 sq_pushstring(vm, return_value.c_str(), return_value.size());
1986 } catch(std::exception& e) {
1987 sq_throwerror(vm, e.what());
1990 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1996 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
1999 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2000 sq_throwerror(vm, _SC("'fade_in' called without instance"));
2003 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2005 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2006 sq_throwerror(vm, _SC("Argument 1 not a float"));
2011 _this->fade_in(static_cast<float> (arg0));
2015 } catch(std::exception& e) {
2016 sq_throwerror(vm, e.what());
2019 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
2025 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
2028 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2029 sq_throwerror(vm, _SC("'fade_out' called without instance"));
2032 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2034 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2035 sq_throwerror(vm, _SC("Argument 1 not a float"));
2040 _this->fade_out(static_cast<float> (arg0));
2044 } catch(std::exception& e) {
2045 sq_throwerror(vm, e.what());
2048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
2054 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
2056 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
2061 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
2064 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2065 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2068 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2070 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2071 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2076 _this->goto_node(static_cast<int> (arg0));
2080 } catch(std::exception& e) {
2081 sq_throwerror(vm, e.what());
2084 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2090 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
2093 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2094 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2097 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2100 _this->start_moving();
2104 } catch(std::exception& e) {
2105 sq_throwerror(vm, e.what());
2108 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2114 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
2117 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2118 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2121 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2124 _this->stop_moving();
2128 } catch(std::exception& e) {
2129 sq_throwerror(vm, e.what());
2132 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2138 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
2140 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
2145 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
2148 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2149 sq_throwerror(vm, _SC("'get_burning' called without instance"));
2152 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2155 bool return_value = _this->get_burning();
2157 sq_pushbool(vm, return_value);
2160 } catch(std::exception& e) {
2161 sq_throwerror(vm, e.what());
2164 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2170 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2173 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2174 sq_throwerror(vm, _SC("'set_burning' called without instance"));
2177 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2179 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2180 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2185 _this->set_burning(arg0 == SQTrue);
2189 } catch(std::exception& e) {
2190 sq_throwerror(vm, e.what());
2193 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2199 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2201 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2206 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2209 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2210 sq_throwerror(vm, _SC("'start' called without instance"));
2213 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2220 } catch(std::exception& e) {
2221 sq_throwerror(vm, e.what());
2224 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2230 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2233 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2234 sq_throwerror(vm, _SC("'stop' called without instance"));
2237 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2244 } catch(std::exception& e) {
2245 sq_throwerror(vm, e.what());
2248 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2254 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2256 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2261 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2264 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2265 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2268 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2270 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2271 sq_throwerror(vm, _SC("Argument 1 not a float"));
2275 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2276 sq_throwerror(vm, _SC("Argument 2 not a float"));
2281 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2285 } catch(std::exception& e) {
2286 sq_throwerror(vm, e.what());
2289 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2295 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2298 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2299 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2302 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2305 float return_value = _this->get_pos_x();
2307 sq_pushfloat(vm, return_value);
2310 } catch(std::exception& e) {
2311 sq_throwerror(vm, e.what());
2314 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2320 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2323 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2324 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2327 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2330 float return_value = _this->get_pos_y();
2332 sq_pushfloat(vm, return_value);
2335 } catch(std::exception& e) {
2336 sq_throwerror(vm, e.what());
2339 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2345 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2347 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2352 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2355 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2356 sq_throwerror(vm, _SC("'start' called without instance"));
2359 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2366 } catch(std::exception& e) {
2367 sq_throwerror(vm, e.what());
2370 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2376 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2379 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2380 sq_throwerror(vm, _SC("'stop' called without instance"));
2383 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2390 } catch(std::exception& e) {
2391 sq_throwerror(vm, e.what());
2394 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2400 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2403 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2404 sq_throwerror(vm, _SC("'thunder' called without instance"));
2407 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2414 } catch(std::exception& e) {
2415 sq_throwerror(vm, e.what());
2418 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2424 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2427 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2428 sq_throwerror(vm, _SC("'lightning' called without instance"));
2431 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2438 } catch(std::exception& e) {
2439 sq_throwerror(vm, e.what());
2442 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2448 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2451 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2452 sq_throwerror(vm, _SC("'flash' called without instance"));
2455 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2462 } catch(std::exception& e) {
2463 sq_throwerror(vm, e.what());
2466 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2472 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2475 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2476 sq_throwerror(vm, _SC("'electrify' called without instance"));
2479 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2486 } catch(std::exception& e) {
2487 sq_throwerror(vm, e.what());
2490 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2496 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2498 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2503 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2506 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2507 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2510 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2512 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2513 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2518 _this->goto_node(static_cast<int> (arg0));
2522 } catch(std::exception& e) {
2523 sq_throwerror(vm, e.what());
2526 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2532 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2535 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2536 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2539 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2542 _this->start_moving();
2546 } catch(std::exception& e) {
2547 sq_throwerror(vm, e.what());
2550 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2556 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2559 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2560 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2563 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2566 _this->stop_moving();
2570 } catch(std::exception& e) {
2571 sq_throwerror(vm, e.what());
2574 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2580 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2583 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2584 sq_throwerror(vm, _SC("'fade' called without instance"));
2587 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2589 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2590 sq_throwerror(vm, _SC("Argument 1 not a float"));
2594 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2595 sq_throwerror(vm, _SC("Argument 2 not a float"));
2600 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2604 } catch(std::exception& e) {
2605 sq_throwerror(vm, e.what());
2608 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2614 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2617 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2618 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2621 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2623 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2624 sq_throwerror(vm, _SC("Argument 1 not a float"));
2629 _this->set_alpha(static_cast<float> (arg0));
2633 } catch(std::exception& e) {
2634 sq_throwerror(vm, e.what());
2637 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2643 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2646 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2647 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2650 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2653 float return_value = _this->get_alpha();
2655 sq_pushfloat(vm, return_value);
2658 } catch(std::exception& e) {
2659 sq_throwerror(vm, e.what());
2662 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2668 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2670 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2675 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2678 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2679 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2682 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2684 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2685 sq_throwerror(vm, _SC("Argument 1 not a float"));
2689 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2690 sq_throwerror(vm, _SC("Argument 2 not a float"));
2694 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2695 sq_throwerror(vm, _SC("Argument 3 not a float"));
2700 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2704 } catch(std::exception& e) {
2705 sq_throwerror(vm, e.what());
2708 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2714 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2717 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2718 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2721 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2724 float return_value = _this->get_ambient_red();
2726 sq_pushfloat(vm, return_value);
2729 } catch(std::exception& e) {
2730 sq_throwerror(vm, e.what());
2733 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2739 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2742 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2743 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2746 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2749 float return_value = _this->get_ambient_green();
2751 sq_pushfloat(vm, return_value);
2754 } catch(std::exception& e) {
2755 sq_throwerror(vm, e.what());
2758 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2764 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2767 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2768 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2771 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2774 float return_value = _this->get_ambient_blue();
2776 sq_pushfloat(vm, return_value);
2779 } catch(std::exception& e) {
2780 sq_throwerror(vm, e.what());
2783 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2789 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2791 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2796 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2799 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2800 sq_throwerror(vm, _SC("'start' called without instance"));
2803 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2810 } catch(std::exception& e) {
2811 sq_throwerror(vm, e.what());
2814 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2820 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2823 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2824 sq_throwerror(vm, _SC("'stop' called without instance"));
2827 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2834 } catch(std::exception& e) {
2835 sq_throwerror(vm, e.what());
2838 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2844 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2847 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2848 sq_throwerror(vm, _SC("'get_time' called without instance"));
2851 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2854 float return_value = _this->get_time();
2856 sq_pushfloat(vm, return_value);
2859 } catch(std::exception& e) {
2860 sq_throwerror(vm, e.what());
2863 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2869 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2872 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2873 sq_throwerror(vm, _SC("'set_time' called without instance"));
2876 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2878 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2879 sq_throwerror(vm, _SC("Argument 1 not a float"));
2884 _this->set_time(static_cast<float> (arg0));
2888 } catch(std::exception& e) {
2889 sq_throwerror(vm, e.what());
2892 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2898 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
2900 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (ptr);
2905 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
2908 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2909 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2912 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2914 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2915 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2920 _this->goto_node(static_cast<int> (arg0));
2924 } catch(std::exception& e) {
2925 sq_throwerror(vm, e.what());
2928 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2934 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
2937 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2938 sq_throwerror(vm, _SC("'set_state' called without instance"));
2941 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
2943 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2944 sq_throwerror(vm, _SC("Argument 1 not a string"));
2949 _this->set_state(arg0);
2953 } catch(std::exception& e) {
2954 sq_throwerror(vm, e.what());
2957 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
2963 static SQInteger display_wrapper(HSQUIRRELVM vm)
2965 return Scripting::display(vm);
2968 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
2970 HSQUIRRELVM arg0 = vm;
2973 Scripting::print_stacktrace(arg0);
2977 } catch(std::exception& e) {
2978 sq_throwerror(vm, e.what());
2981 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
2987 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
2989 return Scripting::get_current_thread(vm);
2992 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
2995 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2996 sq_throwerror(vm, _SC("Argument 1 not a string"));
3001 Scripting::display_text_file(arg0);
3005 } catch(std::exception& e) {
3006 sq_throwerror(vm, e.what());
3009 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
3015 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
3018 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3019 sq_throwerror(vm, _SC("Argument 1 not a string"));
3024 Scripting::load_worldmap(arg0);
3028 } catch(std::exception& e) {
3029 sq_throwerror(vm, e.what());
3032 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
3038 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
3041 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3042 sq_throwerror(vm, _SC("Argument 1 not a string"));
3047 Scripting::load_level(arg0);
3051 } catch(std::exception& e) {
3052 sq_throwerror(vm, e.what());
3055 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
3061 static SQInteger wait_wrapper(HSQUIRRELVM vm)
3063 HSQUIRRELVM arg0 = vm;
3065 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
3066 sq_throwerror(vm, _SC("Argument 1 not a float"));
3071 Scripting::wait(arg0, static_cast<float> (arg1));
3073 return sq_suspendvm(vm);
3075 } catch(std::exception& e) {
3076 sq_throwerror(vm, e.what());
3079 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
3085 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
3087 HSQUIRRELVM arg0 = vm;
3090 Scripting::wait_for_screenswitch(arg0);
3092 return sq_suspendvm(vm);
3094 } catch(std::exception& e) {
3095 sq_throwerror(vm, e.what());
3098 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
3104 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
3109 Scripting::exit_screen();
3113 } catch(std::exception& e) {
3114 sq_throwerror(vm, e.what());
3117 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
3123 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
3126 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3127 sq_throwerror(vm, _SC("Argument 1 not a float"));
3132 Scripting::fadeout_screen(static_cast<float> (arg0));
3136 } catch(std::exception& e) {
3137 sq_throwerror(vm, e.what());
3140 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
3146 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
3149 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3150 sq_throwerror(vm, _SC("Argument 1 not a float"));
3154 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3155 sq_throwerror(vm, _SC("Argument 2 not a float"));
3159 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3160 sq_throwerror(vm, _SC("Argument 3 not a float"));
3165 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3169 } catch(std::exception& e) {
3170 sq_throwerror(vm, e.what());
3173 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
3179 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
3184 Scripting::abort_screenfade();
3188 } catch(std::exception& e) {
3189 sq_throwerror(vm, e.what());
3192 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
3198 static SQInteger translate_wrapper(HSQUIRRELVM vm)
3201 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3202 sq_throwerror(vm, _SC("Argument 1 not a string"));
3207 std::string return_value = Scripting::translate(arg0);
3209 sq_pushstring(vm, return_value.c_str(), return_value.size());
3212 } catch(std::exception& e) {
3213 sq_throwerror(vm, e.what());
3216 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3222 static SQInteger import_wrapper(HSQUIRRELVM vm)
3224 HSQUIRRELVM arg0 = vm;
3226 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3227 sq_throwerror(vm, _SC("Argument 1 not a string"));
3232 Scripting::import(arg0, arg1);
3236 } catch(std::exception& e) {
3237 sq_throwerror(vm, e.what());
3240 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3246 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3251 Scripting::save_state();
3255 } catch(std::exception& e) {
3256 sq_throwerror(vm, e.what());
3259 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3265 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3270 Scripting::update_worldmap();
3274 } catch(std::exception& e) {
3275 sq_throwerror(vm, e.what());
3278 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3284 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3287 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3288 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3293 Scripting::debug_collrects(arg0 == SQTrue);
3297 } catch(std::exception& e) {
3298 sq_throwerror(vm, e.what());
3301 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3307 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3310 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3311 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3316 Scripting::debug_show_fps(arg0 == SQTrue);
3320 } catch(std::exception& e) {
3321 sq_throwerror(vm, e.what());
3324 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3330 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3333 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3334 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3339 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3343 } catch(std::exception& e) {
3344 sq_throwerror(vm, e.what());
3347 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3353 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3356 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3357 sq_throwerror(vm, _SC("Argument 1 not a string"));
3362 Scripting::play_music(arg0);
3366 } catch(std::exception& e) {
3367 sq_throwerror(vm, e.what());
3370 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3376 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3379 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3380 sq_throwerror(vm, _SC("Argument 1 not a string"));
3385 Scripting::play_sound(arg0);
3389 } catch(std::exception& e) {
3390 sq_throwerror(vm, e.what());
3393 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3399 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3404 Scripting::grease();
3408 } catch(std::exception& e) {
3409 sq_throwerror(vm, e.what());
3412 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3418 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3423 Scripting::invincible();
3427 } catch(std::exception& e) {
3428 sq_throwerror(vm, e.what());
3431 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3437 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3446 } catch(std::exception& e) {
3447 sq_throwerror(vm, e.what());
3450 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3456 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3461 Scripting::mortal();
3465 } catch(std::exception& e) {
3466 sq_throwerror(vm, e.what());
3469 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3475 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3480 Scripting::restart();
3484 } catch(std::exception& e) {
3485 sq_throwerror(vm, e.what());
3488 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3494 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3499 Scripting::whereami();
3503 } catch(std::exception& e) {
3504 sq_throwerror(vm, e.what());
3507 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3513 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3518 Scripting::gotoend();
3522 } catch(std::exception& e) {
3523 sq_throwerror(vm, e.what());
3526 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3532 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3537 Scripting::camera();
3541 } catch(std::exception& e) {
3542 sq_throwerror(vm, e.what());
3545 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3551 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3560 } catch(std::exception& e) {
3561 sq_throwerror(vm, e.what());
3564 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3570 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3574 int return_value = Scripting::rand();
3576 sq_pushinteger(vm, return_value);
3579 } catch(std::exception& e) {
3580 sq_throwerror(vm, e.what());
3583 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3589 } // end of namespace Wrapper
3590 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3592 using namespace Wrapper;
3594 sq_pushroottable(v);
3595 sq_pushstring(v, "DisplayEffect", -1);
3596 if(SQ_FAILED(sq_get(v, -2))) {
3597 std::ostringstream msg;
3598 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3599 throw SquirrelError(v, msg.str());
3602 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3603 std::ostringstream msg;
3604 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3605 throw SquirrelError(v, msg.str());
3607 sq_remove(v, -2); // remove object name
3609 if(setup_releasehook) {
3610 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3613 sq_remove(v, -2); // remove root table
3616 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3618 using namespace Wrapper;
3620 sq_pushroottable(v);
3621 sq_pushstring(v, "Camera", -1);
3622 if(SQ_FAILED(sq_get(v, -2))) {
3623 std::ostringstream msg;
3624 msg << "Couldn't resolved squirrel type 'Camera'";
3625 throw SquirrelError(v, msg.str());
3628 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3629 std::ostringstream msg;
3630 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3631 throw SquirrelError(v, msg.str());
3633 sq_remove(v, -2); // remove object name
3635 if(setup_releasehook) {
3636 sq_setreleasehook(v, -1, Camera_release_hook);
3639 sq_remove(v, -2); // remove root table
3642 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3644 using namespace Wrapper;
3646 sq_pushroottable(v);
3647 sq_pushstring(v, "Level", -1);
3648 if(SQ_FAILED(sq_get(v, -2))) {
3649 std::ostringstream msg;
3650 msg << "Couldn't resolved squirrel type 'Level'";
3651 throw SquirrelError(v, msg.str());
3654 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3655 std::ostringstream msg;
3656 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3657 throw SquirrelError(v, msg.str());
3659 sq_remove(v, -2); // remove object name
3661 if(setup_releasehook) {
3662 sq_setreleasehook(v, -1, Level_release_hook);
3665 sq_remove(v, -2); // remove root table
3668 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3670 using namespace Wrapper;
3672 sq_pushroottable(v);
3673 sq_pushstring(v, "ScriptedObject", -1);
3674 if(SQ_FAILED(sq_get(v, -2))) {
3675 std::ostringstream msg;
3676 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3677 throw SquirrelError(v, msg.str());
3680 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3681 std::ostringstream msg;
3682 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3683 throw SquirrelError(v, msg.str());
3685 sq_remove(v, -2); // remove object name
3687 if(setup_releasehook) {
3688 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3691 sq_remove(v, -2); // remove root table
3694 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3696 using namespace Wrapper;
3698 sq_pushroottable(v);
3699 sq_pushstring(v, "Text", -1);
3700 if(SQ_FAILED(sq_get(v, -2))) {
3701 std::ostringstream msg;
3702 msg << "Couldn't resolved squirrel type 'Text'";
3703 throw SquirrelError(v, msg.str());
3706 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3707 std::ostringstream msg;
3708 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3709 throw SquirrelError(v, msg.str());
3711 sq_remove(v, -2); // remove object name
3713 if(setup_releasehook) {
3714 sq_setreleasehook(v, -1, Text_release_hook);
3717 sq_remove(v, -2); // remove root table
3720 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3722 using namespace Wrapper;
3724 sq_pushroottable(v);
3725 sq_pushstring(v, "Player", -1);
3726 if(SQ_FAILED(sq_get(v, -2))) {
3727 std::ostringstream msg;
3728 msg << "Couldn't resolved squirrel type 'Player'";
3729 throw SquirrelError(v, msg.str());
3732 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3733 std::ostringstream msg;
3734 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3735 throw SquirrelError(v, msg.str());
3737 sq_remove(v, -2); // remove object name
3739 if(setup_releasehook) {
3740 sq_setreleasehook(v, -1, Player_release_hook);
3743 sq_remove(v, -2); // remove root table
3746 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3748 using namespace Wrapper;
3750 sq_pushroottable(v);
3751 sq_pushstring(v, "FloatingImage", -1);
3752 if(SQ_FAILED(sq_get(v, -2))) {
3753 std::ostringstream msg;
3754 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3755 throw SquirrelError(v, msg.str());
3758 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3759 std::ostringstream msg;
3760 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3761 throw SquirrelError(v, msg.str());
3763 sq_remove(v, -2); // remove object name
3765 if(setup_releasehook) {
3766 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3769 sq_remove(v, -2); // remove root table
3772 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3774 using namespace Wrapper;
3776 sq_pushroottable(v);
3777 sq_pushstring(v, "Platform", -1);
3778 if(SQ_FAILED(sq_get(v, -2))) {
3779 std::ostringstream msg;
3780 msg << "Couldn't resolved squirrel type 'Platform'";
3781 throw SquirrelError(v, msg.str());
3784 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3785 std::ostringstream msg;
3786 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3787 throw SquirrelError(v, msg.str());
3789 sq_remove(v, -2); // remove object name
3791 if(setup_releasehook) {
3792 sq_setreleasehook(v, -1, Platform_release_hook);
3795 sq_remove(v, -2); // remove root table
3798 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3800 using namespace Wrapper;
3802 sq_pushroottable(v);
3803 sq_pushstring(v, "Candle", -1);
3804 if(SQ_FAILED(sq_get(v, -2))) {
3805 std::ostringstream msg;
3806 msg << "Couldn't resolved squirrel type 'Candle'";
3807 throw SquirrelError(v, msg.str());
3810 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3811 std::ostringstream msg;
3812 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3813 throw SquirrelError(v, msg.str());
3815 sq_remove(v, -2); // remove object name
3817 if(setup_releasehook) {
3818 sq_setreleasehook(v, -1, Candle_release_hook);
3821 sq_remove(v, -2); // remove root table
3824 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3826 using namespace Wrapper;
3828 sq_pushroottable(v);
3829 sq_pushstring(v, "Wind", -1);
3830 if(SQ_FAILED(sq_get(v, -2))) {
3831 std::ostringstream msg;
3832 msg << "Couldn't resolved squirrel type 'Wind'";
3833 throw SquirrelError(v, msg.str());
3836 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3837 std::ostringstream msg;
3838 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3839 throw SquirrelError(v, msg.str());
3841 sq_remove(v, -2); // remove object name
3843 if(setup_releasehook) {
3844 sq_setreleasehook(v, -1, Wind_release_hook);
3847 sq_remove(v, -2); // remove root table
3850 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3852 using namespace Wrapper;
3854 sq_pushroottable(v);
3855 sq_pushstring(v, "AmbientSound", -1);
3856 if(SQ_FAILED(sq_get(v, -2))) {
3857 std::ostringstream msg;
3858 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3859 throw SquirrelError(v, msg.str());
3862 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3863 std::ostringstream msg;
3864 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3865 throw SquirrelError(v, msg.str());
3867 sq_remove(v, -2); // remove object name
3869 if(setup_releasehook) {
3870 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3873 sq_remove(v, -2); // remove root table
3876 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3878 using namespace Wrapper;
3880 sq_pushroottable(v);
3881 sq_pushstring(v, "Thunderstorm", -1);
3882 if(SQ_FAILED(sq_get(v, -2))) {
3883 std::ostringstream msg;
3884 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3885 throw SquirrelError(v, msg.str());
3888 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3889 std::ostringstream msg;
3890 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3891 throw SquirrelError(v, msg.str());
3893 sq_remove(v, -2); // remove object name
3895 if(setup_releasehook) {
3896 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3899 sq_remove(v, -2); // remove root table
3902 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3904 using namespace Wrapper;
3906 sq_pushroottable(v);
3907 sq_pushstring(v, "TileMap", -1);
3908 if(SQ_FAILED(sq_get(v, -2))) {
3909 std::ostringstream msg;
3910 msg << "Couldn't resolved squirrel type 'TileMap'";
3911 throw SquirrelError(v, msg.str());
3914 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3915 std::ostringstream msg;
3916 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3917 throw SquirrelError(v, msg.str());
3919 sq_remove(v, -2); // remove object name
3921 if(setup_releasehook) {
3922 sq_setreleasehook(v, -1, TileMap_release_hook);
3925 sq_remove(v, -2); // remove root table
3928 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3930 using namespace Wrapper;
3932 sq_pushroottable(v);
3933 sq_pushstring(v, "SSector", -1);
3934 if(SQ_FAILED(sq_get(v, -2))) {
3935 std::ostringstream msg;
3936 msg << "Couldn't resolved squirrel type 'SSector'";
3937 throw SquirrelError(v, msg.str());
3940 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3941 std::ostringstream msg;
3942 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3943 throw SquirrelError(v, msg.str());
3945 sq_remove(v, -2); // remove object name
3947 if(setup_releasehook) {
3948 sq_setreleasehook(v, -1, SSector_release_hook);
3951 sq_remove(v, -2); // remove root table
3954 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3956 using namespace Wrapper;
3958 sq_pushroottable(v);
3959 sq_pushstring(v, "LevelTime", -1);
3960 if(SQ_FAILED(sq_get(v, -2))) {
3961 std::ostringstream msg;
3962 msg << "Couldn't resolved squirrel type 'LevelTime'";
3963 throw SquirrelError(v, msg.str());
3966 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3967 std::ostringstream msg;
3968 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3969 throw SquirrelError(v, msg.str());
3971 sq_remove(v, -2); // remove object name
3973 if(setup_releasehook) {
3974 sq_setreleasehook(v, -1, LevelTime_release_hook);
3977 sq_remove(v, -2); // remove root table
3980 void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook)
3982 using namespace Wrapper;
3984 sq_pushroottable(v);
3985 sq_pushstring(v, "WillOWisp", -1);
3986 if(SQ_FAILED(sq_get(v, -2))) {
3987 std::ostringstream msg;
3988 msg << "Couldn't resolved squirrel type 'WillOWisp'";
3989 throw SquirrelError(v, msg.str());
3992 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3993 std::ostringstream msg;
3994 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
3995 throw SquirrelError(v, msg.str());
3997 sq_remove(v, -2); // remove object name
3999 if(setup_releasehook) {
4000 sq_setreleasehook(v, -1, WillOWisp_release_hook);
4003 sq_remove(v, -2); // remove root table
4006 void register_supertux_wrapper(HSQUIRRELVM v)
4008 using namespace Wrapper;
4010 sq_pushstring(v, "ANCHOR_TOP", -1);
4011 sq_pushinteger(v, 16);
4012 if(SQ_FAILED(sq_createslot(v, -3))) {
4013 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
4016 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
4017 sq_pushinteger(v, 32);
4018 if(SQ_FAILED(sq_createslot(v, -3))) {
4019 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
4022 sq_pushstring(v, "ANCHOR_LEFT", -1);
4023 sq_pushinteger(v, 1);
4024 if(SQ_FAILED(sq_createslot(v, -3))) {
4025 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
4028 sq_pushstring(v, "ANCHOR_RIGHT", -1);
4029 sq_pushinteger(v, 2);
4030 if(SQ_FAILED(sq_createslot(v, -3))) {
4031 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
4034 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
4035 sq_pushinteger(v, 0);
4036 if(SQ_FAILED(sq_createslot(v, -3))) {
4037 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
4040 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
4041 sq_pushinteger(v, 17);
4042 if(SQ_FAILED(sq_createslot(v, -3))) {
4043 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
4046 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
4047 sq_pushinteger(v, 18);
4048 if(SQ_FAILED(sq_createslot(v, -3))) {
4049 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
4052 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
4053 sq_pushinteger(v, 33);
4054 if(SQ_FAILED(sq_createslot(v, -3))) {
4055 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
4058 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
4059 sq_pushinteger(v, 34);
4060 if(SQ_FAILED(sq_createslot(v, -3))) {
4061 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
4064 sq_pushstring(v, "display", -1);
4065 sq_newclosure(v, &display_wrapper, 0);
4066 if(SQ_FAILED(sq_createslot(v, -3))) {
4067 throw SquirrelError(v, "Couldn't register function 'display'");
4070 sq_pushstring(v, "print_stacktrace", -1);
4071 sq_newclosure(v, &print_stacktrace_wrapper, 0);
4072 if(SQ_FAILED(sq_createslot(v, -3))) {
4073 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
4076 sq_pushstring(v, "get_current_thread", -1);
4077 sq_newclosure(v, &get_current_thread_wrapper, 0);
4078 if(SQ_FAILED(sq_createslot(v, -3))) {
4079 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
4082 sq_pushstring(v, "display_text_file", -1);
4083 sq_newclosure(v, &display_text_file_wrapper, 0);
4084 if(SQ_FAILED(sq_createslot(v, -3))) {
4085 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
4088 sq_pushstring(v, "load_worldmap", -1);
4089 sq_newclosure(v, &load_worldmap_wrapper, 0);
4090 if(SQ_FAILED(sq_createslot(v, -3))) {
4091 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
4094 sq_pushstring(v, "load_level", -1);
4095 sq_newclosure(v, &load_level_wrapper, 0);
4096 if(SQ_FAILED(sq_createslot(v, -3))) {
4097 throw SquirrelError(v, "Couldn't register function 'load_level'");
4100 sq_pushstring(v, "wait", -1);
4101 sq_newclosure(v, &wait_wrapper, 0);
4102 if(SQ_FAILED(sq_createslot(v, -3))) {
4103 throw SquirrelError(v, "Couldn't register function 'wait'");
4106 sq_pushstring(v, "wait_for_screenswitch", -1);
4107 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
4108 if(SQ_FAILED(sq_createslot(v, -3))) {
4109 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
4112 sq_pushstring(v, "exit_screen", -1);
4113 sq_newclosure(v, &exit_screen_wrapper, 0);
4114 if(SQ_FAILED(sq_createslot(v, -3))) {
4115 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
4118 sq_pushstring(v, "fadeout_screen", -1);
4119 sq_newclosure(v, &fadeout_screen_wrapper, 0);
4120 if(SQ_FAILED(sq_createslot(v, -3))) {
4121 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
4124 sq_pushstring(v, "shrink_screen", -1);
4125 sq_newclosure(v, &shrink_screen_wrapper, 0);
4126 if(SQ_FAILED(sq_createslot(v, -3))) {
4127 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
4130 sq_pushstring(v, "abort_screenfade", -1);
4131 sq_newclosure(v, &abort_screenfade_wrapper, 0);
4132 if(SQ_FAILED(sq_createslot(v, -3))) {
4133 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
4136 sq_pushstring(v, "translate", -1);
4137 sq_newclosure(v, &translate_wrapper, 0);
4138 if(SQ_FAILED(sq_createslot(v, -3))) {
4139 throw SquirrelError(v, "Couldn't register function 'translate'");
4142 sq_pushstring(v, "import", -1);
4143 sq_newclosure(v, &import_wrapper, 0);
4144 if(SQ_FAILED(sq_createslot(v, -3))) {
4145 throw SquirrelError(v, "Couldn't register function 'import'");
4148 sq_pushstring(v, "save_state", -1);
4149 sq_newclosure(v, &save_state_wrapper, 0);
4150 if(SQ_FAILED(sq_createslot(v, -3))) {
4151 throw SquirrelError(v, "Couldn't register function 'save_state'");
4154 sq_pushstring(v, "update_worldmap", -1);
4155 sq_newclosure(v, &update_worldmap_wrapper, 0);
4156 if(SQ_FAILED(sq_createslot(v, -3))) {
4157 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
4160 sq_pushstring(v, "debug_collrects", -1);
4161 sq_newclosure(v, &debug_collrects_wrapper, 0);
4162 if(SQ_FAILED(sq_createslot(v, -3))) {
4163 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
4166 sq_pushstring(v, "debug_show_fps", -1);
4167 sq_newclosure(v, &debug_show_fps_wrapper, 0);
4168 if(SQ_FAILED(sq_createslot(v, -3))) {
4169 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
4172 sq_pushstring(v, "debug_draw_solids_only", -1);
4173 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
4174 if(SQ_FAILED(sq_createslot(v, -3))) {
4175 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
4178 sq_pushstring(v, "play_music", -1);
4179 sq_newclosure(v, &play_music_wrapper, 0);
4180 if(SQ_FAILED(sq_createslot(v, -3))) {
4181 throw SquirrelError(v, "Couldn't register function 'play_music'");
4184 sq_pushstring(v, "play_sound", -1);
4185 sq_newclosure(v, &play_sound_wrapper, 0);
4186 if(SQ_FAILED(sq_createslot(v, -3))) {
4187 throw SquirrelError(v, "Couldn't register function 'play_sound'");
4190 sq_pushstring(v, "grease", -1);
4191 sq_newclosure(v, &grease_wrapper, 0);
4192 if(SQ_FAILED(sq_createslot(v, -3))) {
4193 throw SquirrelError(v, "Couldn't register function 'grease'");
4196 sq_pushstring(v, "invincible", -1);
4197 sq_newclosure(v, &invincible_wrapper, 0);
4198 if(SQ_FAILED(sq_createslot(v, -3))) {
4199 throw SquirrelError(v, "Couldn't register function 'invincible'");
4202 sq_pushstring(v, "ghost", -1);
4203 sq_newclosure(v, &ghost_wrapper, 0);
4204 if(SQ_FAILED(sq_createslot(v, -3))) {
4205 throw SquirrelError(v, "Couldn't register function 'ghost'");
4208 sq_pushstring(v, "mortal", -1);
4209 sq_newclosure(v, &mortal_wrapper, 0);
4210 if(SQ_FAILED(sq_createslot(v, -3))) {
4211 throw SquirrelError(v, "Couldn't register function 'mortal'");
4214 sq_pushstring(v, "restart", -1);
4215 sq_newclosure(v, &restart_wrapper, 0);
4216 if(SQ_FAILED(sq_createslot(v, -3))) {
4217 throw SquirrelError(v, "Couldn't register function 'restart'");
4220 sq_pushstring(v, "whereami", -1);
4221 sq_newclosure(v, &whereami_wrapper, 0);
4222 if(SQ_FAILED(sq_createslot(v, -3))) {
4223 throw SquirrelError(v, "Couldn't register function 'whereami'");
4226 sq_pushstring(v, "gotoend", -1);
4227 sq_newclosure(v, &gotoend_wrapper, 0);
4228 if(SQ_FAILED(sq_createslot(v, -3))) {
4229 throw SquirrelError(v, "Couldn't register function 'gotoend'");
4232 sq_pushstring(v, "camera", -1);
4233 sq_newclosure(v, &camera_wrapper, 0);
4234 if(SQ_FAILED(sq_createslot(v, -3))) {
4235 throw SquirrelError(v, "Couldn't register function 'camera'");
4238 sq_pushstring(v, "quit", -1);
4239 sq_newclosure(v, &quit_wrapper, 0);
4240 if(SQ_FAILED(sq_createslot(v, -3))) {
4241 throw SquirrelError(v, "Couldn't register function 'quit'");
4244 sq_pushstring(v, "rand", -1);
4245 sq_newclosure(v, &rand_wrapper, 0);
4246 if(SQ_FAILED(sq_createslot(v, -3))) {
4247 throw SquirrelError(v, "Couldn't register function 'rand'");
4250 // Register class DisplayEffect
4251 sq_pushstring(v, "DisplayEffect", -1);
4252 if(sq_newclass(v, SQFalse) < 0) {
4253 std::ostringstream msg;
4254 msg << "Couldn't create new class 'DisplayEffect'";
4255 throw SquirrelError(v, msg.str());
4257 sq_pushstring(v, "fade_out", -1);
4258 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4259 if(SQ_FAILED(sq_createslot(v, -3))) {
4260 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4263 sq_pushstring(v, "fade_in", -1);
4264 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4265 if(SQ_FAILED(sq_createslot(v, -3))) {
4266 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4269 sq_pushstring(v, "set_black", -1);
4270 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4271 if(SQ_FAILED(sq_createslot(v, -3))) {
4272 throw SquirrelError(v, "Couldn't register function 'set_black'");
4275 sq_pushstring(v, "is_black", -1);
4276 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4277 if(SQ_FAILED(sq_createslot(v, -3))) {
4278 throw SquirrelError(v, "Couldn't register function 'is_black'");
4281 sq_pushstring(v, "sixteen_to_nine", -1);
4282 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4283 if(SQ_FAILED(sq_createslot(v, -3))) {
4284 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4287 sq_pushstring(v, "four_to_three", -1);
4288 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4289 if(SQ_FAILED(sq_createslot(v, -3))) {
4290 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4293 if(SQ_FAILED(sq_createslot(v, -3))) {
4294 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4297 // Register class Camera
4298 sq_pushstring(v, "Camera", -1);
4299 if(sq_newclass(v, SQFalse) < 0) {
4300 std::ostringstream msg;
4301 msg << "Couldn't create new class 'Camera'";
4302 throw SquirrelError(v, msg.str());
4304 sq_pushstring(v, "reload_config", -1);
4305 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4306 if(SQ_FAILED(sq_createslot(v, -3))) {
4307 throw SquirrelError(v, "Couldn't register function 'reload_config'");
4310 sq_pushstring(v, "shake", -1);
4311 sq_newclosure(v, &Camera_shake_wrapper, 0);
4312 if(SQ_FAILED(sq_createslot(v, -3))) {
4313 throw SquirrelError(v, "Couldn't register function 'shake'");
4316 sq_pushstring(v, "set_pos", -1);
4317 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4318 if(SQ_FAILED(sq_createslot(v, -3))) {
4319 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4322 sq_pushstring(v, "set_mode", -1);
4323 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4324 if(SQ_FAILED(sq_createslot(v, -3))) {
4325 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4328 sq_pushstring(v, "scroll_to", -1);
4329 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4330 if(SQ_FAILED(sq_createslot(v, -3))) {
4331 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4334 if(SQ_FAILED(sq_createslot(v, -3))) {
4335 throw SquirrelError(v, "Couldn't register class 'Camera'");
4338 // Register class Level
4339 sq_pushstring(v, "Level", -1);
4340 if(sq_newclass(v, SQFalse) < 0) {
4341 std::ostringstream msg;
4342 msg << "Couldn't create new class 'Level'";
4343 throw SquirrelError(v, msg.str());
4345 sq_pushstring(v, "finish", -1);
4346 sq_newclosure(v, &Level_finish_wrapper, 0);
4347 if(SQ_FAILED(sq_createslot(v, -3))) {
4348 throw SquirrelError(v, "Couldn't register function 'finish'");
4351 sq_pushstring(v, "spawn", -1);
4352 sq_newclosure(v, &Level_spawn_wrapper, 0);
4353 if(SQ_FAILED(sq_createslot(v, -3))) {
4354 throw SquirrelError(v, "Couldn't register function 'spawn'");
4357 sq_pushstring(v, "flip_vertically", -1);
4358 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4359 if(SQ_FAILED(sq_createslot(v, -3))) {
4360 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4363 sq_pushstring(v, "toggle_pause", -1);
4364 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4365 if(SQ_FAILED(sq_createslot(v, -3))) {
4366 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4369 if(SQ_FAILED(sq_createslot(v, -3))) {
4370 throw SquirrelError(v, "Couldn't register class 'Level'");
4373 // Register class ScriptedObject
4374 sq_pushstring(v, "ScriptedObject", -1);
4375 if(sq_newclass(v, SQFalse) < 0) {
4376 std::ostringstream msg;
4377 msg << "Couldn't create new class 'ScriptedObject'";
4378 throw SquirrelError(v, msg.str());
4380 sq_pushstring(v, "set_action", -1);
4381 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4382 if(SQ_FAILED(sq_createslot(v, -3))) {
4383 throw SquirrelError(v, "Couldn't register function 'set_action'");
4386 sq_pushstring(v, "get_action", -1);
4387 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4388 if(SQ_FAILED(sq_createslot(v, -3))) {
4389 throw SquirrelError(v, "Couldn't register function 'get_action'");
4392 sq_pushstring(v, "move", -1);
4393 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4394 if(SQ_FAILED(sq_createslot(v, -3))) {
4395 throw SquirrelError(v, "Couldn't register function 'move'");
4398 sq_pushstring(v, "set_pos", -1);
4399 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4400 if(SQ_FAILED(sq_createslot(v, -3))) {
4401 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4404 sq_pushstring(v, "get_pos_x", -1);
4405 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4406 if(SQ_FAILED(sq_createslot(v, -3))) {
4407 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4410 sq_pushstring(v, "get_pos_y", -1);
4411 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4412 if(SQ_FAILED(sq_createslot(v, -3))) {
4413 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4416 sq_pushstring(v, "set_velocity", -1);
4417 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4418 if(SQ_FAILED(sq_createslot(v, -3))) {
4419 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4422 sq_pushstring(v, "get_velocity_x", -1);
4423 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4424 if(SQ_FAILED(sq_createslot(v, -3))) {
4425 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4428 sq_pushstring(v, "get_velocity_y", -1);
4429 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4430 if(SQ_FAILED(sq_createslot(v, -3))) {
4431 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4434 sq_pushstring(v, "set_visible", -1);
4435 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4436 if(SQ_FAILED(sq_createslot(v, -3))) {
4437 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4440 sq_pushstring(v, "is_visible", -1);
4441 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4442 if(SQ_FAILED(sq_createslot(v, -3))) {
4443 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4446 sq_pushstring(v, "set_solid", -1);
4447 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4448 if(SQ_FAILED(sq_createslot(v, -3))) {
4449 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4452 sq_pushstring(v, "is_solid", -1);
4453 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4454 if(SQ_FAILED(sq_createslot(v, -3))) {
4455 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4458 sq_pushstring(v, "get_name", -1);
4459 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4460 if(SQ_FAILED(sq_createslot(v, -3))) {
4461 throw SquirrelError(v, "Couldn't register function 'get_name'");
4464 if(SQ_FAILED(sq_createslot(v, -3))) {
4465 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4468 // Register class Text
4469 sq_pushstring(v, "Text", -1);
4470 if(sq_newclass(v, SQFalse) < 0) {
4471 std::ostringstream msg;
4472 msg << "Couldn't create new class 'Text'";
4473 throw SquirrelError(v, msg.str());
4475 sq_pushstring(v, "set_text", -1);
4476 sq_newclosure(v, &Text_set_text_wrapper, 0);
4477 if(SQ_FAILED(sq_createslot(v, -3))) {
4478 throw SquirrelError(v, "Couldn't register function 'set_text'");
4481 sq_pushstring(v, "set_font", -1);
4482 sq_newclosure(v, &Text_set_font_wrapper, 0);
4483 if(SQ_FAILED(sq_createslot(v, -3))) {
4484 throw SquirrelError(v, "Couldn't register function 'set_font'");
4487 sq_pushstring(v, "fade_in", -1);
4488 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4489 if(SQ_FAILED(sq_createslot(v, -3))) {
4490 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4493 sq_pushstring(v, "fade_out", -1);
4494 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4495 if(SQ_FAILED(sq_createslot(v, -3))) {
4496 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4499 sq_pushstring(v, "set_visible", -1);
4500 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4501 if(SQ_FAILED(sq_createslot(v, -3))) {
4502 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4505 sq_pushstring(v, "set_centered", -1);
4506 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4507 if(SQ_FAILED(sq_createslot(v, -3))) {
4508 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4511 sq_pushstring(v, "set_pos", -1);
4512 sq_newclosure(v, &Text_set_pos_wrapper, 0);
4513 if(SQ_FAILED(sq_createslot(v, -3))) {
4514 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4517 sq_pushstring(v, "get_pos_x", -1);
4518 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
4519 if(SQ_FAILED(sq_createslot(v, -3))) {
4520 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4523 sq_pushstring(v, "get_pos_y", -1);
4524 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
4525 if(SQ_FAILED(sq_createslot(v, -3))) {
4526 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4529 sq_pushstring(v, "set_anchor_point", -1);
4530 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
4531 if(SQ_FAILED(sq_createslot(v, -3))) {
4532 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4535 sq_pushstring(v, "get_anchor_point", -1);
4536 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
4537 if(SQ_FAILED(sq_createslot(v, -3))) {
4538 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4541 if(SQ_FAILED(sq_createslot(v, -3))) {
4542 throw SquirrelError(v, "Couldn't register class 'Text'");
4545 // Register class Player
4546 sq_pushstring(v, "Player", -1);
4547 if(sq_newclass(v, SQFalse) < 0) {
4548 std::ostringstream msg;
4549 msg << "Couldn't create new class 'Player'";
4550 throw SquirrelError(v, msg.str());
4552 sq_pushstring(v, "add_bonus", -1);
4553 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4554 if(SQ_FAILED(sq_createslot(v, -3))) {
4555 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4558 sq_pushstring(v, "add_coins", -1);
4559 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4560 if(SQ_FAILED(sq_createslot(v, -3))) {
4561 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4564 sq_pushstring(v, "make_invincible", -1);
4565 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4566 if(SQ_FAILED(sq_createslot(v, -3))) {
4567 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4570 sq_pushstring(v, "deactivate", -1);
4571 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4572 if(SQ_FAILED(sq_createslot(v, -3))) {
4573 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4576 sq_pushstring(v, "activate", -1);
4577 sq_newclosure(v, &Player_activate_wrapper, 0);
4578 if(SQ_FAILED(sq_createslot(v, -3))) {
4579 throw SquirrelError(v, "Couldn't register function 'activate'");
4582 sq_pushstring(v, "walk", -1);
4583 sq_newclosure(v, &Player_walk_wrapper, 0);
4584 if(SQ_FAILED(sq_createslot(v, -3))) {
4585 throw SquirrelError(v, "Couldn't register function 'walk'");
4588 sq_pushstring(v, "set_visible", -1);
4589 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4590 if(SQ_FAILED(sq_createslot(v, -3))) {
4591 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4594 sq_pushstring(v, "get_visible", -1);
4595 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4596 if(SQ_FAILED(sq_createslot(v, -3))) {
4597 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4600 sq_pushstring(v, "kill", -1);
4601 sq_newclosure(v, &Player_kill_wrapper, 0);
4602 if(SQ_FAILED(sq_createslot(v, -3))) {
4603 throw SquirrelError(v, "Couldn't register function 'kill'");
4606 sq_pushstring(v, "set_ghost_mode", -1);
4607 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4608 if(SQ_FAILED(sq_createslot(v, -3))) {
4609 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4612 sq_pushstring(v, "get_ghost_mode", -1);
4613 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4614 if(SQ_FAILED(sq_createslot(v, -3))) {
4615 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4618 sq_pushstring(v, "do_cheer", -1);
4619 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4620 if(SQ_FAILED(sq_createslot(v, -3))) {
4621 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4624 sq_pushstring(v, "do_duck", -1);
4625 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4626 if(SQ_FAILED(sq_createslot(v, -3))) {
4627 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4630 sq_pushstring(v, "do_standup", -1);
4631 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4632 if(SQ_FAILED(sq_createslot(v, -3))) {
4633 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4636 sq_pushstring(v, "do_backflip", -1);
4637 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4638 if(SQ_FAILED(sq_createslot(v, -3))) {
4639 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4642 sq_pushstring(v, "do_jump", -1);
4643 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4644 if(SQ_FAILED(sq_createslot(v, -3))) {
4645 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4648 sq_pushstring(v, "trigger_sequence", -1);
4649 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4650 if(SQ_FAILED(sq_createslot(v, -3))) {
4651 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4654 if(SQ_FAILED(sq_createslot(v, -3))) {
4655 throw SquirrelError(v, "Couldn't register class 'Player'");
4658 // Register class FloatingImage
4659 sq_pushstring(v, "FloatingImage", -1);
4660 if(sq_newclass(v, SQFalse) < 0) {
4661 std::ostringstream msg;
4662 msg << "Couldn't create new class 'FloatingImage'";
4663 throw SquirrelError(v, msg.str());
4665 sq_pushstring(v, "constructor", -1);
4666 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4667 if(SQ_FAILED(sq_createslot(v, -3))) {
4668 throw SquirrelError(v, "Couldn't register function 'constructor'");
4671 sq_pushstring(v, "set_layer", -1);
4672 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4673 if(SQ_FAILED(sq_createslot(v, -3))) {
4674 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4677 sq_pushstring(v, "get_layer", -1);
4678 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4679 if(SQ_FAILED(sq_createslot(v, -3))) {
4680 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4683 sq_pushstring(v, "set_pos", -1);
4684 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4685 if(SQ_FAILED(sq_createslot(v, -3))) {
4686 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4689 sq_pushstring(v, "get_pos_x", -1);
4690 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4691 if(SQ_FAILED(sq_createslot(v, -3))) {
4692 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4695 sq_pushstring(v, "get_pos_y", -1);
4696 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4697 if(SQ_FAILED(sq_createslot(v, -3))) {
4698 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4701 sq_pushstring(v, "set_anchor_point", -1);
4702 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4703 if(SQ_FAILED(sq_createslot(v, -3))) {
4704 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4707 sq_pushstring(v, "get_anchor_point", -1);
4708 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4709 if(SQ_FAILED(sq_createslot(v, -3))) {
4710 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4713 sq_pushstring(v, "set_visible", -1);
4714 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4715 if(SQ_FAILED(sq_createslot(v, -3))) {
4716 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4719 sq_pushstring(v, "get_visible", -1);
4720 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4721 if(SQ_FAILED(sq_createslot(v, -3))) {
4722 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4725 sq_pushstring(v, "set_action", -1);
4726 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4727 if(SQ_FAILED(sq_createslot(v, -3))) {
4728 throw SquirrelError(v, "Couldn't register function 'set_action'");
4731 sq_pushstring(v, "get_action", -1);
4732 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4733 if(SQ_FAILED(sq_createslot(v, -3))) {
4734 throw SquirrelError(v, "Couldn't register function 'get_action'");
4737 sq_pushstring(v, "fade_in", -1);
4738 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4739 if(SQ_FAILED(sq_createslot(v, -3))) {
4740 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4743 sq_pushstring(v, "fade_out", -1);
4744 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4745 if(SQ_FAILED(sq_createslot(v, -3))) {
4746 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4749 if(SQ_FAILED(sq_createslot(v, -3))) {
4750 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4753 // Register class Platform
4754 sq_pushstring(v, "Platform", -1);
4755 if(sq_newclass(v, SQFalse) < 0) {
4756 std::ostringstream msg;
4757 msg << "Couldn't create new class 'Platform'";
4758 throw SquirrelError(v, msg.str());
4760 sq_pushstring(v, "goto_node", -1);
4761 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4762 if(SQ_FAILED(sq_createslot(v, -3))) {
4763 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4766 sq_pushstring(v, "start_moving", -1);
4767 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4768 if(SQ_FAILED(sq_createslot(v, -3))) {
4769 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4772 sq_pushstring(v, "stop_moving", -1);
4773 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4774 if(SQ_FAILED(sq_createslot(v, -3))) {
4775 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4778 if(SQ_FAILED(sq_createslot(v, -3))) {
4779 throw SquirrelError(v, "Couldn't register class 'Platform'");
4782 // Register class Candle
4783 sq_pushstring(v, "Candle", -1);
4784 if(sq_newclass(v, SQFalse) < 0) {
4785 std::ostringstream msg;
4786 msg << "Couldn't create new class 'Candle'";
4787 throw SquirrelError(v, msg.str());
4789 sq_pushstring(v, "get_burning", -1);
4790 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4791 if(SQ_FAILED(sq_createslot(v, -3))) {
4792 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4795 sq_pushstring(v, "set_burning", -1);
4796 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4797 if(SQ_FAILED(sq_createslot(v, -3))) {
4798 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4801 if(SQ_FAILED(sq_createslot(v, -3))) {
4802 throw SquirrelError(v, "Couldn't register class 'Candle'");
4805 // Register class Wind
4806 sq_pushstring(v, "Wind", -1);
4807 if(sq_newclass(v, SQFalse) < 0) {
4808 std::ostringstream msg;
4809 msg << "Couldn't create new class 'Wind'";
4810 throw SquirrelError(v, msg.str());
4812 sq_pushstring(v, "start", -1);
4813 sq_newclosure(v, &Wind_start_wrapper, 0);
4814 if(SQ_FAILED(sq_createslot(v, -3))) {
4815 throw SquirrelError(v, "Couldn't register function 'start'");
4818 sq_pushstring(v, "stop", -1);
4819 sq_newclosure(v, &Wind_stop_wrapper, 0);
4820 if(SQ_FAILED(sq_createslot(v, -3))) {
4821 throw SquirrelError(v, "Couldn't register function 'stop'");
4824 if(SQ_FAILED(sq_createslot(v, -3))) {
4825 throw SquirrelError(v, "Couldn't register class 'Wind'");
4828 // Register class AmbientSound
4829 sq_pushstring(v, "AmbientSound", -1);
4830 if(sq_newclass(v, SQFalse) < 0) {
4831 std::ostringstream msg;
4832 msg << "Couldn't create new class 'AmbientSound'";
4833 throw SquirrelError(v, msg.str());
4835 sq_pushstring(v, "set_pos", -1);
4836 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4837 if(SQ_FAILED(sq_createslot(v, -3))) {
4838 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4841 sq_pushstring(v, "get_pos_x", -1);
4842 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4843 if(SQ_FAILED(sq_createslot(v, -3))) {
4844 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4847 sq_pushstring(v, "get_pos_y", -1);
4848 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4849 if(SQ_FAILED(sq_createslot(v, -3))) {
4850 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4853 if(SQ_FAILED(sq_createslot(v, -3))) {
4854 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4857 // Register class Thunderstorm
4858 sq_pushstring(v, "Thunderstorm", -1);
4859 if(sq_newclass(v, SQFalse) < 0) {
4860 std::ostringstream msg;
4861 msg << "Couldn't create new class 'Thunderstorm'";
4862 throw SquirrelError(v, msg.str());
4864 sq_pushstring(v, "start", -1);
4865 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4866 if(SQ_FAILED(sq_createslot(v, -3))) {
4867 throw SquirrelError(v, "Couldn't register function 'start'");
4870 sq_pushstring(v, "stop", -1);
4871 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4872 if(SQ_FAILED(sq_createslot(v, -3))) {
4873 throw SquirrelError(v, "Couldn't register function 'stop'");
4876 sq_pushstring(v, "thunder", -1);
4877 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4878 if(SQ_FAILED(sq_createslot(v, -3))) {
4879 throw SquirrelError(v, "Couldn't register function 'thunder'");
4882 sq_pushstring(v, "lightning", -1);
4883 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4884 if(SQ_FAILED(sq_createslot(v, -3))) {
4885 throw SquirrelError(v, "Couldn't register function 'lightning'");
4888 sq_pushstring(v, "flash", -1);
4889 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4890 if(SQ_FAILED(sq_createslot(v, -3))) {
4891 throw SquirrelError(v, "Couldn't register function 'flash'");
4894 sq_pushstring(v, "electrify", -1);
4895 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4896 if(SQ_FAILED(sq_createslot(v, -3))) {
4897 throw SquirrelError(v, "Couldn't register function 'electrify'");
4900 if(SQ_FAILED(sq_createslot(v, -3))) {
4901 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4904 // Register class TileMap
4905 sq_pushstring(v, "TileMap", -1);
4906 if(sq_newclass(v, SQFalse) < 0) {
4907 std::ostringstream msg;
4908 msg << "Couldn't create new class 'TileMap'";
4909 throw SquirrelError(v, msg.str());
4911 sq_pushstring(v, "goto_node", -1);
4912 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4913 if(SQ_FAILED(sq_createslot(v, -3))) {
4914 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4917 sq_pushstring(v, "start_moving", -1);
4918 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4919 if(SQ_FAILED(sq_createslot(v, -3))) {
4920 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4923 sq_pushstring(v, "stop_moving", -1);
4924 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4925 if(SQ_FAILED(sq_createslot(v, -3))) {
4926 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4929 sq_pushstring(v, "fade", -1);
4930 sq_newclosure(v, &TileMap_fade_wrapper, 0);
4931 if(SQ_FAILED(sq_createslot(v, -3))) {
4932 throw SquirrelError(v, "Couldn't register function 'fade'");
4935 sq_pushstring(v, "set_alpha", -1);
4936 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
4937 if(SQ_FAILED(sq_createslot(v, -3))) {
4938 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
4941 sq_pushstring(v, "get_alpha", -1);
4942 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
4943 if(SQ_FAILED(sq_createslot(v, -3))) {
4944 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
4947 if(SQ_FAILED(sq_createslot(v, -3))) {
4948 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4951 // Register class SSector
4952 sq_pushstring(v, "SSector", -1);
4953 if(sq_newclass(v, SQFalse) < 0) {
4954 std::ostringstream msg;
4955 msg << "Couldn't create new class 'SSector'";
4956 throw SquirrelError(v, msg.str());
4958 sq_pushstring(v, "set_ambient_light", -1);
4959 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4960 if(SQ_FAILED(sq_createslot(v, -3))) {
4961 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4964 sq_pushstring(v, "get_ambient_red", -1);
4965 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4966 if(SQ_FAILED(sq_createslot(v, -3))) {
4967 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4970 sq_pushstring(v, "get_ambient_green", -1);
4971 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4972 if(SQ_FAILED(sq_createslot(v, -3))) {
4973 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4976 sq_pushstring(v, "get_ambient_blue", -1);
4977 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4978 if(SQ_FAILED(sq_createslot(v, -3))) {
4979 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4982 if(SQ_FAILED(sq_createslot(v, -3))) {
4983 throw SquirrelError(v, "Couldn't register class 'SSector'");
4986 // Register class LevelTime
4987 sq_pushstring(v, "LevelTime", -1);
4988 if(sq_newclass(v, SQFalse) < 0) {
4989 std::ostringstream msg;
4990 msg << "Couldn't create new class 'LevelTime'";
4991 throw SquirrelError(v, msg.str());
4993 sq_pushstring(v, "start", -1);
4994 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4995 if(SQ_FAILED(sq_createslot(v, -3))) {
4996 throw SquirrelError(v, "Couldn't register function 'start'");
4999 sq_pushstring(v, "stop", -1);
5000 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
5001 if(SQ_FAILED(sq_createslot(v, -3))) {
5002 throw SquirrelError(v, "Couldn't register function 'stop'");
5005 sq_pushstring(v, "get_time", -1);
5006 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
5007 if(SQ_FAILED(sq_createslot(v, -3))) {
5008 throw SquirrelError(v, "Couldn't register function 'get_time'");
5011 sq_pushstring(v, "set_time", -1);
5012 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
5013 if(SQ_FAILED(sq_createslot(v, -3))) {
5014 throw SquirrelError(v, "Couldn't register function 'set_time'");
5017 if(SQ_FAILED(sq_createslot(v, -3))) {
5018 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
5021 // Register class WillOWisp
5022 sq_pushstring(v, "WillOWisp", -1);
5023 if(sq_newclass(v, SQFalse) < 0) {
5024 std::ostringstream msg;
5025 msg << "Couldn't create new class 'WillOWisp'";
5026 throw SquirrelError(v, msg.str());
5028 sq_pushstring(v, "goto_node", -1);
5029 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
5030 if(SQ_FAILED(sq_createslot(v, -3))) {
5031 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5034 sq_pushstring(v, "set_state", -1);
5035 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
5036 if(SQ_FAILED(sq_createslot(v, -3))) {
5037 throw SquirrelError(v, "Couldn't register function 'set_state'");
5040 if(SQ_FAILED(sq_createslot(v, -3))) {
5041 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
5046 } // end of namespace Scripting