2 * WARNING: This file is automatically generated from:
3 * 'src/scripting/wrapper.interface.hpp'
13 #include "squirrel_error.hpp"
14 #include "wrapper.interface.hpp"
21 static int DisplayEffect_release_hook(SQUserPointer ptr, int )
23 Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (ptr);
28 static int DisplayEffect_fade_out_wrapper(HSQUIRRELVM v)
30 Scripting::DisplayEffect* _this;
31 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
33 sq_getfloat(v, 2, &arg0);
35 _this->fade_out(arg0);
40 static int DisplayEffect_fade_in_wrapper(HSQUIRRELVM v)
42 Scripting::DisplayEffect* _this;
43 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
45 sq_getfloat(v, 2, &arg0);
52 static int DisplayEffect_set_black_wrapper(HSQUIRRELVM v)
54 Scripting::DisplayEffect* _this;
55 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
57 sq_getbool(v, 2, &arg0);
59 _this->set_black(arg0);
64 static int DisplayEffect_is_black_wrapper(HSQUIRRELVM v)
66 Scripting::DisplayEffect* _this;
67 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
69 bool return_value = _this->is_black();
71 sq_pushbool(v, return_value);
75 static int DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM v)
77 Scripting::DisplayEffect* _this;
78 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
80 sq_getfloat(v, 2, &arg0);
82 _this->sixteen_to_nine(arg0);
87 static int DisplayEffect_four_to_three_wrapper(HSQUIRRELVM v)
89 Scripting::DisplayEffect* _this;
90 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
92 sq_getfloat(v, 2, &arg0);
94 _this->four_to_three(arg0);
99 static int Camera_release_hook(SQUserPointer ptr, int )
101 Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (ptr);
106 static int Camera_shake_wrapper(HSQUIRRELVM v)
108 Scripting::Camera* _this;
109 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
111 sq_getfloat(v, 2, &arg0);
113 sq_getfloat(v, 3, &arg1);
115 sq_getfloat(v, 4, &arg2);
117 _this->shake(arg0, arg1, arg2);
122 static int Camera_set_pos_wrapper(HSQUIRRELVM v)
124 Scripting::Camera* _this;
125 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
127 sq_getfloat(v, 2, &arg0);
129 sq_getfloat(v, 3, &arg1);
131 _this->set_pos(arg0, arg1);
136 static int Camera_set_mode_wrapper(HSQUIRRELVM v)
138 Scripting::Camera* _this;
139 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
141 sq_getstring(v, 2, &arg0);
143 _this->set_mode(arg0);
148 static int Camera_scroll_to_wrapper(HSQUIRRELVM v)
150 Scripting::Camera* _this;
151 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
153 sq_getfloat(v, 2, &arg0);
155 sq_getfloat(v, 3, &arg1);
157 sq_getfloat(v, 4, &arg2);
159 _this->scroll_to(arg0, arg1, arg2);
164 static int Level_release_hook(SQUserPointer ptr, int )
166 Scripting::Level* _this = reinterpret_cast<Scripting::Level*> (ptr);
171 static int Level_finish_wrapper(HSQUIRRELVM v)
173 Scripting::Level* _this;
174 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
176 sq_getbool(v, 2, &arg0);
183 static int Level_spawn_wrapper(HSQUIRRELVM v)
185 Scripting::Level* _this;
186 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
188 sq_getstring(v, 2, &arg0);
190 sq_getstring(v, 3, &arg1);
192 _this->spawn(arg0, arg1);
197 static int Level_flip_vertically_wrapper(HSQUIRRELVM v)
199 Scripting::Level* _this;
200 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
202 _this->flip_vertically();
207 static int ScriptedObject_release_hook(SQUserPointer ptr, int )
209 Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
214 static int ScriptedObject_set_action_wrapper(HSQUIRRELVM v)
216 Scripting::ScriptedObject* _this;
217 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
219 sq_getstring(v, 2, &arg0);
221 _this->set_action(arg0);
226 static int ScriptedObject_get_action_wrapper(HSQUIRRELVM v)
228 Scripting::ScriptedObject* _this;
229 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
231 std::string return_value = _this->get_action();
233 sq_pushstring(v, return_value.c_str(), return_value.size());
237 static int ScriptedObject_move_wrapper(HSQUIRRELVM v)
239 Scripting::ScriptedObject* _this;
240 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
242 sq_getfloat(v, 2, &arg0);
244 sq_getfloat(v, 3, &arg1);
246 _this->move(arg0, arg1);
251 static int ScriptedObject_set_pos_wrapper(HSQUIRRELVM v)
253 Scripting::ScriptedObject* _this;
254 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
256 sq_getfloat(v, 2, &arg0);
258 sq_getfloat(v, 3, &arg1);
260 _this->set_pos(arg0, arg1);
265 static int ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM v)
267 Scripting::ScriptedObject* _this;
268 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
270 float return_value = _this->get_pos_x();
272 sq_pushfloat(v, return_value);
276 static int ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM v)
278 Scripting::ScriptedObject* _this;
279 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
281 float return_value = _this->get_pos_y();
283 sq_pushfloat(v, return_value);
287 static int ScriptedObject_set_velocity_wrapper(HSQUIRRELVM v)
289 Scripting::ScriptedObject* _this;
290 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
292 sq_getfloat(v, 2, &arg0);
294 sq_getfloat(v, 3, &arg1);
296 _this->set_velocity(arg0, arg1);
301 static int ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM v)
303 Scripting::ScriptedObject* _this;
304 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
306 float return_value = _this->get_velocity_x();
308 sq_pushfloat(v, return_value);
312 static int ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM v)
314 Scripting::ScriptedObject* _this;
315 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
317 float return_value = _this->get_velocity_y();
319 sq_pushfloat(v, return_value);
323 static int ScriptedObject_set_visible_wrapper(HSQUIRRELVM v)
325 Scripting::ScriptedObject* _this;
326 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
328 sq_getbool(v, 2, &arg0);
330 _this->set_visible(arg0);
335 static int ScriptedObject_is_visible_wrapper(HSQUIRRELVM v)
337 Scripting::ScriptedObject* _this;
338 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
340 bool return_value = _this->is_visible();
342 sq_pushbool(v, return_value);
346 static int ScriptedObject_get_name_wrapper(HSQUIRRELVM v)
348 Scripting::ScriptedObject* _this;
349 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
351 std::string return_value = _this->get_name();
353 sq_pushstring(v, return_value.c_str(), return_value.size());
357 static int Sound_release_hook(SQUserPointer ptr, int )
359 Scripting::Sound* _this = reinterpret_cast<Scripting::Sound*> (ptr);
364 static int Sound_play_music_wrapper(HSQUIRRELVM v)
366 Scripting::Sound* _this;
367 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
369 sq_getstring(v, 2, &arg0);
371 _this->play_music(arg0);
376 static int Sound_play_wrapper(HSQUIRRELVM v)
378 Scripting::Sound* _this;
379 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
381 sq_getstring(v, 2, &arg0);
388 static int Text_release_hook(SQUserPointer ptr, int )
390 Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
395 static int Text_set_text_wrapper(HSQUIRRELVM v)
397 Scripting::Text* _this;
398 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
400 sq_getstring(v, 2, &arg0);
402 _this->set_text(arg0);
407 static int Text_set_font_wrapper(HSQUIRRELVM v)
409 Scripting::Text* _this;
410 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
412 sq_getstring(v, 2, &arg0);
414 _this->set_font(arg0);
419 static int Text_fade_in_wrapper(HSQUIRRELVM v)
421 Scripting::Text* _this;
422 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
424 sq_getfloat(v, 2, &arg0);
426 _this->fade_in(arg0);
431 static int Text_fade_out_wrapper(HSQUIRRELVM v)
433 Scripting::Text* _this;
434 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
436 sq_getfloat(v, 2, &arg0);
438 _this->fade_out(arg0);
443 static int Text_set_visible_wrapper(HSQUIRRELVM v)
445 Scripting::Text* _this;
446 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
448 sq_getbool(v, 2, &arg0);
450 _this->set_visible(arg0);
455 static int Text_set_centered_wrapper(HSQUIRRELVM v)
457 Scripting::Text* _this;
458 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
460 sq_getbool(v, 2, &arg0);
462 _this->set_centered(arg0);
467 static int Player_release_hook(SQUserPointer ptr, int )
469 Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
474 static int Player_make_invincible_wrapper(HSQUIRRELVM v)
476 Scripting::Player* _this;
477 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
479 _this->make_invincible();
484 static int Player_deactivate_wrapper(HSQUIRRELVM v)
486 Scripting::Player* _this;
487 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
494 static int Player_activate_wrapper(HSQUIRRELVM v)
496 Scripting::Player* _this;
497 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
504 static int Player_walk_wrapper(HSQUIRRELVM v)
506 Scripting::Player* _this;
507 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
509 sq_getfloat(v, 2, &arg0);
516 static int Player_set_visible_wrapper(HSQUIRRELVM v)
518 Scripting::Player* _this;
519 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
521 sq_getbool(v, 2, &arg0);
523 _this->set_visible(arg0);
528 static int Player_get_visible_wrapper(HSQUIRRELVM v)
530 Scripting::Player* _this;
531 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
533 bool return_value = _this->get_visible();
535 sq_pushbool(v, return_value);
539 static int FloatingImage_release_hook(SQUserPointer ptr, int )
541 Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
546 static int FloatingImage_constructor_wrapper(HSQUIRRELVM v)
549 sq_getstring(v, 2, &arg0);
551 Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
552 sq_setinstanceup(v, 1, _this);
553 sq_setreleasehook(v, 1, FloatingImage_release_hook);
558 static int FloatingImage_set_layer_wrapper(HSQUIRRELVM v)
560 Scripting::FloatingImage* _this;
561 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
563 sq_getinteger(v, 2, &arg0);
565 _this->set_layer(arg0);
570 static int FloatingImage_get_layer_wrapper(HSQUIRRELVM v)
572 Scripting::FloatingImage* _this;
573 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
575 int return_value = _this->get_layer();
577 sq_pushinteger(v, return_value);
581 static int FloatingImage_set_pos_wrapper(HSQUIRRELVM v)
583 Scripting::FloatingImage* _this;
584 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
586 sq_getfloat(v, 2, &arg0);
588 sq_getfloat(v, 3, &arg1);
590 _this->set_pos(arg0, arg1);
595 static int FloatingImage_get_pos_x_wrapper(HSQUIRRELVM v)
597 Scripting::FloatingImage* _this;
598 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
600 float return_value = _this->get_pos_x();
602 sq_pushfloat(v, return_value);
606 static int FloatingImage_get_pos_y_wrapper(HSQUIRRELVM v)
608 Scripting::FloatingImage* _this;
609 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
611 float return_value = _this->get_pos_y();
613 sq_pushfloat(v, return_value);
617 static int FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM v)
619 Scripting::FloatingImage* _this;
620 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
622 sq_getinteger(v, 2, &arg0);
624 _this->set_anchor_point(arg0);
629 static int FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM v)
631 Scripting::FloatingImage* _this;
632 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
634 int return_value = _this->get_anchor_point();
636 sq_pushinteger(v, return_value);
640 static int FloatingImage_set_visible_wrapper(HSQUIRRELVM v)
642 Scripting::FloatingImage* _this;
643 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
645 sq_getbool(v, 2, &arg0);
647 _this->set_visible(arg0);
652 static int FloatingImage_get_visible_wrapper(HSQUIRRELVM v)
654 Scripting::FloatingImage* _this;
655 sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
657 bool return_value = _this->get_visible();
659 sq_pushbool(v, return_value);
663 static int display_text_file_wrapper(HSQUIRRELVM v)
666 sq_getstring(v, 2, &arg0);
668 Scripting::display_text_file(arg0);
673 static int wait_wrapper(HSQUIRRELVM v)
676 sq_getfloat(v, 2, &arg0);
678 Scripting::wait(arg0);
680 return sq_suspendvm(v);
683 static int translate_wrapper(HSQUIRRELVM v)
686 sq_getstring(v, 2, &arg0);
688 std::string return_value = Scripting::translate(arg0);
690 sq_pushstring(v, return_value.c_str(), return_value.size());
694 static int import_wrapper(HSQUIRRELVM v)
696 HSQUIRRELVM arg0 = v;
698 sq_getstring(v, 2, &arg1);
700 Scripting::import(arg0, arg1);
705 static int add_key_wrapper(HSQUIRRELVM v)
708 sq_getinteger(v, 2, &arg0);
710 Scripting::add_key(arg0);
715 } // end of namespace Wrapper
717 void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
719 using namespace Wrapper;
722 sq_pushstring(v, "DisplayEffect", -1);
723 if(SQ_FAILED(sq_get(v, -2))) {
724 std::ostringstream msg;
725 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
726 throw SquirrelError(v, msg.str());
729 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
730 std::ostringstream msg;
731 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
732 throw SquirrelError(v, msg.str());
734 sq_remove(v, -2); // remove object name
736 if(setup_releasehook) {
737 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
740 sq_remove(v, -2); // remove root table
743 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
745 using namespace Wrapper;
748 sq_pushstring(v, "Camera", -1);
749 if(SQ_FAILED(sq_get(v, -2))) {
750 std::ostringstream msg;
751 msg << "Couldn't resolved squirrel type 'Camera'";
752 throw SquirrelError(v, msg.str());
755 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
756 std::ostringstream msg;
757 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
758 throw SquirrelError(v, msg.str());
760 sq_remove(v, -2); // remove object name
762 if(setup_releasehook) {
763 sq_setreleasehook(v, -1, Camera_release_hook);
766 sq_remove(v, -2); // remove root table
769 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Level* object, bool setup_releasehook)
771 using namespace Wrapper;
774 sq_pushstring(v, "Level", -1);
775 if(SQ_FAILED(sq_get(v, -2))) {
776 std::ostringstream msg;
777 msg << "Couldn't resolved squirrel type 'Level'";
778 throw SquirrelError(v, msg.str());
781 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
782 std::ostringstream msg;
783 msg << "Couldn't setup squirrel instance for object of type 'Level'";
784 throw SquirrelError(v, msg.str());
786 sq_remove(v, -2); // remove object name
788 if(setup_releasehook) {
789 sq_setreleasehook(v, -1, Level_release_hook);
792 sq_remove(v, -2); // remove root table
795 void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
797 using namespace Wrapper;
800 sq_pushstring(v, "ScriptedObject", -1);
801 if(SQ_FAILED(sq_get(v, -2))) {
802 std::ostringstream msg;
803 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
804 throw SquirrelError(v, msg.str());
807 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
808 std::ostringstream msg;
809 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
810 throw SquirrelError(v, msg.str());
812 sq_remove(v, -2); // remove object name
814 if(setup_releasehook) {
815 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
818 sq_remove(v, -2); // remove root table
821 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Sound* object, bool setup_releasehook)
823 using namespace Wrapper;
826 sq_pushstring(v, "Sound", -1);
827 if(SQ_FAILED(sq_get(v, -2))) {
828 std::ostringstream msg;
829 msg << "Couldn't resolved squirrel type 'Sound'";
830 throw SquirrelError(v, msg.str());
833 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
834 std::ostringstream msg;
835 msg << "Couldn't setup squirrel instance for object of type 'Sound'";
836 throw SquirrelError(v, msg.str());
838 sq_remove(v, -2); // remove object name
840 if(setup_releasehook) {
841 sq_setreleasehook(v, -1, Sound_release_hook);
844 sq_remove(v, -2); // remove root table
847 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
849 using namespace Wrapper;
852 sq_pushstring(v, "Text", -1);
853 if(SQ_FAILED(sq_get(v, -2))) {
854 std::ostringstream msg;
855 msg << "Couldn't resolved squirrel type 'Text'";
856 throw SquirrelError(v, msg.str());
859 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
860 std::ostringstream msg;
861 msg << "Couldn't setup squirrel instance for object of type 'Text'";
862 throw SquirrelError(v, msg.str());
864 sq_remove(v, -2); // remove object name
866 if(setup_releasehook) {
867 sq_setreleasehook(v, -1, Text_release_hook);
870 sq_remove(v, -2); // remove root table
873 void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
875 using namespace Wrapper;
878 sq_pushstring(v, "Player", -1);
879 if(SQ_FAILED(sq_get(v, -2))) {
880 std::ostringstream msg;
881 msg << "Couldn't resolved squirrel type 'Player'";
882 throw SquirrelError(v, msg.str());
885 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
886 std::ostringstream msg;
887 msg << "Couldn't setup squirrel instance for object of type 'Player'";
888 throw SquirrelError(v, msg.str());
890 sq_remove(v, -2); // remove object name
892 if(setup_releasehook) {
893 sq_setreleasehook(v, -1, Player_release_hook);
896 sq_remove(v, -2); // remove root table
899 void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
901 using namespace Wrapper;
904 sq_pushstring(v, "FloatingImage", -1);
905 if(SQ_FAILED(sq_get(v, -2))) {
906 std::ostringstream msg;
907 msg << "Couldn't resolved squirrel type 'FloatingImage'";
908 throw SquirrelError(v, msg.str());
911 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
912 std::ostringstream msg;
913 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
914 throw SquirrelError(v, msg.str());
916 sq_remove(v, -2); // remove object name
918 if(setup_releasehook) {
919 sq_setreleasehook(v, -1, FloatingImage_release_hook);
922 sq_remove(v, -2); // remove root table
925 void register_supertux_wrapper(HSQUIRRELVM v)
927 using namespace Wrapper;
930 sq_pushstring(v, "KEY_BRASS", -1);
931 sq_pushinteger(v, 1);
932 if(SQ_FAILED(sq_createslot(v, -3))) {
933 std::ostringstream msg;
934 msg << "Couldn't register constant'KEY_BRASS'";
935 throw SquirrelError(v, msg.str());
938 sq_pushstring(v, "KEY_IRON", -1);
939 sq_pushinteger(v, 2);
940 if(SQ_FAILED(sq_createslot(v, -3))) {
941 std::ostringstream msg;
942 msg << "Couldn't register constant'KEY_IRON'";
943 throw SquirrelError(v, msg.str());
946 sq_pushstring(v, "KEY_BRONZE", -1);
947 sq_pushinteger(v, 4);
948 if(SQ_FAILED(sq_createslot(v, -3))) {
949 std::ostringstream msg;
950 msg << "Couldn't register constant'KEY_BRONZE'";
951 throw SquirrelError(v, msg.str());
954 sq_pushstring(v, "KEY_SILVER", -1);
955 sq_pushinteger(v, 8);
956 if(SQ_FAILED(sq_createslot(v, -3))) {
957 std::ostringstream msg;
958 msg << "Couldn't register constant'KEY_SILVER'";
959 throw SquirrelError(v, msg.str());
962 sq_pushstring(v, "KEY_GOLD", -1);
963 sq_pushinteger(v, 16);
964 if(SQ_FAILED(sq_createslot(v, -3))) {
965 std::ostringstream msg;
966 msg << "Couldn't register constant'KEY_GOLD'";
967 throw SquirrelError(v, msg.str());
970 sq_pushstring(v, "ANCHOR_TOP", -1);
971 sq_pushinteger(v, 16);
972 if(SQ_FAILED(sq_createslot(v, -3))) {
973 std::ostringstream msg;
974 msg << "Couldn't register constant'ANCHOR_TOP'";
975 throw SquirrelError(v, msg.str());
978 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
979 sq_pushinteger(v, 32);
980 if(SQ_FAILED(sq_createslot(v, -3))) {
981 std::ostringstream msg;
982 msg << "Couldn't register constant'ANCHOR_BOTTOM'";
983 throw SquirrelError(v, msg.str());
986 sq_pushstring(v, "ANCHOR_LEFT", -1);
987 sq_pushinteger(v, 1);
988 if(SQ_FAILED(sq_createslot(v, -3))) {
989 std::ostringstream msg;
990 msg << "Couldn't register constant'ANCHOR_LEFT'";
991 throw SquirrelError(v, msg.str());
994 sq_pushstring(v, "ANCHOR_RIGHT", -1);
995 sq_pushinteger(v, 2);
996 if(SQ_FAILED(sq_createslot(v, -3))) {
997 std::ostringstream msg;
998 msg << "Couldn't register constant'ANCHOR_RIGHT'";
999 throw SquirrelError(v, msg.str());
1002 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
1003 sq_pushinteger(v, 0);
1004 if(SQ_FAILED(sq_createslot(v, -3))) {
1005 std::ostringstream msg;
1006 msg << "Couldn't register constant'ANCHOR_MIDDLE'";
1007 throw SquirrelError(v, msg.str());
1010 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
1011 sq_pushinteger(v, 17);
1012 if(SQ_FAILED(sq_createslot(v, -3))) {
1013 std::ostringstream msg;
1014 msg << "Couldn't register constant'ANCHOR_TOP_LEFT'";
1015 throw SquirrelError(v, msg.str());
1018 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
1019 sq_pushinteger(v, 18);
1020 if(SQ_FAILED(sq_createslot(v, -3))) {
1021 std::ostringstream msg;
1022 msg << "Couldn't register constant'ANCHOR_TOP_RIGHT'";
1023 throw SquirrelError(v, msg.str());
1026 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
1027 sq_pushinteger(v, 33);
1028 if(SQ_FAILED(sq_createslot(v, -3))) {
1029 std::ostringstream msg;
1030 msg << "Couldn't register constant'ANCHOR_BOTTOM_LEFT'";
1031 throw SquirrelError(v, msg.str());
1034 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
1035 sq_pushinteger(v, 34);
1036 if(SQ_FAILED(sq_createslot(v, -3))) {
1037 std::ostringstream msg;
1038 msg << "Couldn't register constant'ANCHOR_BOTTOM_RIGHT'";
1039 throw SquirrelError(v, msg.str());
1042 sq_pushstring(v, "display_text_file", -1);
1043 sq_newclosure(v, &display_text_file_wrapper, 0);
1044 if(SQ_FAILED(sq_createslot(v, -3))) {
1045 std::ostringstream msg;
1046 msg << "Couldn't register function'display_text_file'";
1047 throw SquirrelError(v, msg.str());
1050 sq_pushstring(v, "wait", -1);
1051 sq_newclosure(v, &wait_wrapper, 0);
1052 if(SQ_FAILED(sq_createslot(v, -3))) {
1053 std::ostringstream msg;
1054 msg << "Couldn't register function'wait'";
1055 throw SquirrelError(v, msg.str());
1058 sq_pushstring(v, "translate", -1);
1059 sq_newclosure(v, &translate_wrapper, 0);
1060 if(SQ_FAILED(sq_createslot(v, -3))) {
1061 std::ostringstream msg;
1062 msg << "Couldn't register function'translate'";
1063 throw SquirrelError(v, msg.str());
1066 sq_pushstring(v, "import", -1);
1067 sq_newclosure(v, &import_wrapper, 0);
1068 if(SQ_FAILED(sq_createslot(v, -3))) {
1069 std::ostringstream msg;
1070 msg << "Couldn't register function'import'";
1071 throw SquirrelError(v, msg.str());
1074 sq_pushstring(v, "add_key", -1);
1075 sq_newclosure(v, &add_key_wrapper, 0);
1076 if(SQ_FAILED(sq_createslot(v, -3))) {
1077 std::ostringstream msg;
1078 msg << "Couldn't register function'add_key'";
1079 throw SquirrelError(v, msg.str());
1082 // Register class DisplayEffect
1083 sq_pushstring(v, "DisplayEffect", -1);
1084 if(sq_newclass(v, SQFalse) < 0) {
1085 std::ostringstream msg;
1086 msg << "Couldn't create new class 'DisplayEffect'";
1087 throw SquirrelError(v, msg.str());
1089 sq_pushstring(v, "fade_out", -1);
1090 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
1091 if(SQ_FAILED(sq_createslot(v, -3))) {
1092 std::ostringstream msg;
1093 msg << "Couldn't register function'fade_out'";
1094 throw SquirrelError(v, msg.str());
1097 sq_pushstring(v, "fade_in", -1);
1098 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
1099 if(SQ_FAILED(sq_createslot(v, -3))) {
1100 std::ostringstream msg;
1101 msg << "Couldn't register function'fade_in'";
1102 throw SquirrelError(v, msg.str());
1105 sq_pushstring(v, "set_black", -1);
1106 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
1107 if(SQ_FAILED(sq_createslot(v, -3))) {
1108 std::ostringstream msg;
1109 msg << "Couldn't register function'set_black'";
1110 throw SquirrelError(v, msg.str());
1113 sq_pushstring(v, "is_black", -1);
1114 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
1115 if(SQ_FAILED(sq_createslot(v, -3))) {
1116 std::ostringstream msg;
1117 msg << "Couldn't register function'is_black'";
1118 throw SquirrelError(v, msg.str());
1121 sq_pushstring(v, "sixteen_to_nine", -1);
1122 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
1123 if(SQ_FAILED(sq_createslot(v, -3))) {
1124 std::ostringstream msg;
1125 msg << "Couldn't register function'sixteen_to_nine'";
1126 throw SquirrelError(v, msg.str());
1129 sq_pushstring(v, "four_to_three", -1);
1130 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
1131 if(SQ_FAILED(sq_createslot(v, -3))) {
1132 std::ostringstream msg;
1133 msg << "Couldn't register function'four_to_three'";
1134 throw SquirrelError(v, msg.str());
1137 if(SQ_FAILED(sq_createslot(v, -3))) {
1138 std::ostringstream msg;
1139 msg << "Couldn't register class'DisplayEffect'";
1140 throw SquirrelError(v, msg.str());
1143 // Register class Camera
1144 sq_pushstring(v, "Camera", -1);
1145 if(sq_newclass(v, SQFalse) < 0) {
1146 std::ostringstream msg;
1147 msg << "Couldn't create new class 'Camera'";
1148 throw SquirrelError(v, msg.str());
1150 sq_pushstring(v, "shake", -1);
1151 sq_newclosure(v, &Camera_shake_wrapper, 0);
1152 if(SQ_FAILED(sq_createslot(v, -3))) {
1153 std::ostringstream msg;
1154 msg << "Couldn't register function'shake'";
1155 throw SquirrelError(v, msg.str());
1158 sq_pushstring(v, "set_pos", -1);
1159 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
1160 if(SQ_FAILED(sq_createslot(v, -3))) {
1161 std::ostringstream msg;
1162 msg << "Couldn't register function'set_pos'";
1163 throw SquirrelError(v, msg.str());
1166 sq_pushstring(v, "set_mode", -1);
1167 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
1168 if(SQ_FAILED(sq_createslot(v, -3))) {
1169 std::ostringstream msg;
1170 msg << "Couldn't register function'set_mode'";
1171 throw SquirrelError(v, msg.str());
1174 sq_pushstring(v, "scroll_to", -1);
1175 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
1176 if(SQ_FAILED(sq_createslot(v, -3))) {
1177 std::ostringstream msg;
1178 msg << "Couldn't register function'scroll_to'";
1179 throw SquirrelError(v, msg.str());
1182 if(SQ_FAILED(sq_createslot(v, -3))) {
1183 std::ostringstream msg;
1184 msg << "Couldn't register class'Camera'";
1185 throw SquirrelError(v, msg.str());
1188 // Register class Level
1189 sq_pushstring(v, "Level", -1);
1190 if(sq_newclass(v, SQFalse) < 0) {
1191 std::ostringstream msg;
1192 msg << "Couldn't create new class 'Level'";
1193 throw SquirrelError(v, msg.str());
1195 sq_pushstring(v, "finish", -1);
1196 sq_newclosure(v, &Level_finish_wrapper, 0);
1197 if(SQ_FAILED(sq_createslot(v, -3))) {
1198 std::ostringstream msg;
1199 msg << "Couldn't register function'finish'";
1200 throw SquirrelError(v, msg.str());
1203 sq_pushstring(v, "spawn", -1);
1204 sq_newclosure(v, &Level_spawn_wrapper, 0);
1205 if(SQ_FAILED(sq_createslot(v, -3))) {
1206 std::ostringstream msg;
1207 msg << "Couldn't register function'spawn'";
1208 throw SquirrelError(v, msg.str());
1211 sq_pushstring(v, "flip_vertically", -1);
1212 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
1213 if(SQ_FAILED(sq_createslot(v, -3))) {
1214 std::ostringstream msg;
1215 msg << "Couldn't register function'flip_vertically'";
1216 throw SquirrelError(v, msg.str());
1219 if(SQ_FAILED(sq_createslot(v, -3))) {
1220 std::ostringstream msg;
1221 msg << "Couldn't register class'Level'";
1222 throw SquirrelError(v, msg.str());
1225 // Register class ScriptedObject
1226 sq_pushstring(v, "ScriptedObject", -1);
1227 if(sq_newclass(v, SQFalse) < 0) {
1228 std::ostringstream msg;
1229 msg << "Couldn't create new class 'ScriptedObject'";
1230 throw SquirrelError(v, msg.str());
1232 sq_pushstring(v, "set_action", -1);
1233 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
1234 if(SQ_FAILED(sq_createslot(v, -3))) {
1235 std::ostringstream msg;
1236 msg << "Couldn't register function'set_action'";
1237 throw SquirrelError(v, msg.str());
1240 sq_pushstring(v, "get_action", -1);
1241 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
1242 if(SQ_FAILED(sq_createslot(v, -3))) {
1243 std::ostringstream msg;
1244 msg << "Couldn't register function'get_action'";
1245 throw SquirrelError(v, msg.str());
1248 sq_pushstring(v, "move", -1);
1249 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
1250 if(SQ_FAILED(sq_createslot(v, -3))) {
1251 std::ostringstream msg;
1252 msg << "Couldn't register function'move'";
1253 throw SquirrelError(v, msg.str());
1256 sq_pushstring(v, "set_pos", -1);
1257 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
1258 if(SQ_FAILED(sq_createslot(v, -3))) {
1259 std::ostringstream msg;
1260 msg << "Couldn't register function'set_pos'";
1261 throw SquirrelError(v, msg.str());
1264 sq_pushstring(v, "get_pos_x", -1);
1265 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
1266 if(SQ_FAILED(sq_createslot(v, -3))) {
1267 std::ostringstream msg;
1268 msg << "Couldn't register function'get_pos_x'";
1269 throw SquirrelError(v, msg.str());
1272 sq_pushstring(v, "get_pos_y", -1);
1273 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
1274 if(SQ_FAILED(sq_createslot(v, -3))) {
1275 std::ostringstream msg;
1276 msg << "Couldn't register function'get_pos_y'";
1277 throw SquirrelError(v, msg.str());
1280 sq_pushstring(v, "set_velocity", -1);
1281 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
1282 if(SQ_FAILED(sq_createslot(v, -3))) {
1283 std::ostringstream msg;
1284 msg << "Couldn't register function'set_velocity'";
1285 throw SquirrelError(v, msg.str());
1288 sq_pushstring(v, "get_velocity_x", -1);
1289 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
1290 if(SQ_FAILED(sq_createslot(v, -3))) {
1291 std::ostringstream msg;
1292 msg << "Couldn't register function'get_velocity_x'";
1293 throw SquirrelError(v, msg.str());
1296 sq_pushstring(v, "get_velocity_y", -1);
1297 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
1298 if(SQ_FAILED(sq_createslot(v, -3))) {
1299 std::ostringstream msg;
1300 msg << "Couldn't register function'get_velocity_y'";
1301 throw SquirrelError(v, msg.str());
1304 sq_pushstring(v, "set_visible", -1);
1305 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
1306 if(SQ_FAILED(sq_createslot(v, -3))) {
1307 std::ostringstream msg;
1308 msg << "Couldn't register function'set_visible'";
1309 throw SquirrelError(v, msg.str());
1312 sq_pushstring(v, "is_visible", -1);
1313 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
1314 if(SQ_FAILED(sq_createslot(v, -3))) {
1315 std::ostringstream msg;
1316 msg << "Couldn't register function'is_visible'";
1317 throw SquirrelError(v, msg.str());
1320 sq_pushstring(v, "get_name", -1);
1321 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
1322 if(SQ_FAILED(sq_createslot(v, -3))) {
1323 std::ostringstream msg;
1324 msg << "Couldn't register function'get_name'";
1325 throw SquirrelError(v, msg.str());
1328 if(SQ_FAILED(sq_createslot(v, -3))) {
1329 std::ostringstream msg;
1330 msg << "Couldn't register class'ScriptedObject'";
1331 throw SquirrelError(v, msg.str());
1334 // Register class Sound
1335 sq_pushstring(v, "Sound", -1);
1336 if(sq_newclass(v, SQFalse) < 0) {
1337 std::ostringstream msg;
1338 msg << "Couldn't create new class 'Sound'";
1339 throw SquirrelError(v, msg.str());
1341 sq_pushstring(v, "play_music", -1);
1342 sq_newclosure(v, &Sound_play_music_wrapper, 0);
1343 if(SQ_FAILED(sq_createslot(v, -3))) {
1344 std::ostringstream msg;
1345 msg << "Couldn't register function'play_music'";
1346 throw SquirrelError(v, msg.str());
1349 sq_pushstring(v, "play", -1);
1350 sq_newclosure(v, &Sound_play_wrapper, 0);
1351 if(SQ_FAILED(sq_createslot(v, -3))) {
1352 std::ostringstream msg;
1353 msg << "Couldn't register function'play'";
1354 throw SquirrelError(v, msg.str());
1357 if(SQ_FAILED(sq_createslot(v, -3))) {
1358 std::ostringstream msg;
1359 msg << "Couldn't register class'Sound'";
1360 throw SquirrelError(v, msg.str());
1363 // Register class Text
1364 sq_pushstring(v, "Text", -1);
1365 if(sq_newclass(v, SQFalse) < 0) {
1366 std::ostringstream msg;
1367 msg << "Couldn't create new class 'Text'";
1368 throw SquirrelError(v, msg.str());
1370 sq_pushstring(v, "set_text", -1);
1371 sq_newclosure(v, &Text_set_text_wrapper, 0);
1372 if(SQ_FAILED(sq_createslot(v, -3))) {
1373 std::ostringstream msg;
1374 msg << "Couldn't register function'set_text'";
1375 throw SquirrelError(v, msg.str());
1378 sq_pushstring(v, "set_font", -1);
1379 sq_newclosure(v, &Text_set_font_wrapper, 0);
1380 if(SQ_FAILED(sq_createslot(v, -3))) {
1381 std::ostringstream msg;
1382 msg << "Couldn't register function'set_font'";
1383 throw SquirrelError(v, msg.str());
1386 sq_pushstring(v, "fade_in", -1);
1387 sq_newclosure(v, &Text_fade_in_wrapper, 0);
1388 if(SQ_FAILED(sq_createslot(v, -3))) {
1389 std::ostringstream msg;
1390 msg << "Couldn't register function'fade_in'";
1391 throw SquirrelError(v, msg.str());
1394 sq_pushstring(v, "fade_out", -1);
1395 sq_newclosure(v, &Text_fade_out_wrapper, 0);
1396 if(SQ_FAILED(sq_createslot(v, -3))) {
1397 std::ostringstream msg;
1398 msg << "Couldn't register function'fade_out'";
1399 throw SquirrelError(v, msg.str());
1402 sq_pushstring(v, "set_visible", -1);
1403 sq_newclosure(v, &Text_set_visible_wrapper, 0);
1404 if(SQ_FAILED(sq_createslot(v, -3))) {
1405 std::ostringstream msg;
1406 msg << "Couldn't register function'set_visible'";
1407 throw SquirrelError(v, msg.str());
1410 sq_pushstring(v, "set_centered", -1);
1411 sq_newclosure(v, &Text_set_centered_wrapper, 0);
1412 if(SQ_FAILED(sq_createslot(v, -3))) {
1413 std::ostringstream msg;
1414 msg << "Couldn't register function'set_centered'";
1415 throw SquirrelError(v, msg.str());
1418 if(SQ_FAILED(sq_createslot(v, -3))) {
1419 std::ostringstream msg;
1420 msg << "Couldn't register class'Text'";
1421 throw SquirrelError(v, msg.str());
1424 // Register class Player
1425 sq_pushstring(v, "Player", -1);
1426 if(sq_newclass(v, SQFalse) < 0) {
1427 std::ostringstream msg;
1428 msg << "Couldn't create new class 'Player'";
1429 throw SquirrelError(v, msg.str());
1431 sq_pushstring(v, "make_invincible", -1);
1432 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
1433 if(SQ_FAILED(sq_createslot(v, -3))) {
1434 std::ostringstream msg;
1435 msg << "Couldn't register function'make_invincible'";
1436 throw SquirrelError(v, msg.str());
1439 sq_pushstring(v, "deactivate", -1);
1440 sq_newclosure(v, &Player_deactivate_wrapper, 0);
1441 if(SQ_FAILED(sq_createslot(v, -3))) {
1442 std::ostringstream msg;
1443 msg << "Couldn't register function'deactivate'";
1444 throw SquirrelError(v, msg.str());
1447 sq_pushstring(v, "activate", -1);
1448 sq_newclosure(v, &Player_activate_wrapper, 0);
1449 if(SQ_FAILED(sq_createslot(v, -3))) {
1450 std::ostringstream msg;
1451 msg << "Couldn't register function'activate'";
1452 throw SquirrelError(v, msg.str());
1455 sq_pushstring(v, "walk", -1);
1456 sq_newclosure(v, &Player_walk_wrapper, 0);
1457 if(SQ_FAILED(sq_createslot(v, -3))) {
1458 std::ostringstream msg;
1459 msg << "Couldn't register function'walk'";
1460 throw SquirrelError(v, msg.str());
1463 sq_pushstring(v, "set_visible", -1);
1464 sq_newclosure(v, &Player_set_visible_wrapper, 0);
1465 if(SQ_FAILED(sq_createslot(v, -3))) {
1466 std::ostringstream msg;
1467 msg << "Couldn't register function'set_visible'";
1468 throw SquirrelError(v, msg.str());
1471 sq_pushstring(v, "get_visible", -1);
1472 sq_newclosure(v, &Player_get_visible_wrapper, 0);
1473 if(SQ_FAILED(sq_createslot(v, -3))) {
1474 std::ostringstream msg;
1475 msg << "Couldn't register function'get_visible'";
1476 throw SquirrelError(v, msg.str());
1479 if(SQ_FAILED(sq_createslot(v, -3))) {
1480 std::ostringstream msg;
1481 msg << "Couldn't register class'Player'";
1482 throw SquirrelError(v, msg.str());
1485 // Register class FloatingImage
1486 sq_pushstring(v, "FloatingImage", -1);
1487 if(sq_newclass(v, SQFalse) < 0) {
1488 std::ostringstream msg;
1489 msg << "Couldn't create new class 'FloatingImage'";
1490 throw SquirrelError(v, msg.str());
1492 sq_pushstring(v, "constructor", -1);
1493 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
1494 if(SQ_FAILED(sq_createslot(v, -3))) {
1495 std::ostringstream msg;
1496 msg << "Couldn't register function'constructor'";
1497 throw SquirrelError(v, msg.str());
1500 sq_pushstring(v, "set_layer", -1);
1501 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
1502 if(SQ_FAILED(sq_createslot(v, -3))) {
1503 std::ostringstream msg;
1504 msg << "Couldn't register function'set_layer'";
1505 throw SquirrelError(v, msg.str());
1508 sq_pushstring(v, "get_layer", -1);
1509 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
1510 if(SQ_FAILED(sq_createslot(v, -3))) {
1511 std::ostringstream msg;
1512 msg << "Couldn't register function'get_layer'";
1513 throw SquirrelError(v, msg.str());
1516 sq_pushstring(v, "set_pos", -1);
1517 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
1518 if(SQ_FAILED(sq_createslot(v, -3))) {
1519 std::ostringstream msg;
1520 msg << "Couldn't register function'set_pos'";
1521 throw SquirrelError(v, msg.str());
1524 sq_pushstring(v, "get_pos_x", -1);
1525 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
1526 if(SQ_FAILED(sq_createslot(v, -3))) {
1527 std::ostringstream msg;
1528 msg << "Couldn't register function'get_pos_x'";
1529 throw SquirrelError(v, msg.str());
1532 sq_pushstring(v, "get_pos_y", -1);
1533 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
1534 if(SQ_FAILED(sq_createslot(v, -3))) {
1535 std::ostringstream msg;
1536 msg << "Couldn't register function'get_pos_y'";
1537 throw SquirrelError(v, msg.str());
1540 sq_pushstring(v, "set_anchor_point", -1);
1541 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
1542 if(SQ_FAILED(sq_createslot(v, -3))) {
1543 std::ostringstream msg;
1544 msg << "Couldn't register function'set_anchor_point'";
1545 throw SquirrelError(v, msg.str());
1548 sq_pushstring(v, "get_anchor_point", -1);
1549 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
1550 if(SQ_FAILED(sq_createslot(v, -3))) {
1551 std::ostringstream msg;
1552 msg << "Couldn't register function'get_anchor_point'";
1553 throw SquirrelError(v, msg.str());
1556 sq_pushstring(v, "set_visible", -1);
1557 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
1558 if(SQ_FAILED(sq_createslot(v, -3))) {
1559 std::ostringstream msg;
1560 msg << "Couldn't register function'set_visible'";
1561 throw SquirrelError(v, msg.str());
1564 sq_pushstring(v, "get_visible", -1);
1565 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
1566 if(SQ_FAILED(sq_createslot(v, -3))) {
1567 std::ostringstream msg;
1568 msg << "Couldn't register function'get_visible'";
1569 throw SquirrelError(v, msg.str());
1572 if(SQ_FAILED(sq_createslot(v, -3))) {
1573 std::ostringstream msg;
1574 msg << "Couldn't register class'FloatingImage'";
1575 throw SquirrelError(v, msg.str());
1581 } // end of namespace Scripting