+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'stop_moving' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
+
+ try {
+ _this->stop_moving();
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
+{
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (ptr);
+ delete _this;
+ return 0;
+}
+
+static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'add_bonus' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+ const SQChar* arg0;
+ if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
+ sq_throwerror(vm, _SC("Argument 1 not a string"));
+ return SQ_ERROR;
+ }
+
+ try {
+ bool return_value = _this->add_bonus(arg0);
+
+ sq_pushbool(vm, return_value);
+ return 1;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'add_coins' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+ SQInteger arg0;
+ if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
+ sq_throwerror(vm, _SC("Argument 1 not an integer"));
+ return SQ_ERROR;
+ }
+
+ try {
+ _this->add_coins(static_cast<int> (arg0));
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'make_invincible' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+
+ try {
+ _this->make_invincible();
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'deactivate' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+
+ try {
+ _this->deactivate();
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'activate' called without instance"));