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
3256 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
3258 using namespace Wrapper;
3260 sq_pushroottable(v);
3261 sq_pushstring(v, "DisplayEffect", -1);
3262 if(SQ_FAILED(sq_get(v, -2))) {
3263 std::ostringstream msg;
3264 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
3265 throw SquirrelError(v, msg.str());
3268 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3269 std::ostringstream msg;
3270 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
3271 throw SquirrelError(v, msg.str());
3273 sq_remove(v, -2); // remove object name
3275 if(setup_releasehook) {
3276 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
3279 sq_remove(v, -2); // remove root table
3282 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
3284 using namespace Wrapper;
3286 sq_pushroottable(v);
3287 sq_pushstring(v, "Camera", -1);
3288 if(SQ_FAILED(sq_get(v, -2))) {
3289 std::ostringstream msg;
3290 msg << "Couldn't resolved squirrel type 'Camera'";
3291 throw SquirrelError(v, msg.str());
3294 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3295 std::ostringstream msg;
3296 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
3297 throw SquirrelError(v, msg.str());
3299 sq_remove(v, -2); // remove object name
3301 if(setup_releasehook) {
3302 sq_setreleasehook(v, -1, Camera_release_hook);
3305 sq_remove(v, -2); // remove root table
3308 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
3310 using namespace Wrapper;
3312 sq_pushroottable(v);
3313 sq_pushstring(v, "Level", -1);
3314 if(SQ_FAILED(sq_get(v, -2))) {
3315 std::ostringstream msg;
3316 msg << "Couldn't resolved squirrel type 'Level'";
3317 throw SquirrelError(v, msg.str());
3320 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3321 std::ostringstream msg;
3322 msg << "Couldn't setup squirrel instance for object of type 'Level'";
3323 throw SquirrelError(v, msg.str());
3325 sq_remove(v, -2); // remove object name
3327 if(setup_releasehook) {
3328 sq_setreleasehook(v, -1, Level_release_hook);
3331 sq_remove(v, -2); // remove root table
3334 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
3336 using namespace Wrapper;
3338 sq_pushroottable(v);
3339 sq_pushstring(v, "ScriptedObject", -1);
3340 if(SQ_FAILED(sq_get(v, -2))) {
3341 std::ostringstream msg;
3342 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
3343 throw SquirrelError(v, msg.str());
3346 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3347 std::ostringstream msg;
3348 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
3349 throw SquirrelError(v, msg.str());
3351 sq_remove(v, -2); // remove object name
3353 if(setup_releasehook) {
3354 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
3357 sq_remove(v, -2); // remove root table
3360 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
3362 using namespace Wrapper;
3364 sq_pushroottable(v);
3365 sq_pushstring(v, "Text", -1);
3366 if(SQ_FAILED(sq_get(v, -2))) {
3367 std::ostringstream msg;
3368 msg << "Couldn't resolved squirrel type 'Text'";
3369 throw SquirrelError(v, msg.str());
3372 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3373 std::ostringstream msg;
3374 msg << "Couldn't setup squirrel instance for object of type 'Text'";
3375 throw SquirrelError(v, msg.str());
3377 sq_remove(v, -2); // remove object name
3379 if(setup_releasehook) {
3380 sq_setreleasehook(v, -1, Text_release_hook);
3383 sq_remove(v, -2); // remove root table
3386 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
3388 using namespace Wrapper;
3390 sq_pushroottable(v);
3391 sq_pushstring(v, "Player", -1);
3392 if(SQ_FAILED(sq_get(v, -2))) {
3393 std::ostringstream msg;
3394 msg << "Couldn't resolved squirrel type 'Player'";
3395 throw SquirrelError(v, msg.str());
3398 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3399 std::ostringstream msg;
3400 msg << "Couldn't setup squirrel instance for object of type 'Player'";
3401 throw SquirrelError(v, msg.str());
3403 sq_remove(v, -2); // remove object name
3405 if(setup_releasehook) {
3406 sq_setreleasehook(v, -1, Player_release_hook);
3409 sq_remove(v, -2); // remove root table
3412 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
3414 using namespace Wrapper;
3416 sq_pushroottable(v);
3417 sq_pushstring(v, "FloatingImage", -1);
3418 if(SQ_FAILED(sq_get(v, -2))) {
3419 std::ostringstream msg;
3420 msg << "Couldn't resolved squirrel type 'FloatingImage'";
3421 throw SquirrelError(v, msg.str());
3424 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3425 std::ostringstream msg;
3426 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
3427 throw SquirrelError(v, msg.str());
3429 sq_remove(v, -2); // remove object name
3431 if(setup_releasehook) {
3432 sq_setreleasehook(v, -1, FloatingImage_release_hook);
3435 sq_remove(v, -2); // remove root table
3438 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
3440 using namespace Wrapper;
3442 sq_pushroottable(v);
3443 sq_pushstring(v, "Platform", -1);
3444 if(SQ_FAILED(sq_get(v, -2))) {
3445 std::ostringstream msg;
3446 msg << "Couldn't resolved squirrel type 'Platform'";
3447 throw SquirrelError(v, msg.str());
3450 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3451 std::ostringstream msg;
3452 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
3453 throw SquirrelError(v, msg.str());
3455 sq_remove(v, -2); // remove object name
3457 if(setup_releasehook) {
3458 sq_setreleasehook(v, -1, Platform_release_hook);
3461 sq_remove(v, -2); // remove root table
3464 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
3466 using namespace Wrapper;
3468 sq_pushroottable(v);
3469 sq_pushstring(v, "Candle", -1);
3470 if(SQ_FAILED(sq_get(v, -2))) {
3471 std::ostringstream msg;
3472 msg << "Couldn't resolved squirrel type 'Candle'";
3473 throw SquirrelError(v, msg.str());
3476 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3477 std::ostringstream msg;
3478 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
3479 throw SquirrelError(v, msg.str());
3481 sq_remove(v, -2); // remove object name
3483 if(setup_releasehook) {
3484 sq_setreleasehook(v, -1, Candle_release_hook);
3487 sq_remove(v, -2); // remove root table
3490 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
3492 using namespace Wrapper;
3494 sq_pushroottable(v);
3495 sq_pushstring(v, "Wind", -1);
3496 if(SQ_FAILED(sq_get(v, -2))) {
3497 std::ostringstream msg;
3498 msg << "Couldn't resolved squirrel type 'Wind'";
3499 throw SquirrelError(v, msg.str());
3502 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3503 std::ostringstream msg;
3504 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
3505 throw SquirrelError(v, msg.str());
3507 sq_remove(v, -2); // remove object name
3509 if(setup_releasehook) {
3510 sq_setreleasehook(v, -1, Wind_release_hook);
3513 sq_remove(v, -2); // remove root table
3516 void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
3518 using namespace Wrapper;
3520 sq_pushroottable(v);
3521 sq_pushstring(v, "AmbientSound", -1);
3522 if(SQ_FAILED(sq_get(v, -2))) {
3523 std::ostringstream msg;
3524 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3525 throw SquirrelError(v, msg.str());
3528 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3529 std::ostringstream msg;
3530 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3531 throw SquirrelError(v, msg.str());
3533 sq_remove(v, -2); // remove object name
3535 if(setup_releasehook) {
3536 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3539 sq_remove(v, -2); // remove root table
3542 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
3544 using namespace Wrapper;
3546 sq_pushroottable(v);
3547 sq_pushstring(v, "Thunderstorm", -1);
3548 if(SQ_FAILED(sq_get(v, -2))) {
3549 std::ostringstream msg;
3550 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
3551 throw SquirrelError(v, msg.str());
3554 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3555 std::ostringstream msg;
3556 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
3557 throw SquirrelError(v, msg.str());
3559 sq_remove(v, -2); // remove object name
3561 if(setup_releasehook) {
3562 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
3565 sq_remove(v, -2); // remove root table
3568 void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
3570 using namespace Wrapper;
3572 sq_pushroottable(v);
3573 sq_pushstring(v, "TileMap", -1);
3574 if(SQ_FAILED(sq_get(v, -2))) {
3575 std::ostringstream msg;
3576 msg << "Couldn't resolved squirrel type 'TileMap'";
3577 throw SquirrelError(v, msg.str());
3580 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3581 std::ostringstream msg;
3582 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
3583 throw SquirrelError(v, msg.str());
3585 sq_remove(v, -2); // remove object name
3587 if(setup_releasehook) {
3588 sq_setreleasehook(v, -1, TileMap_release_hook);
3591 sq_remove(v, -2); // remove root table
3594 void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
3596 using namespace Wrapper;
3598 sq_pushroottable(v);
3599 sq_pushstring(v, "SSector", -1);
3600 if(SQ_FAILED(sq_get(v, -2))) {
3601 std::ostringstream msg;
3602 msg << "Couldn't resolved squirrel type 'SSector'";
3603 throw SquirrelError(v, msg.str());
3606 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3607 std::ostringstream msg;
3608 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
3609 throw SquirrelError(v, msg.str());
3611 sq_remove(v, -2); // remove object name
3613 if(setup_releasehook) {
3614 sq_setreleasehook(v, -1, SSector_release_hook);
3617 sq_remove(v, -2); // remove root table
3620 void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
3622 using namespace Wrapper;
3624 sq_pushroottable(v);
3625 sq_pushstring(v, "LevelTime", -1);
3626 if(SQ_FAILED(sq_get(v, -2))) {
3627 std::ostringstream msg;
3628 msg << "Couldn't resolved squirrel type 'LevelTime'";
3629 throw SquirrelError(v, msg.str());
3632 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3633 std::ostringstream msg;
3634 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
3635 throw SquirrelError(v, msg.str());
3637 sq_remove(v, -2); // remove object name
3639 if(setup_releasehook) {
3640 sq_setreleasehook(v, -1, LevelTime_release_hook);
3643 sq_remove(v, -2); // remove root table
3646 void register_supertux_wrapper(HSQUIRRELVM v)
3648 using namespace Wrapper;
3650 sq_pushstring(v, "ANCHOR_TOP", -1);
3651 sq_pushinteger(v, 16);
3652 if(SQ_FAILED(sq_createslot(v, -3))) {
3653 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
3656 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
3657 sq_pushinteger(v, 32);
3658 if(SQ_FAILED(sq_createslot(v, -3))) {
3659 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
3662 sq_pushstring(v, "ANCHOR_LEFT", -1);
3663 sq_pushinteger(v, 1);
3664 if(SQ_FAILED(sq_createslot(v, -3))) {
3665 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
3668 sq_pushstring(v, "ANCHOR_RIGHT", -1);
3669 sq_pushinteger(v, 2);
3670 if(SQ_FAILED(sq_createslot(v, -3))) {
3671 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
3674 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
3675 sq_pushinteger(v, 0);
3676 if(SQ_FAILED(sq_createslot(v, -3))) {
3677 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
3680 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
3681 sq_pushinteger(v, 17);
3682 if(SQ_FAILED(sq_createslot(v, -3))) {
3683 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
3686 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
3687 sq_pushinteger(v, 18);
3688 if(SQ_FAILED(sq_createslot(v, -3))) {
3689 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
3692 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
3693 sq_pushinteger(v, 33);
3694 if(SQ_FAILED(sq_createslot(v, -3))) {
3695 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
3698 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
3699 sq_pushinteger(v, 34);
3700 if(SQ_FAILED(sq_createslot(v, -3))) {
3701 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
3704 sq_pushstring(v, "display", -1);
3705 sq_newclosure(v, &display_wrapper, 0);
3706 if(SQ_FAILED(sq_createslot(v, -3))) {
3707 throw SquirrelError(v, "Couldn't register function 'display'");
3710 sq_pushstring(v, "print_stacktrace", -1);
3711 sq_newclosure(v, &print_stacktrace_wrapper, 0);
3712 if(SQ_FAILED(sq_createslot(v, -3))) {
3713 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
3716 sq_pushstring(v, "get_current_thread", -1);
3717 sq_newclosure(v, &get_current_thread_wrapper, 0);
3718 if(SQ_FAILED(sq_createslot(v, -3))) {
3719 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
3722 sq_pushstring(v, "display_text_file", -1);
3723 sq_newclosure(v, &display_text_file_wrapper, 0);
3724 if(SQ_FAILED(sq_createslot(v, -3))) {
3725 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
3728 sq_pushstring(v, "load_worldmap", -1);
3729 sq_newclosure(v, &load_worldmap_wrapper, 0);
3730 if(SQ_FAILED(sq_createslot(v, -3))) {
3731 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
3734 sq_pushstring(v, "load_level", -1);
3735 sq_newclosure(v, &load_level_wrapper, 0);
3736 if(SQ_FAILED(sq_createslot(v, -3))) {
3737 throw SquirrelError(v, "Couldn't register function 'load_level'");
3740 sq_pushstring(v, "wait", -1);
3741 sq_newclosure(v, &wait_wrapper, 0);
3742 if(SQ_FAILED(sq_createslot(v, -3))) {
3743 throw SquirrelError(v, "Couldn't register function 'wait'");
3746 sq_pushstring(v, "wait_for_screenswitch", -1);
3747 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
3748 if(SQ_FAILED(sq_createslot(v, -3))) {
3749 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
3752 sq_pushstring(v, "exit_screen", -1);
3753 sq_newclosure(v, &exit_screen_wrapper, 0);
3754 if(SQ_FAILED(sq_createslot(v, -3))) {
3755 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
3758 sq_pushstring(v, "fadeout_screen", -1);
3759 sq_newclosure(v, &fadeout_screen_wrapper, 0);
3760 if(SQ_FAILED(sq_createslot(v, -3))) {
3761 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
3764 sq_pushstring(v, "shrink_screen", -1);
3765 sq_newclosure(v, &shrink_screen_wrapper, 0);
3766 if(SQ_FAILED(sq_createslot(v, -3))) {
3767 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
3770 sq_pushstring(v, "translate", -1);
3771 sq_newclosure(v, &translate_wrapper, 0);
3772 if(SQ_FAILED(sq_createslot(v, -3))) {
3773 throw SquirrelError(v, "Couldn't register function 'translate'");
3776 sq_pushstring(v, "import", -1);
3777 sq_newclosure(v, &import_wrapper, 0);
3778 if(SQ_FAILED(sq_createslot(v, -3))) {
3779 throw SquirrelError(v, "Couldn't register function 'import'");
3782 sq_pushstring(v, "save_state", -1);
3783 sq_newclosure(v, &save_state_wrapper, 0);
3784 if(SQ_FAILED(sq_createslot(v, -3))) {
3785 throw SquirrelError(v, "Couldn't register function 'save_state'");
3788 sq_pushstring(v, "update_worldmap", -1);
3789 sq_newclosure(v, &update_worldmap_wrapper, 0);
3790 if(SQ_FAILED(sq_createslot(v, -3))) {
3791 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
3794 sq_pushstring(v, "debug_collrects", -1);
3795 sq_newclosure(v, &debug_collrects_wrapper, 0);
3796 if(SQ_FAILED(sq_createslot(v, -3))) {
3797 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
3800 sq_pushstring(v, "debug_show_fps", -1);
3801 sq_newclosure(v, &debug_show_fps_wrapper, 0);
3802 if(SQ_FAILED(sq_createslot(v, -3))) {
3803 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
3806 sq_pushstring(v, "debug_draw_solids_only", -1);
3807 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
3808 if(SQ_FAILED(sq_createslot(v, -3))) {
3809 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
3812 sq_pushstring(v, "play_music", -1);
3813 sq_newclosure(v, &play_music_wrapper, 0);
3814 if(SQ_FAILED(sq_createslot(v, -3))) {
3815 throw SquirrelError(v, "Couldn't register function 'play_music'");
3818 sq_pushstring(v, "play_sound", -1);
3819 sq_newclosure(v, &play_sound_wrapper, 0);
3820 if(SQ_FAILED(sq_createslot(v, -3))) {
3821 throw SquirrelError(v, "Couldn't register function 'play_sound'");
3824 sq_pushstring(v, "grease", -1);
3825 sq_newclosure(v, &grease_wrapper, 0);
3826 if(SQ_FAILED(sq_createslot(v, -3))) {
3827 throw SquirrelError(v, "Couldn't register function 'grease'");
3830 sq_pushstring(v, "invincible", -1);
3831 sq_newclosure(v, &invincible_wrapper, 0);
3832 if(SQ_FAILED(sq_createslot(v, -3))) {
3833 throw SquirrelError(v, "Couldn't register function 'invincible'");
3836 sq_pushstring(v, "ghost", -1);
3837 sq_newclosure(v, &ghost_wrapper, 0);
3838 if(SQ_FAILED(sq_createslot(v, -3))) {
3839 throw SquirrelError(v, "Couldn't register function 'ghost'");
3842 sq_pushstring(v, "mortal", -1);
3843 sq_newclosure(v, &mortal_wrapper, 0);
3844 if(SQ_FAILED(sq_createslot(v, -3))) {
3845 throw SquirrelError(v, "Couldn't register function 'mortal'");
3848 sq_pushstring(v, "restart", -1);
3849 sq_newclosure(v, &restart_wrapper, 0);
3850 if(SQ_FAILED(sq_createslot(v, -3))) {
3851 throw SquirrelError(v, "Couldn't register function 'restart'");
3854 sq_pushstring(v, "whereami", -1);
3855 sq_newclosure(v, &whereami_wrapper, 0);
3856 if(SQ_FAILED(sq_createslot(v, -3))) {
3857 throw SquirrelError(v, "Couldn't register function 'whereami'");
3860 sq_pushstring(v, "gotoend", -1);
3861 sq_newclosure(v, &gotoend_wrapper, 0);
3862 if(SQ_FAILED(sq_createslot(v, -3))) {
3863 throw SquirrelError(v, "Couldn't register function 'gotoend'");
3866 sq_pushstring(v, "camera", -1);
3867 sq_newclosure(v, &camera_wrapper, 0);
3868 if(SQ_FAILED(sq_createslot(v, -3))) {
3869 throw SquirrelError(v, "Couldn't register function 'camera'");
3872 sq_pushstring(v, "quit", -1);
3873 sq_newclosure(v, &quit_wrapper, 0);
3874 if(SQ_FAILED(sq_createslot(v, -3))) {
3875 throw SquirrelError(v, "Couldn't register function 'quit'");
3878 sq_pushstring(v, "rand", -1);
3879 sq_newclosure(v, &rand_wrapper, 0);
3880 if(SQ_FAILED(sq_createslot(v, -3))) {
3881 throw SquirrelError(v, "Couldn't register function 'rand'");
3884 // Register class DisplayEffect
3885 sq_pushstring(v, "DisplayEffect", -1);
3886 if(sq_newclass(v, SQFalse) < 0) {
3887 std::ostringstream msg;
3888 msg << "Couldn't create new class 'DisplayEffect'";
3889 throw SquirrelError(v, msg.str());
3891 sq_pushstring(v, "fade_out", -1);
3892 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
3893 if(SQ_FAILED(sq_createslot(v, -3))) {
3894 throw SquirrelError(v, "Couldn't register function 'fade_out'");
3897 sq_pushstring(v, "fade_in", -1);
3898 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
3899 if(SQ_FAILED(sq_createslot(v, -3))) {
3900 throw SquirrelError(v, "Couldn't register function 'fade_in'");
3903 sq_pushstring(v, "set_black", -1);
3904 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
3905 if(SQ_FAILED(sq_createslot(v, -3))) {
3906 throw SquirrelError(v, "Couldn't register function 'set_black'");
3909 sq_pushstring(v, "is_black", -1);
3910 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
3911 if(SQ_FAILED(sq_createslot(v, -3))) {
3912 throw SquirrelError(v, "Couldn't register function 'is_black'");
3915 sq_pushstring(v, "sixteen_to_nine", -1);
3916 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
3917 if(SQ_FAILED(sq_createslot(v, -3))) {
3918 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
3921 sq_pushstring(v, "four_to_three", -1);
3922 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
3923 if(SQ_FAILED(sq_createslot(v, -3))) {
3924 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
3927 if(SQ_FAILED(sq_createslot(v, -3))) {
3928 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
3931 // Register class Camera
3932 sq_pushstring(v, "Camera", -1);
3933 if(sq_newclass(v, SQFalse) < 0) {
3934 std::ostringstream msg;
3935 msg << "Couldn't create new class 'Camera'";
3936 throw SquirrelError(v, msg.str());
3938 sq_pushstring(v, "shake", -1);
3939 sq_newclosure(v, &Camera_shake_wrapper, 0);
3940 if(SQ_FAILED(sq_createslot(v, -3))) {
3941 throw SquirrelError(v, "Couldn't register function 'shake'");
3944 sq_pushstring(v, "set_pos", -1);
3945 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
3946 if(SQ_FAILED(sq_createslot(v, -3))) {
3947 throw SquirrelError(v, "Couldn't register function 'set_pos'");
3950 sq_pushstring(v, "set_mode", -1);
3951 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
3952 if(SQ_FAILED(sq_createslot(v, -3))) {
3953 throw SquirrelError(v, "Couldn't register function 'set_mode'");
3956 sq_pushstring(v, "scroll_to", -1);
3957 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
3958 if(SQ_FAILED(sq_createslot(v, -3))) {
3959 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
3962 if(SQ_FAILED(sq_createslot(v, -3))) {
3963 throw SquirrelError(v, "Couldn't register class 'Camera'");
3966 // Register class Level
3967 sq_pushstring(v, "Level", -1);
3968 if(sq_newclass(v, SQFalse) < 0) {
3969 std::ostringstream msg;
3970 msg << "Couldn't create new class 'Level'";
3971 throw SquirrelError(v, msg.str());
3973 sq_pushstring(v, "finish", -1);
3974 sq_newclosure(v, &Level_finish_wrapper, 0);
3975 if(SQ_FAILED(sq_createslot(v, -3))) {
3976 throw SquirrelError(v, "Couldn't register function 'finish'");
3979 sq_pushstring(v, "spawn", -1);
3980 sq_newclosure(v, &Level_spawn_wrapper, 0);
3981 if(SQ_FAILED(sq_createslot(v, -3))) {
3982 throw SquirrelError(v, "Couldn't register function 'spawn'");
3985 sq_pushstring(v, "flip_vertically", -1);
3986 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
3987 if(SQ_FAILED(sq_createslot(v, -3))) {
3988 throw SquirrelError(v, "Couldn't register function 'flip_vertically'");
3991 sq_pushstring(v, "toggle_pause", -1);
3992 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
3993 if(SQ_FAILED(sq_createslot(v, -3))) {
3994 throw SquirrelError(v, "Couldn't register function 'toggle_pause'");
3997 if(SQ_FAILED(sq_createslot(v, -3))) {
3998 throw SquirrelError(v, "Couldn't register class 'Level'");
4001 // Register class ScriptedObject
4002 sq_pushstring(v, "ScriptedObject", -1);
4003 if(sq_newclass(v, SQFalse) < 0) {
4004 std::ostringstream msg;
4005 msg << "Couldn't create new class 'ScriptedObject'";
4006 throw SquirrelError(v, msg.str());
4008 sq_pushstring(v, "set_action", -1);
4009 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
4010 if(SQ_FAILED(sq_createslot(v, -3))) {
4011 throw SquirrelError(v, "Couldn't register function 'set_action'");
4014 sq_pushstring(v, "get_action", -1);
4015 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
4016 if(SQ_FAILED(sq_createslot(v, -3))) {
4017 throw SquirrelError(v, "Couldn't register function 'get_action'");
4020 sq_pushstring(v, "move", -1);
4021 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
4022 if(SQ_FAILED(sq_createslot(v, -3))) {
4023 throw SquirrelError(v, "Couldn't register function 'move'");
4026 sq_pushstring(v, "set_pos", -1);
4027 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
4028 if(SQ_FAILED(sq_createslot(v, -3))) {
4029 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4032 sq_pushstring(v, "get_pos_x", -1);
4033 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
4034 if(SQ_FAILED(sq_createslot(v, -3))) {
4035 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4038 sq_pushstring(v, "get_pos_y", -1);
4039 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
4040 if(SQ_FAILED(sq_createslot(v, -3))) {
4041 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4044 sq_pushstring(v, "set_velocity", -1);
4045 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
4046 if(SQ_FAILED(sq_createslot(v, -3))) {
4047 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
4050 sq_pushstring(v, "get_velocity_x", -1);
4051 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
4052 if(SQ_FAILED(sq_createslot(v, -3))) {
4053 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
4056 sq_pushstring(v, "get_velocity_y", -1);
4057 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
4058 if(SQ_FAILED(sq_createslot(v, -3))) {
4059 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
4062 sq_pushstring(v, "set_visible", -1);
4063 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
4064 if(SQ_FAILED(sq_createslot(v, -3))) {
4065 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4068 sq_pushstring(v, "is_visible", -1);
4069 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
4070 if(SQ_FAILED(sq_createslot(v, -3))) {
4071 throw SquirrelError(v, "Couldn't register function 'is_visible'");
4074 sq_pushstring(v, "set_solid", -1);
4075 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
4076 if(SQ_FAILED(sq_createslot(v, -3))) {
4077 throw SquirrelError(v, "Couldn't register function 'set_solid'");
4080 sq_pushstring(v, "is_solid", -1);
4081 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
4082 if(SQ_FAILED(sq_createslot(v, -3))) {
4083 throw SquirrelError(v, "Couldn't register function 'is_solid'");
4086 sq_pushstring(v, "get_name", -1);
4087 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
4088 if(SQ_FAILED(sq_createslot(v, -3))) {
4089 throw SquirrelError(v, "Couldn't register function 'get_name'");
4092 if(SQ_FAILED(sq_createslot(v, -3))) {
4093 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
4096 // Register class Text
4097 sq_pushstring(v, "Text", -1);
4098 if(sq_newclass(v, SQFalse) < 0) {
4099 std::ostringstream msg;
4100 msg << "Couldn't create new class 'Text'";
4101 throw SquirrelError(v, msg.str());
4103 sq_pushstring(v, "set_text", -1);
4104 sq_newclosure(v, &Text_set_text_wrapper, 0);
4105 if(SQ_FAILED(sq_createslot(v, -3))) {
4106 throw SquirrelError(v, "Couldn't register function 'set_text'");
4109 sq_pushstring(v, "set_font", -1);
4110 sq_newclosure(v, &Text_set_font_wrapper, 0);
4111 if(SQ_FAILED(sq_createslot(v, -3))) {
4112 throw SquirrelError(v, "Couldn't register function 'set_font'");
4115 sq_pushstring(v, "fade_in", -1);
4116 sq_newclosure(v, &Text_fade_in_wrapper, 0);
4117 if(SQ_FAILED(sq_createslot(v, -3))) {
4118 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4121 sq_pushstring(v, "fade_out", -1);
4122 sq_newclosure(v, &Text_fade_out_wrapper, 0);
4123 if(SQ_FAILED(sq_createslot(v, -3))) {
4124 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4127 sq_pushstring(v, "set_visible", -1);
4128 sq_newclosure(v, &Text_set_visible_wrapper, 0);
4129 if(SQ_FAILED(sq_createslot(v, -3))) {
4130 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4133 sq_pushstring(v, "set_centered", -1);
4134 sq_newclosure(v, &Text_set_centered_wrapper, 0);
4135 if(SQ_FAILED(sq_createslot(v, -3))) {
4136 throw SquirrelError(v, "Couldn't register function 'set_centered'");
4139 if(SQ_FAILED(sq_createslot(v, -3))) {
4140 throw SquirrelError(v, "Couldn't register class 'Text'");
4143 // Register class Player
4144 sq_pushstring(v, "Player", -1);
4145 if(sq_newclass(v, SQFalse) < 0) {
4146 std::ostringstream msg;
4147 msg << "Couldn't create new class 'Player'";
4148 throw SquirrelError(v, msg.str());
4150 sq_pushstring(v, "add_bonus", -1);
4151 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
4152 if(SQ_FAILED(sq_createslot(v, -3))) {
4153 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
4156 sq_pushstring(v, "add_coins", -1);
4157 sq_newclosure(v, &Player_add_coins_wrapper, 0);
4158 if(SQ_FAILED(sq_createslot(v, -3))) {
4159 throw SquirrelError(v, "Couldn't register function 'add_coins'");
4162 sq_pushstring(v, "make_invincible", -1);
4163 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
4164 if(SQ_FAILED(sq_createslot(v, -3))) {
4165 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
4168 sq_pushstring(v, "deactivate", -1);
4169 sq_newclosure(v, &Player_deactivate_wrapper, 0);
4170 if(SQ_FAILED(sq_createslot(v, -3))) {
4171 throw SquirrelError(v, "Couldn't register function 'deactivate'");
4174 sq_pushstring(v, "activate", -1);
4175 sq_newclosure(v, &Player_activate_wrapper, 0);
4176 if(SQ_FAILED(sq_createslot(v, -3))) {
4177 throw SquirrelError(v, "Couldn't register function 'activate'");
4180 sq_pushstring(v, "walk", -1);
4181 sq_newclosure(v, &Player_walk_wrapper, 0);
4182 if(SQ_FAILED(sq_createslot(v, -3))) {
4183 throw SquirrelError(v, "Couldn't register function 'walk'");
4186 sq_pushstring(v, "set_visible", -1);
4187 sq_newclosure(v, &Player_set_visible_wrapper, 0);
4188 if(SQ_FAILED(sq_createslot(v, -3))) {
4189 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4192 sq_pushstring(v, "get_visible", -1);
4193 sq_newclosure(v, &Player_get_visible_wrapper, 0);
4194 if(SQ_FAILED(sq_createslot(v, -3))) {
4195 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4198 sq_pushstring(v, "kill", -1);
4199 sq_newclosure(v, &Player_kill_wrapper, 0);
4200 if(SQ_FAILED(sq_createslot(v, -3))) {
4201 throw SquirrelError(v, "Couldn't register function 'kill'");
4204 sq_pushstring(v, "set_ghost_mode", -1);
4205 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
4206 if(SQ_FAILED(sq_createslot(v, -3))) {
4207 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
4210 sq_pushstring(v, "get_ghost_mode", -1);
4211 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
4212 if(SQ_FAILED(sq_createslot(v, -3))) {
4213 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
4216 sq_pushstring(v, "do_cheer", -1);
4217 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
4218 if(SQ_FAILED(sq_createslot(v, -3))) {
4219 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
4222 sq_pushstring(v, "do_duck", -1);
4223 sq_newclosure(v, &Player_do_duck_wrapper, 0);
4224 if(SQ_FAILED(sq_createslot(v, -3))) {
4225 throw SquirrelError(v, "Couldn't register function 'do_duck'");
4228 sq_pushstring(v, "do_standup", -1);
4229 sq_newclosure(v, &Player_do_standup_wrapper, 0);
4230 if(SQ_FAILED(sq_createslot(v, -3))) {
4231 throw SquirrelError(v, "Couldn't register function 'do_standup'");
4234 sq_pushstring(v, "do_backflip", -1);
4235 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
4236 if(SQ_FAILED(sq_createslot(v, -3))) {
4237 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
4240 sq_pushstring(v, "do_jump", -1);
4241 sq_newclosure(v, &Player_do_jump_wrapper, 0);
4242 if(SQ_FAILED(sq_createslot(v, -3))) {
4243 throw SquirrelError(v, "Couldn't register function 'do_jump'");
4246 sq_pushstring(v, "trigger_sequence", -1);
4247 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
4248 if(SQ_FAILED(sq_createslot(v, -3))) {
4249 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
4252 if(SQ_FAILED(sq_createslot(v, -3))) {
4253 throw SquirrelError(v, "Couldn't register class 'Player'");
4256 // Register class FloatingImage
4257 sq_pushstring(v, "FloatingImage", -1);
4258 if(sq_newclass(v, SQFalse) < 0) {
4259 std::ostringstream msg;
4260 msg << "Couldn't create new class 'FloatingImage'";
4261 throw SquirrelError(v, msg.str());
4263 sq_pushstring(v, "constructor", -1);
4264 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4265 if(SQ_FAILED(sq_createslot(v, -3))) {
4266 throw SquirrelError(v, "Couldn't register function 'constructor'");
4269 sq_pushstring(v, "set_layer", -1);
4270 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4271 if(SQ_FAILED(sq_createslot(v, -3))) {
4272 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4275 sq_pushstring(v, "get_layer", -1);
4276 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4277 if(SQ_FAILED(sq_createslot(v, -3))) {
4278 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4281 sq_pushstring(v, "set_pos", -1);
4282 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4283 if(SQ_FAILED(sq_createslot(v, -3))) {
4284 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4287 sq_pushstring(v, "get_pos_x", -1);
4288 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4289 if(SQ_FAILED(sq_createslot(v, -3))) {
4290 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4293 sq_pushstring(v, "get_pos_y", -1);
4294 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4295 if(SQ_FAILED(sq_createslot(v, -3))) {
4296 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4299 sq_pushstring(v, "set_anchor_point", -1);
4300 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4301 if(SQ_FAILED(sq_createslot(v, -3))) {
4302 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4305 sq_pushstring(v, "get_anchor_point", -1);
4306 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4307 if(SQ_FAILED(sq_createslot(v, -3))) {
4308 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4311 sq_pushstring(v, "set_visible", -1);
4312 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4313 if(SQ_FAILED(sq_createslot(v, -3))) {
4314 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4317 sq_pushstring(v, "get_visible", -1);
4318 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4319 if(SQ_FAILED(sq_createslot(v, -3))) {
4320 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4323 sq_pushstring(v, "set_action", -1);
4324 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4325 if(SQ_FAILED(sq_createslot(v, -3))) {
4326 throw SquirrelError(v, "Couldn't register function 'set_action'");
4329 sq_pushstring(v, "get_action", -1);
4330 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4331 if(SQ_FAILED(sq_createslot(v, -3))) {
4332 throw SquirrelError(v, "Couldn't register function 'get_action'");
4335 sq_pushstring(v, "fade_in", -1);
4336 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4337 if(SQ_FAILED(sq_createslot(v, -3))) {
4338 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4341 sq_pushstring(v, "fade_out", -1);
4342 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4343 if(SQ_FAILED(sq_createslot(v, -3))) {
4344 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4347 if(SQ_FAILED(sq_createslot(v, -3))) {
4348 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4351 // Register class Platform
4352 sq_pushstring(v, "Platform", -1);
4353 if(sq_newclass(v, SQFalse) < 0) {
4354 std::ostringstream msg;
4355 msg << "Couldn't create new class 'Platform'";
4356 throw SquirrelError(v, msg.str());
4358 sq_pushstring(v, "goto_node", -1);
4359 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
4360 if(SQ_FAILED(sq_createslot(v, -3))) {
4361 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4364 sq_pushstring(v, "start_moving", -1);
4365 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
4366 if(SQ_FAILED(sq_createslot(v, -3))) {
4367 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4370 sq_pushstring(v, "stop_moving", -1);
4371 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
4372 if(SQ_FAILED(sq_createslot(v, -3))) {
4373 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4376 if(SQ_FAILED(sq_createslot(v, -3))) {
4377 throw SquirrelError(v, "Couldn't register class 'Platform'");
4380 // Register class Candle
4381 sq_pushstring(v, "Candle", -1);
4382 if(sq_newclass(v, SQFalse) < 0) {
4383 std::ostringstream msg;
4384 msg << "Couldn't create new class 'Candle'";
4385 throw SquirrelError(v, msg.str());
4387 sq_pushstring(v, "get_burning", -1);
4388 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4389 if(SQ_FAILED(sq_createslot(v, -3))) {
4390 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4393 sq_pushstring(v, "set_burning", -1);
4394 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4395 if(SQ_FAILED(sq_createslot(v, -3))) {
4396 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4399 if(SQ_FAILED(sq_createslot(v, -3))) {
4400 throw SquirrelError(v, "Couldn't register class 'Candle'");
4403 // Register class Wind
4404 sq_pushstring(v, "Wind", -1);
4405 if(sq_newclass(v, SQFalse) < 0) {
4406 std::ostringstream msg;
4407 msg << "Couldn't create new class 'Wind'";
4408 throw SquirrelError(v, msg.str());
4410 sq_pushstring(v, "start", -1);
4411 sq_newclosure(v, &Wind_start_wrapper, 0);
4412 if(SQ_FAILED(sq_createslot(v, -3))) {
4413 throw SquirrelError(v, "Couldn't register function 'start'");
4416 sq_pushstring(v, "stop", -1);
4417 sq_newclosure(v, &Wind_stop_wrapper, 0);
4418 if(SQ_FAILED(sq_createslot(v, -3))) {
4419 throw SquirrelError(v, "Couldn't register function 'stop'");
4422 if(SQ_FAILED(sq_createslot(v, -3))) {
4423 throw SquirrelError(v, "Couldn't register class 'Wind'");
4426 // Register class AmbientSound
4427 sq_pushstring(v, "AmbientSound", -1);
4428 if(sq_newclass(v, SQFalse) < 0) {
4429 std::ostringstream msg;
4430 msg << "Couldn't create new class 'AmbientSound'";
4431 throw SquirrelError(v, msg.str());
4433 sq_pushstring(v, "set_pos", -1);
4434 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4435 if(SQ_FAILED(sq_createslot(v, -3))) {
4436 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4439 sq_pushstring(v, "get_pos_x", -1);
4440 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4441 if(SQ_FAILED(sq_createslot(v, -3))) {
4442 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4445 sq_pushstring(v, "get_pos_y", -1);
4446 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4447 if(SQ_FAILED(sq_createslot(v, -3))) {
4448 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4451 if(SQ_FAILED(sq_createslot(v, -3))) {
4452 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4455 // Register class Thunderstorm
4456 sq_pushstring(v, "Thunderstorm", -1);
4457 if(sq_newclass(v, SQFalse) < 0) {
4458 std::ostringstream msg;
4459 msg << "Couldn't create new class 'Thunderstorm'";
4460 throw SquirrelError(v, msg.str());
4462 sq_pushstring(v, "start", -1);
4463 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
4464 if(SQ_FAILED(sq_createslot(v, -3))) {
4465 throw SquirrelError(v, "Couldn't register function 'start'");
4468 sq_pushstring(v, "stop", -1);
4469 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
4470 if(SQ_FAILED(sq_createslot(v, -3))) {
4471 throw SquirrelError(v, "Couldn't register function 'stop'");
4474 sq_pushstring(v, "thunder", -1);
4475 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
4476 if(SQ_FAILED(sq_createslot(v, -3))) {
4477 throw SquirrelError(v, "Couldn't register function 'thunder'");
4480 sq_pushstring(v, "lightning", -1);
4481 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
4482 if(SQ_FAILED(sq_createslot(v, -3))) {
4483 throw SquirrelError(v, "Couldn't register function 'lightning'");
4486 sq_pushstring(v, "flash", -1);
4487 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
4488 if(SQ_FAILED(sq_createslot(v, -3))) {
4489 throw SquirrelError(v, "Couldn't register function 'flash'");
4492 sq_pushstring(v, "electrify", -1);
4493 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
4494 if(SQ_FAILED(sq_createslot(v, -3))) {
4495 throw SquirrelError(v, "Couldn't register function 'electrify'");
4498 if(SQ_FAILED(sq_createslot(v, -3))) {
4499 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
4502 // Register class TileMap
4503 sq_pushstring(v, "TileMap", -1);
4504 if(sq_newclass(v, SQFalse) < 0) {
4505 std::ostringstream msg;
4506 msg << "Couldn't create new class 'TileMap'";
4507 throw SquirrelError(v, msg.str());
4509 sq_pushstring(v, "goto_node", -1);
4510 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
4511 if(SQ_FAILED(sq_createslot(v, -3))) {
4512 throw SquirrelError(v, "Couldn't register function 'goto_node'");
4515 sq_pushstring(v, "start_moving", -1);
4516 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
4517 if(SQ_FAILED(sq_createslot(v, -3))) {
4518 throw SquirrelError(v, "Couldn't register function 'start_moving'");
4521 sq_pushstring(v, "stop_moving", -1);
4522 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
4523 if(SQ_FAILED(sq_createslot(v, -3))) {
4524 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
4527 if(SQ_FAILED(sq_createslot(v, -3))) {
4528 throw SquirrelError(v, "Couldn't register class 'TileMap'");
4531 // Register class SSector
4532 sq_pushstring(v, "SSector", -1);
4533 if(sq_newclass(v, SQFalse) < 0) {
4534 std::ostringstream msg;
4535 msg << "Couldn't create new class 'SSector'";
4536 throw SquirrelError(v, msg.str());
4538 sq_pushstring(v, "set_ambient_light", -1);
4539 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
4540 if(SQ_FAILED(sq_createslot(v, -3))) {
4541 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
4544 sq_pushstring(v, "get_ambient_red", -1);
4545 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
4546 if(SQ_FAILED(sq_createslot(v, -3))) {
4547 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
4550 sq_pushstring(v, "get_ambient_green", -1);
4551 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
4552 if(SQ_FAILED(sq_createslot(v, -3))) {
4553 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
4556 sq_pushstring(v, "get_ambient_blue", -1);
4557 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
4558 if(SQ_FAILED(sq_createslot(v, -3))) {
4559 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
4562 if(SQ_FAILED(sq_createslot(v, -3))) {
4563 throw SquirrelError(v, "Couldn't register class 'SSector'");
4566 // Register class LevelTime
4567 sq_pushstring(v, "LevelTime", -1);
4568 if(sq_newclass(v, SQFalse) < 0) {
4569 std::ostringstream msg;
4570 msg << "Couldn't create new class 'LevelTime'";
4571 throw SquirrelError(v, msg.str());
4573 sq_pushstring(v, "start", -1);
4574 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4575 if(SQ_FAILED(sq_createslot(v, -3))) {
4576 throw SquirrelError(v, "Couldn't register function 'start'");
4579 sq_pushstring(v, "stop", -1);
4580 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4581 if(SQ_FAILED(sq_createslot(v, -3))) {
4582 throw SquirrelError(v, "Couldn't register function 'stop'");
4585 sq_pushstring(v, "get_time", -1);
4586 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4587 if(SQ_FAILED(sq_createslot(v, -3))) {
4588 throw SquirrelError(v, "Couldn't register function 'get_time'");
4591 sq_pushstring(v, "set_time", -1);
4592 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
4593 if(SQ_FAILED(sq_createslot(v, -3))) {
4594 throw SquirrelError(v, "Couldn't register function 'set_time'");
4597 if(SQ_FAILED(sq_createslot(v, -3))) {
4598 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
4603 } // end of namespace Scripting