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 Level_edit_wrapper(HSQUIRRELVM vm)
491 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
492 sq_throwerror(vm, _SC("'edit' called without instance"));
495 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
497 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
498 sq_throwerror(vm, _SC("Argument 1 not a bool"));
503 _this->edit(arg0 == SQTrue);
507 } catch(std::exception& e) {
508 sq_throwerror(vm, e.what());
511 sq_throwerror(vm, _SC("Unexpected exception while executing function 'edit'"));
517 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
519 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
524 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
527 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
528 sq_throwerror(vm, _SC("'set_action' called without instance"));
531 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
533 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
534 sq_throwerror(vm, _SC("Argument 1 not a string"));
539 _this->set_action(arg0);
543 } catch(std::exception& e) {
544 sq_throwerror(vm, e.what());
547 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
553 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
556 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
557 sq_throwerror(vm, _SC("'get_action' called without instance"));
560 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
563 std::string return_value = _this->get_action();
565 sq_pushstring(vm, return_value.c_str(), return_value.size());
568 } catch(std::exception& e) {
569 sq_throwerror(vm, e.what());
572 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
578 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
581 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
582 sq_throwerror(vm, _SC("'move' called without instance"));
585 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
587 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
588 sq_throwerror(vm, _SC("Argument 1 not a float"));
592 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
593 sq_throwerror(vm, _SC("Argument 2 not a float"));
598 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
602 } catch(std::exception& e) {
603 sq_throwerror(vm, e.what());
606 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
612 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
615 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
616 sq_throwerror(vm, _SC("'set_pos' called without instance"));
619 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
621 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
622 sq_throwerror(vm, _SC("Argument 1 not a float"));
626 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
627 sq_throwerror(vm, _SC("Argument 2 not a float"));
632 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
636 } catch(std::exception& e) {
637 sq_throwerror(vm, e.what());
640 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
646 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
649 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
650 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
653 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
656 float return_value = _this->get_pos_x();
658 sq_pushfloat(vm, return_value);
661 } catch(std::exception& e) {
662 sq_throwerror(vm, e.what());
665 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
671 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
674 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
675 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
678 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
681 float return_value = _this->get_pos_y();
683 sq_pushfloat(vm, return_value);
686 } catch(std::exception& e) {
687 sq_throwerror(vm, e.what());
690 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
696 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
699 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
700 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
703 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
705 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
706 sq_throwerror(vm, _SC("Argument 1 not a float"));
710 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
711 sq_throwerror(vm, _SC("Argument 2 not a float"));
716 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
720 } catch(std::exception& e) {
721 sq_throwerror(vm, e.what());
724 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
730 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
733 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
734 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
737 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
740 float return_value = _this->get_velocity_x();
742 sq_pushfloat(vm, return_value);
745 } catch(std::exception& e) {
746 sq_throwerror(vm, e.what());
749 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
755 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
758 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
759 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
762 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
765 float return_value = _this->get_velocity_y();
767 sq_pushfloat(vm, return_value);
770 } catch(std::exception& e) {
771 sq_throwerror(vm, e.what());
774 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
780 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
783 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
784 sq_throwerror(vm, _SC("'set_visible' called without instance"));
787 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
789 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
790 sq_throwerror(vm, _SC("Argument 1 not a bool"));
795 _this->set_visible(arg0 == SQTrue);
799 } catch(std::exception& e) {
800 sq_throwerror(vm, e.what());
803 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
809 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
812 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
813 sq_throwerror(vm, _SC("'is_visible' called without instance"));
816 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
819 bool return_value = _this->is_visible();
821 sq_pushbool(vm, return_value);
824 } catch(std::exception& e) {
825 sq_throwerror(vm, e.what());
828 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
834 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
837 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
838 sq_throwerror(vm, _SC("'set_solid' called without instance"));
841 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
843 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
844 sq_throwerror(vm, _SC("Argument 1 not a bool"));
849 _this->set_solid(arg0 == SQTrue);
853 } catch(std::exception& e) {
854 sq_throwerror(vm, e.what());
857 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
863 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
866 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
867 sq_throwerror(vm, _SC("'is_solid' called without instance"));
870 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
873 bool return_value = _this->is_solid();
875 sq_pushbool(vm, return_value);
878 } catch(std::exception& e) {
879 sq_throwerror(vm, e.what());
882 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
888 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
891 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
892 sq_throwerror(vm, _SC("'get_name' called without instance"));
895 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
898 std::string return_value = _this->get_name();
900 sq_pushstring(vm, return_value.c_str(), return_value.size());
903 } catch(std::exception& e) {
904 sq_throwerror(vm, e.what());
907 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
913 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
915 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
920 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
923 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
924 sq_throwerror(vm, _SC("'set_text' 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_text(arg0);
939 } catch(std::exception& e) {
940 sq_throwerror(vm, e.what());
943 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
949 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
952 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
953 sq_throwerror(vm, _SC("'set_font' called without instance"));
956 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
958 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
959 sq_throwerror(vm, _SC("Argument 1 not a string"));
964 _this->set_font(arg0);
968 } catch(std::exception& e) {
969 sq_throwerror(vm, e.what());
972 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
978 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
981 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
982 sq_throwerror(vm, _SC("'fade_in' 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_in(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_in'"));
1007 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
1010 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1011 sq_throwerror(vm, _SC("'fade_out' called without instance"));
1014 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1016 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1017 sq_throwerror(vm, _SC("Argument 1 not a float"));
1022 _this->fade_out(static_cast<float> (arg0));
1026 } catch(std::exception& e) {
1027 sq_throwerror(vm, e.what());
1030 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1036 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
1039 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1040 sq_throwerror(vm, _SC("'set_visible' 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_visible(arg0 == SQTrue);
1055 } catch(std::exception& e) {
1056 sq_throwerror(vm, e.what());
1059 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1065 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
1068 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1069 sq_throwerror(vm, _SC("'set_centered' called without instance"));
1072 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1074 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1075 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1080 _this->set_centered(arg0 == SQTrue);
1084 } catch(std::exception& e) {
1085 sq_throwerror(vm, e.what());
1088 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
1094 static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
1097 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1098 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1101 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1103 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1104 sq_throwerror(vm, _SC("Argument 1 not a float"));
1108 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1109 sq_throwerror(vm, _SC("Argument 2 not a float"));
1114 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1118 } catch(std::exception& e) {
1119 sq_throwerror(vm, e.what());
1122 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1128 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
1131 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1132 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1135 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1138 float return_value = _this->get_pos_x();
1140 sq_pushfloat(vm, return_value);
1143 } catch(std::exception& e) {
1144 sq_throwerror(vm, e.what());
1147 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1153 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
1156 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1157 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1160 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1163 float return_value = _this->get_pos_y();
1165 sq_pushfloat(vm, return_value);
1168 } catch(std::exception& e) {
1169 sq_throwerror(vm, e.what());
1172 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1178 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
1181 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1182 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1185 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1187 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1188 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1193 _this->set_anchor_point(static_cast<int> (arg0));
1197 } catch(std::exception& e) {
1198 sq_throwerror(vm, e.what());
1201 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1207 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
1210 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1211 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1214 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1217 int return_value = _this->get_anchor_point();
1219 sq_pushinteger(vm, return_value);
1222 } catch(std::exception& e) {
1223 sq_throwerror(vm, e.what());
1226 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1232 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1234 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
1239 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1242 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1243 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1246 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1248 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1249 sq_throwerror(vm, _SC("Argument 1 not a string"));
1254 bool return_value = _this->add_bonus(arg0);
1256 sq_pushbool(vm, return_value);
1259 } catch(std::exception& e) {
1260 sq_throwerror(vm, e.what());
1263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1269 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1273 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1276 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1278 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1279 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1284 _this->add_coins(static_cast<int> (arg0));
1288 } catch(std::exception& e) {
1289 sq_throwerror(vm, e.what());
1292 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1298 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1301 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1302 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1305 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1308 _this->make_invincible();
1312 } catch(std::exception& e) {
1313 sq_throwerror(vm, e.what());
1316 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1322 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1325 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1326 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1329 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1332 _this->deactivate();
1336 } catch(std::exception& e) {
1337 sq_throwerror(vm, e.what());
1340 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1346 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1349 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1350 sq_throwerror(vm, _SC("'activate' called without instance"));
1353 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1360 } catch(std::exception& e) {
1361 sq_throwerror(vm, e.what());
1364 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1370 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1373 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1374 sq_throwerror(vm, _SC("'walk' called without instance"));
1377 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1379 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1380 sq_throwerror(vm, _SC("Argument 1 not a float"));
1385 _this->walk(static_cast<float> (arg0));
1389 } catch(std::exception& e) {
1390 sq_throwerror(vm, e.what());
1393 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1399 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1402 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1403 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1406 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1408 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1409 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1414 _this->set_visible(arg0 == SQTrue);
1418 } catch(std::exception& e) {
1419 sq_throwerror(vm, e.what());
1422 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1428 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1431 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1432 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1435 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1438 bool return_value = _this->get_visible();
1440 sq_pushbool(vm, return_value);
1443 } catch(std::exception& e) {
1444 sq_throwerror(vm, e.what());
1447 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1453 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1456 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1457 sq_throwerror(vm, _SC("'kill' 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->kill(arg0 == SQTrue);
1472 } catch(std::exception& e) {
1473 sq_throwerror(vm, e.what());
1476 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1482 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1485 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1486 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1489 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1491 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1492 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1497 _this->set_ghost_mode(arg0 == SQTrue);
1501 } catch(std::exception& e) {
1502 sq_throwerror(vm, e.what());
1505 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1511 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1514 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1515 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1518 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1521 bool return_value = _this->get_ghost_mode();
1523 sq_pushbool(vm, return_value);
1526 } catch(std::exception& e) {
1527 sq_throwerror(vm, e.what());
1530 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1536 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1539 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1540 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1543 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1550 } catch(std::exception& e) {
1551 sq_throwerror(vm, e.what());
1554 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1560 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1563 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1564 sq_throwerror(vm, _SC("'do_duck' called without instance"));
1567 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1574 } catch(std::exception& e) {
1575 sq_throwerror(vm, e.what());
1578 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1584 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1587 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1588 sq_throwerror(vm, _SC("'do_standup' called without instance"));
1591 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1594 _this->do_standup();
1598 } catch(std::exception& e) {
1599 sq_throwerror(vm, e.what());
1602 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1608 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1611 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1612 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1615 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1618 _this->do_backflip();
1622 } catch(std::exception& e) {
1623 sq_throwerror(vm, e.what());
1626 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1632 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1635 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1636 sq_throwerror(vm, _SC("'do_jump' called without instance"));
1639 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1641 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1642 sq_throwerror(vm, _SC("Argument 1 not a float"));
1647 _this->do_jump(static_cast<float> (arg0));
1651 } catch(std::exception& e) {
1652 sq_throwerror(vm, e.what());
1655 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1661 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1664 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1665 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1668 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1670 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1671 sq_throwerror(vm, _SC("Argument 1 not a string"));
1676 _this->trigger_sequence(arg0);
1680 } catch(std::exception& e) {
1681 sq_throwerror(vm, e.what());
1684 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1690 static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
1693 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1694 sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
1697 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1699 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1700 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1705 _this->use_scripting_controller(arg0 == SQTrue);
1709 } catch(std::exception& e) {
1710 sq_throwerror(vm, e.what());
1713 sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
1719 static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
1722 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1723 sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
1726 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1728 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1729 sq_throwerror(vm, _SC("Argument 1 not a string"));
1733 if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
1734 sq_throwerror(vm, _SC("Argument 2 not a bool"));
1739 _this->do_scripting_controller(arg0, arg1 == SQTrue);
1743 } catch(std::exception& e) {
1744 sq_throwerror(vm, e.what());
1747 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
1753 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1755 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1760 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1763 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1764 sq_throwerror(vm, _SC("Argument 1 not a string"));
1769 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1770 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1771 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1774 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1778 } catch(std::exception& e) {
1779 sq_throwerror(vm, e.what());
1782 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1788 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1791 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1792 sq_throwerror(vm, _SC("'set_layer' called without instance"));
1795 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1797 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1798 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1803 _this->set_layer(static_cast<int> (arg0));
1807 } catch(std::exception& e) {
1808 sq_throwerror(vm, e.what());
1811 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1817 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1820 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1821 sq_throwerror(vm, _SC("'get_layer' called without instance"));
1824 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1827 int return_value = _this->get_layer();
1829 sq_pushinteger(vm, return_value);
1832 } catch(std::exception& e) {
1833 sq_throwerror(vm, e.what());
1836 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1842 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1845 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1846 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1849 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1851 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1852 sq_throwerror(vm, _SC("Argument 1 not a float"));
1856 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1857 sq_throwerror(vm, _SC("Argument 2 not a float"));
1862 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1866 } catch(std::exception& e) {
1867 sq_throwerror(vm, e.what());
1870 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1876 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1879 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1880 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1883 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1886 float return_value = _this->get_pos_x();
1888 sq_pushfloat(vm, return_value);
1891 } catch(std::exception& e) {
1892 sq_throwerror(vm, e.what());
1895 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1901 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1904 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1905 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1908 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1911 float return_value = _this->get_pos_y();
1913 sq_pushfloat(vm, return_value);
1916 } catch(std::exception& e) {
1917 sq_throwerror(vm, e.what());
1920 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1926 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1929 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1930 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1933 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1935 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1936 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1941 _this->set_anchor_point(static_cast<int> (arg0));
1945 } catch(std::exception& e) {
1946 sq_throwerror(vm, e.what());
1949 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1955 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1958 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1959 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1962 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1965 int return_value = _this->get_anchor_point();
1967 sq_pushinteger(vm, return_value);
1970 } catch(std::exception& e) {
1971 sq_throwerror(vm, e.what());
1974 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1980 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1983 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1984 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1987 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1989 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1990 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1995 _this->set_visible(arg0 == SQTrue);
1999 } catch(std::exception& e) {
2000 sq_throwerror(vm, e.what());
2003 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
2009 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
2012 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2013 sq_throwerror(vm, _SC("'get_visible' called without instance"));
2016 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2019 bool return_value = _this->get_visible();
2021 sq_pushbool(vm, return_value);
2024 } catch(std::exception& e) {
2025 sq_throwerror(vm, e.what());
2028 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
2034 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
2037 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2038 sq_throwerror(vm, _SC("'set_action' called without instance"));
2041 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2043 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2044 sq_throwerror(vm, _SC("Argument 1 not a string"));
2049 _this->set_action(arg0);
2053 } catch(std::exception& e) {
2054 sq_throwerror(vm, e.what());
2057 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
2063 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
2066 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2067 sq_throwerror(vm, _SC("'get_action' called without instance"));
2070 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2073 std::string return_value = _this->get_action();
2075 sq_pushstring(vm, return_value.c_str(), return_value.size());
2078 } catch(std::exception& e) {
2079 sq_throwerror(vm, e.what());
2082 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
2088 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
2091 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2092 sq_throwerror(vm, _SC("'fade_in' called without instance"));
2095 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2097 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2098 sq_throwerror(vm, _SC("Argument 1 not a float"));
2103 _this->fade_in(static_cast<float> (arg0));
2107 } catch(std::exception& e) {
2108 sq_throwerror(vm, e.what());
2111 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
2117 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
2120 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2121 sq_throwerror(vm, _SC("'fade_out' called without instance"));
2124 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
2126 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2127 sq_throwerror(vm, _SC("Argument 1 not a float"));
2132 _this->fade_out(static_cast<float> (arg0));
2136 } catch(std::exception& e) {
2137 sq_throwerror(vm, e.what());
2140 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
2146 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
2148 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
2153 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
2156 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2157 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2160 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2162 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2163 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2168 _this->goto_node(static_cast<int> (arg0));
2172 } catch(std::exception& e) {
2173 sq_throwerror(vm, e.what());
2176 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2182 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
2185 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2186 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2189 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2192 _this->start_moving();
2196 } catch(std::exception& e) {
2197 sq_throwerror(vm, e.what());
2200 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2206 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
2209 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2210 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2213 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
2216 _this->stop_moving();
2220 } catch(std::exception& e) {
2221 sq_throwerror(vm, e.what());
2224 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2230 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
2232 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
2237 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
2240 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2241 sq_throwerror(vm, _SC("'get_burning' called without instance"));
2244 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2247 bool return_value = _this->get_burning();
2249 sq_pushbool(vm, return_value);
2252 } catch(std::exception& e) {
2253 sq_throwerror(vm, e.what());
2256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2262 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2265 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2266 sq_throwerror(vm, _SC("'set_burning' called without instance"));
2269 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2271 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2272 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2277 _this->set_burning(arg0 == SQTrue);
2281 } catch(std::exception& e) {
2282 sq_throwerror(vm, e.what());
2285 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2291 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2293 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2298 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2301 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2302 sq_throwerror(vm, _SC("'start' called without instance"));
2305 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2312 } catch(std::exception& e) {
2313 sq_throwerror(vm, e.what());
2316 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2322 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2325 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2326 sq_throwerror(vm, _SC("'stop' called without instance"));
2329 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2336 } catch(std::exception& e) {
2337 sq_throwerror(vm, e.what());
2340 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2346 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2348 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2353 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2356 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2357 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2360 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2362 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2363 sq_throwerror(vm, _SC("Argument 1 not a float"));
2367 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2368 sq_throwerror(vm, _SC("Argument 2 not a float"));
2373 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2377 } catch(std::exception& e) {
2378 sq_throwerror(vm, e.what());
2381 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2387 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2390 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2391 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2394 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2397 float return_value = _this->get_pos_x();
2399 sq_pushfloat(vm, return_value);
2402 } catch(std::exception& e) {
2403 sq_throwerror(vm, e.what());
2406 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2412 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2415 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2416 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2419 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2422 float return_value = _this->get_pos_y();
2424 sq_pushfloat(vm, return_value);
2427 } catch(std::exception& e) {
2428 sq_throwerror(vm, e.what());
2431 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2437 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2439 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2444 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2447 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2448 sq_throwerror(vm, _SC("'start' called without instance"));
2451 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2458 } catch(std::exception& e) {
2459 sq_throwerror(vm, e.what());
2462 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2468 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2471 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2472 sq_throwerror(vm, _SC("'stop' called without instance"));
2475 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2482 } catch(std::exception& e) {
2483 sq_throwerror(vm, e.what());
2486 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2492 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2495 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2496 sq_throwerror(vm, _SC("'thunder' called without instance"));
2499 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2506 } catch(std::exception& e) {
2507 sq_throwerror(vm, e.what());
2510 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2516 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2519 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2520 sq_throwerror(vm, _SC("'lightning' called without instance"));
2523 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2530 } catch(std::exception& e) {
2531 sq_throwerror(vm, e.what());
2534 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2540 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2543 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2544 sq_throwerror(vm, _SC("'flash' called without instance"));
2547 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2554 } catch(std::exception& e) {
2555 sq_throwerror(vm, e.what());
2558 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2564 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2567 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2568 sq_throwerror(vm, _SC("'electrify' called without instance"));
2571 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2578 } catch(std::exception& e) {
2579 sq_throwerror(vm, e.what());
2582 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2588 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2590 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2595 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2598 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2599 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2602 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2604 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2605 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2610 _this->goto_node(static_cast<int> (arg0));
2614 } catch(std::exception& e) {
2615 sq_throwerror(vm, e.what());
2618 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2624 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2627 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2628 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2631 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2634 _this->start_moving();
2638 } catch(std::exception& e) {
2639 sq_throwerror(vm, e.what());
2642 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2648 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2651 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2652 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2655 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2658 _this->stop_moving();
2662 } catch(std::exception& e) {
2663 sq_throwerror(vm, e.what());
2666 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2672 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2675 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2676 sq_throwerror(vm, _SC("'fade' called without instance"));
2679 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2681 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2682 sq_throwerror(vm, _SC("Argument 1 not a float"));
2686 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2687 sq_throwerror(vm, _SC("Argument 2 not a float"));
2692 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2696 } catch(std::exception& e) {
2697 sq_throwerror(vm, e.what());
2700 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2706 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2709 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2710 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2713 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2715 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2716 sq_throwerror(vm, _SC("Argument 1 not a float"));
2721 _this->set_alpha(static_cast<float> (arg0));
2725 } catch(std::exception& e) {
2726 sq_throwerror(vm, e.what());
2729 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2735 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2738 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2739 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2742 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2745 float return_value = _this->get_alpha();
2747 sq_pushfloat(vm, return_value);
2750 } catch(std::exception& e) {
2751 sq_throwerror(vm, e.what());
2754 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2760 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2762 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2767 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2770 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2771 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2774 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2776 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2777 sq_throwerror(vm, _SC("Argument 1 not a float"));
2781 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2782 sq_throwerror(vm, _SC("Argument 2 not a float"));
2786 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2787 sq_throwerror(vm, _SC("Argument 3 not a float"));
2792 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2796 } catch(std::exception& e) {
2797 sq_throwerror(vm, e.what());
2800 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2806 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2809 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2810 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2813 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2816 float return_value = _this->get_ambient_red();
2818 sq_pushfloat(vm, return_value);
2821 } catch(std::exception& e) {
2822 sq_throwerror(vm, e.what());
2825 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2831 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2834 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2835 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2838 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2841 float return_value = _this->get_ambient_green();
2843 sq_pushfloat(vm, return_value);
2846 } catch(std::exception& e) {
2847 sq_throwerror(vm, e.what());
2850 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2856 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2859 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2860 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2863 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2866 float return_value = _this->get_ambient_blue();
2868 sq_pushfloat(vm, return_value);
2871 } catch(std::exception& e) {
2872 sq_throwerror(vm, e.what());
2875 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2881 static SQInteger SSector_set_gravity_wrapper(HSQUIRRELVM vm)
2884 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2885 sq_throwerror(vm, _SC("'set_gravity' called without instance"));
2888 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2890 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2891 sq_throwerror(vm, _SC("Argument 1 not a float"));
2896 _this->set_gravity(static_cast<float> (arg0));
2900 } catch(std::exception& e) {
2901 sq_throwerror(vm, e.what());
2904 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'"));
2910 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2912 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2917 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2920 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2921 sq_throwerror(vm, _SC("'start' called without instance"));
2924 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2931 } catch(std::exception& e) {
2932 sq_throwerror(vm, e.what());
2935 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2941 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2944 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2945 sq_throwerror(vm, _SC("'stop' called without instance"));
2948 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2955 } catch(std::exception& e) {
2956 sq_throwerror(vm, e.what());
2959 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2965 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2968 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2969 sq_throwerror(vm, _SC("'get_time' called without instance"));
2972 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2975 float return_value = _this->get_time();
2977 sq_pushfloat(vm, return_value);
2980 } catch(std::exception& e) {
2981 sq_throwerror(vm, e.what());
2984 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2990 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2993 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2994 sq_throwerror(vm, _SC("'set_time' called without instance"));
2997 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2999 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3000 sq_throwerror(vm, _SC("Argument 1 not a float"));
3005 _this->set_time(static_cast<float> (arg0));
3009 } catch(std::exception& e) {
3010 sq_throwerror(vm, e.what());
3013 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
3019 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
3021 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (ptr);
3026 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
3029 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3030 sq_throwerror(vm, _SC("'goto_node' called without instance"));
3033 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3035 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
3036 sq_throwerror(vm, _SC("Argument 1 not an integer"));
3041 _this->goto_node(static_cast<int> (arg0));
3045 } catch(std::exception& e) {
3046 sq_throwerror(vm, e.what());
3049 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
3055 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
3058 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3059 sq_throwerror(vm, _SC("'set_state' called without instance"));
3062 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3064 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3065 sq_throwerror(vm, _SC("Argument 1 not a string"));
3070 _this->set_state(arg0);
3074 } catch(std::exception& e) {
3075 sq_throwerror(vm, e.what());
3078 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
3084 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
3087 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3088 sq_throwerror(vm, _SC("'start_moving' called without instance"));
3091 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3094 _this->start_moving();
3098 } catch(std::exception& e) {
3099 sq_throwerror(vm, e.what());
3102 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
3108 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
3111 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
3112 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
3115 Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
3118 _this->stop_moving();
3122 } catch(std::exception& e) {
3123 sq_throwerror(vm, e.what());
3126 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
3132 static SQInteger display_wrapper(HSQUIRRELVM vm)
3134 return Scripting::display(vm);
3137 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
3139 HSQUIRRELVM arg0 = vm;
3142 Scripting::print_stacktrace(arg0);
3146 } catch(std::exception& e) {
3147 sq_throwerror(vm, e.what());
3150 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
3156 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
3158 return Scripting::get_current_thread(vm);
3161 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
3164 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3165 sq_throwerror(vm, _SC("Argument 1 not a string"));
3170 Scripting::display_text_file(arg0);
3174 } catch(std::exception& e) {
3175 sq_throwerror(vm, e.what());
3178 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
3184 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
3187 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3188 sq_throwerror(vm, _SC("Argument 1 not a string"));
3193 Scripting::load_worldmap(arg0);
3197 } catch(std::exception& e) {
3198 sq_throwerror(vm, e.what());
3201 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
3207 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
3210 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3211 sq_throwerror(vm, _SC("Argument 1 not a string"));
3216 Scripting::load_level(arg0);
3220 } catch(std::exception& e) {
3221 sq_throwerror(vm, e.what());
3224 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
3230 static SQInteger wait_wrapper(HSQUIRRELVM vm)
3232 HSQUIRRELVM arg0 = vm;
3234 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
3235 sq_throwerror(vm, _SC("Argument 1 not a float"));
3240 Scripting::wait(arg0, static_cast<float> (arg1));
3242 return sq_suspendvm(vm);
3244 } catch(std::exception& e) {
3245 sq_throwerror(vm, e.what());
3248 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
3254 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
3256 HSQUIRRELVM arg0 = vm;
3259 Scripting::wait_for_screenswitch(arg0);
3261 return sq_suspendvm(vm);
3263 } catch(std::exception& e) {
3264 sq_throwerror(vm, e.what());
3267 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
3273 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
3278 Scripting::exit_screen();
3282 } catch(std::exception& e) {
3283 sq_throwerror(vm, e.what());
3286 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
3292 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
3295 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3296 sq_throwerror(vm, _SC("Argument 1 not a float"));
3301 Scripting::fadeout_screen(static_cast<float> (arg0));
3305 } catch(std::exception& e) {
3306 sq_throwerror(vm, e.what());
3309 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
3315 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
3318 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3319 sq_throwerror(vm, _SC("Argument 1 not a float"));
3323 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3324 sq_throwerror(vm, _SC("Argument 2 not a float"));
3328 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3329 sq_throwerror(vm, _SC("Argument 3 not a float"));
3334 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3338 } catch(std::exception& e) {
3339 sq_throwerror(vm, e.what());
3342 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
3348 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
3353 Scripting::abort_screenfade();
3357 } catch(std::exception& e) {
3358 sq_throwerror(vm, e.what());
3361 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
3367 static SQInteger translate_wrapper(HSQUIRRELVM vm)
3370 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3371 sq_throwerror(vm, _SC("Argument 1 not a string"));
3376 std::string return_value = Scripting::translate(arg0);
3378 sq_pushstring(vm, return_value.c_str(), return_value.size());
3381 } catch(std::exception& e) {
3382 sq_throwerror(vm, e.what());
3385 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3391 static SQInteger import_wrapper(HSQUIRRELVM vm)
3393 HSQUIRRELVM arg0 = vm;
3395 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3396 sq_throwerror(vm, _SC("Argument 1 not a string"));
3401 Scripting::import(arg0, arg1);
3405 } catch(std::exception& e) {
3406 sq_throwerror(vm, e.what());
3409 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3415 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3420 Scripting::save_state();
3424 } catch(std::exception& e) {
3425 sq_throwerror(vm, e.what());
3428 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3434 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3439 Scripting::update_worldmap();
3443 } catch(std::exception& e) {
3444 sq_throwerror(vm, e.what());
3447 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3453 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3456 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3457 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3462 Scripting::debug_collrects(arg0 == SQTrue);
3466 } catch(std::exception& e) {
3467 sq_throwerror(vm, e.what());
3470 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3476 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3479 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3480 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3485 Scripting::debug_show_fps(arg0 == SQTrue);
3489 } catch(std::exception& e) {
3490 sq_throwerror(vm, e.what());
3493 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3499 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3502 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3503 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3508 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3512 } catch(std::exception& e) {
3513 sq_throwerror(vm, e.what());
3516 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3522 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3525 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3526 sq_throwerror(vm, _SC("Argument 1 not a string"));
3531 Scripting::play_music(arg0);
3535 } catch(std::exception& e) {
3536 sq_throwerror(vm, e.what());
3539 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3545 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3548 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3549 sq_throwerror(vm, _SC("Argument 1 not a string"));
3554 Scripting::play_sound(arg0);
3558 } catch(std::exception& e) {
3559 sq_throwerror(vm, e.what());
3562 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3568 static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm)
3571 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3572 sq_throwerror(vm, _SC("Argument 1 not a float"));
3577 Scripting::set_game_speed(static_cast<float> (arg0));
3581 } catch(std::exception& e) {
3582 sq_throwerror(vm, e.what());
3585 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'"));
3591 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3596 Scripting::grease();
3600 } catch(std::exception& e) {
3601 sq_throwerror(vm, e.what());
3604 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3610 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3615 Scripting::invincible();
3619 } catch(std::exception& e) {
3620 sq_throwerror(vm, e.what());
3623 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3629 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3638 } catch(std::exception& e) {
3639 sq_throwerror(vm, e.what());
3642 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3648 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3653 Scripting::mortal();
3657 } catch(std::exception& e) {
3658 sq_throwerror(vm, e.what());
3661 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3667 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3672 Scripting::restart();
3676 } catch(std::exception& e) {
3677 sq_throwerror(vm, e.what());
3680 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3686 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3691 Scripting::whereami();
3695 } catch(std::exception& e) {
3696 sq_throwerror(vm, e.what());
3699 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3705 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3710 Scripting::gotoend();
3714 } catch(std::exception& e) {
3715 sq_throwerror(vm, e.what());
3718 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3724 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3729 Scripting::camera();
3733 } catch(std::exception& e) {
3734 sq_throwerror(vm, e.what());
3737 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3743 static SQInteger set_gamma_wrapper(HSQUIRRELVM vm)
3746 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3747 sq_throwerror(vm, _SC("Argument 1 not a float"));
3752 Scripting::set_gamma(static_cast<float> (arg0));
3756 } catch(std::exception& e) {
3757 sq_throwerror(vm, e.what());
3760 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'"));
3766 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3775 } catch(std::exception& e) {
3776 sq_throwerror(vm, e.what());
3779 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3785 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3789 int return_value = Scripting::rand();
3791 sq_pushinteger(vm, return_value);
3794 } catch(std::exception& e) {
3795 sq_throwerror(vm, e.what());
3798 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3804 } // end of namespace Wrapper
3805 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3807 using namespace Wrapper;
3809 sq_pushroottable(v);
3810 sq_pushstring(v, "DisplayEffect", -1);
3811 if(SQ_FAILED(sq_get(v, -2))) {
3812 std::ostringstream msg;
3813 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3814 throw SquirrelError(v, msg.str());
3817 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3818 std::ostringstream msg;
3819 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3820 throw SquirrelError(v, msg.str());
3822 sq_remove(v, -2); // remove object name
3824 if(setup_releasehook) {
3825 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3828 sq_remove(v, -2); // remove root table
3831 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3833 using namespace Wrapper;
3835 sq_pushroottable(v);
3836 sq_pushstring(v, "Camera", -1);
3837 if(SQ_FAILED(sq_get(v, -2))) {
3838 std::ostringstream msg;
3839 msg << "Couldn't resolved squirrel type 'Camera'";
3840 throw SquirrelError(v, msg.str());
3843 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3844 std::ostringstream msg;
3845 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3846 throw SquirrelError(v, msg.str());
3848 sq_remove(v, -2); // remove object name
3850 if(setup_releasehook) {
3851 sq_setreleasehook(v, -1, Camera_release_hook);
3854 sq_remove(v, -2); // remove root table
3857 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3859 using namespace Wrapper;
3861 sq_pushroottable(v);
3862 sq_pushstring(v, "Level", -1);
3863 if(SQ_FAILED(sq_get(v, -2))) {
3864 std::ostringstream msg;
3865 msg << "Couldn't resolved squirrel type 'Level'";
3866 throw SquirrelError(v, msg.str());
3869 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3870 std::ostringstream msg;
3871 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3872 throw SquirrelError(v, msg.str());
3874 sq_remove(v, -2); // remove object name
3876 if(setup_releasehook) {
3877 sq_setreleasehook(v, -1, Level_release_hook);
3880 sq_remove(v, -2); // remove root table
3883 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3885 using namespace Wrapper;
3887 sq_pushroottable(v);
3888 sq_pushstring(v, "ScriptedObject", -1);
3889 if(SQ_FAILED(sq_get(v, -2))) {
3890 std::ostringstream msg;
3891 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3892 throw SquirrelError(v, msg.str());
3895 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3896 std::ostringstream msg;
3897 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3898 throw SquirrelError(v, msg.str());
3900 sq_remove(v, -2); // remove object name
3902 if(setup_releasehook) {
3903 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3906 sq_remove(v, -2); // remove root table
3909 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3911 using namespace Wrapper;
3913 sq_pushroottable(v);
3914 sq_pushstring(v, "Text", -1);
3915 if(SQ_FAILED(sq_get(v, -2))) {
3916 std::ostringstream msg;
3917 msg << "Couldn't resolved squirrel type 'Text'";
3918 throw SquirrelError(v, msg.str());
3921 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3922 std::ostringstream msg;
3923 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3924 throw SquirrelError(v, msg.str());
3926 sq_remove(v, -2); // remove object name
3928 if(setup_releasehook) {
3929 sq_setreleasehook(v, -1, Text_release_hook);
3932 sq_remove(v, -2); // remove root table
3935 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3937 using namespace Wrapper;
3939 sq_pushroottable(v);
3940 sq_pushstring(v, "Player", -1);
3941 if(SQ_FAILED(sq_get(v, -2))) {
3942 std::ostringstream msg;
3943 msg << "Couldn't resolved squirrel type 'Player'";
3944 throw SquirrelError(v, msg.str());
3947 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3948 std::ostringstream msg;
3949 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3950 throw SquirrelError(v, msg.str());
3952 sq_remove(v, -2); // remove object name
3954 if(setup_releasehook) {
3955 sq_setreleasehook(v, -1, Player_release_hook);
3958 sq_remove(v, -2); // remove root table
3961 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3963 using namespace Wrapper;
3965 sq_pushroottable(v);
3966 sq_pushstring(v, "FloatingImage", -1);
3967 if(SQ_FAILED(sq_get(v, -2))) {
3968 std::ostringstream msg;
3969 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3970 throw SquirrelError(v, msg.str());
3973 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3974 std::ostringstream msg;
3975 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3976 throw SquirrelError(v, msg.str());
3978 sq_remove(v, -2); // remove object name
3980 if(setup_releasehook) {
3981 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3984 sq_remove(v, -2); // remove root table
3987 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3989 using namespace Wrapper;
3991 sq_pushroottable(v);
3992 sq_pushstring(v, "Platform", -1);
3993 if(SQ_FAILED(sq_get(v, -2))) {
3994 std::ostringstream msg;
3995 msg << "Couldn't resolved squirrel type 'Platform'";
3996 throw SquirrelError(v, msg.str());
3999 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4000 std::ostringstream msg;
4001 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
4002 throw SquirrelError(v, msg.str());
4004 sq_remove(v, -2); // remove object name
4006 if(setup_releasehook) {
4007 sq_setreleasehook(v, -1, Platform_release_hook);
4010 sq_remove(v, -2); // remove root table
4013 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
4015 using namespace Wrapper;
4017 sq_pushroottable(v);
4018 sq_pushstring(v, "Candle", -1);
4019 if(SQ_FAILED(sq_get(v, -2))) {
4020 std::ostringstream msg;
4021 msg << "Couldn't resolved squirrel type 'Candle'";
4022 throw SquirrelError(v, msg.str());
4025 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4026 std::ostringstream msg;
4027 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
4028 throw SquirrelError(v, msg.str());
4030 sq_remove(v, -2); // remove object name
4032 if(setup_releasehook) {
4033 sq_setreleasehook(v, -1, Candle_release_hook);
4036 sq_remove(v, -2); // remove root table
4039 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
4041 using namespace Wrapper;
4043 sq_pushroottable(v);
4044 sq_pushstring(v, "Wind", -1);
4045 if(SQ_FAILED(sq_get(v, -2))) {
4046 std::ostringstream msg;
4047 msg << "Couldn't resolved squirrel type 'Wind'";
4048 throw SquirrelError(v, msg.str());
4051 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4052 std::ostringstream msg;
4053 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
4054 throw SquirrelError(v, msg.str());
4056 sq_remove(v, -2); // remove object name
4058 if(setup_releasehook) {
4059 sq_setreleasehook(v, -1, Wind_release_hook);
4062 sq_remove(v, -2); // remove root table
4065 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
4067 using namespace Wrapper;
4069 sq_pushroottable(v);
4070 sq_pushstring(v, "AmbientSound", -1);
4071 if(SQ_FAILED(sq_get(v, -2))) {
4072 std::ostringstream msg;
4073 msg << "Couldn't resolved squirrel type 'AmbientSound'";
4074 throw SquirrelError(v, msg.str());
4077 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4078 std::ostringstream msg;
4079 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
4080 throw SquirrelError(v, msg.str());
4082 sq_remove(v, -2); // remove object name
4084 if(setup_releasehook) {
4085 sq_setreleasehook(v, -1, AmbientSound_release_hook);
4088 sq_remove(v, -2); // remove root table
4091 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
4093 using namespace Wrapper;
4095 sq_pushroottable(v);
4096 sq_pushstring(v, "Thunderstorm", -1);
4097 if(SQ_FAILED(sq_get(v, -2))) {
4098 std::ostringstream msg;
4099 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
4100 throw SquirrelError(v, msg.str());
4103 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4104 std::ostringstream msg;
4105 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
4106 throw SquirrelError(v, msg.str());
4108 sq_remove(v, -2); // remove object name
4110 if(setup_releasehook) {
4111 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
4114 sq_remove(v, -2); // remove root table
4117 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
4119 using namespace Wrapper;
4121 sq_pushroottable(v);
4122 sq_pushstring(v, "TileMap", -1);
4123 if(SQ_FAILED(sq_get(v, -2))) {
4124 std::ostringstream msg;
4125 msg << "Couldn't resolved squirrel type 'TileMap'";
4126 throw SquirrelError(v, msg.str());
4129 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4130 std::ostringstream msg;
4131 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
4132 throw SquirrelError(v, msg.str());
4134 sq_remove(v, -2); // remove object name
4136 if(setup_releasehook) {
4137 sq_setreleasehook(v, -1, TileMap_release_hook);
4140 sq_remove(v, -2); // remove root table
4143 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
4145 using namespace Wrapper;
4147 sq_pushroottable(v);
4148 sq_pushstring(v, "SSector", -1);
4149 if(SQ_FAILED(sq_get(v, -2))) {
4150 std::ostringstream msg;
4151 msg << "Couldn't resolved squirrel type 'SSector'";
4152 throw SquirrelError(v, msg.str());
4155 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4156 std::ostringstream msg;
4157 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
4158 throw SquirrelError(v, msg.str());
4160 sq_remove(v, -2); // remove object name
4162 if(setup_releasehook) {
4163 sq_setreleasehook(v, -1, SSector_release_hook);
4166 sq_remove(v, -2); // remove root table
4169 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
4171 using namespace Wrapper;
4173 sq_pushroottable(v);
4174 sq_pushstring(v, "LevelTime", -1);
4175 if(SQ_FAILED(sq_get(v, -2))) {
4176 std::ostringstream msg;
4177 msg << "Couldn't resolved squirrel type 'LevelTime'";
4178 throw SquirrelError(v, msg.str());
4181 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4182 std::ostringstream msg;
4183 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
4184 throw SquirrelError(v, msg.str());
4186 sq_remove(v, -2); // remove object name
4188 if(setup_releasehook) {
4189 sq_setreleasehook(v, -1, LevelTime_release_hook);
4192 sq_remove(v, -2); // remove root table
4195 void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook)
4197 using namespace Wrapper;
4199 sq_pushroottable(v);
4200 sq_pushstring(v, "WillOWisp", -1);
4201 if(SQ_FAILED(sq_get(v, -2))) {
4202 std::ostringstream msg;
4203 msg << "Couldn't resolved squirrel type 'WillOWisp'";
4204 throw SquirrelError(v, msg.str());
4207 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4208 std::ostringstream msg;
4209 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
4210 throw SquirrelError(v, msg.str());
4212 sq_remove(v, -2); // remove object name
4214 if(setup_releasehook) {
4215 sq_setreleasehook(v, -1, WillOWisp_release_hook);
4218 sq_remove(v, -2); // remove root table
4221 void register_supertux_wrapper(HSQUIRRELVM v)
4223 using namespace Wrapper;
4225 sq_pushstring(v, "ANCHOR_TOP", -1);
4226 sq_pushinteger(v, 16);
4227 if(SQ_FAILED(sq_createslot(v, -3))) {
4228 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
4231 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
4232 sq_pushinteger(v, 32);
4233 if(SQ_FAILED(sq_createslot(v, -3))) {
4234 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
4237 sq_pushstring(v, "ANCHOR_LEFT", -1);
4238 sq_pushinteger(v, 1);
4239 if(SQ_FAILED(sq_createslot(v, -3))) {
4240 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
4243 sq_pushstring(v, "ANCHOR_RIGHT", -1);
4244 sq_pushinteger(v, 2);
4245 if(SQ_FAILED(sq_createslot(v, -3))) {
4246 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
4249 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
4250 sq_pushinteger(v, 0);
4251 if(SQ_FAILED(sq_createslot(v, -3))) {
4252 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
4255 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
4256 sq_pushinteger(v, 17);
4257 if(SQ_FAILED(sq_createslot(v, -3))) {
4258 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
4261 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
4262 sq_pushinteger(v, 18);
4263 if(SQ_FAILED(sq_createslot(v, -3))) {
4264 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
4267 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
4268 sq_pushinteger(v, 33);
4269 if(SQ_FAILED(sq_createslot(v, -3))) {
4270 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
4273 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
4274 sq_pushinteger(v, 34);
4275 if(SQ_FAILED(sq_createslot(v, -3))) {
4276 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
4279 sq_pushstring(v, "display", -1);
4280 sq_newclosure(v, &display_wrapper, 0);
4281 if(SQ_FAILED(sq_createslot(v, -3))) {
4282 throw SquirrelError(v, "Couldn't register function 'display'");
4285 sq_pushstring(v, "print_stacktrace", -1);
4286 sq_newclosure(v, &print_stacktrace_wrapper, 0);
4287 if(SQ_FAILED(sq_createslot(v, -3))) {
4288 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
4291 sq_pushstring(v, "get_current_thread", -1);
4292 sq_newclosure(v, &get_current_thread_wrapper, 0);
4293 if(SQ_FAILED(sq_createslot(v, -3))) {
4294 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
4297 sq_pushstring(v, "display_text_file", -1);
4298 sq_newclosure(v, &display_text_file_wrapper, 0);
4299 if(SQ_FAILED(sq_createslot(v, -3))) {
4300 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
4303 sq_pushstring(v, "load_worldmap", -1);
4304 sq_newclosure(v, &load_worldmap_wrapper, 0);
4305 if(SQ_FAILED(sq_createslot(v, -3))) {
4306 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
4309 sq_pushstring(v, "load_level", -1);
4310 sq_newclosure(v, &load_level_wrapper, 0);
4311 if(SQ_FAILED(sq_createslot(v, -3))) {
4312 throw SquirrelError(v, "Couldn't register function 'load_level'");
4315 sq_pushstring(v, "wait", -1);
4316 sq_newclosure(v, &wait_wrapper, 0);
4317 if(SQ_FAILED(sq_createslot(v, -3))) {
4318 throw SquirrelError(v, "Couldn't register function 'wait'");
4321 sq_pushstring(v, "wait_for_screenswitch", -1);
4322 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
4323 if(SQ_FAILED(sq_createslot(v, -3))) {
4324 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
4327 sq_pushstring(v, "exit_screen", -1);
4328 sq_newclosure(v, &exit_screen_wrapper, 0);
4329 if(SQ_FAILED(sq_createslot(v, -3))) {
4330 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
4333 sq_pushstring(v, "fadeout_screen", -1);
4334 sq_newclosure(v, &fadeout_screen_wrapper, 0);
4335 if(SQ_FAILED(sq_createslot(v, -3))) {
4336 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
4339 sq_pushstring(v, "shrink_screen", -1);
4340 sq_newclosure(v, &shrink_screen_wrapper, 0);
4341 if(SQ_FAILED(sq_createslot(v, -3))) {
4342 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
4345 sq_pushstring(v, "abort_screenfade", -1);
4346 sq_newclosure(v, &abort_screenfade_wrapper, 0);
4347 if(SQ_FAILED(sq_createslot(v, -3))) {
4348 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
4351 sq_pushstring(v, "translate", -1);
4352 sq_newclosure(v, &translate_wrapper, 0);
4353 if(SQ_FAILED(sq_createslot(v, -3))) {
4354 throw SquirrelError(v, "Couldn't register function 'translate'");
4357 sq_pushstring(v, "import", -1);
4358 sq_newclosure(v, &import_wrapper, 0);
4359 if(SQ_FAILED(sq_createslot(v, -3))) {
4360 throw SquirrelError(v, "Couldn't register function 'import'");
4363 sq_pushstring(v, "save_state", -1);
4364 sq_newclosure(v, &save_state_wrapper, 0);
4365 if(SQ_FAILED(sq_createslot(v, -3))) {
4366 throw SquirrelError(v, "Couldn't register function 'save_state'");
4369 sq_pushstring(v, "update_worldmap", -1);
4370 sq_newclosure(v, &update_worldmap_wrapper, 0);
4371 if(SQ_FAILED(sq_createslot(v, -3))) {
4372 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
4375 sq_pushstring(v, "debug_collrects", -1);
4376 sq_newclosure(v, &debug_collrects_wrapper, 0);
4377 if(SQ_FAILED(sq_createslot(v, -3))) {
4378 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
4381 sq_pushstring(v, "debug_show_fps", -1);
4382 sq_newclosure(v, &debug_show_fps_wrapper, 0);
4383 if(SQ_FAILED(sq_createslot(v, -3))) {
4384 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
4387 sq_pushstring(v, "debug_draw_solids_only", -1);
4388 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
4389 if(SQ_FAILED(sq_createslot(v, -3))) {
4390 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
4393 sq_pushstring(v, "play_music", -1);
4394 sq_newclosure(v, &play_music_wrapper, 0);
4395 if(SQ_FAILED(sq_createslot(v, -3))) {
4396 throw SquirrelError(v, "Couldn't register function 'play_music'");
4399 sq_pushstring(v, "play_sound", -1);
4400 sq_newclosure(v, &play_sound_wrapper, 0);
4401 if(SQ_FAILED(sq_createslot(v, -3))) {
4402 throw SquirrelError(v, "Couldn't register function 'play_sound'");
4405 sq_pushstring(v, "set_game_speed", -1);
4406 sq_newclosure(v, &set_game_speed_wrapper, 0);
4407 if(SQ_FAILED(sq_createslot(v, -3))) {
4408 throw SquirrelError(v, "Couldn't register function 'set_game_speed'");
4411 sq_pushstring(v, "grease", -1);
4412 sq_newclosure(v, &grease_wrapper, 0);
4413 if(SQ_FAILED(sq_createslot(v, -3))) {
4414 throw SquirrelError(v, "Couldn't register function 'grease'");
4417 sq_pushstring(v, "invincible", -1);
4418 sq_newclosure(v, &invincible_wrapper, 0);
4419 if(SQ_FAILED(sq_createslot(v, -3))) {
4420 throw SquirrelError(v, "Couldn't register function 'invincible'");
4423 sq_pushstring(v, "ghost", -1);
4424 sq_newclosure(v, &ghost_wrapper, 0);
4425 if(SQ_FAILED(sq_createslot(v, -3))) {
4426 throw SquirrelError(v, "Couldn't register function 'ghost'");
4429 sq_pushstring(v, "mortal", -1);
4430 sq_newclosure(v, &mortal_wrapper, 0);
4431 if(SQ_FAILED(sq_createslot(v, -3))) {
4432 throw SquirrelError(v, "Couldn't register function 'mortal'");
4435 sq_pushstring(v, "restart", -1);
4436 sq_newclosure(v, &restart_wrapper, 0);
4437 if(SQ_FAILED(sq_createslot(v, -3))) {
4438 throw SquirrelError(v, "Couldn't register function 'restart'");
4441 sq_pushstring(v, "whereami", -1);
4442 sq_newclosure(v, &whereami_wrapper, 0);
4443 if(SQ_FAILED(sq_createslot(v, -3))) {
4444 throw SquirrelError(v, "Couldn't register function 'whereami'");
4447 sq_pushstring(v, "gotoend", -1);
4448 sq_newclosure(v, &gotoend_wrapper, 0);
4449 if(SQ_FAILED(sq_createslot(v, -3))) {
4450 throw SquirrelError(v, "Couldn't register function 'gotoend'");
4453 sq_pushstring(v, "camera", -1);
4454 sq_newclosure(v, &camera_wrapper, 0);
4455 if(SQ_FAILED(sq_createslot(v, -3))) {
4456 throw SquirrelError(v, "Couldn't register function 'camera'");
4459 sq_pushstring(v, "set_gamma", -1);
4460 sq_newclosure(v, &set_gamma_wrapper, 0);
4461 if(SQ_FAILED(sq_createslot(v, -3))) {
4462 throw SquirrelError(v, "Couldn't register function 'set_gamma'");
4465 sq_pushstring(v, "quit", -1);
4466 sq_newclosure(v, &quit_wrapper, 0);
4467 if(SQ_FAILED(sq_createslot(v, -3))) {
4468 throw SquirrelError(v, "Couldn't register function 'quit'");
4471 sq_pushstring(v, "rand", -1);
4472 sq_newclosure(v, &rand_wrapper, 0);
4473 if(SQ_FAILED(sq_createslot(v, -3))) {
4474 throw SquirrelError(v, "Couldn't register function 'rand'");
4477 // Register class DisplayEffect
4478 sq_pushstring(v, "DisplayEffect", -1);
4479 if(sq_newclass(v, SQFalse) < 0) {
4480 std::ostringstream msg;
4481 msg << "Couldn't create new class 'DisplayEffect'";
4482 throw SquirrelError(v, msg.str());
4484 sq_pushstring(v, "fade_out", -1);
4485 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4486 if(SQ_FAILED(sq_createslot(v, -3))) {
4487 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4490 sq_pushstring(v, "fade_in", -1);
4491 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4492 if(SQ_FAILED(sq_createslot(v, -3))) {
4493 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4496 sq_pushstring(v, "set_black", -1);
4497 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4498 if(SQ_FAILED(sq_createslot(v, -3))) {
4499 throw SquirrelError(v, "Couldn't register function 'set_black'");
4502 sq_pushstring(v, "is_black", -1);
4503 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4504 if(SQ_FAILED(sq_createslot(v, -3))) {
4505 throw SquirrelError(v, "Couldn't register function 'is_black'");
4508 sq_pushstring(v, "sixteen_to_nine", -1);
4509 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4510 if(SQ_FAILED(sq_createslot(v, -3))) {
4511 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4514 sq_pushstring(v, "four_to_three", -1);
4515 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4516 if(SQ_FAILED(sq_createslot(v, -3))) {
4517 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4520 if(SQ_FAILED(sq_createslot(v, -3))) {
4521 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4524 // Register class Camera
4525 sq_pushstring(v, "Camera", -1);
4526 if(sq_newclass(v, SQFalse) < 0) {
4527 std::ostringstream msg;
4528 msg << "Couldn't create new class 'Camera'";
4529 throw SquirrelError(v, msg.str());
4531 sq_pushstring(v, "reload_config", -1);
4532 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4533 if(SQ_FAILED(sq_createslot(v, -3))) {
4534 throw SquirrelError(v, "Couldn't register function 'reload_config'");
4537 sq_pushstring(v, "shake", -1);
4538 sq_newclosure(v, &Camera_shake_wrapper, 0);
4539 if(SQ_FAILED(sq_createslot(v, -3))) {
4540 throw SquirrelError(v, "Couldn't register function 'shake'");
4543 sq_pushstring(v, "set_pos", -1);
4544 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4545 if(SQ_FAILED(sq_createslot(v, -3))) {
4546 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4549 sq_pushstring(v, "set_mode", -1);
4550 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4551 if(SQ_FAILED(sq_createslot(v, -3))) {
4552 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4555 sq_pushstring(v, "scroll_to", -1);
4556 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4557 if(SQ_FAILED(sq_createslot(v, -3))) {
4558 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4561 if(SQ_FAILED(sq_createslot(v, -3))) {
4562 throw SquirrelError(v, "Couldn't register class 'Camera'");
4565 // Register class Level
4566 sq_pushstring(v, "Level", -1);
4567 if(sq_newclass(v, SQFalse) < 0) {
4568 std::ostringstream msg;
4569 msg << "Couldn't create new class 'Level'";
4570 throw SquirrelError(v, msg.str());
4572 sq_pushstring(v, "finish", -1);
4573 sq_newclosure(v, &Level_finish_wrapper, 0);
4574 if(SQ_FAILED(sq_createslot(v, -3))) {
4575 throw SquirrelError(v, "Couldn't register function 'finish'");
4578 sq_pushstring(v, "spawn", -1);
4579 sq_newclosure(v, &Level_spawn_wrapper, 0);
4580 if(SQ_FAILED(sq_createslot(v, -3))) {
4581 throw SquirrelError(v, "Couldn't register function 'spawn'");
4584 sq_pushstring(v, "flip_vertically", -1);
4585 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4586 if(SQ_FAILED(sq_createslot(v, -3))) {
4587 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4590 sq_pushstring(v, "toggle_pause", -1);
4591 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4592 if(SQ_FAILED(sq_createslot(v, -3))) {
4593 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4596 sq_pushstring(v, "edit", -1);
4597 sq_newclosure(v, &Level_edit_wrapper, 0);
4598 if(SQ_FAILED(sq_createslot(v, -3))) {
4599 throw SquirrelError(v, "Couldn't register function 'edit'");
4602 if(SQ_FAILED(sq_createslot(v, -3))) {
4603 throw SquirrelError(v, "Couldn't register class 'Level'");
4606 // Register class ScriptedObject
4607 sq_pushstring(v, "ScriptedObject", -1);
4608 if(sq_newclass(v, SQFalse) < 0) {
4609 std::ostringstream msg;
4610 msg << "Couldn't create new class 'ScriptedObject'";
4611 throw SquirrelError(v, msg.str());
4613 sq_pushstring(v, "set_action", -1);
4614 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4615 if(SQ_FAILED(sq_createslot(v, -3))) {
4616 throw SquirrelError(v, "Couldn't register function 'set_action'");
4619 sq_pushstring(v, "get_action", -1);
4620 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4621 if(SQ_FAILED(sq_createslot(v, -3))) {
4622 throw SquirrelError(v, "Couldn't register function 'get_action'");
4625 sq_pushstring(v, "move", -1);
4626 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4627 if(SQ_FAILED(sq_createslot(v, -3))) {
4628 throw SquirrelError(v, "Couldn't register function 'move'");
4631 sq_pushstring(v, "set_pos", -1);
4632 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4633 if(SQ_FAILED(sq_createslot(v, -3))) {
4634 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4637 sq_pushstring(v, "get_pos_x", -1);
4638 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4639 if(SQ_FAILED(sq_createslot(v, -3))) {
4640 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4643 sq_pushstring(v, "get_pos_y", -1);
4644 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4645 if(SQ_FAILED(sq_createslot(v, -3))) {
4646 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4649 sq_pushstring(v, "set_velocity", -1);
4650 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4651 if(SQ_FAILED(sq_createslot(v, -3))) {
4652 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4655 sq_pushstring(v, "get_velocity_x", -1);
4656 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4657 if(SQ_FAILED(sq_createslot(v, -3))) {
4658 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4661 sq_pushstring(v, "get_velocity_y", -1);
4662 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4663 if(SQ_FAILED(sq_createslot(v, -3))) {
4664 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4667 sq_pushstring(v, "set_visible", -1);
4668 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4669 if(SQ_FAILED(sq_createslot(v, -3))) {
4670 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4673 sq_pushstring(v, "is_visible", -1);
4674 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4675 if(SQ_FAILED(sq_createslot(v, -3))) {
4676 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4679 sq_pushstring(v, "set_solid", -1);
4680 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4681 if(SQ_FAILED(sq_createslot(v, -3))) {
4682 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4685 sq_pushstring(v, "is_solid", -1);
4686 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4687 if(SQ_FAILED(sq_createslot(v, -3))) {
4688 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4691 sq_pushstring(v, "get_name", -1);
4692 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4693 if(SQ_FAILED(sq_createslot(v, -3))) {
4694 throw SquirrelError(v, "Couldn't register function 'get_name'");
4697 if(SQ_FAILED(sq_createslot(v, -3))) {
4698 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4701 // Register class Text
4702 sq_pushstring(v, "Text", -1);
4703 if(sq_newclass(v, SQFalse) < 0) {
4704 std::ostringstream msg;
4705 msg << "Couldn't create new class 'Text'";
4706 throw SquirrelError(v, msg.str());
4708 sq_pushstring(v, "set_text", -1);
4709 sq_newclosure(v, &Text_set_text_wrapper, 0);
4710 if(SQ_FAILED(sq_createslot(v, -3))) {
4711 throw SquirrelError(v, "Couldn't register function 'set_text'");
4714 sq_pushstring(v, "set_font", -1);
4715 sq_newclosure(v, &Text_set_font_wrapper, 0);
4716 if(SQ_FAILED(sq_createslot(v, -3))) {
4717 throw SquirrelError(v, "Couldn't register function 'set_font'");
4720 sq_pushstring(v, "fade_in", -1);
4721 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4722 if(SQ_FAILED(sq_createslot(v, -3))) {
4723 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4726 sq_pushstring(v, "fade_out", -1);
4727 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4728 if(SQ_FAILED(sq_createslot(v, -3))) {
4729 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4732 sq_pushstring(v, "set_visible", -1);
4733 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4734 if(SQ_FAILED(sq_createslot(v, -3))) {
4735 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4738 sq_pushstring(v, "set_centered", -1);
4739 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4740 if(SQ_FAILED(sq_createslot(v, -3))) {
4741 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4744 sq_pushstring(v, "set_pos", -1);
4745 sq_newclosure(v, &Text_set_pos_wrapper, 0);
4746 if(SQ_FAILED(sq_createslot(v, -3))) {
4747 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4750 sq_pushstring(v, "get_pos_x", -1);
4751 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
4752 if(SQ_FAILED(sq_createslot(v, -3))) {
4753 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4756 sq_pushstring(v, "get_pos_y", -1);
4757 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
4758 if(SQ_FAILED(sq_createslot(v, -3))) {
4759 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4762 sq_pushstring(v, "set_anchor_point", -1);
4763 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
4764 if(SQ_FAILED(sq_createslot(v, -3))) {
4765 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4768 sq_pushstring(v, "get_anchor_point", -1);
4769 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
4770 if(SQ_FAILED(sq_createslot(v, -3))) {
4771 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4774 if(SQ_FAILED(sq_createslot(v, -3))) {
4775 throw SquirrelError(v, "Couldn't register class 'Text'");
4778 // Register class Player
4779 sq_pushstring(v, "Player", -1);
4780 if(sq_newclass(v, SQFalse) < 0) {
4781 std::ostringstream msg;
4782 msg << "Couldn't create new class 'Player'";
4783 throw SquirrelError(v, msg.str());
4785 sq_pushstring(v, "add_bonus", -1);
4786 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4787 if(SQ_FAILED(sq_createslot(v, -3))) {
4788 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4791 sq_pushstring(v, "add_coins", -1);
4792 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4793 if(SQ_FAILED(sq_createslot(v, -3))) {
4794 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4797 sq_pushstring(v, "make_invincible", -1);
4798 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4799 if(SQ_FAILED(sq_createslot(v, -3))) {
4800 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4803 sq_pushstring(v, "deactivate", -1);
4804 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4805 if(SQ_FAILED(sq_createslot(v, -3))) {
4806 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4809 sq_pushstring(v, "activate", -1);
4810 sq_newclosure(v, &Player_activate_wrapper, 0);
4811 if(SQ_FAILED(sq_createslot(v, -3))) {
4812 throw SquirrelError(v, "Couldn't register function 'activate'");
4815 sq_pushstring(v, "walk", -1);
4816 sq_newclosure(v, &Player_walk_wrapper, 0);
4817 if(SQ_FAILED(sq_createslot(v, -3))) {
4818 throw SquirrelError(v, "Couldn't register function 'walk'");
4821 sq_pushstring(v, "set_visible", -1);
4822 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4823 if(SQ_FAILED(sq_createslot(v, -3))) {
4824 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4827 sq_pushstring(v, "get_visible", -1);
4828 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4829 if(SQ_FAILED(sq_createslot(v, -3))) {
4830 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4833 sq_pushstring(v, "kill", -1);
4834 sq_newclosure(v, &Player_kill_wrapper, 0);
4835 if(SQ_FAILED(sq_createslot(v, -3))) {
4836 throw SquirrelError(v, "Couldn't register function 'kill'");
4839 sq_pushstring(v, "set_ghost_mode", -1);
4840 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4841 if(SQ_FAILED(sq_createslot(v, -3))) {
4842 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4845 sq_pushstring(v, "get_ghost_mode", -1);
4846 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4847 if(SQ_FAILED(sq_createslot(v, -3))) {
4848 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4851 sq_pushstring(v, "do_cheer", -1);
4852 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4853 if(SQ_FAILED(sq_createslot(v, -3))) {
4854 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4857 sq_pushstring(v, "do_duck", -1);
4858 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4859 if(SQ_FAILED(sq_createslot(v, -3))) {
4860 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4863 sq_pushstring(v, "do_standup", -1);
4864 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4865 if(SQ_FAILED(sq_createslot(v, -3))) {
4866 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4869 sq_pushstring(v, "do_backflip", -1);
4870 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4871 if(SQ_FAILED(sq_createslot(v, -3))) {
4872 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4875 sq_pushstring(v, "do_jump", -1);
4876 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4877 if(SQ_FAILED(sq_createslot(v, -3))) {
4878 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4881 sq_pushstring(v, "trigger_sequence", -1);
4882 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4883 if(SQ_FAILED(sq_createslot(v, -3))) {
4884 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4887 sq_pushstring(v, "use_scripting_controller", -1);
4888 sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
4889 if(SQ_FAILED(sq_createslot(v, -3))) {
4890 throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
4893 sq_pushstring(v, "do_scripting_controller", -1);
4894 sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
4895 if(SQ_FAILED(sq_createslot(v, -3))) {
4896 throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
4899 if(SQ_FAILED(sq_createslot(v, -3))) {
4900 throw SquirrelError(v, "Couldn't register class 'Player'");
4903 // Register class FloatingImage
4904 sq_pushstring(v, "FloatingImage", -1);
4905 if(sq_newclass(v, SQFalse) < 0) {
4906 std::ostringstream msg;
4907 msg << "Couldn't create new class 'FloatingImage'";
4908 throw SquirrelError(v, msg.str());
4910 sq_pushstring(v, "constructor", -1);
4911 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4912 if(SQ_FAILED(sq_createslot(v, -3))) {
4913 throw SquirrelError(v, "Couldn't register function 'constructor'");
4916 sq_pushstring(v, "set_layer", -1);
4917 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4918 if(SQ_FAILED(sq_createslot(v, -3))) {
4919 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4922 sq_pushstring(v, "get_layer", -1);
4923 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4924 if(SQ_FAILED(sq_createslot(v, -3))) {
4925 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4928 sq_pushstring(v, "set_pos", -1);
4929 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4930 if(SQ_FAILED(sq_createslot(v, -3))) {
4931 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4934 sq_pushstring(v, "get_pos_x", -1);
4935 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4936 if(SQ_FAILED(sq_createslot(v, -3))) {
4937 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4940 sq_pushstring(v, "get_pos_y", -1);
4941 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4942 if(SQ_FAILED(sq_createslot(v, -3))) {
4943 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4946 sq_pushstring(v, "set_anchor_point", -1);
4947 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4948 if(SQ_FAILED(sq_createslot(v, -3))) {
4949 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4952 sq_pushstring(v, "get_anchor_point", -1);
4953 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4954 if(SQ_FAILED(sq_createslot(v, -3))) {
4955 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4958 sq_pushstring(v, "set_visible", -1);
4959 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4960 if(SQ_FAILED(sq_createslot(v, -3))) {
4961 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4964 sq_pushstring(v, "get_visible", -1);
4965 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4966 if(SQ_FAILED(sq_createslot(v, -3))) {
4967 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4970 sq_pushstring(v, "set_action", -1);
4971 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4972 if(SQ_FAILED(sq_createslot(v, -3))) {
4973 throw SquirrelError(v, "Couldn't register function 'set_action'");
4976 sq_pushstring(v, "get_action", -1);
4977 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4978 if(SQ_FAILED(sq_createslot(v, -3))) {
4979 throw SquirrelError(v, "Couldn't register function 'get_action'");
4982 sq_pushstring(v, "fade_in", -1);
4983 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4984 if(SQ_FAILED(sq_createslot(v, -3))) {
4985 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4988 sq_pushstring(v, "fade_out", -1);
4989 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4990 if(SQ_FAILED(sq_createslot(v, -3))) {
4991 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4994 if(SQ_FAILED(sq_createslot(v, -3))) {
4995 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4998 // Register class Platform
4999 sq_pushstring(v, "Platform", -1);
5000 if(sq_newclass(v, SQFalse) < 0) {
5001 std::ostringstream msg;
5002 msg << "Couldn't create new class 'Platform'";
5003 throw SquirrelError(v, msg.str());
5005 sq_pushstring(v, "goto_node", -1);
5006 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
5007 if(SQ_FAILED(sq_createslot(v, -3))) {
5008 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5011 sq_pushstring(v, "start_moving", -1);
5012 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
5013 if(SQ_FAILED(sq_createslot(v, -3))) {
5014 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5017 sq_pushstring(v, "stop_moving", -1);
5018 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
5019 if(SQ_FAILED(sq_createslot(v, -3))) {
5020 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5023 if(SQ_FAILED(sq_createslot(v, -3))) {
5024 throw SquirrelError(v, "Couldn't register class 'Platform'");
5027 // Register class Candle
5028 sq_pushstring(v, "Candle", -1);
5029 if(sq_newclass(v, SQFalse) < 0) {
5030 std::ostringstream msg;
5031 msg << "Couldn't create new class 'Candle'";
5032 throw SquirrelError(v, msg.str());
5034 sq_pushstring(v, "get_burning", -1);
5035 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
5036 if(SQ_FAILED(sq_createslot(v, -3))) {
5037 throw SquirrelError(v, "Couldn't register function 'get_burning'");
5040 sq_pushstring(v, "set_burning", -1);
5041 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
5042 if(SQ_FAILED(sq_createslot(v, -3))) {
5043 throw SquirrelError(v, "Couldn't register function 'set_burning'");
5046 if(SQ_FAILED(sq_createslot(v, -3))) {
5047 throw SquirrelError(v, "Couldn't register class 'Candle'");
5050 // Register class Wind
5051 sq_pushstring(v, "Wind", -1);
5052 if(sq_newclass(v, SQFalse) < 0) {
5053 std::ostringstream msg;
5054 msg << "Couldn't create new class 'Wind'";
5055 throw SquirrelError(v, msg.str());
5057 sq_pushstring(v, "start", -1);
5058 sq_newclosure(v, &Wind_start_wrapper, 0);
5059 if(SQ_FAILED(sq_createslot(v, -3))) {
5060 throw SquirrelError(v, "Couldn't register function 'start'");
5063 sq_pushstring(v, "stop", -1);
5064 sq_newclosure(v, &Wind_stop_wrapper, 0);
5065 if(SQ_FAILED(sq_createslot(v, -3))) {
5066 throw SquirrelError(v, "Couldn't register function 'stop'");
5069 if(SQ_FAILED(sq_createslot(v, -3))) {
5070 throw SquirrelError(v, "Couldn't register class 'Wind'");
5073 // Register class AmbientSound
5074 sq_pushstring(v, "AmbientSound", -1);
5075 if(sq_newclass(v, SQFalse) < 0) {
5076 std::ostringstream msg;
5077 msg << "Couldn't create new class 'AmbientSound'";
5078 throw SquirrelError(v, msg.str());
5080 sq_pushstring(v, "set_pos", -1);
5081 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
5082 if(SQ_FAILED(sq_createslot(v, -3))) {
5083 throw SquirrelError(v, "Couldn't register function 'set_pos'");
5086 sq_pushstring(v, "get_pos_x", -1);
5087 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
5088 if(SQ_FAILED(sq_createslot(v, -3))) {
5089 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
5092 sq_pushstring(v, "get_pos_y", -1);
5093 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
5094 if(SQ_FAILED(sq_createslot(v, -3))) {
5095 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
5098 if(SQ_FAILED(sq_createslot(v, -3))) {
5099 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
5102 // Register class Thunderstorm
5103 sq_pushstring(v, "Thunderstorm", -1);
5104 if(sq_newclass(v, SQFalse) < 0) {
5105 std::ostringstream msg;
5106 msg << "Couldn't create new class 'Thunderstorm'";
5107 throw SquirrelError(v, msg.str());
5109 sq_pushstring(v, "start", -1);
5110 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
5111 if(SQ_FAILED(sq_createslot(v, -3))) {
5112 throw SquirrelError(v, "Couldn't register function 'start'");
5115 sq_pushstring(v, "stop", -1);
5116 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
5117 if(SQ_FAILED(sq_createslot(v, -3))) {
5118 throw SquirrelError(v, "Couldn't register function 'stop'");
5121 sq_pushstring(v, "thunder", -1);
5122 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
5123 if(SQ_FAILED(sq_createslot(v, -3))) {
5124 throw SquirrelError(v, "Couldn't register function 'thunder'");
5127 sq_pushstring(v, "lightning", -1);
5128 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
5129 if(SQ_FAILED(sq_createslot(v, -3))) {
5130 throw SquirrelError(v, "Couldn't register function 'lightning'");
5133 sq_pushstring(v, "flash", -1);
5134 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
5135 if(SQ_FAILED(sq_createslot(v, -3))) {
5136 throw SquirrelError(v, "Couldn't register function 'flash'");
5139 sq_pushstring(v, "electrify", -1);
5140 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
5141 if(SQ_FAILED(sq_createslot(v, -3))) {
5142 throw SquirrelError(v, "Couldn't register function 'electrify'");
5145 if(SQ_FAILED(sq_createslot(v, -3))) {
5146 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
5149 // Register class TileMap
5150 sq_pushstring(v, "TileMap", -1);
5151 if(sq_newclass(v, SQFalse) < 0) {
5152 std::ostringstream msg;
5153 msg << "Couldn't create new class 'TileMap'";
5154 throw SquirrelError(v, msg.str());
5156 sq_pushstring(v, "goto_node", -1);
5157 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
5158 if(SQ_FAILED(sq_createslot(v, -3))) {
5159 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5162 sq_pushstring(v, "start_moving", -1);
5163 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
5164 if(SQ_FAILED(sq_createslot(v, -3))) {
5165 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5168 sq_pushstring(v, "stop_moving", -1);
5169 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
5170 if(SQ_FAILED(sq_createslot(v, -3))) {
5171 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5174 sq_pushstring(v, "fade", -1);
5175 sq_newclosure(v, &TileMap_fade_wrapper, 0);
5176 if(SQ_FAILED(sq_createslot(v, -3))) {
5177 throw SquirrelError(v, "Couldn't register function 'fade'");
5180 sq_pushstring(v, "set_alpha", -1);
5181 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
5182 if(SQ_FAILED(sq_createslot(v, -3))) {
5183 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
5186 sq_pushstring(v, "get_alpha", -1);
5187 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
5188 if(SQ_FAILED(sq_createslot(v, -3))) {
5189 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
5192 if(SQ_FAILED(sq_createslot(v, -3))) {
5193 throw SquirrelError(v, "Couldn't register class 'TileMap'");
5196 // Register class SSector
5197 sq_pushstring(v, "SSector", -1);
5198 if(sq_newclass(v, SQFalse) < 0) {
5199 std::ostringstream msg;
5200 msg << "Couldn't create new class 'SSector'";
5201 throw SquirrelError(v, msg.str());
5203 sq_pushstring(v, "set_ambient_light", -1);
5204 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
5205 if(SQ_FAILED(sq_createslot(v, -3))) {
5206 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
5209 sq_pushstring(v, "get_ambient_red", -1);
5210 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
5211 if(SQ_FAILED(sq_createslot(v, -3))) {
5212 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
5215 sq_pushstring(v, "get_ambient_green", -1);
5216 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
5217 if(SQ_FAILED(sq_createslot(v, -3))) {
5218 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
5221 sq_pushstring(v, "get_ambient_blue", -1);
5222 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
5223 if(SQ_FAILED(sq_createslot(v, -3))) {
5224 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
5227 sq_pushstring(v, "set_gravity", -1);
5228 sq_newclosure(v, &SSector_set_gravity_wrapper, 0);
5229 if(SQ_FAILED(sq_createslot(v, -3))) {
5230 throw SquirrelError(v, "Couldn't register function 'set_gravity'");
5233 if(SQ_FAILED(sq_createslot(v, -3))) {
5234 throw SquirrelError(v, "Couldn't register class 'SSector'");
5237 // Register class LevelTime
5238 sq_pushstring(v, "LevelTime", -1);
5239 if(sq_newclass(v, SQFalse) < 0) {
5240 std::ostringstream msg;
5241 msg << "Couldn't create new class 'LevelTime'";
5242 throw SquirrelError(v, msg.str());
5244 sq_pushstring(v, "start", -1);
5245 sq_newclosure(v, &LevelTime_start_wrapper, 0);
5246 if(SQ_FAILED(sq_createslot(v, -3))) {
5247 throw SquirrelError(v, "Couldn't register function 'start'");
5250 sq_pushstring(v, "stop", -1);
5251 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
5252 if(SQ_FAILED(sq_createslot(v, -3))) {
5253 throw SquirrelError(v, "Couldn't register function 'stop'");
5256 sq_pushstring(v, "get_time", -1);
5257 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
5258 if(SQ_FAILED(sq_createslot(v, -3))) {
5259 throw SquirrelError(v, "Couldn't register function 'get_time'");
5262 sq_pushstring(v, "set_time", -1);
5263 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
5264 if(SQ_FAILED(sq_createslot(v, -3))) {
5265 throw SquirrelError(v, "Couldn't register function 'set_time'");
5268 if(SQ_FAILED(sq_createslot(v, -3))) {
5269 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
5272 // Register class WillOWisp
5273 sq_pushstring(v, "WillOWisp", -1);
5274 if(sq_newclass(v, SQFalse) < 0) {
5275 std::ostringstream msg;
5276 msg << "Couldn't create new class 'WillOWisp'";
5277 throw SquirrelError(v, msg.str());
5279 sq_pushstring(v, "goto_node", -1);
5280 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
5281 if(SQ_FAILED(sq_createslot(v, -3))) {
5282 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5285 sq_pushstring(v, "set_state", -1);
5286 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
5287 if(SQ_FAILED(sq_createslot(v, -3))) {
5288 throw SquirrelError(v, "Couldn't register function 'set_state'");
5291 sq_pushstring(v, "start_moving", -1);
5292 sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
5293 if(SQ_FAILED(sq_createslot(v, -3))) {
5294 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5297 sq_pushstring(v, "stop_moving", -1);
5298 sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
5299 if(SQ_FAILED(sq_createslot(v, -3))) {
5300 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5303 if(SQ_FAILED(sq_createslot(v, -3))) {
5304 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
5309 } // end of namespace Scripting