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_shake_wrapper(HSQUIRRELVM vm)
208 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
209 sq_throwerror(vm, _SC("'shake' called without instance"));
212 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
214 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
215 sq_throwerror(vm, _SC("Argument 1 not a float"));
219 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
220 sq_throwerror(vm, _SC("Argument 2 not a float"));
224 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
225 sq_throwerror(vm, _SC("Argument 3 not a float"));
230 _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
234 } catch(std::exception& e) {
235 sq_throwerror(vm, e.what());
238 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
244 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
247 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
248 sq_throwerror(vm, _SC("'set_pos' called without instance"));
251 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
253 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
254 sq_throwerror(vm, _SC("Argument 1 not a float"));
258 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
259 sq_throwerror(vm, _SC("Argument 2 not a float"));
264 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
268 } catch(std::exception& e) {
269 sq_throwerror(vm, e.what());
272 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
278 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
281 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
282 sq_throwerror(vm, _SC("'set_mode' called without instance"));
285 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
287 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
288 sq_throwerror(vm, _SC("Argument 1 not a string"));
293 _this->set_mode(arg0);
297 } catch(std::exception& e) {
298 sq_throwerror(vm, e.what());
301 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
307 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
310 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
311 sq_throwerror(vm, _SC("'scroll_to' called without instance"));
314 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
316 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
317 sq_throwerror(vm, _SC("Argument 1 not a float"));
321 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
322 sq_throwerror(vm, _SC("Argument 2 not a float"));
326 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
327 sq_throwerror(vm, _SC("Argument 3 not a float"));
332 _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
336 } catch(std::exception& e) {
337 sq_throwerror(vm, e.what());
340 sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
346 static SQInteger Level_release_hook(SQUserPointer ptr, SQInteger )
348 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (ptr);
353 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
356 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
357 sq_throwerror(vm, _SC("'finish' called without instance"));
360 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
362 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
363 sq_throwerror(vm, _SC("Argument 1 not a bool"));
368 _this->finish(arg0 == SQTrue);
372 } catch(std::exception& e) {
373 sq_throwerror(vm, e.what());
376 sq_throwerror(vm, _SC("Unexpected exception while executing function 'finish'"));
382 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
385 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
386 sq_throwerror(vm, _SC("'spawn' called without instance"));
389 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
391 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
392 sq_throwerror(vm, _SC("Argument 1 not a string"));
396 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
397 sq_throwerror(vm, _SC("Argument 2 not a string"));
402 _this->spawn(arg0, arg1);
406 } catch(std::exception& e) {
407 sq_throwerror(vm, e.what());
410 sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn'"));
416 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
419 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
420 sq_throwerror(vm, _SC("'flip_vertically' called without instance"));
423 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
426 _this->flip_vertically();
430 } catch(std::exception& e) {
431 sq_throwerror(vm, e.what());
434 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flip_vertically'"));
440 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
443 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
444 sq_throwerror(vm, _SC("'toggle_pause' called without instance"));
447 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (data);
450 _this->toggle_pause();
454 } catch(std::exception& e) {
455 sq_throwerror(vm, e.what());
458 sq_throwerror(vm, _SC("Unexpected exception while executing function 'toggle_pause'"));
464 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
466 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
471 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
474 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
475 sq_throwerror(vm, _SC("'set_action' called without instance"));
478 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
480 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
481 sq_throwerror(vm, _SC("Argument 1 not a string"));
486 _this->set_action(arg0);
490 } catch(std::exception& e) {
491 sq_throwerror(vm, e.what());
494 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
500 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
503 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
504 sq_throwerror(vm, _SC("'get_action' called without instance"));
507 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
510 std::string return_value = _this->get_action();
512 sq_pushstring(vm, return_value.c_str(), return_value.size());
515 } catch(std::exception& e) {
516 sq_throwerror(vm, e.what());
519 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
525 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
528 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
529 sq_throwerror(vm, _SC("'move' called without instance"));
532 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
534 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
535 sq_throwerror(vm, _SC("Argument 1 not a float"));
539 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
540 sq_throwerror(vm, _SC("Argument 2 not a float"));
545 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
549 } catch(std::exception& e) {
550 sq_throwerror(vm, e.what());
553 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
559 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
562 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
563 sq_throwerror(vm, _SC("'set_pos' called without instance"));
566 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
568 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
569 sq_throwerror(vm, _SC("Argument 1 not a float"));
573 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
574 sq_throwerror(vm, _SC("Argument 2 not a float"));
579 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
583 } catch(std::exception& e) {
584 sq_throwerror(vm, e.what());
587 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
593 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
596 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
597 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
600 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
603 float return_value = _this->get_pos_x();
605 sq_pushfloat(vm, return_value);
608 } catch(std::exception& e) {
609 sq_throwerror(vm, e.what());
612 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
618 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
621 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
622 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
625 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
628 float return_value = _this->get_pos_y();
630 sq_pushfloat(vm, return_value);
633 } catch(std::exception& e) {
634 sq_throwerror(vm, e.what());
637 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
643 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
646 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
647 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
650 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
652 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
653 sq_throwerror(vm, _SC("Argument 1 not a float"));
657 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
658 sq_throwerror(vm, _SC("Argument 2 not a float"));
663 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
667 } catch(std::exception& e) {
668 sq_throwerror(vm, e.what());
671 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
677 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
680 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
681 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
684 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
687 float return_value = _this->get_velocity_x();
689 sq_pushfloat(vm, return_value);
692 } catch(std::exception& e) {
693 sq_throwerror(vm, e.what());
696 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
702 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
705 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
706 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
709 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
712 float return_value = _this->get_velocity_y();
714 sq_pushfloat(vm, return_value);
717 } catch(std::exception& e) {
718 sq_throwerror(vm, e.what());
721 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
727 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
730 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
731 sq_throwerror(vm, _SC("'set_visible' called without instance"));
734 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
736 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
737 sq_throwerror(vm, _SC("Argument 1 not a bool"));
742 _this->set_visible(arg0 == SQTrue);
746 } catch(std::exception& e) {
747 sq_throwerror(vm, e.what());
750 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
756 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
759 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
760 sq_throwerror(vm, _SC("'is_visible' called without instance"));
763 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
766 bool return_value = _this->is_visible();
768 sq_pushbool(vm, return_value);
771 } catch(std::exception& e) {
772 sq_throwerror(vm, e.what());
775 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
781 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
784 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
785 sq_throwerror(vm, _SC("'set_solid' called without instance"));
788 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
790 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
791 sq_throwerror(vm, _SC("Argument 1 not a bool"));
796 _this->set_solid(arg0 == SQTrue);
800 } catch(std::exception& e) {
801 sq_throwerror(vm, e.what());
804 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
810 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
813 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
814 sq_throwerror(vm, _SC("'is_solid' called without instance"));
817 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
820 bool return_value = _this->is_solid();
822 sq_pushbool(vm, return_value);
825 } catch(std::exception& e) {
826 sq_throwerror(vm, e.what());
829 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
835 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
838 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
839 sq_throwerror(vm, _SC("'get_name' called without instance"));
842 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
845 std::string return_value = _this->get_name();
847 sq_pushstring(vm, return_value.c_str(), return_value.size());
850 } catch(std::exception& e) {
851 sq_throwerror(vm, e.what());
854 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
860 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
862 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
867 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
870 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
871 sq_throwerror(vm, _SC("'set_text' called without instance"));
874 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
876 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
877 sq_throwerror(vm, _SC("Argument 1 not a string"));
882 _this->set_text(arg0);
886 } catch(std::exception& e) {
887 sq_throwerror(vm, e.what());
890 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
896 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
899 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
900 sq_throwerror(vm, _SC("'set_font' called without instance"));
903 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
905 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
906 sq_throwerror(vm, _SC("Argument 1 not a string"));
911 _this->set_font(arg0);
915 } catch(std::exception& e) {
916 sq_throwerror(vm, e.what());
919 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
925 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
928 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
929 sq_throwerror(vm, _SC("'fade_in' called without instance"));
932 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
934 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
935 sq_throwerror(vm, _SC("Argument 1 not a float"));
940 _this->fade_in(static_cast<float> (arg0));
944 } catch(std::exception& e) {
945 sq_throwerror(vm, e.what());
948 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
954 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
957 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
958 sq_throwerror(vm, _SC("'fade_out' called without instance"));
961 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
963 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
964 sq_throwerror(vm, _SC("Argument 1 not a float"));
969 _this->fade_out(static_cast<float> (arg0));
973 } catch(std::exception& e) {
974 sq_throwerror(vm, e.what());
977 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
983 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
986 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
987 sq_throwerror(vm, _SC("'set_visible' called without instance"));
990 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
992 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
993 sq_throwerror(vm, _SC("Argument 1 not a bool"));
998 _this->set_visible(arg0 == SQTrue);
1002 } catch(std::exception& e) {
1003 sq_throwerror(vm, e.what());
1006 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1012 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
1015 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1016 sq_throwerror(vm, _SC("'set_centered' called without instance"));
1019 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
1021 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1022 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1027 _this->set_centered(arg0 == SQTrue);
1031 } catch(std::exception& e) {
1032 sq_throwerror(vm, e.what());
1035 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
1041 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1043 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
1048 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1051 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1052 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1055 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1057 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1058 sq_throwerror(vm, _SC("Argument 1 not a string"));
1063 bool return_value = _this->add_bonus(arg0);
1065 sq_pushbool(vm, return_value);
1068 } catch(std::exception& e) {
1069 sq_throwerror(vm, e.what());
1072 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1078 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1081 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1082 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1085 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1087 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1088 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1093 _this->add_coins(static_cast<int> (arg0));
1097 } catch(std::exception& e) {
1098 sq_throwerror(vm, e.what());
1101 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1107 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1110 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1111 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1114 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1117 _this->make_invincible();
1121 } catch(std::exception& e) {
1122 sq_throwerror(vm, e.what());
1125 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1131 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1134 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1135 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1138 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1141 _this->deactivate();
1145 } catch(std::exception& e) {
1146 sq_throwerror(vm, e.what());
1149 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1155 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1158 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1159 sq_throwerror(vm, _SC("'activate' called without instance"));
1162 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1169 } catch(std::exception& e) {
1170 sq_throwerror(vm, e.what());
1173 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1179 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1182 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1183 sq_throwerror(vm, _SC("'walk' called without instance"));
1186 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1188 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1189 sq_throwerror(vm, _SC("Argument 1 not a float"));
1194 _this->walk(static_cast<float> (arg0));
1198 } catch(std::exception& e) {
1199 sq_throwerror(vm, e.what());
1202 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1208 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1211 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1212 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1215 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1217 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1218 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1223 _this->set_visible(arg0 == SQTrue);
1227 } catch(std::exception& e) {
1228 sq_throwerror(vm, e.what());
1231 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1237 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1240 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1241 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1244 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1247 bool return_value = _this->get_visible();
1249 sq_pushbool(vm, return_value);
1252 } catch(std::exception& e) {
1253 sq_throwerror(vm, e.what());
1256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1262 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1265 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1266 sq_throwerror(vm, _SC("'kill' called without instance"));
1269 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1271 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1272 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1277 _this->kill(arg0 == SQTrue);
1281 } catch(std::exception& e) {
1282 sq_throwerror(vm, e.what());
1285 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1291 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1294 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1295 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1298 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1300 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1301 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1306 _this->set_ghost_mode(arg0 == SQTrue);
1310 } catch(std::exception& e) {
1311 sq_throwerror(vm, e.what());
1314 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1320 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1323 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1324 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1327 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1330 bool return_value = _this->get_ghost_mode();
1332 sq_pushbool(vm, return_value);
1335 } catch(std::exception& e) {
1336 sq_throwerror(vm, e.what());
1339 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1345 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1348 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1349 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1352 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1359 } catch(std::exception& e) {
1360 sq_throwerror(vm, e.what());
1363 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1369 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1372 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1373 sq_throwerror(vm, _SC("'do_duck' called without instance"));
1376 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1383 } catch(std::exception& e) {
1384 sq_throwerror(vm, e.what());
1387 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1393 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1396 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1397 sq_throwerror(vm, _SC("'do_standup' called without instance"));
1400 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1403 _this->do_standup();
1407 } catch(std::exception& e) {
1408 sq_throwerror(vm, e.what());
1411 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1417 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1420 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1421 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1424 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1427 _this->do_backflip();
1431 } catch(std::exception& e) {
1432 sq_throwerror(vm, e.what());
1435 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1441 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1444 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1445 sq_throwerror(vm, _SC("'do_jump' called without instance"));
1448 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1450 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1451 sq_throwerror(vm, _SC("Argument 1 not a float"));
1456 _this->do_jump(static_cast<float> (arg0));
1460 } catch(std::exception& e) {
1461 sq_throwerror(vm, e.what());
1464 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1470 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1473 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1474 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1477 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
1479 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1480 sq_throwerror(vm, _SC("Argument 1 not a string"));
1485 _this->trigger_sequence(arg0);
1489 } catch(std::exception& e) {
1490 sq_throwerror(vm, e.what());
1493 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1499 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
1501 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
1506 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
1509 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1510 sq_throwerror(vm, _SC("Argument 1 not a string"));
1515 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
1516 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
1517 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
1520 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
1524 } catch(std::exception& e) {
1525 sq_throwerror(vm, e.what());
1528 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
1534 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
1537 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1538 sq_throwerror(vm, _SC("'set_layer' called without instance"));
1541 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1543 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1544 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1549 _this->set_layer(static_cast<int> (arg0));
1553 } catch(std::exception& e) {
1554 sq_throwerror(vm, e.what());
1557 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
1563 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
1566 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1567 sq_throwerror(vm, _SC("'get_layer' called without instance"));
1570 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1573 int return_value = _this->get_layer();
1575 sq_pushinteger(vm, return_value);
1578 } catch(std::exception& e) {
1579 sq_throwerror(vm, e.what());
1582 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
1588 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
1591 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1592 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1595 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1597 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1598 sq_throwerror(vm, _SC("Argument 1 not a float"));
1602 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1603 sq_throwerror(vm, _SC("Argument 2 not a float"));
1608 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1612 } catch(std::exception& e) {
1613 sq_throwerror(vm, e.what());
1616 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1622 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
1625 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1626 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1629 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1632 float return_value = _this->get_pos_x();
1634 sq_pushfloat(vm, return_value);
1637 } catch(std::exception& e) {
1638 sq_throwerror(vm, e.what());
1641 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1647 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
1650 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1651 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1654 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1657 float return_value = _this->get_pos_y();
1659 sq_pushfloat(vm, return_value);
1662 } catch(std::exception& e) {
1663 sq_throwerror(vm, e.what());
1666 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1672 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
1675 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1676 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
1679 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1681 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1682 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1687 _this->set_anchor_point(static_cast<int> (arg0));
1691 } catch(std::exception& e) {
1692 sq_throwerror(vm, e.what());
1695 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1701 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1704 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1705 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1708 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1711 int return_value = _this->get_anchor_point();
1713 sq_pushinteger(vm, return_value);
1716 } catch(std::exception& e) {
1717 sq_throwerror(vm, e.what());
1720 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1726 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1729 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1730 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1733 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1735 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1736 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1741 _this->set_visible(arg0 == SQTrue);
1745 } catch(std::exception& e) {
1746 sq_throwerror(vm, e.what());
1749 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1755 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1758 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1759 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1762 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1765 bool return_value = _this->get_visible();
1767 sq_pushbool(vm, return_value);
1770 } catch(std::exception& e) {
1771 sq_throwerror(vm, e.what());
1774 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1780 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
1783 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1784 sq_throwerror(vm, _SC("'set_action' called without instance"));
1787 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1789 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1790 sq_throwerror(vm, _SC("Argument 1 not a string"));
1795 _this->set_action(arg0);
1799 } catch(std::exception& e) {
1800 sq_throwerror(vm, e.what());
1803 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1809 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
1812 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1813 sq_throwerror(vm, _SC("'get_action' called without instance"));
1816 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1819 std::string return_value = _this->get_action();
1821 sq_pushstring(vm, return_value.c_str(), return_value.size());
1824 } catch(std::exception& e) {
1825 sq_throwerror(vm, e.what());
1828 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1834 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
1837 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1838 sq_throwerror(vm, _SC("'fade_in' called without instance"));
1841 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1843 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1844 sq_throwerror(vm, _SC("Argument 1 not a float"));
1849 _this->fade_in(static_cast<float> (arg0));
1853 } catch(std::exception& e) {
1854 sq_throwerror(vm, e.what());
1857 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
1863 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
1866 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1867 sq_throwerror(vm, _SC("'fade_out' called without instance"));
1870 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
1872 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1873 sq_throwerror(vm, _SC("Argument 1 not a float"));
1878 _this->fade_out(static_cast<float> (arg0));
1882 } catch(std::exception& e) {
1883 sq_throwerror(vm, e.what());
1886 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1892 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
1894 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
1899 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
1902 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1903 sq_throwerror(vm, _SC("'goto_node' called without instance"));
1906 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1908 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1909 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1914 _this->goto_node(static_cast<int> (arg0));
1918 } catch(std::exception& e) {
1919 sq_throwerror(vm, e.what());
1922 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
1928 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
1931 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1932 sq_throwerror(vm, _SC("'start_moving' called without instance"));
1935 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1938 _this->start_moving();
1942 } catch(std::exception& e) {
1943 sq_throwerror(vm, e.what());
1946 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
1952 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
1955 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1956 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
1959 Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
1962 _this->stop_moving();
1966 } catch(std::exception& e) {
1967 sq_throwerror(vm, e.what());
1970 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
1976 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
1978 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
1983 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
1986 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
1987 sq_throwerror(vm, _SC("'get_burning' called without instance"));
1990 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
1993 bool return_value = _this->get_burning();
1995 sq_pushbool(vm, return_value);
1998 } catch(std::exception& e) {
1999 sq_throwerror(vm, e.what());
2002 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
2008 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
2011 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2012 sq_throwerror(vm, _SC("'set_burning' called without instance"));
2015 Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
2017 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2018 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2023 _this->set_burning(arg0 == SQTrue);
2027 } catch(std::exception& e) {
2028 sq_throwerror(vm, e.what());
2031 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
2037 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
2039 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
2044 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
2047 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2048 sq_throwerror(vm, _SC("'start' called without instance"));
2051 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2058 } catch(std::exception& e) {
2059 sq_throwerror(vm, e.what());
2062 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2068 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
2071 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2072 sq_throwerror(vm, _SC("'stop' called without instance"));
2075 Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
2082 } catch(std::exception& e) {
2083 sq_throwerror(vm, e.what());
2086 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2092 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
2094 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
2099 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
2102 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2103 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2106 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2108 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2109 sq_throwerror(vm, _SC("Argument 1 not a float"));
2113 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2114 sq_throwerror(vm, _SC("Argument 2 not a float"));
2119 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2123 } catch(std::exception& e) {
2124 sq_throwerror(vm, e.what());
2127 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2133 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
2136 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2137 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2140 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2143 float return_value = _this->get_pos_x();
2145 sq_pushfloat(vm, return_value);
2148 } catch(std::exception& e) {
2149 sq_throwerror(vm, e.what());
2152 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2158 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
2161 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2162 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2165 Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
2168 float return_value = _this->get_pos_y();
2170 sq_pushfloat(vm, return_value);
2173 } catch(std::exception& e) {
2174 sq_throwerror(vm, e.what());
2177 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2183 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2185 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
2190 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2193 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2194 sq_throwerror(vm, _SC("'start' called without instance"));
2197 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2204 } catch(std::exception& e) {
2205 sq_throwerror(vm, e.what());
2208 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2214 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2217 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2218 sq_throwerror(vm, _SC("'stop' called without instance"));
2221 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2228 } catch(std::exception& e) {
2229 sq_throwerror(vm, e.what());
2232 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2238 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2241 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2242 sq_throwerror(vm, _SC("'thunder' called without instance"));
2245 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2252 } catch(std::exception& e) {
2253 sq_throwerror(vm, e.what());
2256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2262 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2265 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2266 sq_throwerror(vm, _SC("'lightning' called without instance"));
2269 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2276 } catch(std::exception& e) {
2277 sq_throwerror(vm, e.what());
2280 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2286 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2289 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2290 sq_throwerror(vm, _SC("'flash' called without instance"));
2293 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2300 } catch(std::exception& e) {
2301 sq_throwerror(vm, e.what());
2304 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2310 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2313 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2314 sq_throwerror(vm, _SC("'electrify' called without instance"));
2317 Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
2324 } catch(std::exception& e) {
2325 sq_throwerror(vm, e.what());
2328 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2334 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2336 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
2341 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2344 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2345 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2348 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2350 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2351 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2356 _this->goto_node(static_cast<int> (arg0));
2360 } catch(std::exception& e) {
2361 sq_throwerror(vm, e.what());
2364 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2370 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2373 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2374 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2377 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2380 _this->start_moving();
2384 } catch(std::exception& e) {
2385 sq_throwerror(vm, e.what());
2388 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2394 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2397 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2398 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2401 Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
2404 _this->stop_moving();
2408 } catch(std::exception& e) {
2409 sq_throwerror(vm, e.what());
2412 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2418 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2420 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
2425 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2428 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2429 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2432 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2434 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2435 sq_throwerror(vm, _SC("Argument 1 not a float"));
2439 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2440 sq_throwerror(vm, _SC("Argument 2 not a float"));
2444 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2445 sq_throwerror(vm, _SC("Argument 3 not a float"));
2450 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2454 } catch(std::exception& e) {
2455 sq_throwerror(vm, e.what());
2458 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2464 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2467 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2468 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2471 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2474 float return_value = _this->get_ambient_red();
2476 sq_pushfloat(vm, return_value);
2479 } catch(std::exception& e) {
2480 sq_throwerror(vm, e.what());
2483 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2489 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2492 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2493 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2496 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2499 float return_value = _this->get_ambient_green();
2501 sq_pushfloat(vm, return_value);
2504 } catch(std::exception& e) {
2505 sq_throwerror(vm, e.what());
2508 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2514 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2517 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2518 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2521 Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
2524 float return_value = _this->get_ambient_blue();
2526 sq_pushfloat(vm, return_value);
2529 } catch(std::exception& e) {
2530 sq_throwerror(vm, e.what());
2533 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2539 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
2541 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
2546 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
2549 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2550 sq_throwerror(vm, _SC("'start' called without instance"));
2553 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2560 } catch(std::exception& e) {
2561 sq_throwerror(vm, e.what());
2564 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2570 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
2573 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2574 sq_throwerror(vm, _SC("'stop' called without instance"));
2577 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2584 } catch(std::exception& e) {
2585 sq_throwerror(vm, e.what());
2588 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2594 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
2597 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2598 sq_throwerror(vm, _SC("'get_time' called without instance"));
2601 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2604 float return_value = _this->get_time();
2606 sq_pushfloat(vm, return_value);
2609 } catch(std::exception& e) {
2610 sq_throwerror(vm, e.what());
2613 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
2619 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
2622 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {
2623 sq_throwerror(vm, _SC("'set_time' called without instance"));
2626 Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
2628 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2629 sq_throwerror(vm, _SC("Argument 1 not a float"));
2634 _this->set_time(static_cast<float> (arg0));
2638 } catch(std::exception& e) {
2639 sq_throwerror(vm, e.what());
2642 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
2648 static SQInteger display_wrapper(HSQUIRRELVM vm)
2650 return Scripting::display(vm);
2653 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
2655 HSQUIRRELVM arg0 = vm;
2658 Scripting::print_stacktrace(arg0);
2662 } catch(std::exception& e) {
2663 sq_throwerror(vm, e.what());
2666 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
2672 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
2674 return Scripting::get_current_thread(vm);
2677 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
2680 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2681 sq_throwerror(vm, _SC("Argument 1 not a string"));
2686 Scripting::display_text_file(arg0);
2690 } catch(std::exception& e) {
2691 sq_throwerror(vm, e.what());
2694 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
2700 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
2703 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2704 sq_throwerror(vm, _SC("Argument 1 not a string"));
2709 Scripting::load_worldmap(arg0);
2713 } catch(std::exception& e) {
2714 sq_throwerror(vm, e.what());
2717 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
2723 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
2726 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2727 sq_throwerror(vm, _SC("Argument 1 not a string"));
2732 Scripting::load_level(arg0);
2736 } catch(std::exception& e) {
2737 sq_throwerror(vm, e.what());
2740 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
2746 static SQInteger wait_wrapper(HSQUIRRELVM vm)
2748 HSQUIRRELVM arg0 = vm;
2750 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
2751 sq_throwerror(vm, _SC("Argument 1 not a float"));
2756 Scripting::wait(arg0, static_cast<float> (arg1));
2758 return sq_suspendvm(vm);
2760 } catch(std::exception& e) {
2761 sq_throwerror(vm, e.what());
2764 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
2770 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
2772 HSQUIRRELVM arg0 = vm;
2775 Scripting::wait_for_screenswitch(arg0);
2777 return sq_suspendvm(vm);
2779 } catch(std::exception& e) {
2780 sq_throwerror(vm, e.what());
2783 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
2789 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
2794 Scripting::exit_screen();
2798 } catch(std::exception& e) {
2799 sq_throwerror(vm, e.what());
2802 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
2808 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
2811 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2812 sq_throwerror(vm, _SC("Argument 1 not a float"));
2817 Scripting::fadeout_screen(static_cast<float> (arg0));
2821 } catch(std::exception& e) {
2822 sq_throwerror(vm, e.what());
2825 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
2831 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
2834 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2835 sq_throwerror(vm, _SC("Argument 1 not a float"));
2839 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2840 sq_throwerror(vm, _SC("Argument 2 not a float"));
2844 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2845 sq_throwerror(vm, _SC("Argument 3 not a float"));
2850 Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2854 } catch(std::exception& e) {
2855 sq_throwerror(vm, e.what());
2858 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
2864 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
2869 Scripting::abort_screenfade();
2873 } catch(std::exception& e) {
2874 sq_throwerror(vm, e.what());
2877 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
2883 static SQInteger translate_wrapper(HSQUIRRELVM vm)
2886 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2887 sq_throwerror(vm, _SC("Argument 1 not a string"));
2892 std::string return_value = Scripting::translate(arg0);
2894 sq_pushstring(vm, return_value.c_str(), return_value.size());
2897 } catch(std::exception& e) {
2898 sq_throwerror(vm, e.what());
2901 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
2907 static SQInteger import_wrapper(HSQUIRRELVM vm)
2909 HSQUIRRELVM arg0 = vm;
2911 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
2912 sq_throwerror(vm, _SC("Argument 1 not a string"));
2917 Scripting::import(arg0, arg1);
2921 } catch(std::exception& e) {
2922 sq_throwerror(vm, e.what());
2925 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
2931 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
2936 Scripting::save_state();
2940 } catch(std::exception& e) {
2941 sq_throwerror(vm, e.what());
2944 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
2950 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
2955 Scripting::update_worldmap();
2959 } catch(std::exception& e) {
2960 sq_throwerror(vm, e.what());
2963 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
2969 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
2972 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2973 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2978 Scripting::debug_collrects(arg0 == SQTrue);
2982 } catch(std::exception& e) {
2983 sq_throwerror(vm, e.what());
2986 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
2992 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
2995 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2996 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3001 Scripting::debug_show_fps(arg0 == SQTrue);
3005 } catch(std::exception& e) {
3006 sq_throwerror(vm, e.what());
3009 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3015 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3018 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3019 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3024 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3028 } catch(std::exception& e) {
3029 sq_throwerror(vm, e.what());
3032 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3038 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3041 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3042 sq_throwerror(vm, _SC("Argument 1 not a string"));
3047 Scripting::play_music(arg0);
3051 } catch(std::exception& e) {
3052 sq_throwerror(vm, e.what());
3055 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3061 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3064 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3065 sq_throwerror(vm, _SC("Argument 1 not a string"));
3070 Scripting::play_sound(arg0);
3074 } catch(std::exception& e) {
3075 sq_throwerror(vm, e.what());
3078 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3084 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3089 Scripting::grease();
3093 } catch(std::exception& e) {
3094 sq_throwerror(vm, e.what());
3097 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3103 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3108 Scripting::invincible();
3112 } catch(std::exception& e) {
3113 sq_throwerror(vm, e.what());
3116 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3122 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3131 } catch(std::exception& e) {
3132 sq_throwerror(vm, e.what());
3135 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3141 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3146 Scripting::mortal();
3150 } catch(std::exception& e) {
3151 sq_throwerror(vm, e.what());
3154 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3160 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3165 Scripting::restart();
3169 } catch(std::exception& e) {
3170 sq_throwerror(vm, e.what());
3173 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3179 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3184 Scripting::whereami();
3188 } catch(std::exception& e) {
3189 sq_throwerror(vm, e.what());
3192 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3198 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3203 Scripting::gotoend();
3207 } catch(std::exception& e) {
3208 sq_throwerror(vm, e.what());
3211 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3217 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3222 Scripting::camera();
3226 } catch(std::exception& e) {
3227 sq_throwerror(vm, e.what());
3230 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3236 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3245 } catch(std::exception& e) {
3246 sq_throwerror(vm, e.what());
3249 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3255 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3259 int return_value = Scripting::rand();
3261 sq_pushinteger(vm, return_value);
3264 } catch(std::exception& e) {
3265 sq_throwerror(vm, e.what());
3268 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3274 } // end of namespace Wrapper
3275 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3277 using namespace Wrapper;
3279 sq_pushroottable(v);
3280 sq_pushstring(v, "DisplayEffect", -1);
3281 if(SQ_FAILED(sq_get(v, -2))) {
3282 std::ostringstream msg;
3283 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3284 throw SquirrelError(v, msg.str());
3287 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3288 std::ostringstream msg;
3289 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3290 throw SquirrelError(v, msg.str());
3292 sq_remove(v, -2); // remove object name
3294 if(setup_releasehook) {
3295 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3298 sq_remove(v, -2); // remove root table
3301 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3303 using namespace Wrapper;
3305 sq_pushroottable(v);
3306 sq_pushstring(v, "Camera", -1);
3307 if(SQ_FAILED(sq_get(v, -2))) {
3308 std::ostringstream msg;
3309 msg << "Couldn't resolved squirrel type 'Camera'";
3310 throw SquirrelError(v, msg.str());
3313 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3314 std::ostringstream msg;
3315 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3316 throw SquirrelError(v, msg.str());
3318 sq_remove(v, -2); // remove object name
3320 if(setup_releasehook) {
3321 sq_setreleasehook(v, -1, Camera_release_hook);
3324 sq_remove(v, -2); // remove root table
3327 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3329 using namespace Wrapper;
3331 sq_pushroottable(v);
3332 sq_pushstring(v, "Level", -1);
3333 if(SQ_FAILED(sq_get(v, -2))) {
3334 std::ostringstream msg;
3335 msg << "Couldn't resolved squirrel type 'Level'";
3336 throw SquirrelError(v, msg.str());
3339 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3340 std::ostringstream msg;
3341 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3342 throw SquirrelError(v, msg.str());
3344 sq_remove(v, -2); // remove object name
3346 if(setup_releasehook) {
3347 sq_setreleasehook(v, -1, Level_release_hook);
3350 sq_remove(v, -2); // remove root table
3353 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3355 using namespace Wrapper;
3357 sq_pushroottable(v);
3358 sq_pushstring(v, "ScriptedObject", -1);
3359 if(SQ_FAILED(sq_get(v, -2))) {
3360 std::ostringstream msg;
3361 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3362 throw SquirrelError(v, msg.str());
3365 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3366 std::ostringstream msg;
3367 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3368 throw SquirrelError(v, msg.str());
3370 sq_remove(v, -2); // remove object name
3372 if(setup_releasehook) {
3373 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3376 sq_remove(v, -2); // remove root table
3379 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3381 using namespace Wrapper;
3383 sq_pushroottable(v);
3384 sq_pushstring(v, "Text", -1);
3385 if(SQ_FAILED(sq_get(v, -2))) {
3386 std::ostringstream msg;
3387 msg << "Couldn't resolved squirrel type 'Text'";
3388 throw SquirrelError(v, msg.str());
3391 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3392 std::ostringstream msg;
3393 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3394 throw SquirrelError(v, msg.str());
3396 sq_remove(v, -2); // remove object name
3398 if(setup_releasehook) {
3399 sq_setreleasehook(v, -1, Text_release_hook);
3402 sq_remove(v, -2); // remove root table
3405 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3407 using namespace Wrapper;
3409 sq_pushroottable(v);
3410 sq_pushstring(v, "Player", -1);
3411 if(SQ_FAILED(sq_get(v, -2))) {
3412 std::ostringstream msg;
3413 msg << "Couldn't resolved squirrel type 'Player'";
3414 throw SquirrelError(v, msg.str());
3417 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3418 std::ostringstream msg;
3419 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3420 throw SquirrelError(v, msg.str());
3422 sq_remove(v, -2); // remove object name
3424 if(setup_releasehook) {
3425 sq_setreleasehook(v, -1, Player_release_hook);
3428 sq_remove(v, -2); // remove root table
3431 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3433 using namespace Wrapper;
3435 sq_pushroottable(v);
3436 sq_pushstring(v, "FloatingImage", -1);
3437 if(SQ_FAILED(sq_get(v, -2))) {
3438 std::ostringstream msg;
3439 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3440 throw SquirrelError(v, msg.str());
3443 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3444 std::ostringstream msg;
3445 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3446 throw SquirrelError(v, msg.str());
3448 sq_remove(v, -2); // remove object name
3450 if(setup_releasehook) {
3451 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3454 sq_remove(v, -2); // remove root table
3457 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3459 using namespace Wrapper;
3461 sq_pushroottable(v);
3462 sq_pushstring(v, "Platform", -1);
3463 if(SQ_FAILED(sq_get(v, -2))) {
3464 std::ostringstream msg;
3465 msg << "Couldn't resolved squirrel type 'Platform'";
3466 throw SquirrelError(v, msg.str());
3469 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3470 std::ostringstream msg;
3471 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3472 throw SquirrelError(v, msg.str());
3474 sq_remove(v, -2); // remove object name
3476 if(setup_releasehook) {
3477 sq_setreleasehook(v, -1, Platform_release_hook);
3480 sq_remove(v, -2); // remove root table
3483 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3485 using namespace Wrapper;
3487 sq_pushroottable(v);
3488 sq_pushstring(v, "Candle", -1);
3489 if(SQ_FAILED(sq_get(v, -2))) {
3490 std::ostringstream msg;
3491 msg << "Couldn't resolved squirrel type 'Candle'";
3492 throw SquirrelError(v, msg.str());
3495 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3496 std::ostringstream msg;
3497 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3498 throw SquirrelError(v, msg.str());
3500 sq_remove(v, -2); // remove object name
3502 if(setup_releasehook) {
3503 sq_setreleasehook(v, -1, Candle_release_hook);
3506 sq_remove(v, -2); // remove root table
3509 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3511 using namespace Wrapper;
3513 sq_pushroottable(v);
3514 sq_pushstring(v, "Wind", -1);
3515 if(SQ_FAILED(sq_get(v, -2))) {
3516 std::ostringstream msg;
3517 msg << "Couldn't resolved squirrel type 'Wind'";
3518 throw SquirrelError(v, msg.str());
3521 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3522 std::ostringstream msg;
3523 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3524 throw SquirrelError(v, msg.str());
3526 sq_remove(v, -2); // remove object name
3528 if(setup_releasehook) {
3529 sq_setreleasehook(v, -1, Wind_release_hook);
3532 sq_remove(v, -2); // remove root table
3535 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3537 using namespace Wrapper;
3539 sq_pushroottable(v);
3540 sq_pushstring(v, "AmbientSound", -1);
3541 if(SQ_FAILED(sq_get(v, -2))) {
3542 std::ostringstream msg;
3543 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3544 throw SquirrelError(v, msg.str());
3547 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3548 std::ostringstream msg;
3549 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3550 throw SquirrelError(v, msg.str());
3552 sq_remove(v, -2); // remove object name
3554 if(setup_releasehook) {
3555 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3558 sq_remove(v, -2); // remove root table
3561 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3563 using namespace Wrapper;
3565 sq_pushroottable(v);
3566 sq_pushstring(v, "Thunderstorm", -1);
3567 if(SQ_FAILED(sq_get(v, -2))) {
3568 std::ostringstream msg;
3569 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3570 throw SquirrelError(v, msg.str());
3573 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3574 std::ostringstream msg;
3575 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3576 throw SquirrelError(v, msg.str());
3578 sq_remove(v, -2); // remove object name
3580 if(setup_releasehook) {
3581 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3584 sq_remove(v, -2); // remove root table
3587 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3589 using namespace Wrapper;
3591 sq_pushroottable(v);
3592 sq_pushstring(v, "TileMap", -1);
3593 if(SQ_FAILED(sq_get(v, -2))) {
3594 std::ostringstream msg;
3595 msg << "Couldn't resolved squirrel type 'TileMap'";
3596 throw SquirrelError(v, msg.str());
3599 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3600 std::ostringstream msg;
3601 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3602 throw SquirrelError(v, msg.str());
3604 sq_remove(v, -2); // remove object name
3606 if(setup_releasehook) {
3607 sq_setreleasehook(v, -1, TileMap_release_hook);
3610 sq_remove(v, -2); // remove root table
3613 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3615 using namespace Wrapper;
3617 sq_pushroottable(v);
3618 sq_pushstring(v, "SSector", -1);
3619 if(SQ_FAILED(sq_get(v, -2))) {
3620 std::ostringstream msg;
3621 msg << "Couldn't resolved squirrel type 'SSector'";
3622 throw SquirrelError(v, msg.str());
3625 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3626 std::ostringstream msg;
3627 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3628 throw SquirrelError(v, msg.str());
3630 sq_remove(v, -2); // remove object name
3632 if(setup_releasehook) {
3633 sq_setreleasehook(v, -1, SSector_release_hook);
3636 sq_remove(v, -2); // remove root table
3639 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3641 using namespace Wrapper;
3643 sq_pushroottable(v);
3644 sq_pushstring(v, "LevelTime", -1);
3645 if(SQ_FAILED(sq_get(v, -2))) {
3646 std::ostringstream msg;
3647 msg << "Couldn't resolved squirrel type 'LevelTime'";
3648 throw SquirrelError(v, msg.str());
3651 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3652 std::ostringstream msg;
3653 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3654 throw SquirrelError(v, msg.str());
3656 sq_remove(v, -2); // remove object name
3658 if(setup_releasehook) {
3659 sq_setreleasehook(v, -1, LevelTime_release_hook);
3662 sq_remove(v, -2); // remove root table
3665 void register_supertux_wrapper(HSQUIRRELVM v)
3667 using namespace Wrapper;
3669 sq_pushstring(v, "ANCHOR_TOP", -1);
3670 sq_pushinteger(v, 16);
3671 if(SQ_FAILED(sq_createslot(v, -3))) {
3672 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
3675 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
3676 sq_pushinteger(v, 32);
3677 if(SQ_FAILED(sq_createslot(v, -3))) {
3678 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
3681 sq_pushstring(v, "ANCHOR_LEFT", -1);
3682 sq_pushinteger(v, 1);
3683 if(SQ_FAILED(sq_createslot(v, -3))) {
3684 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
3687 sq_pushstring(v, "ANCHOR_RIGHT", -1);
3688 sq_pushinteger(v, 2);
3689 if(SQ_FAILED(sq_createslot(v, -3))) {
3690 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
3693 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
3694 sq_pushinteger(v, 0);
3695 if(SQ_FAILED(sq_createslot(v, -3))) {
3696 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
3699 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
3700 sq_pushinteger(v, 17);
3701 if(SQ_FAILED(sq_createslot(v, -3))) {
3702 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
3705 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
3706 sq_pushinteger(v, 18);
3707 if(SQ_FAILED(sq_createslot(v, -3))) {
3708 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
3711 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
3712 sq_pushinteger(v, 33);
3713 if(SQ_FAILED(sq_createslot(v, -3))) {
3714 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
3717 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
3718 sq_pushinteger(v, 34);
3719 if(SQ_FAILED(sq_createslot(v, -3))) {
3720 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
3723 sq_pushstring(v, "display", -1);
3724 sq_newclosure(v, &display_wrapper, 0);
3725 if(SQ_FAILED(sq_createslot(v, -3))) {
3726 throw SquirrelError(v, "Couldn't register function 'display'");
3729 sq_pushstring(v, "print_stacktrace", -1);
3730 sq_newclosure(v, &print_stacktrace_wrapper, 0);
3731 if(SQ_FAILED(sq_createslot(v, -3))) {
3732 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
3735 sq_pushstring(v, "get_current_thread", -1);
3736 sq_newclosure(v, &get_current_thread_wrapper, 0);
3737 if(SQ_FAILED(sq_createslot(v, -3))) {
3738 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
3741 sq_pushstring(v, "display_text_file", -1);
3742 sq_newclosure(v, &display_text_file_wrapper, 0);
3743 if(SQ_FAILED(sq_createslot(v, -3))) {
3744 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
3747 sq_pushstring(v, "load_worldmap", -1);
3748 sq_newclosure(v, &load_worldmap_wrapper, 0);
3749 if(SQ_FAILED(sq_createslot(v, -3))) {
3750 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
3753 sq_pushstring(v, "load_level", -1);
3754 sq_newclosure(v, &load_level_wrapper, 0);
3755 if(SQ_FAILED(sq_createslot(v, -3))) {
3756 throw SquirrelError(v, "Couldn't register function 'load_level'");
3759 sq_pushstring(v, "wait", -1);
3760 sq_newclosure(v, &wait_wrapper, 0);
3761 if(SQ_FAILED(sq_createslot(v, -3))) {
3762 throw SquirrelError(v, "Couldn't register function 'wait'");
3765 sq_pushstring(v, "wait_for_screenswitch", -1);
3766 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
3767 if(SQ_FAILED(sq_createslot(v, -3))) {
3768 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
3771 sq_pushstring(v, "exit_screen", -1);
3772 sq_newclosure(v, &exit_screen_wrapper, 0);
3773 if(SQ_FAILED(sq_createslot(v, -3))) {
3774 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
3777 sq_pushstring(v, "fadeout_screen", -1);
3778 sq_newclosure(v, &fadeout_screen_wrapper, 0);
3779 if(SQ_FAILED(sq_createslot(v, -3))) {
3780 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
3783 sq_pushstring(v, "shrink_screen", -1);
3784 sq_newclosure(v, &shrink_screen_wrapper, 0);
3785 if(SQ_FAILED(sq_createslot(v, -3))) {
3786 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
3789 sq_pushstring(v, "abort_screenfade", -1);
3790 sq_newclosure(v, &abort_screenfade_wrapper, 0);
3791 if(SQ_FAILED(sq_createslot(v, -3))) {
3792 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
3795 sq_pushstring(v, "translate", -1);
3796 sq_newclosure(v, &translate_wrapper, 0);
3797 if(SQ_FAILED(sq_createslot(v, -3))) {
3798 throw SquirrelError(v, "Couldn't register function 'translate'");
3801 sq_pushstring(v, "import", -1);
3802 sq_newclosure(v, &import_wrapper, 0);
3803 if(SQ_FAILED(sq_createslot(v, -3))) {
3804 throw SquirrelError(v, "Couldn't register function 'import'");
3807 sq_pushstring(v, "save_state", -1);
3808 sq_newclosure(v, &save_state_wrapper, 0);
3809 if(SQ_FAILED(sq_createslot(v, -3))) {
3810 throw SquirrelError(v, "Couldn't register function 'save_state'");
3813 sq_pushstring(v, "update_worldmap", -1);
3814 sq_newclosure(v, &update_worldmap_wrapper, 0);
3815 if(SQ_FAILED(sq_createslot(v, -3))) {
3816 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
3819 sq_pushstring(v, "debug_collrects", -1);
3820 sq_newclosure(v, &debug_collrects_wrapper, 0);
3821 if(SQ_FAILED(sq_createslot(v, -3))) {
3822 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
3825 sq_pushstring(v, "debug_show_fps", -1);
3826 sq_newclosure(v, &debug_show_fps_wrapper, 0);
3827 if(SQ_FAILED(sq_createslot(v, -3))) {
3828 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
3831 sq_pushstring(v, "debug_draw_solids_only", -1);
3832 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
3833 if(SQ_FAILED(sq_createslot(v, -3))) {
3834 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
3837 sq_pushstring(v, "play_music", -1);
3838 sq_newclosure(v, &play_music_wrapper, 0);
3839 if(SQ_FAILED(sq_createslot(v, -3))) {
3840 throw SquirrelError(v, "Couldn't register function 'play_music'");
3843 sq_pushstring(v, "play_sound", -1);
3844 sq_newclosure(v, &play_sound_wrapper, 0);
3845 if(SQ_FAILED(sq_createslot(v, -3))) {
3846 throw SquirrelError(v, "Couldn't register function 'play_sound'");
3849 sq_pushstring(v, "grease", -1);
3850 sq_newclosure(v, &grease_wrapper, 0);
3851 if(SQ_FAILED(sq_createslot(v, -3))) {
3852 throw SquirrelError(v, "Couldn't register function 'grease'");
3855 sq_pushstring(v, "invincible", -1);
3856 sq_newclosure(v, &invincible_wrapper, 0);
3857 if(SQ_FAILED(sq_createslot(v, -3))) {
3858 throw SquirrelError(v, "Couldn't register function 'invincible'");
3861 sq_pushstring(v, "ghost", -1);
3862 sq_newclosure(v, &ghost_wrapper, 0);
3863 if(SQ_FAILED(sq_createslot(v, -3))) {
3864 throw SquirrelError(v, "Couldn't register function 'ghost'");
3867 sq_pushstring(v, "mortal", -1);
3868 sq_newclosure(v, &mortal_wrapper, 0);
3869 if(SQ_FAILED(sq_createslot(v, -3))) {
3870 throw SquirrelError(v, "Couldn't register function 'mortal'");
3873 sq_pushstring(v, "restart", -1);
3874 sq_newclosure(v, &restart_wrapper, 0);
3875 if(SQ_FAILED(sq_createslot(v, -3))) {
3876 throw SquirrelError(v, "Couldn't register function 'restart'");
3879 sq_pushstring(v, "whereami", -1);
3880 sq_newclosure(v, &whereami_wrapper, 0);
3881 if(SQ_FAILED(sq_createslot(v, -3))) {
3882 throw SquirrelError(v, "Couldn't register function 'whereami'");
3885 sq_pushstring(v, "gotoend", -1);
3886 sq_newclosure(v, &gotoend_wrapper, 0);
3887 if(SQ_FAILED(sq_createslot(v, -3))) {
3888 throw SquirrelError(v, "Couldn't register function 'gotoend'");
3891 sq_pushstring(v, "camera", -1);
3892 sq_newclosure(v, &camera_wrapper, 0);
3893 if(SQ_FAILED(sq_createslot(v, -3))) {
3894 throw SquirrelError(v, "Couldn't register function 'camera'");
3897 sq_pushstring(v, "quit", -1);
3898 sq_newclosure(v, &quit_wrapper, 0);
3899 if(SQ_FAILED(sq_createslot(v, -3))) {
3900 throw SquirrelError(v, "Couldn't register function 'quit'");
3903 sq_pushstring(v, "rand", -1);
3904 sq_newclosure(v, &rand_wrapper, 0);
3905 if(SQ_FAILED(sq_createslot(v, -3))) {
3906 throw SquirrelError(v, "Couldn't register function 'rand'");
3909 // Register class DisplayEffect
3910 sq_pushstring(v, "DisplayEffect", -1);
3911 if(sq_newclass(v, SQFalse) < 0) {
3912 std::ostringstream msg;
3913 msg << "Couldn't create new class 'DisplayEffect'";
3914 throw SquirrelError(v, msg.str());
3916 sq_pushstring(v, "fade_out", -1);
3917 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
3918 if(SQ_FAILED(sq_createslot(v, -3))) {
3919 throw SquirrelError(v, "Couldn't register function 'fade_out'");
3922 sq_pushstring(v, "fade_in", -1);
3923 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
3924 if(SQ_FAILED(sq_createslot(v, -3))) {
3925 throw SquirrelError(v, "Couldn't register function 'fade_in'");
3928 sq_pushstring(v, "set_black", -1);
3929 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
3930 if(SQ_FAILED(sq_createslot(v, -3))) {
3931 throw SquirrelError(v, "Couldn't register function 'set_black'");
3934 sq_pushstring(v, "is_black", -1);
3935 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
3936 if(SQ_FAILED(sq_createslot(v, -3))) {
3937 throw SquirrelError(v, "Couldn't register function 'is_black'");
3940 sq_pushstring(v, "sixteen_to_nine", -1);
3941 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
3942 if(SQ_FAILED(sq_createslot(v, -3))) {
3943 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
3946 sq_pushstring(v, "four_to_three", -1);
3947 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
3948 if(SQ_FAILED(sq_createslot(v, -3))) {
3949 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
3952 if(SQ_FAILED(sq_createslot(v, -3))) {
3953 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
3956 // Register class Camera
3957 sq_pushstring(v, "Camera", -1);
3958 if(sq_newclass(v, SQFalse) < 0) {
3959 std::ostringstream msg;
3960 msg << "Couldn't create new class 'Camera'";
3961 throw SquirrelError(v, msg.str());
3963 sq_pushstring(v, "shake", -1);
3964 sq_newclosure(v, &Camera_shake_wrapper, 0);
3965 if(SQ_FAILED(sq_createslot(v, -3))) {
3966 throw SquirrelError(v, "Couldn't register function 'shake'");
3969 sq_pushstring(v, "set_pos", -1);
3970 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
3971 if(SQ_FAILED(sq_createslot(v, -3))) {
3972 throw SquirrelError(v, "Couldn't register function 'set_pos'");
3975 sq_pushstring(v, "set_mode", -1);
3976 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
3977 if(SQ_FAILED(sq_createslot(v, -3))) {
3978 throw SquirrelError(v, "Couldn't register function 'set_mode'");
3981 sq_pushstring(v, "scroll_to", -1);
3982 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
3983 if(SQ_FAILED(sq_createslot(v, -3))) {
3984 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
3987 if(SQ_FAILED(sq_createslot(v, -3))) {
3988 throw SquirrelError(v, "Couldn't register class 'Camera'");
3991 // Register class Level
3992 sq_pushstring(v, "Level", -1);
3993 if(sq_newclass(v, SQFalse) < 0) {
3994 std::ostringstream msg;
3995 msg << "Couldn't create new class 'Level'";
3996 throw SquirrelError(v, msg.str());
3998 sq_pushstring(v, "finish", -1);
3999 sq_newclosure(v, &Level_finish_wrapper, 0);
4000 if(SQ_FAILED(sq_createslot(v, -3))) {
4001 throw SquirrelError(v, "Couldn't register function 'finish'");
4004 sq_pushstring(v, "spawn", -1);
4005 sq_newclosure(v, &Level_spawn_wrapper, 0);
4006 if(SQ_FAILED(sq_createslot(v, -3))) {
4007 throw SquirrelError(v, "Couldn't register function 'spawn'");
4010 sq_pushstring(v, "flip_vertically", -1);
4011 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4012 if(SQ_FAILED(sq_createslot(v, -3))) {
4013 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
4016 sq_pushstring(v, "toggle_pause", -1);
4017 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4018 if(SQ_FAILED(sq_createslot(v, -3))) {
4019 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
4022 if(SQ_FAILED(sq_createslot(v, -3))) {
4023 throw SquirrelError(v, "Couldn't register class 'Level'");
4026 // Register class ScriptedObject
4027 sq_pushstring(v, "ScriptedObject", -1);
4028 if(sq_newclass(v, SQFalse) < 0) {
4029 std::ostringstream msg;
4030 msg << "Couldn't create new class 'ScriptedObject'";
4031 throw SquirrelError(v, msg.str());
4033 sq_pushstring(v, "set_action", -1);
4034 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4035 if(SQ_FAILED(sq_createslot(v, -3))) {
4036 throw SquirrelError(v, "Couldn't register function 'set_action'");
4039 sq_pushstring(v, "get_action", -1);
4040 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4041 if(SQ_FAILED(sq_createslot(v, -3))) {
4042 throw SquirrelError(v, "Couldn't register function 'get_action'");
4045 sq_pushstring(v, "move", -1);
4046 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4047 if(SQ_FAILED(sq_createslot(v, -3))) {
4048 throw SquirrelError(v, "Couldn't register function 'move'");
4051 sq_pushstring(v, "set_pos", -1);
4052 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4053 if(SQ_FAILED(sq_createslot(v, -3))) {
4054 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4057 sq_pushstring(v, "get_pos_x", -1);
4058 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4059 if(SQ_FAILED(sq_createslot(v, -3))) {
4060 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4063 sq_pushstring(v, "get_pos_y", -1);
4064 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4065 if(SQ_FAILED(sq_createslot(v, -3))) {
4066 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4069 sq_pushstring(v, "set_velocity", -1);
4070 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4071 if(SQ_FAILED(sq_createslot(v, -3))) {
4072 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4075 sq_pushstring(v, "get_velocity_x", -1);
4076 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4077 if(SQ_FAILED(sq_createslot(v, -3))) {
4078 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4081 sq_pushstring(v, "get_velocity_y", -1);
4082 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4083 if(SQ_FAILED(sq_createslot(v, -3))) {
4084 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4087 sq_pushstring(v, "set_visible", -1);
4088 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4089 if(SQ_FAILED(sq_createslot(v, -3))) {
4090 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4093 sq_pushstring(v, "is_visible", -1);
4094 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4095 if(SQ_FAILED(sq_createslot(v, -3))) {
4096 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4099 sq_pushstring(v, "set_solid", -1);
4100 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4101 if(SQ_FAILED(sq_createslot(v, -3))) {
4102 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4105 sq_pushstring(v, "is_solid", -1);
4106 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4107 if(SQ_FAILED(sq_createslot(v, -3))) {
4108 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4111 sq_pushstring(v, "get_name", -1);
4112 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4113 if(SQ_FAILED(sq_createslot(v, -3))) {
4114 throw SquirrelError(v, "Couldn't register function 'get_name'");
4117 if(SQ_FAILED(sq_createslot(v, -3))) {
4118 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4121 // Register class Text
4122 sq_pushstring(v, "Text", -1);
4123 if(sq_newclass(v, SQFalse) < 0) {
4124 std::ostringstream msg;
4125 msg << "Couldn't create new class 'Text'";
4126 throw SquirrelError(v, msg.str());
4128 sq_pushstring(v, "set_text", -1);
4129 sq_newclosure(v, &Text_set_text_wrapper, 0);
4130 if(SQ_FAILED(sq_createslot(v, -3))) {
4131 throw SquirrelError(v, "Couldn't register function 'set_text'");
4134 sq_pushstring(v, "set_font", -1);
4135 sq_newclosure(v, &Text_set_font_wrapper, 0);
4136 if(SQ_FAILED(sq_createslot(v, -3))) {
4137 throw SquirrelError(v, "Couldn't register function 'set_font'");
4140 sq_pushstring(v, "fade_in", -1);
4141 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4142 if(SQ_FAILED(sq_createslot(v, -3))) {
4143 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4146 sq_pushstring(v, "fade_out", -1);
4147 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4148 if(SQ_FAILED(sq_createslot(v, -3))) {
4149 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4152 sq_pushstring(v, "set_visible", -1);
4153 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4154 if(SQ_FAILED(sq_createslot(v, -3))) {
4155 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4158 sq_pushstring(v, "set_centered", -1);
4159 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4160 if(SQ_FAILED(sq_createslot(v, -3))) {
4161 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4164 if(SQ_FAILED(sq_createslot(v, -3))) {
4165 throw SquirrelError(v, "Couldn't register class 'Text'");
4168 // Register class Player
4169 sq_pushstring(v, "Player", -1);
4170 if(sq_newclass(v, SQFalse) < 0) {
4171 std::ostringstream msg;
4172 msg << "Couldn't create new class 'Player'";
4173 throw SquirrelError(v, msg.str());
4175 sq_pushstring(v, "add_bonus", -1);
4176 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4177 if(SQ_FAILED(sq_createslot(v, -3))) {
4178 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4181 sq_pushstring(v, "add_coins", -1);
4182 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4183 if(SQ_FAILED(sq_createslot(v, -3))) {
4184 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4187 sq_pushstring(v, "make_invincible", -1);
4188 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4189 if(SQ_FAILED(sq_createslot(v, -3))) {
4190 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4193 sq_pushstring(v, "deactivate", -1);
4194 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4195 if(SQ_FAILED(sq_createslot(v, -3))) {
4196 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4199 sq_pushstring(v, "activate", -1);
4200 sq_newclosure(v, &Player_activate_wrapper, 0);
4201 if(SQ_FAILED(sq_createslot(v, -3))) {
4202 throw SquirrelError(v, "Couldn't register function 'activate'");
4205 sq_pushstring(v, "walk", -1);
4206 sq_newclosure(v, &Player_walk_wrapper, 0);
4207 if(SQ_FAILED(sq_createslot(v, -3))) {
4208 throw SquirrelError(v, "Couldn't register function 'walk'");
4211 sq_pushstring(v, "set_visible", -1);
4212 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4213 if(SQ_FAILED(sq_createslot(v, -3))) {
4214 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4217 sq_pushstring(v, "get_visible", -1);
4218 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4219 if(SQ_FAILED(sq_createslot(v, -3))) {
4220 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4223 sq_pushstring(v, "kill", -1);
4224 sq_newclosure(v, &Player_kill_wrapper, 0);
4225 if(SQ_FAILED(sq_createslot(v, -3))) {
4226 throw SquirrelError(v, "Couldn't register function 'kill'");
4229 sq_pushstring(v, "set_ghost_mode", -1);
4230 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4231 if(SQ_FAILED(sq_createslot(v, -3))) {
4232 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4235 sq_pushstring(v, "get_ghost_mode", -1);
4236 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4237 if(SQ_FAILED(sq_createslot(v, -3))) {
4238 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4241 sq_pushstring(v, "do_cheer", -1);
4242 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4243 if(SQ_FAILED(sq_createslot(v, -3))) {
4244 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4247 sq_pushstring(v, "do_duck", -1);
4248 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4249 if(SQ_FAILED(sq_createslot(v, -3))) {
4250 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4253 sq_pushstring(v, "do_standup", -1);
4254 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4255 if(SQ_FAILED(sq_createslot(v, -3))) {
4256 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4259 sq_pushstring(v, "do_backflip", -1);
4260 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4261 if(SQ_FAILED(sq_createslot(v, -3))) {
4262 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4265 sq_pushstring(v, "do_jump", -1);
4266 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4267 if(SQ_FAILED(sq_createslot(v, -3))) {
4268 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4271 sq_pushstring(v, "trigger_sequence", -1);
4272 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4273 if(SQ_FAILED(sq_createslot(v, -3))) {
4274 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4277 if(SQ_FAILED(sq_createslot(v, -3))) {
4278 throw SquirrelError(v, "Couldn't register class 'Player'");
4281 // Register class FloatingImage
4282 sq_pushstring(v, "FloatingImage", -1);
4283 if(sq_newclass(v, SQFalse) < 0) {
4284 std::ostringstream msg;
4285 msg << "Couldn't create new class 'FloatingImage'";
4286 throw SquirrelError(v, msg.str());
4288 sq_pushstring(v, "constructor", -1);
4289 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4290 if(SQ_FAILED(sq_createslot(v, -3))) {
4291 throw SquirrelError(v, "Couldn't register function 'constructor'");
4294 sq_pushstring(v, "set_layer", -1);
4295 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4296 if(SQ_FAILED(sq_createslot(v, -3))) {
4297 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4300 sq_pushstring(v, "get_layer", -1);
4301 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4302 if(SQ_FAILED(sq_createslot(v, -3))) {
4303 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4306 sq_pushstring(v, "set_pos", -1);
4307 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4308 if(SQ_FAILED(sq_createslot(v, -3))) {
4309 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4312 sq_pushstring(v, "get_pos_x", -1);
4313 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4314 if(SQ_FAILED(sq_createslot(v, -3))) {
4315 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4318 sq_pushstring(v, "get_pos_y", -1);
4319 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4320 if(SQ_FAILED(sq_createslot(v, -3))) {
4321 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4324 sq_pushstring(v, "set_anchor_point", -1);
4325 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4326 if(SQ_FAILED(sq_createslot(v, -3))) {
4327 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4330 sq_pushstring(v, "get_anchor_point", -1);
4331 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4332 if(SQ_FAILED(sq_createslot(v, -3))) {
4333 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4336 sq_pushstring(v, "set_visible", -1);
4337 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4338 if(SQ_FAILED(sq_createslot(v, -3))) {
4339 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4342 sq_pushstring(v, "get_visible", -1);
4343 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4344 if(SQ_FAILED(sq_createslot(v, -3))) {
4345 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4348 sq_pushstring(v, "set_action", -1);
4349 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4350 if(SQ_FAILED(sq_createslot(v, -3))) {
4351 throw SquirrelError(v, "Couldn't register function 'set_action'");
4354 sq_pushstring(v, "get_action", -1);
4355 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4356 if(SQ_FAILED(sq_createslot(v, -3))) {
4357 throw SquirrelError(v, "Couldn't register function 'get_action'");
4360 sq_pushstring(v, "fade_in", -1);
4361 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4362 if(SQ_FAILED(sq_createslot(v, -3))) {
4363 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4366 sq_pushstring(v, "fade_out", -1);
4367 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4368 if(SQ_FAILED(sq_createslot(v, -3))) {
4369 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4372 if(SQ_FAILED(sq_createslot(v, -3))) {
4373 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4376 // Register class Platform
4377 sq_pushstring(v, "Platform", -1);
4378 if(sq_newclass(v, SQFalse) < 0) {
4379 std::ostringstream msg;
4380 msg << "Couldn't create new class 'Platform'";
4381 throw SquirrelError(v, msg.str());
4383 sq_pushstring(v, "goto_node", -1);
4384 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4385 if(SQ_FAILED(sq_createslot(v, -3))) {
4386 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4389 sq_pushstring(v, "start_moving", -1);
4390 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4391 if(SQ_FAILED(sq_createslot(v, -3))) {
4392 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4395 sq_pushstring(v, "stop_moving", -1);
4396 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4397 if(SQ_FAILED(sq_createslot(v, -3))) {
4398 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4401 if(SQ_FAILED(sq_createslot(v, -3))) {
4402 throw SquirrelError(v, "Couldn't register class 'Platform'");
4405 // Register class Candle
4406 sq_pushstring(v, "Candle", -1);
4407 if(sq_newclass(v, SQFalse) < 0) {
4408 std::ostringstream msg;
4409 msg << "Couldn't create new class 'Candle'";
4410 throw SquirrelError(v, msg.str());
4412 sq_pushstring(v, "get_burning", -1);
4413 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4414 if(SQ_FAILED(sq_createslot(v, -3))) {
4415 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4418 sq_pushstring(v, "set_burning", -1);
4419 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4420 if(SQ_FAILED(sq_createslot(v, -3))) {
4421 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4424 if(SQ_FAILED(sq_createslot(v, -3))) {
4425 throw SquirrelError(v, "Couldn't register class 'Candle'");
4428 // Register class Wind
4429 sq_pushstring(v, "Wind", -1);
4430 if(sq_newclass(v, SQFalse) < 0) {
4431 std::ostringstream msg;
4432 msg << "Couldn't create new class 'Wind'";
4433 throw SquirrelError(v, msg.str());
4435 sq_pushstring(v, "start", -1);
4436 sq_newclosure(v, &Wind_start_wrapper, 0);
4437 if(SQ_FAILED(sq_createslot(v, -3))) {
4438 throw SquirrelError(v, "Couldn't register function 'start'");
4441 sq_pushstring(v, "stop", -1);
4442 sq_newclosure(v, &Wind_stop_wrapper, 0);
4443 if(SQ_FAILED(sq_createslot(v, -3))) {
4444 throw SquirrelError(v, "Couldn't register function 'stop'");
4447 if(SQ_FAILED(sq_createslot(v, -3))) {
4448 throw SquirrelError(v, "Couldn't register class 'Wind'");
4451 // Register class AmbientSound
4452 sq_pushstring(v, "AmbientSound", -1);
4453 if(sq_newclass(v, SQFalse) < 0) {
4454 std::ostringstream msg;
4455 msg << "Couldn't create new class 'AmbientSound'";
4456 throw SquirrelError(v, msg.str());
4458 sq_pushstring(v, "set_pos", -1);
4459 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4460 if(SQ_FAILED(sq_createslot(v, -3))) {
4461 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4464 sq_pushstring(v, "get_pos_x", -1);
4465 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4466 if(SQ_FAILED(sq_createslot(v, -3))) {
4467 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4470 sq_pushstring(v, "get_pos_y", -1);
4471 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4472 if(SQ_FAILED(sq_createslot(v, -3))) {
4473 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4476 if(SQ_FAILED(sq_createslot(v, -3))) {
4477 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4480 // Register class Thunderstorm
4481 sq_pushstring(v, "Thunderstorm", -1);
4482 if(sq_newclass(v, SQFalse) < 0) {
4483 std::ostringstream msg;
4484 msg << "Couldn't create new class 'Thunderstorm'";
4485 throw SquirrelError(v, msg.str());
4487 sq_pushstring(v, "start", -1);
4488 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4489 if(SQ_FAILED(sq_createslot(v, -3))) {
4490 throw SquirrelError(v, "Couldn't register function 'start'");
4493 sq_pushstring(v, "stop", -1);
4494 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4495 if(SQ_FAILED(sq_createslot(v, -3))) {
4496 throw SquirrelError(v, "Couldn't register function 'stop'");
4499 sq_pushstring(v, "thunder", -1);
4500 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4501 if(SQ_FAILED(sq_createslot(v, -3))) {
4502 throw SquirrelError(v, "Couldn't register function 'thunder'");
4505 sq_pushstring(v, "lightning", -1);
4506 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4507 if(SQ_FAILED(sq_createslot(v, -3))) {
4508 throw SquirrelError(v, "Couldn't register function 'lightning'");
4511 sq_pushstring(v, "flash", -1);
4512 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4513 if(SQ_FAILED(sq_createslot(v, -3))) {
4514 throw SquirrelError(v, "Couldn't register function 'flash'");
4517 sq_pushstring(v, "electrify", -1);
4518 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4519 if(SQ_FAILED(sq_createslot(v, -3))) {
4520 throw SquirrelError(v, "Couldn't register function 'electrify'");
4523 if(SQ_FAILED(sq_createslot(v, -3))) {
4524 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4527 // Register class TileMap
4528 sq_pushstring(v, "TileMap", -1);
4529 if(sq_newclass(v, SQFalse) < 0) {
4530 std::ostringstream msg;
4531 msg << "Couldn't create new class 'TileMap'";
4532 throw SquirrelError(v, msg.str());
4534 sq_pushstring(v, "goto_node", -1);
4535 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4536 if(SQ_FAILED(sq_createslot(v, -3))) {
4537 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4540 sq_pushstring(v, "start_moving", -1);
4541 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4542 if(SQ_FAILED(sq_createslot(v, -3))) {
4543 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4546 sq_pushstring(v, "stop_moving", -1);
4547 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4548 if(SQ_FAILED(sq_createslot(v, -3))) {
4549 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4552 if(SQ_FAILED(sq_createslot(v, -3))) {
4553 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4556 // Register class SSector
4557 sq_pushstring(v, "SSector", -1);
4558 if(sq_newclass(v, SQFalse) < 0) {
4559 std::ostringstream msg;
4560 msg << "Couldn't create new class 'SSector'";
4561 throw SquirrelError(v, msg.str());
4563 sq_pushstring(v, "set_ambient_light", -1);
4564 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4565 if(SQ_FAILED(sq_createslot(v, -3))) {
4566 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4569 sq_pushstring(v, "get_ambient_red", -1);
4570 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4571 if(SQ_FAILED(sq_createslot(v, -3))) {
4572 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4575 sq_pushstring(v, "get_ambient_green", -1);
4576 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4577 if(SQ_FAILED(sq_createslot(v, -3))) {
4578 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4581 sq_pushstring(v, "get_ambient_blue", -1);
4582 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4583 if(SQ_FAILED(sq_createslot(v, -3))) {
4584 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4587 if(SQ_FAILED(sq_createslot(v, -3))) {
4588 throw SquirrelError(v, "Couldn't register class 'SSector'");
4591 // Register class LevelTime
4592 sq_pushstring(v, "LevelTime", -1);
4593 if(sq_newclass(v, SQFalse) < 0) {
4594 std::ostringstream msg;
4595 msg << "Couldn't create new class 'LevelTime'";
4596 throw SquirrelError(v, msg.str());
4598 sq_pushstring(v, "start", -1);
4599 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4600 if(SQ_FAILED(sq_createslot(v, -3))) {
4601 throw SquirrelError(v, "Couldn't register function 'start'");
4604 sq_pushstring(v, "stop", -1);
4605 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4606 if(SQ_FAILED(sq_createslot(v, -3))) {
4607 throw SquirrelError(v, "Couldn't register function 'stop'");
4610 sq_pushstring(v, "get_time", -1);
4611 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4612 if(SQ_FAILED(sq_createslot(v, -3))) {
4613 throw SquirrelError(v, "Couldn't register function 'get_time'");
4616 sq_pushstring(v, "set_time", -1);
4617 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
4618 if(SQ_FAILED(sq_createslot(v, -3))) {
4619 throw SquirrelError(v, "Couldn't register function 'set_time'");
4622 if(SQ_FAILED(sq_createslot(v, -3))) {
4623 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
4628 } // end of namespace Scripting