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 translate_wrapper(HSQUIRRELVM vm)
2867 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2868 sq_throwerror(vm, _SC("Argument 1 not a string"));
2873 std::string return_value = Scripting::translate(arg0);
2875 sq_pushstring(vm, return_value.c_str(), return_value.size());
2878 } catch(std::exception& e) {
2879 sq_throwerror(vm, e.what());
2882 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
2888 static SQInteger import_wrapper(HSQUIRRELVM vm)
2890 HSQUIRRELVM arg0 = vm;
2892 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
2893 sq_throwerror(vm, _SC("Argument 1 not a string"));
2898 Scripting::import(arg0, arg1);
2902 } catch(std::exception& e) {
2903 sq_throwerror(vm, e.what());
2906 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
2912 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
2917 Scripting::save_state();
2921 } catch(std::exception& e) {
2922 sq_throwerror(vm, e.what());
2925 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
2931 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
2936 Scripting::update_worldmap();
2940 } catch(std::exception& e) {
2941 sq_throwerror(vm, e.what());
2944 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
2950 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
2953 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2954 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2959 Scripting::debug_collrects(arg0 == SQTrue);
2963 } catch(std::exception& e) {
2964 sq_throwerror(vm, e.what());
2967 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
2973 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
2976 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2977 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2982 Scripting::debug_show_fps(arg0 == SQTrue);
2986 } catch(std::exception& e) {
2987 sq_throwerror(vm, e.what());
2990 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
2996 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
2999 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3000 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3005 Scripting::debug_draw_solids_only(arg0 == SQTrue);
3009 } catch(std::exception& e) {
3010 sq_throwerror(vm, e.what());
3013 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3019 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3022 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3023 sq_throwerror(vm, _SC("Argument 1 not a string"));
3028 Scripting::play_music(arg0);
3032 } catch(std::exception& e) {
3033 sq_throwerror(vm, e.what());
3036 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3042 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3045 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3046 sq_throwerror(vm, _SC("Argument 1 not a string"));
3051 Scripting::play_sound(arg0);
3055 } catch(std::exception& e) {
3056 sq_throwerror(vm, e.what());
3059 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3065 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3070 Scripting::grease();
3074 } catch(std::exception& e) {
3075 sq_throwerror(vm, e.what());
3078 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3084 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3089 Scripting::invincible();
3093 } catch(std::exception& e) {
3094 sq_throwerror(vm, e.what());
3097 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3103 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3112 } catch(std::exception& e) {
3113 sq_throwerror(vm, e.what());
3116 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3122 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3127 Scripting::mortal();
3131 } catch(std::exception& e) {
3132 sq_throwerror(vm, e.what());
3135 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3141 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3146 Scripting::restart();
3150 } catch(std::exception& e) {
3151 sq_throwerror(vm, e.what());
3154 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3160 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3165 Scripting::whereami();
3169 } catch(std::exception& e) {
3170 sq_throwerror(vm, e.what());
3173 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3179 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3184 Scripting::gotoend();
3188 } catch(std::exception& e) {
3189 sq_throwerror(vm, e.what());
3192 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3198 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3203 Scripting::camera();
3207 } catch(std::exception& e) {
3208 sq_throwerror(vm, e.what());
3211 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3217 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3226 } catch(std::exception& e) {
3227 sq_throwerror(vm, e.what());
3230 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3236 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3240 int return_value = Scripting::rand();
3242 sq_pushinteger(vm, return_value);
3245 } catch(std::exception& e) {
3246 sq_throwerror(vm, e.what());
3249 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3255 } // end of namespace Wrapper
3257 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3259 using namespace Wrapper;
3261 sq_pushroottable(v);
3262 sq_pushstring(v, "DisplayEffect", -1);
3263 if(SQ_FAILED(sq_get(v, -2))) {
3264 std::ostringstream msg;
3265 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3266 throw SquirrelError(v, msg.str());
3269 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3270 std::ostringstream msg;
3271 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3272 throw SquirrelError(v, msg.str());
3274 sq_remove(v, -2); // remove object name
3276 if(setup_releasehook) {
3277 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3280 sq_remove(v, -2); // remove root table
3283 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3285 using namespace Wrapper;
3287 sq_pushroottable(v);
3288 sq_pushstring(v, "Camera", -1);
3289 if(SQ_FAILED(sq_get(v, -2))) {
3290 std::ostringstream msg;
3291 msg << "Couldn't resolved squirrel type 'Camera'";
3292 throw SquirrelError(v, msg.str());
3295 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3296 std::ostringstream msg;
3297 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3298 throw SquirrelError(v, msg.str());
3300 sq_remove(v, -2); // remove object name
3302 if(setup_releasehook) {
3303 sq_setreleasehook(v, -1, Camera_release_hook);
3306 sq_remove(v, -2); // remove root table
3309 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3311 using namespace Wrapper;
3313 sq_pushroottable(v);
3314 sq_pushstring(v, "Level", -1);
3315 if(SQ_FAILED(sq_get(v, -2))) {
3316 std::ostringstream msg;
3317 msg << "Couldn't resolved squirrel type 'Level'";
3318 throw SquirrelError(v, msg.str());
3321 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3322 std::ostringstream msg;
3323 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3324 throw SquirrelError(v, msg.str());
3326 sq_remove(v, -2); // remove object name
3328 if(setup_releasehook) {
3329 sq_setreleasehook(v, -1, Level_release_hook);
3332 sq_remove(v, -2); // remove root table
3335 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3337 using namespace Wrapper;
3339 sq_pushroottable(v);
3340 sq_pushstring(v, "ScriptedObject", -1);
3341 if(SQ_FAILED(sq_get(v, -2))) {
3342 std::ostringstream msg;
3343 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3344 throw SquirrelError(v, msg.str());
3347 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3348 std::ostringstream msg;
3349 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3350 throw SquirrelError(v, msg.str());
3352 sq_remove(v, -2); // remove object name
3354 if(setup_releasehook) {
3355 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3358 sq_remove(v, -2); // remove root table
3361 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3363 using namespace Wrapper;
3365 sq_pushroottable(v);
3366 sq_pushstring(v, "Text", -1);
3367 if(SQ_FAILED(sq_get(v, -2))) {
3368 std::ostringstream msg;
3369 msg << "Couldn't resolved squirrel type 'Text'";
3370 throw SquirrelError(v, msg.str());
3373 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3374 std::ostringstream msg;
3375 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3376 throw SquirrelError(v, msg.str());
3378 sq_remove(v, -2); // remove object name
3380 if(setup_releasehook) {
3381 sq_setreleasehook(v, -1, Text_release_hook);
3384 sq_remove(v, -2); // remove root table
3387 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3389 using namespace Wrapper;
3391 sq_pushroottable(v);
3392 sq_pushstring(v, "Player", -1);
3393 if(SQ_FAILED(sq_get(v, -2))) {
3394 std::ostringstream msg;
3395 msg << "Couldn't resolved squirrel type 'Player'";
3396 throw SquirrelError(v, msg.str());
3399 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3400 std::ostringstream msg;
3401 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3402 throw SquirrelError(v, msg.str());
3404 sq_remove(v, -2); // remove object name
3406 if(setup_releasehook) {
3407 sq_setreleasehook(v, -1, Player_release_hook);
3410 sq_remove(v, -2); // remove root table
3413 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3415 using namespace Wrapper;
3417 sq_pushroottable(v);
3418 sq_pushstring(v, "FloatingImage", -1);
3419 if(SQ_FAILED(sq_get(v, -2))) {
3420 std::ostringstream msg;
3421 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3422 throw SquirrelError(v, msg.str());
3425 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3426 std::ostringstream msg;
3427 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3428 throw SquirrelError(v, msg.str());
3430 sq_remove(v, -2); // remove object name
3432 if(setup_releasehook) {
3433 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3436 sq_remove(v, -2); // remove root table
3439 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3441 using namespace Wrapper;
3443 sq_pushroottable(v);
3444 sq_pushstring(v, "Platform", -1);
3445 if(SQ_FAILED(sq_get(v, -2))) {
3446 std::ostringstream msg;
3447 msg << "Couldn't resolved squirrel type 'Platform'";
3448 throw SquirrelError(v, msg.str());
3451 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3452 std::ostringstream msg;
3453 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3454 throw SquirrelError(v, msg.str());
3456 sq_remove(v, -2); // remove object name
3458 if(setup_releasehook) {
3459 sq_setreleasehook(v, -1, Platform_release_hook);
3462 sq_remove(v, -2); // remove root table
3465 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3467 using namespace Wrapper;
3469 sq_pushroottable(v);
3470 sq_pushstring(v, "Candle", -1);
3471 if(SQ_FAILED(sq_get(v, -2))) {
3472 std::ostringstream msg;
3473 msg << "Couldn't resolved squirrel type 'Candle'";
3474 throw SquirrelError(v, msg.str());
3477 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3478 std::ostringstream msg;
3479 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3480 throw SquirrelError(v, msg.str());
3482 sq_remove(v, -2); // remove object name
3484 if(setup_releasehook) {
3485 sq_setreleasehook(v, -1, Candle_release_hook);
3488 sq_remove(v, -2); // remove root table
3491 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3493 using namespace Wrapper;
3495 sq_pushroottable(v);
3496 sq_pushstring(v, "Wind", -1);
3497 if(SQ_FAILED(sq_get(v, -2))) {
3498 std::ostringstream msg;
3499 msg << "Couldn't resolved squirrel type 'Wind'";
3500 throw SquirrelError(v, msg.str());
3503 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3504 std::ostringstream msg;
3505 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3506 throw SquirrelError(v, msg.str());
3508 sq_remove(v, -2); // remove object name
3510 if(setup_releasehook) {
3511 sq_setreleasehook(v, -1, Wind_release_hook);
3514 sq_remove(v, -2); // remove root table
3517 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3519 using namespace Wrapper;
3521 sq_pushroottable(v);
3522 sq_pushstring(v, "AmbientSound", -1);
3523 if(SQ_FAILED(sq_get(v, -2))) {
3524 std::ostringstream msg;
3525 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3526 throw SquirrelError(v, msg.str());
3529 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3530 std::ostringstream msg;
3531 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3532 throw SquirrelError(v, msg.str());
3534 sq_remove(v, -2); // remove object name
3536 if(setup_releasehook) {
3537 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3540 sq_remove(v, -2); // remove root table
3543 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3545 using namespace Wrapper;
3547 sq_pushroottable(v);
3548 sq_pushstring(v, "Thunderstorm", -1);
3549 if(SQ_FAILED(sq_get(v, -2))) {
3550 std::ostringstream msg;
3551 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3552 throw SquirrelError(v, msg.str());
3555 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3556 std::ostringstream msg;
3557 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3558 throw SquirrelError(v, msg.str());
3560 sq_remove(v, -2); // remove object name
3562 if(setup_releasehook) {
3563 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3566 sq_remove(v, -2); // remove root table
3569 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3571 using namespace Wrapper;
3573 sq_pushroottable(v);
3574 sq_pushstring(v, "TileMap", -1);
3575 if(SQ_FAILED(sq_get(v, -2))) {
3576 std::ostringstream msg;
3577 msg << "Couldn't resolved squirrel type 'TileMap'";
3578 throw SquirrelError(v, msg.str());
3581 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3582 std::ostringstream msg;
3583 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3584 throw SquirrelError(v, msg.str());
3586 sq_remove(v, -2); // remove object name
3588 if(setup_releasehook) {
3589 sq_setreleasehook(v, -1, TileMap_release_hook);
3592 sq_remove(v, -2); // remove root table
3595 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3597 using namespace Wrapper;
3599 sq_pushroottable(v);
3600 sq_pushstring(v, "SSector", -1);
3601 if(SQ_FAILED(sq_get(v, -2))) {
3602 std::ostringstream msg;
3603 msg << "Couldn't resolved squirrel type 'SSector'";
3604 throw SquirrelError(v, msg.str());
3607 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3608 std::ostringstream msg;
3609 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3610 throw SquirrelError(v, msg.str());
3612 sq_remove(v, -2); // remove object name
3614 if(setup_releasehook) {
3615 sq_setreleasehook(v, -1, SSector_release_hook);
3618 sq_remove(v, -2); // remove root table
3621 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3623 using namespace Wrapper;
3625 sq_pushroottable(v);
3626 sq_pushstring(v, "LevelTime", -1);
3627 if(SQ_FAILED(sq_get(v, -2))) {
3628 std::ostringstream msg;
3629 msg << "Couldn't resolved squirrel type 'LevelTime'";
3630 throw SquirrelError(v, msg.str());
3633 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3634 std::ostringstream msg;
3635 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3636 throw SquirrelError(v, msg.str());
3638 sq_remove(v, -2); // remove object name
3640 if(setup_releasehook) {
3641 sq_setreleasehook(v, -1, LevelTime_release_hook);
3644 sq_remove(v, -2); // remove root table
3647 void register_supertux_wrapper(HSQUIRRELVM v)
3649 using namespace Wrapper;
3651 sq_pushstring(v, "ANCHOR_TOP", -1);
3652 sq_pushinteger(v, 16);
3653 if(SQ_FAILED(sq_createslot(v, -3))) {
3654 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
3657 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
3658 sq_pushinteger(v, 32);
3659 if(SQ_FAILED(sq_createslot(v, -3))) {
3660 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
3663 sq_pushstring(v, "ANCHOR_LEFT", -1);
3664 sq_pushinteger(v, 1);
3665 if(SQ_FAILED(sq_createslot(v, -3))) {
3666 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
3669 sq_pushstring(v, "ANCHOR_RIGHT", -1);
3670 sq_pushinteger(v, 2);
3671 if(SQ_FAILED(sq_createslot(v, -3))) {
3672 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
3675 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
3676 sq_pushinteger(v, 0);
3677 if(SQ_FAILED(sq_createslot(v, -3))) {
3678 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
3681 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
3682 sq_pushinteger(v, 17);
3683 if(SQ_FAILED(sq_createslot(v, -3))) {
3684 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
3687 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
3688 sq_pushinteger(v, 18);
3689 if(SQ_FAILED(sq_createslot(v, -3))) {
3690 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
3693 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
3694 sq_pushinteger(v, 33);
3695 if(SQ_FAILED(sq_createslot(v, -3))) {
3696 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
3699 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
3700 sq_pushinteger(v, 34);
3701 if(SQ_FAILED(sq_createslot(v, -3))) {
3702 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
3705 sq_pushstring(v, "display", -1);
3706 sq_newclosure(v, &display_wrapper, 0);
3707 if(SQ_FAILED(sq_createslot(v, -3))) {
3708 throw SquirrelError(v, "Couldn't register function 'display'");
3711 sq_pushstring(v, "print_stacktrace", -1);
3712 sq_newclosure(v, &print_stacktrace_wrapper, 0);
3713 if(SQ_FAILED(sq_createslot(v, -3))) {
3714 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
3717 sq_pushstring(v, "get_current_thread", -1);
3718 sq_newclosure(v, &get_current_thread_wrapper, 0);
3719 if(SQ_FAILED(sq_createslot(v, -3))) {
3720 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
3723 sq_pushstring(v, "display_text_file", -1);
3724 sq_newclosure(v, &display_text_file_wrapper, 0);
3725 if(SQ_FAILED(sq_createslot(v, -3))) {
3726 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
3729 sq_pushstring(v, "load_worldmap", -1);
3730 sq_newclosure(v, &load_worldmap_wrapper, 0);
3731 if(SQ_FAILED(sq_createslot(v, -3))) {
3732 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
3735 sq_pushstring(v, "load_level", -1);
3736 sq_newclosure(v, &load_level_wrapper, 0);
3737 if(SQ_FAILED(sq_createslot(v, -3))) {
3738 throw SquirrelError(v, "Couldn't register function 'load_level'");
3741 sq_pushstring(v, "wait", -1);
3742 sq_newclosure(v, &wait_wrapper, 0);
3743 if(SQ_FAILED(sq_createslot(v, -3))) {
3744 throw SquirrelError(v, "Couldn't register function 'wait'");
3747 sq_pushstring(v, "wait_for_screenswitch", -1);
3748 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
3749 if(SQ_FAILED(sq_createslot(v, -3))) {
3750 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
3753 sq_pushstring(v, "exit_screen", -1);
3754 sq_newclosure(v, &exit_screen_wrapper, 0);
3755 if(SQ_FAILED(sq_createslot(v, -3))) {
3756 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
3759 sq_pushstring(v, "fadeout_screen", -1);
3760 sq_newclosure(v, &fadeout_screen_wrapper, 0);
3761 if(SQ_FAILED(sq_createslot(v, -3))) {
3762 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
3765 sq_pushstring(v, "shrink_screen", -1);
3766 sq_newclosure(v, &shrink_screen_wrapper, 0);
3767 if(SQ_FAILED(sq_createslot(v, -3))) {
3768 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
3771 sq_pushstring(v, "translate", -1);
3772 sq_newclosure(v, &translate_wrapper, 0);
3773 if(SQ_FAILED(sq_createslot(v, -3))) {
3774 throw SquirrelError(v, "Couldn't register function 'translate'");
3777 sq_pushstring(v, "import", -1);
3778 sq_newclosure(v, &import_wrapper, 0);
3779 if(SQ_FAILED(sq_createslot(v, -3))) {
3780 throw SquirrelError(v, "Couldn't register function 'import'");
3783 sq_pushstring(v, "save_state", -1);
3784 sq_newclosure(v, &save_state_wrapper, 0);
3785 if(SQ_FAILED(sq_createslot(v, -3))) {
3786 throw SquirrelError(v, "Couldn't register function 'save_state'");
3789 sq_pushstring(v, "update_worldmap", -1);
3790 sq_newclosure(v, &update_worldmap_wrapper, 0);
3791 if(SQ_FAILED(sq_createslot(v, -3))) {
3792 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
3795 sq_pushstring(v, "debug_collrects", -1);
3796 sq_newclosure(v, &debug_collrects_wrapper, 0);
3797 if(SQ_FAILED(sq_createslot(v, -3))) {
3798 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
3801 sq_pushstring(v, "debug_show_fps", -1);
3802 sq_newclosure(v, &debug_show_fps_wrapper, 0);
3803 if(SQ_FAILED(sq_createslot(v, -3))) {
3804 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
3807 sq_pushstring(v, "debug_draw_solids_only", -1);
3808 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
3809 if(SQ_FAILED(sq_createslot(v, -3))) {
3810 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
3813 sq_pushstring(v, "play_music", -1);
3814 sq_newclosure(v, &play_music_wrapper, 0);
3815 if(SQ_FAILED(sq_createslot(v, -3))) {
3816 throw SquirrelError(v, "Couldn't register function 'play_music'");
3819 sq_pushstring(v, "play_sound", -1);
3820 sq_newclosure(v, &play_sound_wrapper, 0);
3821 if(SQ_FAILED(sq_createslot(v, -3))) {
3822 throw SquirrelError(v, "Couldn't register function 'play_sound'");
3825 sq_pushstring(v, "grease", -1);
3826 sq_newclosure(v, &grease_wrapper, 0);
3827 if(SQ_FAILED(sq_createslot(v, -3))) {
3828 throw SquirrelError(v, "Couldn't register function 'grease'");
3831 sq_pushstring(v, "invincible", -1);
3832 sq_newclosure(v, &invincible_wrapper, 0);
3833 if(SQ_FAILED(sq_createslot(v, -3))) {
3834 throw SquirrelError(v, "Couldn't register function 'invincible'");
3837 sq_pushstring(v, "ghost", -1);
3838 sq_newclosure(v, &ghost_wrapper, 0);
3839 if(SQ_FAILED(sq_createslot(v, -3))) {
3840 throw SquirrelError(v, "Couldn't register function 'ghost'");
3843 sq_pushstring(v, "mortal", -1);
3844 sq_newclosure(v, &mortal_wrapper, 0);
3845 if(SQ_FAILED(sq_createslot(v, -3))) {
3846 throw SquirrelError(v, "Couldn't register function 'mortal'");
3849 sq_pushstring(v, "restart", -1);
3850 sq_newclosure(v, &restart_wrapper, 0);
3851 if(SQ_FAILED(sq_createslot(v, -3))) {
3852 throw SquirrelError(v, "Couldn't register function 'restart'");
3855 sq_pushstring(v, "whereami", -1);
3856 sq_newclosure(v, &whereami_wrapper, 0);
3857 if(SQ_FAILED(sq_createslot(v, -3))) {
3858 throw SquirrelError(v, "Couldn't register function 'whereami'");
3861 sq_pushstring(v, "gotoend", -1);
3862 sq_newclosure(v, &gotoend_wrapper, 0);
3863 if(SQ_FAILED(sq_createslot(v, -3))) {
3864 throw SquirrelError(v, "Couldn't register function 'gotoend'");
3867 sq_pushstring(v, "camera", -1);
3868 sq_newclosure(v, &camera_wrapper, 0);
3869 if(SQ_FAILED(sq_createslot(v, -3))) {
3870 throw SquirrelError(v, "Couldn't register function 'camera'");
3873 sq_pushstring(v, "quit", -1);
3874 sq_newclosure(v, &quit_wrapper, 0);
3875 if(SQ_FAILED(sq_createslot(v, -3))) {
3876 throw SquirrelError(v, "Couldn't register function 'quit'");
3879 sq_pushstring(v, "rand", -1);
3880 sq_newclosure(v, &rand_wrapper, 0);
3881 if(SQ_FAILED(sq_createslot(v, -3))) {
3882 throw SquirrelError(v, "Couldn't register function 'rand'");
3885 // Register class DisplayEffect
3886 sq_pushstring(v, "DisplayEffect", -1);
3887 if(sq_newclass(v, SQFalse) < 0) {
3888 std::ostringstream msg;
3889 msg << "Couldn't create new class 'DisplayEffect'";
3890 throw SquirrelError(v, msg.str());
3892 sq_pushstring(v, "fade_out", -1);
3893 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
3894 if(SQ_FAILED(sq_createslot(v, -3))) {
3895 throw SquirrelError(v, "Couldn't register function 'fade_out'");
3898 sq_pushstring(v, "fade_in", -1);
3899 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
3900 if(SQ_FAILED(sq_createslot(v, -3))) {
3901 throw SquirrelError(v, "Couldn't register function 'fade_in'");
3904 sq_pushstring(v, "set_black", -1);
3905 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
3906 if(SQ_FAILED(sq_createslot(v, -3))) {
3907 throw SquirrelError(v, "Couldn't register function 'set_black'");
3910 sq_pushstring(v, "is_black", -1);
3911 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
3912 if(SQ_FAILED(sq_createslot(v, -3))) {
3913 throw SquirrelError(v, "Couldn't register function 'is_black'");
3916 sq_pushstring(v, "sixteen_to_nine", -1);
3917 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
3918 if(SQ_FAILED(sq_createslot(v, -3))) {
3919 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
3922 sq_pushstring(v, "four_to_three", -1);
3923 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
3924 if(SQ_FAILED(sq_createslot(v, -3))) {
3925 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
3928 if(SQ_FAILED(sq_createslot(v, -3))) {
3929 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
3932 // Register class Camera
3933 sq_pushstring(v, "Camera", -1);
3934 if(sq_newclass(v, SQFalse) < 0) {
3935 std::ostringstream msg;
3936 msg << "Couldn't create new class 'Camera'";
3937 throw SquirrelError(v, msg.str());
3939 sq_pushstring(v, "shake", -1);
3940 sq_newclosure(v, &Camera_shake_wrapper, 0);
3941 if(SQ_FAILED(sq_createslot(v, -3))) {
3942 throw SquirrelError(v, "Couldn't register function 'shake'");
3945 sq_pushstring(v, "set_pos", -1);
3946 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
3947 if(SQ_FAILED(sq_createslot(v, -3))) {
3948 throw SquirrelError(v, "Couldn't register function 'set_pos'");
3951 sq_pushstring(v, "set_mode", -1);
3952 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
3953 if(SQ_FAILED(sq_createslot(v, -3))) {
3954 throw SquirrelError(v, "Couldn't register function 'set_mode'");
3957 sq_pushstring(v, "scroll_to", -1);
3958 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
3959 if(SQ_FAILED(sq_createslot(v, -3))) {
3960 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
3963 if(SQ_FAILED(sq_createslot(v, -3))) {
3964 throw SquirrelError(v, "Couldn't register class 'Camera'");
3967 // Register class Level
3968 sq_pushstring(v, "Level", -1);
3969 if(sq_newclass(v, SQFalse) < 0) {
3970 std::ostringstream msg;
3971 msg << "Couldn't create new class 'Level'";
3972 throw SquirrelError(v, msg.str());
3974 sq_pushstring(v, "finish", -1);
3975 sq_newclosure(v, &Level_finish_wrapper, 0);
3976 if(SQ_FAILED(sq_createslot(v, -3))) {
3977 throw SquirrelError(v, "Couldn't register function 'finish'");
3980 sq_pushstring(v, "spawn", -1);
3981 sq_newclosure(v, &Level_spawn_wrapper, 0);
3982 if(SQ_FAILED(sq_createslot(v, -3))) {
3983 throw SquirrelError(v, "Couldn't register function 'spawn'");
3986 sq_pushstring(v, "flip_vertically", -1);
3987 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
3988 if(SQ_FAILED(sq_createslot(v, -3))) {
3989 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
3992 sq_pushstring(v, "toggle_pause", -1);
3993 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
3994 if(SQ_FAILED(sq_createslot(v, -3))) {
3995 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
3998 if(SQ_FAILED(sq_createslot(v, -3))) {
3999 throw SquirrelError(v, "Couldn't register class 'Level'");
4002 // Register class ScriptedObject
4003 sq_pushstring(v, "ScriptedObject", -1);
4004 if(sq_newclass(v, SQFalse) < 0) {
4005 std::ostringstream msg;
4006 msg << "Couldn't create new class 'ScriptedObject'";
4007 throw SquirrelError(v, msg.str());
4009 sq_pushstring(v, "set_action", -1);
4010 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4011 if(SQ_FAILED(sq_createslot(v, -3))) {
4012 throw SquirrelError(v, "Couldn't register function 'set_action'");
4015 sq_pushstring(v, "get_action", -1);
4016 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4017 if(SQ_FAILED(sq_createslot(v, -3))) {
4018 throw SquirrelError(v, "Couldn't register function 'get_action'");
4021 sq_pushstring(v, "move", -1);
4022 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4023 if(SQ_FAILED(sq_createslot(v, -3))) {
4024 throw SquirrelError(v, "Couldn't register function 'move'");
4027 sq_pushstring(v, "set_pos", -1);
4028 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4029 if(SQ_FAILED(sq_createslot(v, -3))) {
4030 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4033 sq_pushstring(v, "get_pos_x", -1);
4034 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4035 if(SQ_FAILED(sq_createslot(v, -3))) {
4036 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4039 sq_pushstring(v, "get_pos_y", -1);
4040 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4041 if(SQ_FAILED(sq_createslot(v, -3))) {
4042 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4045 sq_pushstring(v, "set_velocity", -1);
4046 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4047 if(SQ_FAILED(sq_createslot(v, -3))) {
4048 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4051 sq_pushstring(v, "get_velocity_x", -1);
4052 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4053 if(SQ_FAILED(sq_createslot(v, -3))) {
4054 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4057 sq_pushstring(v, "get_velocity_y", -1);
4058 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4059 if(SQ_FAILED(sq_createslot(v, -3))) {
4060 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4063 sq_pushstring(v, "set_visible", -1);
4064 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4065 if(SQ_FAILED(sq_createslot(v, -3))) {
4066 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4069 sq_pushstring(v, "is_visible", -1);
4070 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4071 if(SQ_FAILED(sq_createslot(v, -3))) {
4072 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4075 sq_pushstring(v, "set_solid", -1);
4076 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4077 if(SQ_FAILED(sq_createslot(v, -3))) {
4078 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4081 sq_pushstring(v, "is_solid", -1);
4082 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4083 if(SQ_FAILED(sq_createslot(v, -3))) {
4084 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4087 sq_pushstring(v, "get_name", -1);
4088 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4089 if(SQ_FAILED(sq_createslot(v, -3))) {
4090 throw SquirrelError(v, "Couldn't register function 'get_name'");
4093 if(SQ_FAILED(sq_createslot(v, -3))) {
4094 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4097 // Register class Text
4098 sq_pushstring(v, "Text", -1);
4099 if(sq_newclass(v, SQFalse) < 0) {
4100 std::ostringstream msg;
4101 msg << "Couldn't create new class 'Text'";
4102 throw SquirrelError(v, msg.str());
4104 sq_pushstring(v, "set_text", -1);
4105 sq_newclosure(v, &Text_set_text_wrapper, 0);
4106 if(SQ_FAILED(sq_createslot(v, -3))) {
4107 throw SquirrelError(v, "Couldn't register function 'set_text'");
4110 sq_pushstring(v, "set_font", -1);
4111 sq_newclosure(v, &Text_set_font_wrapper, 0);
4112 if(SQ_FAILED(sq_createslot(v, -3))) {
4113 throw SquirrelError(v, "Couldn't register function 'set_font'");
4116 sq_pushstring(v, "fade_in", -1);
4117 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4118 if(SQ_FAILED(sq_createslot(v, -3))) {
4119 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4122 sq_pushstring(v, "fade_out", -1);
4123 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4124 if(SQ_FAILED(sq_createslot(v, -3))) {
4125 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4128 sq_pushstring(v, "set_visible", -1);
4129 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4130 if(SQ_FAILED(sq_createslot(v, -3))) {
4131 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4134 sq_pushstring(v, "set_centered", -1);
4135 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4136 if(SQ_FAILED(sq_createslot(v, -3))) {
4137 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4140 if(SQ_FAILED(sq_createslot(v, -3))) {
4141 throw SquirrelError(v, "Couldn't register class 'Text'");
4144 // Register class Player
4145 sq_pushstring(v, "Player", -1);
4146 if(sq_newclass(v, SQFalse) < 0) {
4147 std::ostringstream msg;
4148 msg << "Couldn't create new class 'Player'";
4149 throw SquirrelError(v, msg.str());
4151 sq_pushstring(v, "add_bonus", -1);
4152 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4153 if(SQ_FAILED(sq_createslot(v, -3))) {
4154 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4157 sq_pushstring(v, "add_coins", -1);
4158 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4159 if(SQ_FAILED(sq_createslot(v, -3))) {
4160 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4163 sq_pushstring(v, "make_invincible", -1);
4164 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4165 if(SQ_FAILED(sq_createslot(v, -3))) {
4166 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4169 sq_pushstring(v, "deactivate", -1);
4170 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4171 if(SQ_FAILED(sq_createslot(v, -3))) {
4172 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4175 sq_pushstring(v, "activate", -1);
4176 sq_newclosure(v, &Player_activate_wrapper, 0);
4177 if(SQ_FAILED(sq_createslot(v, -3))) {
4178 throw SquirrelError(v, "Couldn't register function 'activate'");
4181 sq_pushstring(v, "walk", -1);
4182 sq_newclosure(v, &Player_walk_wrapper, 0);
4183 if(SQ_FAILED(sq_createslot(v, -3))) {
4184 throw SquirrelError(v, "Couldn't register function 'walk'");
4187 sq_pushstring(v, "set_visible", -1);
4188 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4189 if(SQ_FAILED(sq_createslot(v, -3))) {
4190 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4193 sq_pushstring(v, "get_visible", -1);
4194 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4195 if(SQ_FAILED(sq_createslot(v, -3))) {
4196 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4199 sq_pushstring(v, "kill", -1);
4200 sq_newclosure(v, &Player_kill_wrapper, 0);
4201 if(SQ_FAILED(sq_createslot(v, -3))) {
4202 throw SquirrelError(v, "Couldn't register function 'kill'");
4205 sq_pushstring(v, "set_ghost_mode", -1);
4206 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4207 if(SQ_FAILED(sq_createslot(v, -3))) {
4208 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4211 sq_pushstring(v, "get_ghost_mode", -1);
4212 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4213 if(SQ_FAILED(sq_createslot(v, -3))) {
4214 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4217 sq_pushstring(v, "do_cheer", -1);
4218 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4219 if(SQ_FAILED(sq_createslot(v, -3))) {
4220 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4223 sq_pushstring(v, "do_duck", -1);
4224 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4225 if(SQ_FAILED(sq_createslot(v, -3))) {
4226 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4229 sq_pushstring(v, "do_standup", -1);
4230 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4231 if(SQ_FAILED(sq_createslot(v, -3))) {
4232 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4235 sq_pushstring(v, "do_backflip", -1);
4236 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4237 if(SQ_FAILED(sq_createslot(v, -3))) {
4238 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4241 sq_pushstring(v, "do_jump", -1);
4242 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4243 if(SQ_FAILED(sq_createslot(v, -3))) {
4244 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4247 sq_pushstring(v, "trigger_sequence", -1);
4248 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4249 if(SQ_FAILED(sq_createslot(v, -3))) {
4250 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4253 if(SQ_FAILED(sq_createslot(v, -3))) {
4254 throw SquirrelError(v, "Couldn't register class 'Player'");
4257 // Register class FloatingImage
4258 sq_pushstring(v, "FloatingImage", -1);
4259 if(sq_newclass(v, SQFalse) < 0) {
4260 std::ostringstream msg;
4261 msg << "Couldn't create new class 'FloatingImage'";
4262 throw SquirrelError(v, msg.str());
4264 sq_pushstring(v, "constructor", -1);
4265 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4266 if(SQ_FAILED(sq_createslot(v, -3))) {
4267 throw SquirrelError(v, "Couldn't register function 'constructor'");
4270 sq_pushstring(v, "set_layer", -1);
4271 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4272 if(SQ_FAILED(sq_createslot(v, -3))) {
4273 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4276 sq_pushstring(v, "get_layer", -1);
4277 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4278 if(SQ_FAILED(sq_createslot(v, -3))) {
4279 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4282 sq_pushstring(v, "set_pos", -1);
4283 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4284 if(SQ_FAILED(sq_createslot(v, -3))) {
4285 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4288 sq_pushstring(v, "get_pos_x", -1);
4289 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4290 if(SQ_FAILED(sq_createslot(v, -3))) {
4291 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4294 sq_pushstring(v, "get_pos_y", -1);
4295 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4296 if(SQ_FAILED(sq_createslot(v, -3))) {
4297 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4300 sq_pushstring(v, "set_anchor_point", -1);
4301 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4302 if(SQ_FAILED(sq_createslot(v, -3))) {
4303 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4306 sq_pushstring(v, "get_anchor_point", -1);
4307 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4308 if(SQ_FAILED(sq_createslot(v, -3))) {
4309 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4312 sq_pushstring(v, "set_visible", -1);
4313 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4314 if(SQ_FAILED(sq_createslot(v, -3))) {
4315 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4318 sq_pushstring(v, "get_visible", -1);
4319 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4320 if(SQ_FAILED(sq_createslot(v, -3))) {
4321 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4324 sq_pushstring(v, "set_action", -1);
4325 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4326 if(SQ_FAILED(sq_createslot(v, -3))) {
4327 throw SquirrelError(v, "Couldn't register function 'set_action'");
4330 sq_pushstring(v, "get_action", -1);
4331 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4332 if(SQ_FAILED(sq_createslot(v, -3))) {
4333 throw SquirrelError(v, "Couldn't register function 'get_action'");
4336 sq_pushstring(v, "fade_in", -1);
4337 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4338 if(SQ_FAILED(sq_createslot(v, -3))) {
4339 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4342 sq_pushstring(v, "fade_out", -1);
4343 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4344 if(SQ_FAILED(sq_createslot(v, -3))) {
4345 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4348 if(SQ_FAILED(sq_createslot(v, -3))) {
4349 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4352 // Register class Platform
4353 sq_pushstring(v, "Platform", -1);
4354 if(sq_newclass(v, SQFalse) < 0) {
4355 std::ostringstream msg;
4356 msg << "Couldn't create new class 'Platform'";
4357 throw SquirrelError(v, msg.str());
4359 sq_pushstring(v, "goto_node", -1);
4360 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4361 if(SQ_FAILED(sq_createslot(v, -3))) {
4362 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4365 sq_pushstring(v, "start_moving", -1);
4366 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4367 if(SQ_FAILED(sq_createslot(v, -3))) {
4368 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4371 sq_pushstring(v, "stop_moving", -1);
4372 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4373 if(SQ_FAILED(sq_createslot(v, -3))) {
4374 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4377 if(SQ_FAILED(sq_createslot(v, -3))) {
4378 throw SquirrelError(v, "Couldn't register class 'Platform'");
4381 // Register class Candle
4382 sq_pushstring(v, "Candle", -1);
4383 if(sq_newclass(v, SQFalse) < 0) {
4384 std::ostringstream msg;
4385 msg << "Couldn't create new class 'Candle'";
4386 throw SquirrelError(v, msg.str());
4388 sq_pushstring(v, "get_burning", -1);
4389 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4390 if(SQ_FAILED(sq_createslot(v, -3))) {
4391 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4394 sq_pushstring(v, "set_burning", -1);
4395 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4396 if(SQ_FAILED(sq_createslot(v, -3))) {
4397 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4400 if(SQ_FAILED(sq_createslot(v, -3))) {
4401 throw SquirrelError(v, "Couldn't register class 'Candle'");
4404 // Register class Wind
4405 sq_pushstring(v, "Wind", -1);
4406 if(sq_newclass(v, SQFalse) < 0) {
4407 std::ostringstream msg;
4408 msg << "Couldn't create new class 'Wind'";
4409 throw SquirrelError(v, msg.str());
4411 sq_pushstring(v, "start", -1);
4412 sq_newclosure(v, &Wind_start_wrapper, 0);
4413 if(SQ_FAILED(sq_createslot(v, -3))) {
4414 throw SquirrelError(v, "Couldn't register function 'start'");
4417 sq_pushstring(v, "stop", -1);
4418 sq_newclosure(v, &Wind_stop_wrapper, 0);
4419 if(SQ_FAILED(sq_createslot(v, -3))) {
4420 throw SquirrelError(v, "Couldn't register function 'stop'");
4423 if(SQ_FAILED(sq_createslot(v, -3))) {
4424 throw SquirrelError(v, "Couldn't register class 'Wind'");
4427 // Register class AmbientSound
4428 sq_pushstring(v, "AmbientSound", -1);
4429 if(sq_newclass(v, SQFalse) < 0) {
4430 std::ostringstream msg;
4431 msg << "Couldn't create new class 'AmbientSound'";
4432 throw SquirrelError(v, msg.str());
4434 sq_pushstring(v, "set_pos", -1);
4435 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4436 if(SQ_FAILED(sq_createslot(v, -3))) {
4437 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4440 sq_pushstring(v, "get_pos_x", -1);
4441 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4442 if(SQ_FAILED(sq_createslot(v, -3))) {
4443 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4446 sq_pushstring(v, "get_pos_y", -1);
4447 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4448 if(SQ_FAILED(sq_createslot(v, -3))) {
4449 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4452 if(SQ_FAILED(sq_createslot(v, -3))) {
4453 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4456 // Register class Thunderstorm
4457 sq_pushstring(v, "Thunderstorm", -1);
4458 if(sq_newclass(v, SQFalse) < 0) {
4459 std::ostringstream msg;
4460 msg << "Couldn't create new class 'Thunderstorm'";
4461 throw SquirrelError(v, msg.str());
4463 sq_pushstring(v, "start", -1);
4464 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4465 if(SQ_FAILED(sq_createslot(v, -3))) {
4466 throw SquirrelError(v, "Couldn't register function 'start'");
4469 sq_pushstring(v, "stop", -1);
4470 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4471 if(SQ_FAILED(sq_createslot(v, -3))) {
4472 throw SquirrelError(v, "Couldn't register function 'stop'");
4475 sq_pushstring(v, "thunder", -1);
4476 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4477 if(SQ_FAILED(sq_createslot(v, -3))) {
4478 throw SquirrelError(v, "Couldn't register function 'thunder'");
4481 sq_pushstring(v, "lightning", -1);
4482 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4483 if(SQ_FAILED(sq_createslot(v, -3))) {
4484 throw SquirrelError(v, "Couldn't register function 'lightning'");
4487 sq_pushstring(v, "flash", -1);
4488 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4489 if(SQ_FAILED(sq_createslot(v, -3))) {
4490 throw SquirrelError(v, "Couldn't register function 'flash'");
4493 sq_pushstring(v, "electrify", -1);
4494 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4495 if(SQ_FAILED(sq_createslot(v, -3))) {
4496 throw SquirrelError(v, "Couldn't register function 'electrify'");
4499 if(SQ_FAILED(sq_createslot(v, -3))) {
4500 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4503 // Register class TileMap
4504 sq_pushstring(v, "TileMap", -1);
4505 if(sq_newclass(v, SQFalse) < 0) {
4506 std::ostringstream msg;
4507 msg << "Couldn't create new class 'TileMap'";
4508 throw SquirrelError(v, msg.str());
4510 sq_pushstring(v, "goto_node", -1);
4511 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4512 if(SQ_FAILED(sq_createslot(v, -3))) {
4513 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4516 sq_pushstring(v, "start_moving", -1);
4517 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4518 if(SQ_FAILED(sq_createslot(v, -3))) {
4519 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4522 sq_pushstring(v, "stop_moving", -1);
4523 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4524 if(SQ_FAILED(sq_createslot(v, -3))) {
4525 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4528 if(SQ_FAILED(sq_createslot(v, -3))) {
4529 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4532 // Register class SSector
4533 sq_pushstring(v, "SSector", -1);
4534 if(sq_newclass(v, SQFalse) < 0) {
4535 std::ostringstream msg;
4536 msg << "Couldn't create new class 'SSector'";
4537 throw SquirrelError(v, msg.str());
4539 sq_pushstring(v, "set_ambient_light", -1);
4540 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4541 if(SQ_FAILED(sq_createslot(v, -3))) {
4542 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4545 sq_pushstring(v, "get_ambient_red", -1);
4546 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4547 if(SQ_FAILED(sq_createslot(v, -3))) {
4548 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4551 sq_pushstring(v, "get_ambient_green", -1);
4552 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4553 if(SQ_FAILED(sq_createslot(v, -3))) {
4554 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4557 sq_pushstring(v, "get_ambient_blue", -1);
4558 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4559 if(SQ_FAILED(sq_createslot(v, -3))) {
4560 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4563 if(SQ_FAILED(sq_createslot(v, -3))) {
4564 throw SquirrelError(v, "Couldn't register class 'SSector'");
4567 // Register class LevelTime
4568 sq_pushstring(v, "LevelTime", -1);
4569 if(sq_newclass(v, SQFalse) < 0) {
4570 std::ostringstream msg;
4571 msg << "Couldn't create new class 'LevelTime'";
4572 throw SquirrelError(v, msg.str());
4574 sq_pushstring(v, "start", -1);
4575 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4576 if(SQ_FAILED(sq_createslot(v, -3))) {
4577 throw SquirrelError(v, "Couldn't register function 'start'");
4580 sq_pushstring(v, "stop", -1);
4581 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4582 if(SQ_FAILED(sq_createslot(v, -3))) {
4583 throw SquirrelError(v, "Couldn't register function 'stop'");
4586 sq_pushstring(v, "get_time", -1);
4587 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4588 if(SQ_FAILED(sq_createslot(v, -3))) {
4589 throw SquirrelError(v, "Couldn't register function 'get_time'");
4592 sq_pushstring(v, "set_time", -1);
4593 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
4594 if(SQ_FAILED(sq_createslot(v, -3))) {
4595 throw SquirrelError(v, "Couldn't register function 'set_time'");
4598 if(SQ_FAILED(sq_createslot(v, -3))) {
4599 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
4604 } // end of namespace Scripting