2 * WARNING: This file is automatically generated from:
3 * 'src/scripting/wrapper.interface.hpp'
9 #include "scripting/squirrel_error.hpp"
10 #include "scripting/wrapper.interface.hpp"
15 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
17 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (ptr);
22 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
25 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
26 sq_throwerror(vm, _SC("'set_pos' called without instance"));
29 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
31 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
32 sq_throwerror(vm, _SC("Argument 1 not a float"));
36 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
37 sq_throwerror(vm, _SC("Argument 2 not a float"));
42 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
46 } catch(std::exception& e) {
47 sq_throwerror(vm, e.what());
50 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
56 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
59 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
60 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
63 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
66 float return_value = _this->get_pos_x();
68 sq_pushfloat(vm, return_value);
71 } catch(std::exception& e) {
72 sq_throwerror(vm, e.what());
75 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
81 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
84 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
85 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
88 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
91 float return_value = _this->get_pos_y();
93 sq_pushfloat(vm, return_value);
96 } catch(std::exception& e) {
97 sq_throwerror(vm, e.what());
100 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
106 static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
108 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (ptr);
113 static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
116 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
117 sq_throwerror(vm, _SC("'reload_config' called without instance"));
120 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
123 _this->reload_config();
127 } catch(std::exception& e) {
128 sq_throwerror(vm, e.what());
131 sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
137 static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
140 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
141 sq_throwerror(vm, _SC("'shake' called without instance"));
144 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
146 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
147 sq_throwerror(vm, _SC("Argument 1 not a float"));
151 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
152 sq_throwerror(vm, _SC("Argument 2 not a float"));
156 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
157 sq_throwerror(vm, _SC("Argument 3 not a float"));
162 _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
166 } catch(std::exception& e) {
167 sq_throwerror(vm, e.what());
170 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
176 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
179 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
180 sq_throwerror(vm, _SC("'set_pos' called without instance"));
183 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
185 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
186 sq_throwerror(vm, _SC("Argument 1 not a float"));
190 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
191 sq_throwerror(vm, _SC("Argument 2 not a float"));
196 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
200 } catch(std::exception& e) {
201 sq_throwerror(vm, e.what());
204 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
210 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
213 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
214 sq_throwerror(vm, _SC("'set_mode' called without instance"));
217 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
219 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
220 sq_throwerror(vm, _SC("Argument 1 not a string"));
225 _this->set_mode(arg0);
229 } catch(std::exception& e) {
230 sq_throwerror(vm, e.what());
233 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
239 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
242 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
243 sq_throwerror(vm, _SC("'scroll_to' called without instance"));
246 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
248 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
249 sq_throwerror(vm, _SC("Argument 1 not a float"));
253 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
254 sq_throwerror(vm, _SC("Argument 2 not a float"));
258 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
259 sq_throwerror(vm, _SC("Argument 3 not a float"));
264 _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
268 } catch(std::exception& e) {
269 sq_throwerror(vm, e.what());
272 sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
278 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
280 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (ptr);
285 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
288 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
289 sq_throwerror(vm, _SC("'get_burning' called without instance"));
292 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
295 bool return_value = _this->get_burning();
297 sq_pushbool(vm, return_value);
300 } catch(std::exception& e) {
301 sq_throwerror(vm, e.what());
304 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
310 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
313 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
314 sq_throwerror(vm, _SC("'set_burning' called without instance"));
317 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
319 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
320 sq_throwerror(vm, _SC("Argument 1 not a bool"));
325 _this->set_burning(arg0 == SQTrue);
329 } catch(std::exception& e) {
330 sq_throwerror(vm, e.what());
333 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
339 static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
341 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (ptr);
346 static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
349 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
350 sq_throwerror(vm, _SC("'fade_out' called without instance"));
353 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
355 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
356 sq_throwerror(vm, _SC("Argument 1 not a float"));
361 _this->fade_out(static_cast<float> (arg0));
365 } catch(std::exception& e) {
366 sq_throwerror(vm, e.what());
369 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
375 static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
378 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
379 sq_throwerror(vm, _SC("'fade_in' called without instance"));
382 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
384 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
385 sq_throwerror(vm, _SC("Argument 1 not a float"));
390 _this->fade_in(static_cast<float> (arg0));
394 } catch(std::exception& e) {
395 sq_throwerror(vm, e.what());
398 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
404 static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
407 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
408 sq_throwerror(vm, _SC("'set_black' called without instance"));
411 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
413 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
414 sq_throwerror(vm, _SC("Argument 1 not a bool"));
419 _this->set_black(arg0 == SQTrue);
423 } catch(std::exception& e) {
424 sq_throwerror(vm, e.what());
427 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
433 static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
436 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
437 sq_throwerror(vm, _SC("'is_black' called without instance"));
440 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
443 bool return_value = _this->is_black();
445 sq_pushbool(vm, return_value);
448 } catch(std::exception& e) {
449 sq_throwerror(vm, e.what());
452 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
458 static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
461 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
462 sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
465 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
467 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
468 sq_throwerror(vm, _SC("Argument 1 not a float"));
473 _this->sixteen_to_nine(static_cast<float> (arg0));
477 } catch(std::exception& e) {
478 sq_throwerror(vm, e.what());
481 sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
487 static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
490 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
491 sq_throwerror(vm, _SC("'four_to_three' called without instance"));
494 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
496 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
497 sq_throwerror(vm, _SC("Argument 1 not a float"));
502 _this->four_to_three(static_cast<float> (arg0));
506 } catch(std::exception& e) {
507 sq_throwerror(vm, e.what());
510 sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
516 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
518 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (ptr);
523 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
526 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
527 sq_throwerror(vm, _SC("Argument 1 not a string"));
532 scripting::FloatingImage* _this = new scripting::FloatingImage(arg0);
533 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
534 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
537 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
541 } catch(std::exception& e) {
542 sq_throwerror(vm, e.what());
545 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
551 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
554 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
555 sq_throwerror(vm, _SC("'set_layer' called without instance"));
558 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
560 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
561 sq_throwerror(vm, _SC("Argument 1 not an integer"));
566 _this->set_layer(static_cast<int> (arg0));
570 } catch(std::exception& e) {
571 sq_throwerror(vm, e.what());
574 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
580 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
583 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
584 sq_throwerror(vm, _SC("'get_layer' called without instance"));
587 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
590 int return_value = _this->get_layer();
592 sq_pushinteger(vm, return_value);
595 } catch(std::exception& e) {
596 sq_throwerror(vm, e.what());
599 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
605 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
608 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
609 sq_throwerror(vm, _SC("'set_pos' called without instance"));
612 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
614 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
615 sq_throwerror(vm, _SC("Argument 1 not a float"));
619 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
620 sq_throwerror(vm, _SC("Argument 2 not a float"));
625 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
629 } catch(std::exception& e) {
630 sq_throwerror(vm, e.what());
633 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
639 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
642 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
643 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
646 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
649 float return_value = _this->get_pos_x();
651 sq_pushfloat(vm, return_value);
654 } catch(std::exception& e) {
655 sq_throwerror(vm, e.what());
658 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
664 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
667 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
668 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
671 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
674 float return_value = _this->get_pos_y();
676 sq_pushfloat(vm, return_value);
679 } catch(std::exception& e) {
680 sq_throwerror(vm, e.what());
683 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
689 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
692 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
693 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
696 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
698 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
699 sq_throwerror(vm, _SC("Argument 1 not an integer"));
704 _this->set_anchor_point(static_cast<int> (arg0));
708 } catch(std::exception& e) {
709 sq_throwerror(vm, e.what());
712 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
718 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
721 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
722 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
725 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
728 int return_value = _this->get_anchor_point();
730 sq_pushinteger(vm, return_value);
733 } catch(std::exception& e) {
734 sq_throwerror(vm, e.what());
737 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
743 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
746 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
747 sq_throwerror(vm, _SC("'set_visible' called without instance"));
750 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
752 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
753 sq_throwerror(vm, _SC("Argument 1 not a bool"));
758 _this->set_visible(arg0 == SQTrue);
762 } catch(std::exception& e) {
763 sq_throwerror(vm, e.what());
766 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
772 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
775 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
776 sq_throwerror(vm, _SC("'get_visible' called without instance"));
779 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
782 bool return_value = _this->get_visible();
784 sq_pushbool(vm, return_value);
787 } catch(std::exception& e) {
788 sq_throwerror(vm, e.what());
791 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
797 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
800 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
801 sq_throwerror(vm, _SC("'set_action' called without instance"));
804 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
806 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
807 sq_throwerror(vm, _SC("Argument 1 not a string"));
812 _this->set_action(arg0);
816 } catch(std::exception& e) {
817 sq_throwerror(vm, e.what());
820 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
826 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
829 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
830 sq_throwerror(vm, _SC("'get_action' called without instance"));
833 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
836 std::string return_value = _this->get_action();
838 sq_pushstring(vm, return_value.c_str(), return_value.size());
841 } catch(std::exception& e) {
842 sq_throwerror(vm, e.what());
845 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
851 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
854 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
855 sq_throwerror(vm, _SC("'fade_in' called without instance"));
858 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
860 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
861 sq_throwerror(vm, _SC("Argument 1 not a float"));
866 _this->fade_in(static_cast<float> (arg0));
870 } catch(std::exception& e) {
871 sq_throwerror(vm, e.what());
874 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
880 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
883 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
884 sq_throwerror(vm, _SC("'fade_out' called without instance"));
887 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
889 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
890 sq_throwerror(vm, _SC("Argument 1 not a float"));
895 _this->fade_out(static_cast<float> (arg0));
899 } catch(std::exception& e) {
900 sq_throwerror(vm, e.what());
903 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
909 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
911 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (ptr);
916 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
919 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
920 sq_throwerror(vm, _SC("'start' called without instance"));
923 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
930 } catch(std::exception& e) {
931 sq_throwerror(vm, e.what());
934 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
940 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
943 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
944 sq_throwerror(vm, _SC("'stop' called without instance"));
947 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
954 } catch(std::exception& e) {
955 sq_throwerror(vm, e.what());
958 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
964 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
967 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
968 sq_throwerror(vm, _SC("'get_time' called without instance"));
971 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
974 float return_value = _this->get_time();
976 sq_pushfloat(vm, return_value);
979 } catch(std::exception& e) {
980 sq_throwerror(vm, e.what());
983 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
989 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
992 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
993 sq_throwerror(vm, _SC("'set_time' called without instance"));
996 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
998 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
999 sq_throwerror(vm, _SC("Argument 1 not a float"));
1004 _this->set_time(static_cast<float> (arg0));
1008 } catch(std::exception& e) {
1009 sq_throwerror(vm, e.what());
1012 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
1018 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
1020 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (ptr);
1025 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
1028 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1029 sq_throwerror(vm, _SC("'goto_node' called without instance"));
1032 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
1034 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1035 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1040 _this->goto_node(static_cast<int> (arg0));
1044 } catch(std::exception& e) {
1045 sq_throwerror(vm, e.what());
1048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
1054 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
1057 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1058 sq_throwerror(vm, _SC("'start_moving' called without instance"));
1061 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
1064 _this->start_moving();
1068 } catch(std::exception& e) {
1069 sq_throwerror(vm, e.what());
1072 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
1078 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
1081 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1082 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
1085 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
1088 _this->stop_moving();
1092 } catch(std::exception& e) {
1093 sq_throwerror(vm, e.what());
1096 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
1102 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1104 scripting::Player* _this = reinterpret_cast<scripting::Player*> (ptr);
1109 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1112 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1113 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1116 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1118 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1119 sq_throwerror(vm, _SC("Argument 1 not a string"));
1124 bool return_value = _this->add_bonus(arg0);
1126 sq_pushbool(vm, return_value);
1129 } catch(std::exception& e) {
1130 sq_throwerror(vm, e.what());
1133 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1139 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1142 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1143 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1146 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1148 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1149 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1154 _this->add_coins(static_cast<int> (arg0));
1158 } catch(std::exception& e) {
1159 sq_throwerror(vm, e.what());
1162 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1168 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1171 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1172 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1175 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1178 _this->make_invincible();
1182 } catch(std::exception& e) {
1183 sq_throwerror(vm, e.what());
1186 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1192 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1195 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1196 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1199 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1202 _this->deactivate();
1206 } catch(std::exception& e) {
1207 sq_throwerror(vm, e.what());
1210 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1216 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1219 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1220 sq_throwerror(vm, _SC("'activate' called without instance"));
1223 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1230 } catch(std::exception& e) {
1231 sq_throwerror(vm, e.what());
1234 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1240 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1243 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1244 sq_throwerror(vm, _SC("'walk' called without instance"));
1247 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1249 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1250 sq_throwerror(vm, _SC("Argument 1 not a float"));
1255 _this->walk(static_cast<float> (arg0));
1259 } catch(std::exception& e) {
1260 sq_throwerror(vm, e.what());
1263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1269 static SQInteger Player_set_dir_wrapper(HSQUIRRELVM vm)
1272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1273 sq_throwerror(vm, _SC("'set_dir' called without instance"));
1276 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1278 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1279 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1284 _this->set_dir(arg0 == SQTrue);
1288 } catch(std::exception& e) {
1289 sq_throwerror(vm, e.what());
1292 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_dir'"));
1298 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
1301 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1302 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1305 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1307 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1308 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1313 _this->set_visible(arg0 == SQTrue);
1317 } catch(std::exception& e) {
1318 sq_throwerror(vm, e.what());
1321 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1327 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
1330 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1331 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1334 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1337 bool return_value = _this->get_visible();
1339 sq_pushbool(vm, return_value);
1342 } catch(std::exception& e) {
1343 sq_throwerror(vm, e.what());
1346 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1352 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
1355 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1356 sq_throwerror(vm, _SC("'kill' called without instance"));
1359 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1361 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1362 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1367 _this->kill(arg0 == SQTrue);
1371 } catch(std::exception& e) {
1372 sq_throwerror(vm, e.what());
1375 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
1381 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
1384 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1385 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
1388 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1390 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1391 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1396 _this->set_ghost_mode(arg0 == SQTrue);
1400 } catch(std::exception& e) {
1401 sq_throwerror(vm, e.what());
1404 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
1410 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
1413 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1414 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
1417 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1420 bool return_value = _this->get_ghost_mode();
1422 sq_pushbool(vm, return_value);
1425 } catch(std::exception& e) {
1426 sq_throwerror(vm, e.what());
1429 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
1435 static SQInteger Player_kick_wrapper(HSQUIRRELVM vm)
1438 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1439 sq_throwerror(vm, _SC("'kick' called without instance"));
1442 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1449 } catch(std::exception& e) {
1450 sq_throwerror(vm, e.what());
1453 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kick'"));
1459 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
1462 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1463 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
1466 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1473 } catch(std::exception& e) {
1474 sq_throwerror(vm, e.what());
1477 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
1483 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
1486 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1487 sq_throwerror(vm, _SC("'do_duck' called without instance"));
1490 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1497 } catch(std::exception& e) {
1498 sq_throwerror(vm, e.what());
1501 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
1507 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
1510 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1511 sq_throwerror(vm, _SC("'do_standup' called without instance"));
1514 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1517 _this->do_standup();
1521 } catch(std::exception& e) {
1522 sq_throwerror(vm, e.what());
1525 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
1531 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
1534 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1535 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
1538 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1541 _this->do_backflip();
1545 } catch(std::exception& e) {
1546 sq_throwerror(vm, e.what());
1549 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
1555 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
1558 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1559 sq_throwerror(vm, _SC("'do_jump' called without instance"));
1562 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1564 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1565 sq_throwerror(vm, _SC("Argument 1 not a float"));
1570 _this->do_jump(static_cast<float> (arg0));
1574 } catch(std::exception& e) {
1575 sq_throwerror(vm, e.what());
1578 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
1584 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
1587 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1588 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
1591 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1593 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1594 sq_throwerror(vm, _SC("Argument 1 not a string"));
1599 _this->trigger_sequence(arg0);
1603 } catch(std::exception& e) {
1604 sq_throwerror(vm, e.what());
1607 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
1613 static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
1616 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1617 sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
1620 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1622 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1623 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1628 _this->use_scripting_controller(arg0 == SQTrue);
1632 } catch(std::exception& e) {
1633 sq_throwerror(vm, e.what());
1636 sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
1642 static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
1645 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1646 sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
1649 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
1651 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1652 sq_throwerror(vm, _SC("Argument 1 not a string"));
1656 if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
1657 sq_throwerror(vm, _SC("Argument 2 not a bool"));
1662 _this->do_scripting_controller(arg0, arg1 == SQTrue);
1666 } catch(std::exception& e) {
1667 sq_throwerror(vm, e.what());
1670 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
1676 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
1678 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (ptr);
1683 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
1686 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1687 sq_throwerror(vm, _SC("'set_action' called without instance"));
1690 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1692 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1693 sq_throwerror(vm, _SC("Argument 1 not a string"));
1698 _this->set_action(arg0);
1702 } catch(std::exception& e) {
1703 sq_throwerror(vm, e.what());
1706 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1712 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
1715 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1716 sq_throwerror(vm, _SC("'get_action' called without instance"));
1719 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1722 std::string return_value = _this->get_action();
1724 sq_pushstring(vm, return_value.c_str(), return_value.size());
1727 } catch(std::exception& e) {
1728 sq_throwerror(vm, e.what());
1731 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1737 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
1740 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1741 sq_throwerror(vm, _SC("'move' called without instance"));
1744 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1746 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1747 sq_throwerror(vm, _SC("Argument 1 not a float"));
1751 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1752 sq_throwerror(vm, _SC("Argument 2 not a float"));
1757 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
1761 } catch(std::exception& e) {
1762 sq_throwerror(vm, e.what());
1765 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
1771 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
1774 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1775 sq_throwerror(vm, _SC("'set_pos' called without instance"));
1778 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1780 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1781 sq_throwerror(vm, _SC("Argument 1 not a float"));
1785 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1786 sq_throwerror(vm, _SC("Argument 2 not a float"));
1791 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
1795 } catch(std::exception& e) {
1796 sq_throwerror(vm, e.what());
1799 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
1805 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
1808 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1809 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
1812 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1815 float return_value = _this->get_pos_x();
1817 sq_pushfloat(vm, return_value);
1820 } catch(std::exception& e) {
1821 sq_throwerror(vm, e.what());
1824 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
1830 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
1833 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1834 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
1837 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1840 float return_value = _this->get_pos_y();
1842 sq_pushfloat(vm, return_value);
1845 } catch(std::exception& e) {
1846 sq_throwerror(vm, e.what());
1849 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
1855 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
1858 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1859 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
1862 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1864 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1865 sq_throwerror(vm, _SC("Argument 1 not a float"));
1869 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1870 sq_throwerror(vm, _SC("Argument 2 not a float"));
1875 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
1879 } catch(std::exception& e) {
1880 sq_throwerror(vm, e.what());
1883 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
1889 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
1892 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1893 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
1896 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1899 float return_value = _this->get_velocity_x();
1901 sq_pushfloat(vm, return_value);
1904 } catch(std::exception& e) {
1905 sq_throwerror(vm, e.what());
1908 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
1914 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
1917 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1918 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
1921 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1924 float return_value = _this->get_velocity_y();
1926 sq_pushfloat(vm, return_value);
1929 } catch(std::exception& e) {
1930 sq_throwerror(vm, e.what());
1933 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
1939 static SQInteger ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm)
1942 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1943 sq_throwerror(vm, _SC("'enable_gravity' called without instance"));
1946 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1948 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1949 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1954 _this->enable_gravity(arg0 == SQTrue);
1958 } catch(std::exception& e) {
1959 sq_throwerror(vm, e.what());
1962 sq_throwerror(vm, _SC("Unexpected exception while executing function 'enable_gravity'"));
1968 static SQInteger ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm)
1971 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1972 sq_throwerror(vm, _SC("'gravity_enabled' called without instance"));
1975 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
1978 bool return_value = _this->gravity_enabled();
1980 sq_pushbool(vm, return_value);
1983 } catch(std::exception& e) {
1984 sq_throwerror(vm, e.what());
1987 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gravity_enabled'"));
1993 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
1996 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
1997 sq_throwerror(vm, _SC("'set_visible' called without instance"));
2000 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2002 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2003 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2008 _this->set_visible(arg0 == SQTrue);
2012 } catch(std::exception& e) {
2013 sq_throwerror(vm, e.what());
2016 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
2022 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
2025 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2026 sq_throwerror(vm, _SC("'is_visible' called without instance"));
2029 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2032 bool return_value = _this->is_visible();
2034 sq_pushbool(vm, return_value);
2037 } catch(std::exception& e) {
2038 sq_throwerror(vm, e.what());
2041 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
2047 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
2050 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2051 sq_throwerror(vm, _SC("'set_solid' called without instance"));
2054 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2056 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2057 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2062 _this->set_solid(arg0 == SQTrue);
2066 } catch(std::exception& e) {
2067 sq_throwerror(vm, e.what());
2070 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
2076 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
2079 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2080 sq_throwerror(vm, _SC("'is_solid' called without instance"));
2083 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2086 bool return_value = _this->is_solid();
2088 sq_pushbool(vm, return_value);
2091 } catch(std::exception& e) {
2092 sq_throwerror(vm, e.what());
2095 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
2101 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
2104 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2105 sq_throwerror(vm, _SC("'get_name' called without instance"));
2108 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2111 std::string return_value = _this->get_name();
2113 sq_pushstring(vm, return_value.c_str(), return_value.size());
2116 } catch(std::exception& e) {
2117 sq_throwerror(vm, e.what());
2120 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
2126 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
2128 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (ptr);
2133 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
2136 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2137 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
2140 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
2142 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2143 sq_throwerror(vm, _SC("Argument 1 not a float"));
2147 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2148 sq_throwerror(vm, _SC("Argument 2 not a float"));
2152 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
2153 sq_throwerror(vm, _SC("Argument 3 not a float"));
2158 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
2162 } catch(std::exception& e) {
2163 sq_throwerror(vm, e.what());
2166 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
2172 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
2175 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2176 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
2179 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
2182 float return_value = _this->get_ambient_red();
2184 sq_pushfloat(vm, return_value);
2187 } catch(std::exception& e) {
2188 sq_throwerror(vm, e.what());
2191 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
2197 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
2200 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2201 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
2204 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
2207 float return_value = _this->get_ambient_green();
2209 sq_pushfloat(vm, return_value);
2212 } catch(std::exception& e) {
2213 sq_throwerror(vm, e.what());
2216 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
2222 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
2225 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2226 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
2229 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
2232 float return_value = _this->get_ambient_blue();
2234 sq_pushfloat(vm, return_value);
2237 } catch(std::exception& e) {
2238 sq_throwerror(vm, e.what());
2241 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
2247 static SQInteger SSector_set_gravity_wrapper(HSQUIRRELVM vm)
2250 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2251 sq_throwerror(vm, _SC("'set_gravity' called without instance"));
2254 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
2256 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2257 sq_throwerror(vm, _SC("Argument 1 not a float"));
2262 _this->set_gravity(static_cast<float> (arg0));
2266 } catch(std::exception& e) {
2267 sq_throwerror(vm, e.what());
2270 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'"));
2276 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
2278 scripting::Text* _this = reinterpret_cast<scripting::Text*> (ptr);
2283 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
2286 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2287 sq_throwerror(vm, _SC("'set_text' called without instance"));
2290 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2292 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2293 sq_throwerror(vm, _SC("Argument 1 not a string"));
2298 _this->set_text(arg0);
2302 } catch(std::exception& e) {
2303 sq_throwerror(vm, e.what());
2306 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
2312 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
2315 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2316 sq_throwerror(vm, _SC("'set_font' called without instance"));
2319 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2321 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2322 sq_throwerror(vm, _SC("Argument 1 not a string"));
2327 _this->set_font(arg0);
2331 } catch(std::exception& e) {
2332 sq_throwerror(vm, e.what());
2335 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
2341 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
2344 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2345 sq_throwerror(vm, _SC("'fade_in' called without instance"));
2348 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2350 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2351 sq_throwerror(vm, _SC("Argument 1 not a float"));
2356 _this->fade_in(static_cast<float> (arg0));
2360 } catch(std::exception& e) {
2361 sq_throwerror(vm, e.what());
2364 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
2370 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
2373 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2374 sq_throwerror(vm, _SC("'fade_out' called without instance"));
2377 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2379 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2380 sq_throwerror(vm, _SC("Argument 1 not a float"));
2385 _this->fade_out(static_cast<float> (arg0));
2389 } catch(std::exception& e) {
2390 sq_throwerror(vm, e.what());
2393 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
2399 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
2402 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2403 sq_throwerror(vm, _SC("'set_visible' called without instance"));
2406 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2408 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2409 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2414 _this->set_visible(arg0 == SQTrue);
2418 } catch(std::exception& e) {
2419 sq_throwerror(vm, e.what());
2422 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
2428 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
2431 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2432 sq_throwerror(vm, _SC("'set_centered' called without instance"));
2435 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2437 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2438 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2443 _this->set_centered(arg0 == SQTrue);
2447 } catch(std::exception& e) {
2448 sq_throwerror(vm, e.what());
2451 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
2457 static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
2460 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2461 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2464 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2466 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2467 sq_throwerror(vm, _SC("Argument 1 not a float"));
2471 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2472 sq_throwerror(vm, _SC("Argument 2 not a float"));
2477 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2481 } catch(std::exception& e) {
2482 sq_throwerror(vm, e.what());
2485 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2491 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
2494 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2495 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2498 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2501 float return_value = _this->get_pos_x();
2503 sq_pushfloat(vm, return_value);
2506 } catch(std::exception& e) {
2507 sq_throwerror(vm, e.what());
2510 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2516 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
2519 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2520 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2523 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2526 float return_value = _this->get_pos_y();
2528 sq_pushfloat(vm, return_value);
2531 } catch(std::exception& e) {
2532 sq_throwerror(vm, e.what());
2535 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2541 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
2544 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2545 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
2548 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2550 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2551 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2556 _this->set_anchor_point(static_cast<int> (arg0));
2560 } catch(std::exception& e) {
2561 sq_throwerror(vm, e.what());
2564 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
2570 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
2573 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2574 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
2577 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
2580 int return_value = _this->get_anchor_point();
2582 sq_pushinteger(vm, return_value);
2585 } catch(std::exception& e) {
2586 sq_throwerror(vm, e.what());
2589 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
2595 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
2597 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (ptr);
2602 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
2605 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2606 sq_throwerror(vm, _SC("'start' called without instance"));
2609 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2616 } catch(std::exception& e) {
2617 sq_throwerror(vm, e.what());
2620 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
2626 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
2629 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2630 sq_throwerror(vm, _SC("'stop' called without instance"));
2633 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2640 } catch(std::exception& e) {
2641 sq_throwerror(vm, e.what());
2644 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
2650 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
2653 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2654 sq_throwerror(vm, _SC("'thunder' called without instance"));
2657 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2664 } catch(std::exception& e) {
2665 sq_throwerror(vm, e.what());
2668 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
2674 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
2677 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2678 sq_throwerror(vm, _SC("'lightning' called without instance"));
2681 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2688 } catch(std::exception& e) {
2689 sq_throwerror(vm, e.what());
2692 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
2698 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
2701 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2702 sq_throwerror(vm, _SC("'flash' called without instance"));
2705 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2712 } catch(std::exception& e) {
2713 sq_throwerror(vm, e.what());
2716 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
2722 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
2725 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2726 sq_throwerror(vm, _SC("'electrify' called without instance"));
2729 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
2736 } catch(std::exception& e) {
2737 sq_throwerror(vm, e.what());
2740 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
2746 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
2748 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (ptr);
2753 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
2756 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2757 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2760 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2762 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2763 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2768 _this->goto_node(static_cast<int> (arg0));
2772 } catch(std::exception& e) {
2773 sq_throwerror(vm, e.what());
2776 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2782 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
2785 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2786 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2789 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2792 _this->start_moving();
2796 } catch(std::exception& e) {
2797 sq_throwerror(vm, e.what());
2800 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
2806 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
2809 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2810 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
2813 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2816 _this->stop_moving();
2820 } catch(std::exception& e) {
2821 sq_throwerror(vm, e.what());
2824 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
2830 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
2833 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2834 sq_throwerror(vm, _SC("'fade' called without instance"));
2837 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2839 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2840 sq_throwerror(vm, _SC("Argument 1 not a float"));
2844 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2845 sq_throwerror(vm, _SC("Argument 2 not a float"));
2850 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
2854 } catch(std::exception& e) {
2855 sq_throwerror(vm, e.what());
2858 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
2864 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
2867 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2868 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
2871 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2873 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2874 sq_throwerror(vm, _SC("Argument 1 not a float"));
2879 _this->set_alpha(static_cast<float> (arg0));
2883 } catch(std::exception& e) {
2884 sq_throwerror(vm, e.what());
2887 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
2893 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
2896 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2897 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
2900 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
2903 float return_value = _this->get_alpha();
2905 sq_pushfloat(vm, return_value);
2908 } catch(std::exception& e) {
2909 sq_throwerror(vm, e.what());
2912 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
2918 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
2920 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (ptr);
2925 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
2928 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2929 sq_throwerror(vm, _SC("'goto_node' called without instance"));
2932 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
2934 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
2935 sq_throwerror(vm, _SC("Argument 1 not an integer"));
2940 _this->goto_node(static_cast<int> (arg0));
2944 } catch(std::exception& e) {
2945 sq_throwerror(vm, e.what());
2948 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
2954 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
2957 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2958 sq_throwerror(vm, _SC("'set_state' called without instance"));
2961 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
2963 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2964 sq_throwerror(vm, _SC("Argument 1 not a string"));
2969 _this->set_state(arg0);
2973 } catch(std::exception& e) {
2974 sq_throwerror(vm, e.what());
2977 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
2983 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
2986 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
2987 sq_throwerror(vm, _SC("'start_moving' called without instance"));
2990 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
2993 _this->start_moving();
2997 } catch(std::exception& e) {
2998 sq_throwerror(vm, e.what());
3001 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
3007 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
3010 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
3011 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
3014 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
3017 _this->stop_moving();
3021 } catch(std::exception& e) {
3022 sq_throwerror(vm, e.what());
3025 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
3031 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
3033 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (ptr);
3038 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
3041 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
3042 sq_throwerror(vm, _SC("'start' called without instance"));
3045 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
3052 } catch(std::exception& e) {
3053 sq_throwerror(vm, e.what());
3056 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
3062 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
3065 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
3066 sq_throwerror(vm, _SC("'stop' called without instance"));
3069 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
3076 } catch(std::exception& e) {
3077 sq_throwerror(vm, e.what());
3080 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
3086 static SQInteger display_wrapper(HSQUIRRELVM vm)
3088 return scripting::display(vm);
3091 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
3093 HSQUIRRELVM arg0 = vm;
3096 scripting::print_stacktrace(arg0);
3100 } catch(std::exception& e) {
3101 sq_throwerror(vm, e.what());
3104 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
3110 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
3112 return scripting::get_current_thread(vm);
3115 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
3118 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3119 sq_throwerror(vm, _SC("Argument 1 not a string"));
3124 scripting::display_text_file(arg0);
3128 } catch(std::exception& e) {
3129 sq_throwerror(vm, e.what());
3132 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
3138 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
3141 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3142 sq_throwerror(vm, _SC("Argument 1 not a string"));
3147 scripting::load_worldmap(arg0);
3151 } catch(std::exception& e) {
3152 sq_throwerror(vm, e.what());
3155 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
3161 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
3164 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3165 sq_throwerror(vm, _SC("Argument 1 not a string"));
3170 scripting::load_level(arg0);
3174 } catch(std::exception& e) {
3175 sq_throwerror(vm, e.what());
3178 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
3184 static SQInteger wait_wrapper(HSQUIRRELVM vm)
3186 HSQUIRRELVM arg0 = vm;
3188 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
3189 sq_throwerror(vm, _SC("Argument 1 not a float"));
3194 scripting::wait(arg0, static_cast<float> (arg1));
3196 return sq_suspendvm(vm);
3198 } catch(std::exception& e) {
3199 sq_throwerror(vm, e.what());
3202 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
3208 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
3210 HSQUIRRELVM arg0 = vm;
3213 scripting::wait_for_screenswitch(arg0);
3215 return sq_suspendvm(vm);
3217 } catch(std::exception& e) {
3218 sq_throwerror(vm, e.what());
3221 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
3227 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
3232 scripting::exit_screen();
3236 } catch(std::exception& e) {
3237 sq_throwerror(vm, e.what());
3240 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
3246 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
3249 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3250 sq_throwerror(vm, _SC("Argument 1 not a float"));
3255 scripting::fadeout_screen(static_cast<float> (arg0));
3259 } catch(std::exception& e) {
3260 sq_throwerror(vm, e.what());
3263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
3269 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
3272 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3273 sq_throwerror(vm, _SC("Argument 1 not a float"));
3277 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3278 sq_throwerror(vm, _SC("Argument 2 not a float"));
3282 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3283 sq_throwerror(vm, _SC("Argument 3 not a float"));
3288 scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3292 } catch(std::exception& e) {
3293 sq_throwerror(vm, e.what());
3296 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
3302 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
3307 scripting::abort_screenfade();
3311 } catch(std::exception& e) {
3312 sq_throwerror(vm, e.what());
3315 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
3321 static SQInteger translate_wrapper(HSQUIRRELVM vm)
3324 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3325 sq_throwerror(vm, _SC("Argument 1 not a string"));
3330 std::string return_value = scripting::translate(arg0);
3332 sq_pushstring(vm, return_value.c_str(), return_value.size());
3335 } catch(std::exception& e) {
3336 sq_throwerror(vm, e.what());
3339 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
3345 static SQInteger import_wrapper(HSQUIRRELVM vm)
3347 HSQUIRRELVM arg0 = vm;
3349 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
3350 sq_throwerror(vm, _SC("Argument 1 not a string"));
3355 scripting::import(arg0, arg1);
3359 } catch(std::exception& e) {
3360 sq_throwerror(vm, e.what());
3363 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
3369 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
3374 scripting::save_state();
3378 } catch(std::exception& e) {
3379 sq_throwerror(vm, e.what());
3382 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
3388 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
3393 scripting::update_worldmap();
3397 } catch(std::exception& e) {
3398 sq_throwerror(vm, e.what());
3401 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
3407 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
3410 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3411 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3416 scripting::debug_collrects(arg0 == SQTrue);
3420 } catch(std::exception& e) {
3421 sq_throwerror(vm, e.what());
3424 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
3430 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
3433 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3434 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3439 scripting::debug_show_fps(arg0 == SQTrue);
3443 } catch(std::exception& e) {
3444 sq_throwerror(vm, e.what());
3447 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
3453 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
3456 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3457 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3462 scripting::debug_draw_solids_only(arg0 == SQTrue);
3466 } catch(std::exception& e) {
3467 sq_throwerror(vm, e.what());
3470 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
3476 static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm)
3479 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3480 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3485 scripting::debug_draw_editor_images(arg0 == SQTrue);
3489 } catch(std::exception& e) {
3490 sq_throwerror(vm, e.what());
3493 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'"));
3499 static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm)
3502 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3503 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3508 scripting::debug_worldmap_ghost(arg0 == SQTrue);
3512 } catch(std::exception& e) {
3513 sq_throwerror(vm, e.what());
3516 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_worldmap_ghost'"));
3522 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
3525 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3526 sq_throwerror(vm, _SC("Argument 1 not a string"));
3531 scripting::play_music(arg0);
3535 } catch(std::exception& e) {
3536 sq_throwerror(vm, e.what());
3539 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
3545 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
3548 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3549 sq_throwerror(vm, _SC("Argument 1 not a string"));
3554 scripting::play_sound(arg0);
3558 } catch(std::exception& e) {
3559 sq_throwerror(vm, e.what());
3562 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
3568 static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm)
3571 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3572 sq_throwerror(vm, _SC("Argument 1 not a float"));
3577 scripting::set_game_speed(static_cast<float> (arg0));
3581 } catch(std::exception& e) {
3582 sq_throwerror(vm, e.what());
3585 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'"));
3591 static SQInteger grease_wrapper(HSQUIRRELVM vm)
3596 scripting::grease();
3600 } catch(std::exception& e) {
3601 sq_throwerror(vm, e.what());
3604 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
3610 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
3615 scripting::invincible();
3619 } catch(std::exception& e) {
3620 sq_throwerror(vm, e.what());
3623 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
3629 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
3638 } catch(std::exception& e) {
3639 sq_throwerror(vm, e.what());
3642 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
3648 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
3653 scripting::mortal();
3657 } catch(std::exception& e) {
3658 sq_throwerror(vm, e.what());
3661 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
3667 static SQInteger restart_wrapper(HSQUIRRELVM vm)
3672 scripting::restart();
3676 } catch(std::exception& e) {
3677 sq_throwerror(vm, e.what());
3680 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
3686 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
3691 scripting::whereami();
3695 } catch(std::exception& e) {
3696 sq_throwerror(vm, e.what());
3699 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
3705 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
3710 scripting::gotoend();
3714 } catch(std::exception& e) {
3715 sq_throwerror(vm, e.what());
3718 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
3724 static SQInteger camera_wrapper(HSQUIRRELVM vm)
3729 scripting::camera();
3733 } catch(std::exception& e) {
3734 sq_throwerror(vm, e.what());
3737 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
3743 static SQInteger set_gamma_wrapper(HSQUIRRELVM vm)
3746 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3747 sq_throwerror(vm, _SC("Argument 1 not a float"));
3752 scripting::set_gamma(static_cast<float> (arg0));
3756 } catch(std::exception& e) {
3757 sq_throwerror(vm, e.what());
3760 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'"));
3766 static SQInteger quit_wrapper(HSQUIRRELVM vm)
3775 } catch(std::exception& e) {
3776 sq_throwerror(vm, e.what());
3779 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
3785 static SQInteger rand_wrapper(HSQUIRRELVM vm)
3789 int return_value = scripting::rand();
3791 sq_pushinteger(vm, return_value);
3794 } catch(std::exception& e) {
3795 sq_throwerror(vm, e.what());
3798 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
3804 static SQInteger record_demo_wrapper(HSQUIRRELVM vm)
3807 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3808 sq_throwerror(vm, _SC("Argument 1 not a string"));
3813 scripting::record_demo(arg0);
3817 } catch(std::exception& e) {
3818 sq_throwerror(vm, e.what());
3821 sq_throwerror(vm, _SC("Unexpected exception while executing function 'record_demo'"));
3827 static SQInteger play_demo_wrapper(HSQUIRRELVM vm)
3830 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3831 sq_throwerror(vm, _SC("Argument 1 not a string"));
3836 scripting::play_demo(arg0);
3840 } catch(std::exception& e) {
3841 sq_throwerror(vm, e.what());
3844 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_demo'"));
3850 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
3853 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3854 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3859 scripting::Level_finish(arg0 == SQTrue);
3863 } catch(std::exception& e) {
3864 sq_throwerror(vm, e.what());
3867 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_finish'"));
3873 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
3876 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3877 sq_throwerror(vm, _SC("Argument 1 not a string"));
3881 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
3882 sq_throwerror(vm, _SC("Argument 2 not a string"));
3887 scripting::Level_spawn(arg0, arg1);
3891 } catch(std::exception& e) {
3892 sq_throwerror(vm, e.what());
3895 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn'"));
3901 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
3906 scripting::Level_flip_vertically();
3910 } catch(std::exception& e) {
3911 sq_throwerror(vm, e.what());
3914 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_flip_vertically'"));
3920 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
3925 scripting::Level_toggle_pause();
3929 } catch(std::exception& e) {
3930 sq_throwerror(vm, e.what());
3933 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_toggle_pause'"));
3939 static SQInteger Level_edit_wrapper(HSQUIRRELVM vm)
3942 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3943 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3948 scripting::Level_edit(arg0 == SQTrue);
3952 } catch(std::exception& e) {
3953 sq_throwerror(vm, e.what());
3956 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_edit'"));
3962 } // namespace wrapper
3963 void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook)
3965 using namespace wrapper;
3967 sq_pushroottable(v);
3968 sq_pushstring(v, "AmbientSound", -1);
3969 if(SQ_FAILED(sq_get(v, -2))) {
3970 std::ostringstream msg;
3971 msg << "Couldn't resolved squirrel type 'AmbientSound'";
3972 throw SquirrelError(v, msg.str());
3975 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
3976 std::ostringstream msg;
3977 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
3978 throw SquirrelError(v, msg.str());
3980 sq_remove(v, -2); // remove object name
3982 if(setup_releasehook) {
3983 sq_setreleasehook(v, -1, AmbientSound_release_hook);
3986 sq_remove(v, -2); // remove root table
3989 void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook)
3991 using namespace wrapper;
3993 sq_pushroottable(v);
3994 sq_pushstring(v, "Camera", -1);
3995 if(SQ_FAILED(sq_get(v, -2))) {
3996 std::ostringstream msg;
3997 msg << "Couldn't resolved squirrel type 'Camera'";
3998 throw SquirrelError(v, msg.str());
4001 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4002 std::ostringstream msg;
4003 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
4004 throw SquirrelError(v, msg.str());
4006 sq_remove(v, -2); // remove object name
4008 if(setup_releasehook) {
4009 sq_setreleasehook(v, -1, Camera_release_hook);
4012 sq_remove(v, -2); // remove root table
4015 void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook)
4017 using namespace wrapper;
4019 sq_pushroottable(v);
4020 sq_pushstring(v, "Candle", -1);
4021 if(SQ_FAILED(sq_get(v, -2))) {
4022 std::ostringstream msg;
4023 msg << "Couldn't resolved squirrel type 'Candle'";
4024 throw SquirrelError(v, msg.str());
4027 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4028 std::ostringstream msg;
4029 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
4030 throw SquirrelError(v, msg.str());
4032 sq_remove(v, -2); // remove object name
4034 if(setup_releasehook) {
4035 sq_setreleasehook(v, -1, Candle_release_hook);
4038 sq_remove(v, -2); // remove root table
4041 void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook)
4043 using namespace wrapper;
4045 sq_pushroottable(v);
4046 sq_pushstring(v, "DisplayEffect", -1);
4047 if(SQ_FAILED(sq_get(v, -2))) {
4048 std::ostringstream msg;
4049 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
4050 throw SquirrelError(v, msg.str());
4053 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4054 std::ostringstream msg;
4055 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
4056 throw SquirrelError(v, msg.str());
4058 sq_remove(v, -2); // remove object name
4060 if(setup_releasehook) {
4061 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
4064 sq_remove(v, -2); // remove root table
4067 void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook)
4069 using namespace wrapper;
4071 sq_pushroottable(v);
4072 sq_pushstring(v, "FloatingImage", -1);
4073 if(SQ_FAILED(sq_get(v, -2))) {
4074 std::ostringstream msg;
4075 msg << "Couldn't resolved squirrel type 'FloatingImage'";
4076 throw SquirrelError(v, msg.str());
4079 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4080 std::ostringstream msg;
4081 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
4082 throw SquirrelError(v, msg.str());
4084 sq_remove(v, -2); // remove object name
4086 if(setup_releasehook) {
4087 sq_setreleasehook(v, -1, FloatingImage_release_hook);
4090 sq_remove(v, -2); // remove root table
4093 void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook)
4095 using namespace wrapper;
4097 sq_pushroottable(v);
4098 sq_pushstring(v, "LevelTime", -1);
4099 if(SQ_FAILED(sq_get(v, -2))) {
4100 std::ostringstream msg;
4101 msg << "Couldn't resolved squirrel type 'LevelTime'";
4102 throw SquirrelError(v, msg.str());
4105 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4106 std::ostringstream msg;
4107 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
4108 throw SquirrelError(v, msg.str());
4110 sq_remove(v, -2); // remove object name
4112 if(setup_releasehook) {
4113 sq_setreleasehook(v, -1, LevelTime_release_hook);
4116 sq_remove(v, -2); // remove root table
4119 void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook)
4121 using namespace wrapper;
4123 sq_pushroottable(v);
4124 sq_pushstring(v, "Platform", -1);
4125 if(SQ_FAILED(sq_get(v, -2))) {
4126 std::ostringstream msg;
4127 msg << "Couldn't resolved squirrel type 'Platform'";
4128 throw SquirrelError(v, msg.str());
4131 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4132 std::ostringstream msg;
4133 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
4134 throw SquirrelError(v, msg.str());
4136 sq_remove(v, -2); // remove object name
4138 if(setup_releasehook) {
4139 sq_setreleasehook(v, -1, Platform_release_hook);
4142 sq_remove(v, -2); // remove root table
4145 void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook)
4147 using namespace wrapper;
4149 sq_pushroottable(v);
4150 sq_pushstring(v, "Player", -1);
4151 if(SQ_FAILED(sq_get(v, -2))) {
4152 std::ostringstream msg;
4153 msg << "Couldn't resolved squirrel type 'Player'";
4154 throw SquirrelError(v, msg.str());
4157 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4158 std::ostringstream msg;
4159 msg << "Couldn't setup squirrel instance for object of type 'Player'";
4160 throw SquirrelError(v, msg.str());
4162 sq_remove(v, -2); // remove object name
4164 if(setup_releasehook) {
4165 sq_setreleasehook(v, -1, Player_release_hook);
4168 sq_remove(v, -2); // remove root table
4171 void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook)
4173 using namespace wrapper;
4175 sq_pushroottable(v);
4176 sq_pushstring(v, "ScriptedObject", -1);
4177 if(SQ_FAILED(sq_get(v, -2))) {
4178 std::ostringstream msg;
4179 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
4180 throw SquirrelError(v, msg.str());
4183 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4184 std::ostringstream msg;
4185 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
4186 throw SquirrelError(v, msg.str());
4188 sq_remove(v, -2); // remove object name
4190 if(setup_releasehook) {
4191 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
4194 sq_remove(v, -2); // remove root table
4197 void create_squirrel_instance(HSQUIRRELVM v, scripting::SSector* object, bool setup_releasehook)
4199 using namespace wrapper;
4201 sq_pushroottable(v);
4202 sq_pushstring(v, "SSector", -1);
4203 if(SQ_FAILED(sq_get(v, -2))) {
4204 std::ostringstream msg;
4205 msg << "Couldn't resolved squirrel type 'SSector'";
4206 throw SquirrelError(v, msg.str());
4209 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4210 std::ostringstream msg;
4211 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
4212 throw SquirrelError(v, msg.str());
4214 sq_remove(v, -2); // remove object name
4216 if(setup_releasehook) {
4217 sq_setreleasehook(v, -1, SSector_release_hook);
4220 sq_remove(v, -2); // remove root table
4223 void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook)
4225 using namespace wrapper;
4227 sq_pushroottable(v);
4228 sq_pushstring(v, "Text", -1);
4229 if(SQ_FAILED(sq_get(v, -2))) {
4230 std::ostringstream msg;
4231 msg << "Couldn't resolved squirrel type 'Text'";
4232 throw SquirrelError(v, msg.str());
4235 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4236 std::ostringstream msg;
4237 msg << "Couldn't setup squirrel instance for object of type 'Text'";
4238 throw SquirrelError(v, msg.str());
4240 sq_remove(v, -2); // remove object name
4242 if(setup_releasehook) {
4243 sq_setreleasehook(v, -1, Text_release_hook);
4246 sq_remove(v, -2); // remove root table
4249 void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook)
4251 using namespace wrapper;
4253 sq_pushroottable(v);
4254 sq_pushstring(v, "Thunderstorm", -1);
4255 if(SQ_FAILED(sq_get(v, -2))) {
4256 std::ostringstream msg;
4257 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
4258 throw SquirrelError(v, msg.str());
4261 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4262 std::ostringstream msg;
4263 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
4264 throw SquirrelError(v, msg.str());
4266 sq_remove(v, -2); // remove object name
4268 if(setup_releasehook) {
4269 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
4272 sq_remove(v, -2); // remove root table
4275 void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook)
4277 using namespace wrapper;
4279 sq_pushroottable(v);
4280 sq_pushstring(v, "TileMap", -1);
4281 if(SQ_FAILED(sq_get(v, -2))) {
4282 std::ostringstream msg;
4283 msg << "Couldn't resolved squirrel type 'TileMap'";
4284 throw SquirrelError(v, msg.str());
4287 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4288 std::ostringstream msg;
4289 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
4290 throw SquirrelError(v, msg.str());
4292 sq_remove(v, -2); // remove object name
4294 if(setup_releasehook) {
4295 sq_setreleasehook(v, -1, TileMap_release_hook);
4298 sq_remove(v, -2); // remove root table
4301 void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook)
4303 using namespace wrapper;
4305 sq_pushroottable(v);
4306 sq_pushstring(v, "WillOWisp", -1);
4307 if(SQ_FAILED(sq_get(v, -2))) {
4308 std::ostringstream msg;
4309 msg << "Couldn't resolved squirrel type 'WillOWisp'";
4310 throw SquirrelError(v, msg.str());
4313 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4314 std::ostringstream msg;
4315 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
4316 throw SquirrelError(v, msg.str());
4318 sq_remove(v, -2); // remove object name
4320 if(setup_releasehook) {
4321 sq_setreleasehook(v, -1, WillOWisp_release_hook);
4324 sq_remove(v, -2); // remove root table
4327 void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook)
4329 using namespace wrapper;
4331 sq_pushroottable(v);
4332 sq_pushstring(v, "Wind", -1);
4333 if(SQ_FAILED(sq_get(v, -2))) {
4334 std::ostringstream msg;
4335 msg << "Couldn't resolved squirrel type 'Wind'";
4336 throw SquirrelError(v, msg.str());
4339 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
4340 std::ostringstream msg;
4341 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
4342 throw SquirrelError(v, msg.str());
4344 sq_remove(v, -2); // remove object name
4346 if(setup_releasehook) {
4347 sq_setreleasehook(v, -1, Wind_release_hook);
4350 sq_remove(v, -2); // remove root table
4353 void register_supertux_wrapper(HSQUIRRELVM v)
4355 using namespace wrapper;
4357 sq_pushstring(v, "ANCHOR_TOP", -1);
4358 sq_pushinteger(v, 16);
4359 if(SQ_FAILED(sq_createslot(v, -3))) {
4360 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
4363 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
4364 sq_pushinteger(v, 32);
4365 if(SQ_FAILED(sq_createslot(v, -3))) {
4366 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
4369 sq_pushstring(v, "ANCHOR_LEFT", -1);
4370 sq_pushinteger(v, 1);
4371 if(SQ_FAILED(sq_createslot(v, -3))) {
4372 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
4375 sq_pushstring(v, "ANCHOR_RIGHT", -1);
4376 sq_pushinteger(v, 2);
4377 if(SQ_FAILED(sq_createslot(v, -3))) {
4378 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
4381 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
4382 sq_pushinteger(v, 0);
4383 if(SQ_FAILED(sq_createslot(v, -3))) {
4384 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
4387 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
4388 sq_pushinteger(v, 17);
4389 if(SQ_FAILED(sq_createslot(v, -3))) {
4390 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
4393 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
4394 sq_pushinteger(v, 18);
4395 if(SQ_FAILED(sq_createslot(v, -3))) {
4396 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
4399 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
4400 sq_pushinteger(v, 33);
4401 if(SQ_FAILED(sq_createslot(v, -3))) {
4402 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
4405 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
4406 sq_pushinteger(v, 34);
4407 if(SQ_FAILED(sq_createslot(v, -3))) {
4408 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
4411 sq_pushstring(v, "display", -1);
4412 sq_newclosure(v, &display_wrapper, 0);
4413 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t.");
4414 if(SQ_FAILED(sq_createslot(v, -3))) {
4415 throw SquirrelError(v, "Couldn't register function 'display'");
4418 sq_pushstring(v, "print_stacktrace", -1);
4419 sq_newclosure(v, &print_stacktrace_wrapper, 0);
4420 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4421 if(SQ_FAILED(sq_createslot(v, -3))) {
4422 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
4425 sq_pushstring(v, "get_current_thread", -1);
4426 sq_newclosure(v, &get_current_thread_wrapper, 0);
4427 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t");
4428 if(SQ_FAILED(sq_createslot(v, -3))) {
4429 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
4432 sq_pushstring(v, "display_text_file", -1);
4433 sq_newclosure(v, &display_text_file_wrapper, 0);
4434 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4435 if(SQ_FAILED(sq_createslot(v, -3))) {
4436 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
4439 sq_pushstring(v, "load_worldmap", -1);
4440 sq_newclosure(v, &load_worldmap_wrapper, 0);
4441 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4442 if(SQ_FAILED(sq_createslot(v, -3))) {
4443 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
4446 sq_pushstring(v, "load_level", -1);
4447 sq_newclosure(v, &load_level_wrapper, 0);
4448 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4449 if(SQ_FAILED(sq_createslot(v, -3))) {
4450 throw SquirrelError(v, "Couldn't register function 'load_level'");
4453 sq_pushstring(v, "wait", -1);
4454 sq_newclosure(v, &wait_wrapper, 0);
4455 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4456 if(SQ_FAILED(sq_createslot(v, -3))) {
4457 throw SquirrelError(v, "Couldn't register function 'wait'");
4460 sq_pushstring(v, "wait_for_screenswitch", -1);
4461 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
4462 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4463 if(SQ_FAILED(sq_createslot(v, -3))) {
4464 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
4467 sq_pushstring(v, "exit_screen", -1);
4468 sq_newclosure(v, &exit_screen_wrapper, 0);
4469 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4470 if(SQ_FAILED(sq_createslot(v, -3))) {
4471 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
4474 sq_pushstring(v, "fadeout_screen", -1);
4475 sq_newclosure(v, &fadeout_screen_wrapper, 0);
4476 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4477 if(SQ_FAILED(sq_createslot(v, -3))) {
4478 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
4481 sq_pushstring(v, "shrink_screen", -1);
4482 sq_newclosure(v, &shrink_screen_wrapper, 0);
4483 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
4484 if(SQ_FAILED(sq_createslot(v, -3))) {
4485 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
4488 sq_pushstring(v, "abort_screenfade", -1);
4489 sq_newclosure(v, &abort_screenfade_wrapper, 0);
4490 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4491 if(SQ_FAILED(sq_createslot(v, -3))) {
4492 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
4495 sq_pushstring(v, "translate", -1);
4496 sq_newclosure(v, &translate_wrapper, 0);
4497 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4498 if(SQ_FAILED(sq_createslot(v, -3))) {
4499 throw SquirrelError(v, "Couldn't register function 'translate'");
4502 sq_pushstring(v, "import", -1);
4503 sq_newclosure(v, &import_wrapper, 0);
4504 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4505 if(SQ_FAILED(sq_createslot(v, -3))) {
4506 throw SquirrelError(v, "Couldn't register function 'import'");
4509 sq_pushstring(v, "save_state", -1);
4510 sq_newclosure(v, &save_state_wrapper, 0);
4511 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4512 if(SQ_FAILED(sq_createslot(v, -3))) {
4513 throw SquirrelError(v, "Couldn't register function 'save_state'");
4516 sq_pushstring(v, "update_worldmap", -1);
4517 sq_newclosure(v, &update_worldmap_wrapper, 0);
4518 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4519 if(SQ_FAILED(sq_createslot(v, -3))) {
4520 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
4523 sq_pushstring(v, "debug_collrects", -1);
4524 sq_newclosure(v, &debug_collrects_wrapper, 0);
4525 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4526 if(SQ_FAILED(sq_createslot(v, -3))) {
4527 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
4530 sq_pushstring(v, "debug_show_fps", -1);
4531 sq_newclosure(v, &debug_show_fps_wrapper, 0);
4532 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4533 if(SQ_FAILED(sq_createslot(v, -3))) {
4534 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
4537 sq_pushstring(v, "debug_draw_solids_only", -1);
4538 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
4539 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4540 if(SQ_FAILED(sq_createslot(v, -3))) {
4541 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
4544 sq_pushstring(v, "debug_draw_editor_images", -1);
4545 sq_newclosure(v, &debug_draw_editor_images_wrapper, 0);
4546 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4547 if(SQ_FAILED(sq_createslot(v, -3))) {
4548 throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'");
4551 sq_pushstring(v, "debug_worldmap_ghost", -1);
4552 sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0);
4553 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4554 if(SQ_FAILED(sq_createslot(v, -3))) {
4555 throw SquirrelError(v, "Couldn't register function 'debug_worldmap_ghost'");
4558 sq_pushstring(v, "play_music", -1);
4559 sq_newclosure(v, &play_music_wrapper, 0);
4560 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4561 if(SQ_FAILED(sq_createslot(v, -3))) {
4562 throw SquirrelError(v, "Couldn't register function 'play_music'");
4565 sq_pushstring(v, "play_sound", -1);
4566 sq_newclosure(v, &play_sound_wrapper, 0);
4567 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4568 if(SQ_FAILED(sq_createslot(v, -3))) {
4569 throw SquirrelError(v, "Couldn't register function 'play_sound'");
4572 sq_pushstring(v, "set_game_speed", -1);
4573 sq_newclosure(v, &set_game_speed_wrapper, 0);
4574 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4575 if(SQ_FAILED(sq_createslot(v, -3))) {
4576 throw SquirrelError(v, "Couldn't register function 'set_game_speed'");
4579 sq_pushstring(v, "grease", -1);
4580 sq_newclosure(v, &grease_wrapper, 0);
4581 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4582 if(SQ_FAILED(sq_createslot(v, -3))) {
4583 throw SquirrelError(v, "Couldn't register function 'grease'");
4586 sq_pushstring(v, "invincible", -1);
4587 sq_newclosure(v, &invincible_wrapper, 0);
4588 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4589 if(SQ_FAILED(sq_createslot(v, -3))) {
4590 throw SquirrelError(v, "Couldn't register function 'invincible'");
4593 sq_pushstring(v, "ghost", -1);
4594 sq_newclosure(v, &ghost_wrapper, 0);
4595 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4596 if(SQ_FAILED(sq_createslot(v, -3))) {
4597 throw SquirrelError(v, "Couldn't register function 'ghost'");
4600 sq_pushstring(v, "mortal", -1);
4601 sq_newclosure(v, &mortal_wrapper, 0);
4602 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4603 if(SQ_FAILED(sq_createslot(v, -3))) {
4604 throw SquirrelError(v, "Couldn't register function 'mortal'");
4607 sq_pushstring(v, "restart", -1);
4608 sq_newclosure(v, &restart_wrapper, 0);
4609 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4610 if(SQ_FAILED(sq_createslot(v, -3))) {
4611 throw SquirrelError(v, "Couldn't register function 'restart'");
4614 sq_pushstring(v, "whereami", -1);
4615 sq_newclosure(v, &whereami_wrapper, 0);
4616 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4617 if(SQ_FAILED(sq_createslot(v, -3))) {
4618 throw SquirrelError(v, "Couldn't register function 'whereami'");
4621 sq_pushstring(v, "gotoend", -1);
4622 sq_newclosure(v, &gotoend_wrapper, 0);
4623 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4624 if(SQ_FAILED(sq_createslot(v, -3))) {
4625 throw SquirrelError(v, "Couldn't register function 'gotoend'");
4628 sq_pushstring(v, "camera", -1);
4629 sq_newclosure(v, &camera_wrapper, 0);
4630 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4631 if(SQ_FAILED(sq_createslot(v, -3))) {
4632 throw SquirrelError(v, "Couldn't register function 'camera'");
4635 sq_pushstring(v, "set_gamma", -1);
4636 sq_newclosure(v, &set_gamma_wrapper, 0);
4637 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4638 if(SQ_FAILED(sq_createslot(v, -3))) {
4639 throw SquirrelError(v, "Couldn't register function 'set_gamma'");
4642 sq_pushstring(v, "quit", -1);
4643 sq_newclosure(v, &quit_wrapper, 0);
4644 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4645 if(SQ_FAILED(sq_createslot(v, -3))) {
4646 throw SquirrelError(v, "Couldn't register function 'quit'");
4649 sq_pushstring(v, "rand", -1);
4650 sq_newclosure(v, &rand_wrapper, 0);
4651 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4652 if(SQ_FAILED(sq_createslot(v, -3))) {
4653 throw SquirrelError(v, "Couldn't register function 'rand'");
4656 sq_pushstring(v, "record_demo", -1);
4657 sq_newclosure(v, &record_demo_wrapper, 0);
4658 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4659 if(SQ_FAILED(sq_createslot(v, -3))) {
4660 throw SquirrelError(v, "Couldn't register function 'record_demo'");
4663 sq_pushstring(v, "play_demo", -1);
4664 sq_newclosure(v, &play_demo_wrapper, 0);
4665 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4666 if(SQ_FAILED(sq_createslot(v, -3))) {
4667 throw SquirrelError(v, "Couldn't register function 'play_demo'");
4670 sq_pushstring(v, "Level_finish", -1);
4671 sq_newclosure(v, &Level_finish_wrapper, 0);
4672 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4673 if(SQ_FAILED(sq_createslot(v, -3))) {
4674 throw SquirrelError(v, "Couldn't register function 'Level_finish'");
4677 sq_pushstring(v, "Level_spawn", -1);
4678 sq_newclosure(v, &Level_spawn_wrapper, 0);
4679 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
4680 if(SQ_FAILED(sq_createslot(v, -3))) {
4681 throw SquirrelError(v, "Couldn't register function 'Level_spawn'");
4684 sq_pushstring(v, "Level_flip_vertically", -1);
4685 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
4686 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4687 if(SQ_FAILED(sq_createslot(v, -3))) {
4688 throw SquirrelError(v, "Couldn't register function 'Level_flip_vertically'");
4691 sq_pushstring(v, "Level_toggle_pause", -1);
4692 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
4693 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4694 if(SQ_FAILED(sq_createslot(v, -3))) {
4695 throw SquirrelError(v, "Couldn't register function 'Level_toggle_pause'");
4698 sq_pushstring(v, "Level_edit", -1);
4699 sq_newclosure(v, &Level_edit_wrapper, 0);
4700 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4701 if(SQ_FAILED(sq_createslot(v, -3))) {
4702 throw SquirrelError(v, "Couldn't register function 'Level_edit'");
4705 // Register class AmbientSound
4706 sq_pushstring(v, "AmbientSound", -1);
4707 if(sq_newclass(v, SQFalse) < 0) {
4708 std::ostringstream msg;
4709 msg << "Couldn't create new class 'AmbientSound'";
4710 throw SquirrelError(v, msg.str());
4712 sq_pushstring(v, "set_pos", -1);
4713 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
4714 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
4715 if(SQ_FAILED(sq_createslot(v, -3))) {
4716 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4719 sq_pushstring(v, "get_pos_x", -1);
4720 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
4721 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4722 if(SQ_FAILED(sq_createslot(v, -3))) {
4723 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4726 sq_pushstring(v, "get_pos_y", -1);
4727 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
4728 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4729 if(SQ_FAILED(sq_createslot(v, -3))) {
4730 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4733 if(SQ_FAILED(sq_createslot(v, -3))) {
4734 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
4737 // Register class Camera
4738 sq_pushstring(v, "Camera", -1);
4739 if(sq_newclass(v, SQFalse) < 0) {
4740 std::ostringstream msg;
4741 msg << "Couldn't create new class 'Camera'";
4742 throw SquirrelError(v, msg.str());
4744 sq_pushstring(v, "reload_config", -1);
4745 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
4746 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4747 if(SQ_FAILED(sq_createslot(v, -3))) {
4748 throw SquirrelError(v, "Couldn't register function 'reload_config'");
4751 sq_pushstring(v, "shake", -1);
4752 sq_newclosure(v, &Camera_shake_wrapper, 0);
4753 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
4754 if(SQ_FAILED(sq_createslot(v, -3))) {
4755 throw SquirrelError(v, "Couldn't register function 'shake'");
4758 sq_pushstring(v, "set_pos", -1);
4759 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
4760 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
4761 if(SQ_FAILED(sq_createslot(v, -3))) {
4762 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4765 sq_pushstring(v, "set_mode", -1);
4766 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
4767 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4768 if(SQ_FAILED(sq_createslot(v, -3))) {
4769 throw SquirrelError(v, "Couldn't register function 'set_mode'");
4772 sq_pushstring(v, "scroll_to", -1);
4773 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
4774 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
4775 if(SQ_FAILED(sq_createslot(v, -3))) {
4776 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
4779 if(SQ_FAILED(sq_createslot(v, -3))) {
4780 throw SquirrelError(v, "Couldn't register class 'Camera'");
4783 // Register class Candle
4784 sq_pushstring(v, "Candle", -1);
4785 if(sq_newclass(v, SQFalse) < 0) {
4786 std::ostringstream msg;
4787 msg << "Couldn't create new class 'Candle'";
4788 throw SquirrelError(v, msg.str());
4790 sq_pushstring(v, "get_burning", -1);
4791 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
4792 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4793 if(SQ_FAILED(sq_createslot(v, -3))) {
4794 throw SquirrelError(v, "Couldn't register function 'get_burning'");
4797 sq_pushstring(v, "set_burning", -1);
4798 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
4799 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4800 if(SQ_FAILED(sq_createslot(v, -3))) {
4801 throw SquirrelError(v, "Couldn't register function 'set_burning'");
4804 if(SQ_FAILED(sq_createslot(v, -3))) {
4805 throw SquirrelError(v, "Couldn't register class 'Candle'");
4808 // Register class DisplayEffect
4809 sq_pushstring(v, "DisplayEffect", -1);
4810 if(sq_newclass(v, SQFalse) < 0) {
4811 std::ostringstream msg;
4812 msg << "Couldn't create new class 'DisplayEffect'";
4813 throw SquirrelError(v, msg.str());
4815 sq_pushstring(v, "fade_out", -1);
4816 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
4817 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4818 if(SQ_FAILED(sq_createslot(v, -3))) {
4819 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4822 sq_pushstring(v, "fade_in", -1);
4823 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
4824 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4825 if(SQ_FAILED(sq_createslot(v, -3))) {
4826 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4829 sq_pushstring(v, "set_black", -1);
4830 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
4831 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4832 if(SQ_FAILED(sq_createslot(v, -3))) {
4833 throw SquirrelError(v, "Couldn't register function 'set_black'");
4836 sq_pushstring(v, "is_black", -1);
4837 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
4838 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4839 if(SQ_FAILED(sq_createslot(v, -3))) {
4840 throw SquirrelError(v, "Couldn't register function 'is_black'");
4843 sq_pushstring(v, "sixteen_to_nine", -1);
4844 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
4845 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4846 if(SQ_FAILED(sq_createslot(v, -3))) {
4847 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
4850 sq_pushstring(v, "four_to_three", -1);
4851 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
4852 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4853 if(SQ_FAILED(sq_createslot(v, -3))) {
4854 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
4857 if(SQ_FAILED(sq_createslot(v, -3))) {
4858 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
4861 // Register class FloatingImage
4862 sq_pushstring(v, "FloatingImage", -1);
4863 if(sq_newclass(v, SQFalse) < 0) {
4864 std::ostringstream msg;
4865 msg << "Couldn't create new class 'FloatingImage'";
4866 throw SquirrelError(v, msg.str());
4868 sq_pushstring(v, "constructor", -1);
4869 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
4870 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4871 if(SQ_FAILED(sq_createslot(v, -3))) {
4872 throw SquirrelError(v, "Couldn't register function 'constructor'");
4875 sq_pushstring(v, "set_layer", -1);
4876 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
4877 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
4878 if(SQ_FAILED(sq_createslot(v, -3))) {
4879 throw SquirrelError(v, "Couldn't register function 'set_layer'");
4882 sq_pushstring(v, "get_layer", -1);
4883 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
4884 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4885 if(SQ_FAILED(sq_createslot(v, -3))) {
4886 throw SquirrelError(v, "Couldn't register function 'get_layer'");
4889 sq_pushstring(v, "set_pos", -1);
4890 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
4891 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
4892 if(SQ_FAILED(sq_createslot(v, -3))) {
4893 throw SquirrelError(v, "Couldn't register function 'set_pos'");
4896 sq_pushstring(v, "get_pos_x", -1);
4897 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
4898 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4899 if(SQ_FAILED(sq_createslot(v, -3))) {
4900 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
4903 sq_pushstring(v, "get_pos_y", -1);
4904 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
4905 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4906 if(SQ_FAILED(sq_createslot(v, -3))) {
4907 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
4910 sq_pushstring(v, "set_anchor_point", -1);
4911 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
4912 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
4913 if(SQ_FAILED(sq_createslot(v, -3))) {
4914 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
4917 sq_pushstring(v, "get_anchor_point", -1);
4918 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
4919 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4920 if(SQ_FAILED(sq_createslot(v, -3))) {
4921 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
4924 sq_pushstring(v, "set_visible", -1);
4925 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
4926 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
4927 if(SQ_FAILED(sq_createslot(v, -3))) {
4928 throw SquirrelError(v, "Couldn't register function 'set_visible'");
4931 sq_pushstring(v, "get_visible", -1);
4932 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
4933 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4934 if(SQ_FAILED(sq_createslot(v, -3))) {
4935 throw SquirrelError(v, "Couldn't register function 'get_visible'");
4938 sq_pushstring(v, "set_action", -1);
4939 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
4940 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
4941 if(SQ_FAILED(sq_createslot(v, -3))) {
4942 throw SquirrelError(v, "Couldn't register function 'set_action'");
4945 sq_pushstring(v, "get_action", -1);
4946 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
4947 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4948 if(SQ_FAILED(sq_createslot(v, -3))) {
4949 throw SquirrelError(v, "Couldn't register function 'get_action'");
4952 sq_pushstring(v, "fade_in", -1);
4953 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
4954 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4955 if(SQ_FAILED(sq_createslot(v, -3))) {
4956 throw SquirrelError(v, "Couldn't register function 'fade_in'");
4959 sq_pushstring(v, "fade_out", -1);
4960 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
4961 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
4962 if(SQ_FAILED(sq_createslot(v, -3))) {
4963 throw SquirrelError(v, "Couldn't register function 'fade_out'");
4966 if(SQ_FAILED(sq_createslot(v, -3))) {
4967 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
4970 // Register class LevelTime
4971 sq_pushstring(v, "LevelTime", -1);
4972 if(sq_newclass(v, SQFalse) < 0) {
4973 std::ostringstream msg;
4974 msg << "Couldn't create new class 'LevelTime'";
4975 throw SquirrelError(v, msg.str());
4977 sq_pushstring(v, "start", -1);
4978 sq_newclosure(v, &LevelTime_start_wrapper, 0);
4979 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4980 if(SQ_FAILED(sq_createslot(v, -3))) {
4981 throw SquirrelError(v, "Couldn't register function 'start'");
4984 sq_pushstring(v, "stop", -1);
4985 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
4986 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4987 if(SQ_FAILED(sq_createslot(v, -3))) {
4988 throw SquirrelError(v, "Couldn't register function 'stop'");
4991 sq_pushstring(v, "get_time", -1);
4992 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
4993 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
4994 if(SQ_FAILED(sq_createslot(v, -3))) {
4995 throw SquirrelError(v, "Couldn't register function 'get_time'");
4998 sq_pushstring(v, "set_time", -1);
4999 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
5000 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5001 if(SQ_FAILED(sq_createslot(v, -3))) {
5002 throw SquirrelError(v, "Couldn't register function 'set_time'");
5005 if(SQ_FAILED(sq_createslot(v, -3))) {
5006 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
5009 // Register class Platform
5010 sq_pushstring(v, "Platform", -1);
5011 if(sq_newclass(v, SQFalse) < 0) {
5012 std::ostringstream msg;
5013 msg << "Couldn't create new class 'Platform'";
5014 throw SquirrelError(v, msg.str());
5016 sq_pushstring(v, "goto_node", -1);
5017 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
5018 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
5019 if(SQ_FAILED(sq_createslot(v, -3))) {
5020 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5023 sq_pushstring(v, "start_moving", -1);
5024 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
5025 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5026 if(SQ_FAILED(sq_createslot(v, -3))) {
5027 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5030 sq_pushstring(v, "stop_moving", -1);
5031 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
5032 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5033 if(SQ_FAILED(sq_createslot(v, -3))) {
5034 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5037 if(SQ_FAILED(sq_createslot(v, -3))) {
5038 throw SquirrelError(v, "Couldn't register class 'Platform'");
5041 // Register class Player
5042 sq_pushstring(v, "Player", -1);
5043 if(sq_newclass(v, SQFalse) < 0) {
5044 std::ostringstream msg;
5045 msg << "Couldn't create new class 'Player'";
5046 throw SquirrelError(v, msg.str());
5048 sq_pushstring(v, "add_bonus", -1);
5049 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
5050 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5051 if(SQ_FAILED(sq_createslot(v, -3))) {
5052 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
5055 sq_pushstring(v, "add_coins", -1);
5056 sq_newclosure(v, &Player_add_coins_wrapper, 0);
5057 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
5058 if(SQ_FAILED(sq_createslot(v, -3))) {
5059 throw SquirrelError(v, "Couldn't register function 'add_coins'");
5062 sq_pushstring(v, "make_invincible", -1);
5063 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
5064 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5065 if(SQ_FAILED(sq_createslot(v, -3))) {
5066 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
5069 sq_pushstring(v, "deactivate", -1);
5070 sq_newclosure(v, &Player_deactivate_wrapper, 0);
5071 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5072 if(SQ_FAILED(sq_createslot(v, -3))) {
5073 throw SquirrelError(v, "Couldn't register function 'deactivate'");
5076 sq_pushstring(v, "activate", -1);
5077 sq_newclosure(v, &Player_activate_wrapper, 0);
5078 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5079 if(SQ_FAILED(sq_createslot(v, -3))) {
5080 throw SquirrelError(v, "Couldn't register function 'activate'");
5083 sq_pushstring(v, "walk", -1);
5084 sq_newclosure(v, &Player_walk_wrapper, 0);
5085 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5086 if(SQ_FAILED(sq_createslot(v, -3))) {
5087 throw SquirrelError(v, "Couldn't register function 'walk'");
5090 sq_pushstring(v, "set_dir", -1);
5091 sq_newclosure(v, &Player_set_dir_wrapper, 0);
5092 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5093 if(SQ_FAILED(sq_createslot(v, -3))) {
5094 throw SquirrelError(v, "Couldn't register function 'set_dir'");
5097 sq_pushstring(v, "set_visible", -1);
5098 sq_newclosure(v, &Player_set_visible_wrapper, 0);
5099 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5100 if(SQ_FAILED(sq_createslot(v, -3))) {
5101 throw SquirrelError(v, "Couldn't register function 'set_visible'");
5104 sq_pushstring(v, "get_visible", -1);
5105 sq_newclosure(v, &Player_get_visible_wrapper, 0);
5106 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5107 if(SQ_FAILED(sq_createslot(v, -3))) {
5108 throw SquirrelError(v, "Couldn't register function 'get_visible'");
5111 sq_pushstring(v, "kill", -1);
5112 sq_newclosure(v, &Player_kill_wrapper, 0);
5113 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5114 if(SQ_FAILED(sq_createslot(v, -3))) {
5115 throw SquirrelError(v, "Couldn't register function 'kill'");
5118 sq_pushstring(v, "set_ghost_mode", -1);
5119 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
5120 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5121 if(SQ_FAILED(sq_createslot(v, -3))) {
5122 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
5125 sq_pushstring(v, "get_ghost_mode", -1);
5126 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
5127 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5128 if(SQ_FAILED(sq_createslot(v, -3))) {
5129 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
5132 sq_pushstring(v, "kick", -1);
5133 sq_newclosure(v, &Player_kick_wrapper, 0);
5134 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5135 if(SQ_FAILED(sq_createslot(v, -3))) {
5136 throw SquirrelError(v, "Couldn't register function 'kick'");
5139 sq_pushstring(v, "do_cheer", -1);
5140 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
5141 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5142 if(SQ_FAILED(sq_createslot(v, -3))) {
5143 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
5146 sq_pushstring(v, "do_duck", -1);
5147 sq_newclosure(v, &Player_do_duck_wrapper, 0);
5148 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5149 if(SQ_FAILED(sq_createslot(v, -3))) {
5150 throw SquirrelError(v, "Couldn't register function 'do_duck'");
5153 sq_pushstring(v, "do_standup", -1);
5154 sq_newclosure(v, &Player_do_standup_wrapper, 0);
5155 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5156 if(SQ_FAILED(sq_createslot(v, -3))) {
5157 throw SquirrelError(v, "Couldn't register function 'do_standup'");
5160 sq_pushstring(v, "do_backflip", -1);
5161 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
5162 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5163 if(SQ_FAILED(sq_createslot(v, -3))) {
5164 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
5167 sq_pushstring(v, "do_jump", -1);
5168 sq_newclosure(v, &Player_do_jump_wrapper, 0);
5169 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5170 if(SQ_FAILED(sq_createslot(v, -3))) {
5171 throw SquirrelError(v, "Couldn't register function 'do_jump'");
5174 sq_pushstring(v, "trigger_sequence", -1);
5175 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
5176 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5177 if(SQ_FAILED(sq_createslot(v, -3))) {
5178 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
5181 sq_pushstring(v, "use_scripting_controller", -1);
5182 sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
5183 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5184 if(SQ_FAILED(sq_createslot(v, -3))) {
5185 throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
5188 sq_pushstring(v, "do_scripting_controller", -1);
5189 sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
5190 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsb");
5191 if(SQ_FAILED(sq_createslot(v, -3))) {
5192 throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
5195 if(SQ_FAILED(sq_createslot(v, -3))) {
5196 throw SquirrelError(v, "Couldn't register class 'Player'");
5199 // Register class ScriptedObject
5200 sq_pushstring(v, "ScriptedObject", -1);
5201 if(sq_newclass(v, SQFalse) < 0) {
5202 std::ostringstream msg;
5203 msg << "Couldn't create new class 'ScriptedObject'";
5204 throw SquirrelError(v, msg.str());
5206 sq_pushstring(v, "set_action", -1);
5207 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
5208 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5209 if(SQ_FAILED(sq_createslot(v, -3))) {
5210 throw SquirrelError(v, "Couldn't register function 'set_action'");
5213 sq_pushstring(v, "get_action", -1);
5214 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
5215 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5216 if(SQ_FAILED(sq_createslot(v, -3))) {
5217 throw SquirrelError(v, "Couldn't register function 'get_action'");
5220 sq_pushstring(v, "move", -1);
5221 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
5222 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
5223 if(SQ_FAILED(sq_createslot(v, -3))) {
5224 throw SquirrelError(v, "Couldn't register function 'move'");
5227 sq_pushstring(v, "set_pos", -1);
5228 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
5229 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
5230 if(SQ_FAILED(sq_createslot(v, -3))) {
5231 throw SquirrelError(v, "Couldn't register function 'set_pos'");
5234 sq_pushstring(v, "get_pos_x", -1);
5235 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
5236 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5237 if(SQ_FAILED(sq_createslot(v, -3))) {
5238 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
5241 sq_pushstring(v, "get_pos_y", -1);
5242 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
5243 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5244 if(SQ_FAILED(sq_createslot(v, -3))) {
5245 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
5248 sq_pushstring(v, "set_velocity", -1);
5249 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
5250 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
5251 if(SQ_FAILED(sq_createslot(v, -3))) {
5252 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
5255 sq_pushstring(v, "get_velocity_x", -1);
5256 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
5257 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5258 if(SQ_FAILED(sq_createslot(v, -3))) {
5259 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
5262 sq_pushstring(v, "get_velocity_y", -1);
5263 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
5264 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5265 if(SQ_FAILED(sq_createslot(v, -3))) {
5266 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
5269 sq_pushstring(v, "enable_gravity", -1);
5270 sq_newclosure(v, &ScriptedObject_enable_gravity_wrapper, 0);
5271 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5272 if(SQ_FAILED(sq_createslot(v, -3))) {
5273 throw SquirrelError(v, "Couldn't register function 'enable_gravity'");
5276 sq_pushstring(v, "gravity_enabled", -1);
5277 sq_newclosure(v, &ScriptedObject_gravity_enabled_wrapper, 0);
5278 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5279 if(SQ_FAILED(sq_createslot(v, -3))) {
5280 throw SquirrelError(v, "Couldn't register function 'gravity_enabled'");
5283 sq_pushstring(v, "set_visible", -1);
5284 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
5285 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5286 if(SQ_FAILED(sq_createslot(v, -3))) {
5287 throw SquirrelError(v, "Couldn't register function 'set_visible'");
5290 sq_pushstring(v, "is_visible", -1);
5291 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
5292 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5293 if(SQ_FAILED(sq_createslot(v, -3))) {
5294 throw SquirrelError(v, "Couldn't register function 'is_visible'");
5297 sq_pushstring(v, "set_solid", -1);
5298 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
5299 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5300 if(SQ_FAILED(sq_createslot(v, -3))) {
5301 throw SquirrelError(v, "Couldn't register function 'set_solid'");
5304 sq_pushstring(v, "is_solid", -1);
5305 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
5306 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5307 if(SQ_FAILED(sq_createslot(v, -3))) {
5308 throw SquirrelError(v, "Couldn't register function 'is_solid'");
5311 sq_pushstring(v, "get_name", -1);
5312 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
5313 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5314 if(SQ_FAILED(sq_createslot(v, -3))) {
5315 throw SquirrelError(v, "Couldn't register function 'get_name'");
5318 if(SQ_FAILED(sq_createslot(v, -3))) {
5319 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
5322 // Register class SSector
5323 sq_pushstring(v, "SSector", -1);
5324 if(sq_newclass(v, SQFalse) < 0) {
5325 std::ostringstream msg;
5326 msg << "Couldn't create new class 'SSector'";
5327 throw SquirrelError(v, msg.str());
5329 sq_pushstring(v, "set_ambient_light", -1);
5330 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
5331 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
5332 if(SQ_FAILED(sq_createslot(v, -3))) {
5333 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
5336 sq_pushstring(v, "get_ambient_red", -1);
5337 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
5338 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5339 if(SQ_FAILED(sq_createslot(v, -3))) {
5340 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
5343 sq_pushstring(v, "get_ambient_green", -1);
5344 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
5345 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5346 if(SQ_FAILED(sq_createslot(v, -3))) {
5347 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
5350 sq_pushstring(v, "get_ambient_blue", -1);
5351 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
5352 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5353 if(SQ_FAILED(sq_createslot(v, -3))) {
5354 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
5357 sq_pushstring(v, "set_gravity", -1);
5358 sq_newclosure(v, &SSector_set_gravity_wrapper, 0);
5359 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5360 if(SQ_FAILED(sq_createslot(v, -3))) {
5361 throw SquirrelError(v, "Couldn't register function 'set_gravity'");
5364 if(SQ_FAILED(sq_createslot(v, -3))) {
5365 throw SquirrelError(v, "Couldn't register class 'SSector'");
5368 // Register class Text
5369 sq_pushstring(v, "Text", -1);
5370 if(sq_newclass(v, SQFalse) < 0) {
5371 std::ostringstream msg;
5372 msg << "Couldn't create new class 'Text'";
5373 throw SquirrelError(v, msg.str());
5375 sq_pushstring(v, "set_text", -1);
5376 sq_newclosure(v, &Text_set_text_wrapper, 0);
5377 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5378 if(SQ_FAILED(sq_createslot(v, -3))) {
5379 throw SquirrelError(v, "Couldn't register function 'set_text'");
5382 sq_pushstring(v, "set_font", -1);
5383 sq_newclosure(v, &Text_set_font_wrapper, 0);
5384 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5385 if(SQ_FAILED(sq_createslot(v, -3))) {
5386 throw SquirrelError(v, "Couldn't register function 'set_font'");
5389 sq_pushstring(v, "fade_in", -1);
5390 sq_newclosure(v, &Text_fade_in_wrapper, 0);
5391 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5392 if(SQ_FAILED(sq_createslot(v, -3))) {
5393 throw SquirrelError(v, "Couldn't register function 'fade_in'");
5396 sq_pushstring(v, "fade_out", -1);
5397 sq_newclosure(v, &Text_fade_out_wrapper, 0);
5398 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5399 if(SQ_FAILED(sq_createslot(v, -3))) {
5400 throw SquirrelError(v, "Couldn't register function 'fade_out'");
5403 sq_pushstring(v, "set_visible", -1);
5404 sq_newclosure(v, &Text_set_visible_wrapper, 0);
5405 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5406 if(SQ_FAILED(sq_createslot(v, -3))) {
5407 throw SquirrelError(v, "Couldn't register function 'set_visible'");
5410 sq_pushstring(v, "set_centered", -1);
5411 sq_newclosure(v, &Text_set_centered_wrapper, 0);
5412 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
5413 if(SQ_FAILED(sq_createslot(v, -3))) {
5414 throw SquirrelError(v, "Couldn't register function 'set_centered'");
5417 sq_pushstring(v, "set_pos", -1);
5418 sq_newclosure(v, &Text_set_pos_wrapper, 0);
5419 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
5420 if(SQ_FAILED(sq_createslot(v, -3))) {
5421 throw SquirrelError(v, "Couldn't register function 'set_pos'");
5424 sq_pushstring(v, "get_pos_x", -1);
5425 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
5426 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5427 if(SQ_FAILED(sq_createslot(v, -3))) {
5428 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
5431 sq_pushstring(v, "get_pos_y", -1);
5432 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
5433 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5434 if(SQ_FAILED(sq_createslot(v, -3))) {
5435 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
5438 sq_pushstring(v, "set_anchor_point", -1);
5439 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
5440 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
5441 if(SQ_FAILED(sq_createslot(v, -3))) {
5442 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
5445 sq_pushstring(v, "get_anchor_point", -1);
5446 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
5447 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5448 if(SQ_FAILED(sq_createslot(v, -3))) {
5449 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
5452 if(SQ_FAILED(sq_createslot(v, -3))) {
5453 throw SquirrelError(v, "Couldn't register class 'Text'");
5456 // Register class Thunderstorm
5457 sq_pushstring(v, "Thunderstorm", -1);
5458 if(sq_newclass(v, SQFalse) < 0) {
5459 std::ostringstream msg;
5460 msg << "Couldn't create new class 'Thunderstorm'";
5461 throw SquirrelError(v, msg.str());
5463 sq_pushstring(v, "start", -1);
5464 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
5465 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5466 if(SQ_FAILED(sq_createslot(v, -3))) {
5467 throw SquirrelError(v, "Couldn't register function 'start'");
5470 sq_pushstring(v, "stop", -1);
5471 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
5472 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5473 if(SQ_FAILED(sq_createslot(v, -3))) {
5474 throw SquirrelError(v, "Couldn't register function 'stop'");
5477 sq_pushstring(v, "thunder", -1);
5478 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
5479 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5480 if(SQ_FAILED(sq_createslot(v, -3))) {
5481 throw SquirrelError(v, "Couldn't register function 'thunder'");
5484 sq_pushstring(v, "lightning", -1);
5485 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
5486 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5487 if(SQ_FAILED(sq_createslot(v, -3))) {
5488 throw SquirrelError(v, "Couldn't register function 'lightning'");
5491 sq_pushstring(v, "flash", -1);
5492 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
5493 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5494 if(SQ_FAILED(sq_createslot(v, -3))) {
5495 throw SquirrelError(v, "Couldn't register function 'flash'");
5498 sq_pushstring(v, "electrify", -1);
5499 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
5500 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5501 if(SQ_FAILED(sq_createslot(v, -3))) {
5502 throw SquirrelError(v, "Couldn't register function 'electrify'");
5505 if(SQ_FAILED(sq_createslot(v, -3))) {
5506 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
5509 // Register class TileMap
5510 sq_pushstring(v, "TileMap", -1);
5511 if(sq_newclass(v, SQFalse) < 0) {
5512 std::ostringstream msg;
5513 msg << "Couldn't create new class 'TileMap'";
5514 throw SquirrelError(v, msg.str());
5516 sq_pushstring(v, "goto_node", -1);
5517 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
5518 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
5519 if(SQ_FAILED(sq_createslot(v, -3))) {
5520 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5523 sq_pushstring(v, "start_moving", -1);
5524 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
5525 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5526 if(SQ_FAILED(sq_createslot(v, -3))) {
5527 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5530 sq_pushstring(v, "stop_moving", -1);
5531 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
5532 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5533 if(SQ_FAILED(sq_createslot(v, -3))) {
5534 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5537 sq_pushstring(v, "fade", -1);
5538 sq_newclosure(v, &TileMap_fade_wrapper, 0);
5539 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
5540 if(SQ_FAILED(sq_createslot(v, -3))) {
5541 throw SquirrelError(v, "Couldn't register function 'fade'");
5544 sq_pushstring(v, "set_alpha", -1);
5545 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
5546 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
5547 if(SQ_FAILED(sq_createslot(v, -3))) {
5548 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
5551 sq_pushstring(v, "get_alpha", -1);
5552 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
5553 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5554 if(SQ_FAILED(sq_createslot(v, -3))) {
5555 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
5558 if(SQ_FAILED(sq_createslot(v, -3))) {
5559 throw SquirrelError(v, "Couldn't register class 'TileMap'");
5562 // Register class WillOWisp
5563 sq_pushstring(v, "WillOWisp", -1);
5564 if(sq_newclass(v, SQFalse) < 0) {
5565 std::ostringstream msg;
5566 msg << "Couldn't create new class 'WillOWisp'";
5567 throw SquirrelError(v, msg.str());
5569 sq_pushstring(v, "goto_node", -1);
5570 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
5571 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
5572 if(SQ_FAILED(sq_createslot(v, -3))) {
5573 throw SquirrelError(v, "Couldn't register function 'goto_node'");
5576 sq_pushstring(v, "set_state", -1);
5577 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
5578 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
5579 if(SQ_FAILED(sq_createslot(v, -3))) {
5580 throw SquirrelError(v, "Couldn't register function 'set_state'");
5583 sq_pushstring(v, "start_moving", -1);
5584 sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
5585 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5586 if(SQ_FAILED(sq_createslot(v, -3))) {
5587 throw SquirrelError(v, "Couldn't register function 'start_moving'");
5590 sq_pushstring(v, "stop_moving", -1);
5591 sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
5592 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5593 if(SQ_FAILED(sq_createslot(v, -3))) {
5594 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
5597 if(SQ_FAILED(sq_createslot(v, -3))) {
5598 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
5601 // Register class Wind
5602 sq_pushstring(v, "Wind", -1);
5603 if(sq_newclass(v, SQFalse) < 0) {
5604 std::ostringstream msg;
5605 msg << "Couldn't create new class 'Wind'";
5606 throw SquirrelError(v, msg.str());
5608 sq_pushstring(v, "start", -1);
5609 sq_newclosure(v, &Wind_start_wrapper, 0);
5610 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5611 if(SQ_FAILED(sq_createslot(v, -3))) {
5612 throw SquirrelError(v, "Couldn't register function 'start'");
5615 sq_pushstring(v, "stop", -1);
5616 sq_newclosure(v, &Wind_stop_wrapper, 0);
5617 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
5618 if(SQ_FAILED(sq_createslot(v, -3))) {
5619 throw SquirrelError(v, "Couldn't register function 'stop'");
5622 if(SQ_FAILED(sq_createslot(v, -3))) {
5623 throw SquirrelError(v, "Couldn't register class 'Wind'");
5628 } // namespace scripting