#include "scripting/squirrel_error.hpp"
#include "scripting/wrapper.interface.hpp"
-namespace Scripting {
-namespace Wrapper {
+namespace scripting {
+namespace wrapper {
static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (ptr);
+ scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'set_pos' called without instance"));
return SQ_ERROR;
}
- Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
+ scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
return SQ_ERROR;
}
- Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
+ scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
try {
float return_value = _this->get_pos_x();
sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
return SQ_ERROR;
}
- Scripting::AmbientSound* _this = reinterpret_cast<Scripting::AmbientSound*> (data);
+ scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
try {
float return_value = _this->get_pos_y();
static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (ptr);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'reload_config' called without instance"));
return SQ_ERROR;
}
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
try {
_this->reload_config();
sq_throwerror(vm, _SC("'shake' called without instance"));
return SQ_ERROR;
}
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_pos' called without instance"));
return SQ_ERROR;
}
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_mode' called without instance"));
return SQ_ERROR;
}
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'scroll_to' called without instance"));
return SQ_ERROR;
}
- Scripting::Camera* _this = reinterpret_cast<Scripting::Camera*> (data);
+ scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (ptr);
+ scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'get_burning' called without instance"));
return SQ_ERROR;
}
- Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
+ scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
try {
bool return_value = _this->get_burning();
sq_throwerror(vm, _SC("'set_burning' called without instance"));
return SQ_ERROR;
}
- Scripting::Candle* _this = reinterpret_cast<Scripting::Candle*> (data);
+ scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (ptr);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'fade_out' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'fade_in' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_black' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'is_black' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
try {
bool return_value = _this->is_black();
sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'four_to_three' called without instance"));
return SQ_ERROR;
}
- Scripting::DisplayEffect* _this = reinterpret_cast<Scripting::DisplayEffect*> (data);
+ scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (ptr);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (ptr);
delete _this;
return 0;
}
}
try {
- Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0);
+ scripting::FloatingImage* _this = new scripting::FloatingImage(arg0);
if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
return SQ_ERROR;
sq_throwerror(vm, _SC("'set_layer' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'get_layer' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
int return_value = _this->get_layer();
sq_throwerror(vm, _SC("'set_pos' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
float return_value = _this->get_pos_x();
sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
float return_value = _this->get_pos_y();
sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
int return_value = _this->get_anchor_point();
sq_throwerror(vm, _SC("'set_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'get_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
bool return_value = _this->get_visible();
sq_throwerror(vm, _SC("'set_action' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'get_action' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
try {
std::string return_value = _this->get_action();
sq_throwerror(vm, _SC("'fade_in' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'fade_out' called without instance"));
return SQ_ERROR;
}
- Scripting::FloatingImage* _this = reinterpret_cast<Scripting::FloatingImage*> (data);
+ scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (ptr);
+ scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'start' called without instance"));
return SQ_ERROR;
}
- Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
+ scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
try {
_this->start();
sq_throwerror(vm, _SC("'stop' called without instance"));
return SQ_ERROR;
}
- Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
+ scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
try {
_this->stop();
sq_throwerror(vm, _SC("'get_time' called without instance"));
return SQ_ERROR;
}
- Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
+ scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
try {
float return_value = _this->get_time();
sq_throwerror(vm, _SC("'set_time' called without instance"));
return SQ_ERROR;
}
- Scripting::LevelTime* _this = reinterpret_cast<Scripting::LevelTime*> (data);
+ scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (ptr);
+ scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'goto_node' called without instance"));
return SQ_ERROR;
}
- Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
+ scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'start_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
+ scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
try {
_this->start_moving();
sq_throwerror(vm, _SC("'stop_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::Platform* _this = reinterpret_cast<Scripting::Platform*> (data);
+ scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
try {
_this->stop_moving();
static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'add_bonus' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ 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"));
sq_throwerror(vm, _SC("'add_coins' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ 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"));
sq_throwerror(vm, _SC("'make_invincible' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->make_invincible();
sq_throwerror(vm, _SC("'deactivate' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->deactivate();
sq_throwerror(vm, _SC("'activate' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->activate();
sq_throwerror(vm, _SC("'walk' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
}
+static SQInteger Player_set_dir_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'set_dir' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+ SQBool arg0;
+ if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
+ sq_throwerror(vm, _SC("Argument 1 not a bool"));
+ return SQ_ERROR;
+ }
+
+ try {
+ _this->set_dir(arg0 == SQTrue);
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_dir'"));
+ return SQ_ERROR;
+ }
+
+}
+
static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
{
SQUserPointer data;
sq_throwerror(vm, _SC("'set_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'get_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
bool return_value = _this->get_visible();
sq_throwerror(vm, _SC("'kill' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
bool return_value = _this->get_ghost_mode();
}
+static SQInteger Player_kick_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'kick' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
+
+ try {
+ _this->kick();
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'kick'"));
+ return SQ_ERROR;
+ }
+
+}
+
static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
{
SQUserPointer data;
sq_throwerror(vm, _SC("'do_cheer' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->do_cheer();
sq_throwerror(vm, _SC("'do_duck' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->do_duck();
sq_throwerror(vm, _SC("'do_standup' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->do_standup();
sq_throwerror(vm, _SC("'do_backflip' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
try {
_this->do_backflip();
sq_throwerror(vm, _SC("'do_jump' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ 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"));
sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
return SQ_ERROR;
}
- Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (data);
+ 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"));
static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (ptr);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'set_action' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'get_action' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
std::string return_value = _this->get_action();
sq_throwerror(vm, _SC("'move' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_pos' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
float return_value = _this->get_pos_x();
sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
float return_value = _this->get_pos_y();
sq_throwerror(vm, _SC("'set_velocity' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
float return_value = _this->get_velocity_x();
sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
float return_value = _this->get_velocity_y();
}
+static SQInteger ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'enable_gravity' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
+ SQBool arg0;
+ if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
+ sq_throwerror(vm, _SC("Argument 1 not a bool"));
+ return SQ_ERROR;
+ }
+
+ try {
+ _this->enable_gravity(arg0 == SQTrue);
+
+ return 0;
+
+ } catch(std::exception& e) {
+ sq_throwerror(vm, e.what());
+ return SQ_ERROR;
+ } catch(...) {
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'enable_gravity'"));
+ return SQ_ERROR;
+ }
+
+}
+
+static SQInteger ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm)
+{
+ SQUserPointer data;
+ if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
+ sq_throwerror(vm, _SC("'gravity_enabled' called without instance"));
+ return SQ_ERROR;
+ }
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
+
+ try {
+ bool return_value = _this->gravity_enabled();
+
+ 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 'gravity_enabled'"));
+ return SQ_ERROR;
+ }
+
+}
+
static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
{
SQUserPointer data;
sq_throwerror(vm, _SC("'set_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'is_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
bool return_value = _this->is_visible();
sq_throwerror(vm, _SC("'set_solid' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'is_solid' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
bool return_value = _this->is_solid();
sq_throwerror(vm, _SC("'get_name' called without instance"));
return SQ_ERROR;
}
- Scripting::ScriptedObject* _this = reinterpret_cast<Scripting::ScriptedObject*> (data);
+ scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
try {
std::string return_value = _this->get_name();
static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (ptr);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
return SQ_ERROR;
}
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
return SQ_ERROR;
}
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
try {
float return_value = _this->get_ambient_red();
sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
return SQ_ERROR;
}
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
try {
float return_value = _this->get_ambient_green();
sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
return SQ_ERROR;
}
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
try {
float return_value = _this->get_ambient_blue();
sq_throwerror(vm, _SC("'set_gravity' called without instance"));
return SQ_ERROR;
}
- Scripting::SSector* _this = reinterpret_cast<Scripting::SSector*> (data);
+ scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (ptr);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'set_text' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'set_font' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'fade_in' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'fade_out' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_visible' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'set_centered' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a bool"));
sq_throwerror(vm, _SC("'set_pos' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
try {
float return_value = _this->get_pos_x();
sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
try {
float return_value = _this->get_pos_y();
sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
return SQ_ERROR;
}
- Scripting::Text* _this = reinterpret_cast<Scripting::Text*> (data);
+ scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
try {
int return_value = _this->get_anchor_point();
static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (ptr);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'start' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->start();
sq_throwerror(vm, _SC("'stop' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->stop();
sq_throwerror(vm, _SC("'thunder' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->thunder();
sq_throwerror(vm, _SC("'lightning' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->lightning();
sq_throwerror(vm, _SC("'flash' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->flash();
sq_throwerror(vm, _SC("'electrify' called without instance"));
return SQ_ERROR;
}
- Scripting::Thunderstorm* _this = reinterpret_cast<Scripting::Thunderstorm*> (data);
+ scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
try {
_this->electrify();
static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (ptr);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'goto_node' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'start_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
try {
_this->start_moving();
sq_throwerror(vm, _SC("'stop_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
try {
_this->stop_moving();
sq_throwerror(vm, _SC("'fade' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'set_alpha' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
SQFloat arg0;
if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a float"));
sq_throwerror(vm, _SC("'get_alpha' called without instance"));
return SQ_ERROR;
}
- Scripting::TileMap* _this = reinterpret_cast<Scripting::TileMap*> (data);
+ scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
try {
float return_value = _this->get_alpha();
static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (ptr);
+ scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'goto_node' called without instance"));
return SQ_ERROR;
}
- Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
+ scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
SQInteger arg0;
if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not an integer"));
sq_throwerror(vm, _SC("'set_state' called without instance"));
return SQ_ERROR;
}
- Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
+ scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
const SQChar* arg0;
if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
sq_throwerror(vm, _SC("Argument 1 not a string"));
sq_throwerror(vm, _SC("'start_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
+ scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
try {
_this->start_moving();
sq_throwerror(vm, _SC("'stop_moving' called without instance"));
return SQ_ERROR;
}
- Scripting::WillOWisp* _this = reinterpret_cast<Scripting::WillOWisp*> (data);
+ scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
try {
_this->stop_moving();
static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
{
- Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (ptr);
+ scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (ptr);
delete _this;
return 0;
}
sq_throwerror(vm, _SC("'start' called without instance"));
return SQ_ERROR;
}
- Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
+ scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
try {
_this->start();
sq_throwerror(vm, _SC("'stop' called without instance"));
return SQ_ERROR;
}
- Scripting::Wind* _this = reinterpret_cast<Scripting::Wind*> (data);
+ scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
try {
_this->stop();
static SQInteger display_wrapper(HSQUIRRELVM vm)
{
- return Scripting::display(vm);
+ return scripting::display(vm);
}
static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
HSQUIRRELVM arg0 = vm;
try {
- Scripting::print_stacktrace(arg0);
+ scripting::print_stacktrace(arg0);
return 0;
static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
{
- return Scripting::get_current_thread(vm);
+ return scripting::get_current_thread(vm);
}
static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
}
try {
- Scripting::display_text_file(arg0);
+ scripting::display_text_file(arg0);
return 0;
}
try {
- Scripting::load_worldmap(arg0);
+ scripting::load_worldmap(arg0);
return 0;
}
try {
- Scripting::load_level(arg0);
+ scripting::load_level(arg0);
return 0;
}
try {
- Scripting::wait(arg0, static_cast<float> (arg1));
+ scripting::wait(arg0, static_cast<float> (arg1));
return sq_suspendvm(vm);
HSQUIRRELVM arg0 = vm;
try {
- Scripting::wait_for_screenswitch(arg0);
+ scripting::wait_for_screenswitch(arg0);
return sq_suspendvm(vm);
(void) vm;
try {
- Scripting::exit_screen();
+ scripting::exit_screen();
return 0;
}
try {
- Scripting::fadeout_screen(static_cast<float> (arg0));
+ scripting::fadeout_screen(static_cast<float> (arg0));
return 0;
}
try {
- Scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
+ scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
return 0;
(void) vm;
try {
- Scripting::abort_screenfade();
+ scripting::abort_screenfade();
return 0;
}
try {
- std::string return_value = Scripting::translate(arg0);
+ std::string return_value = scripting::translate(arg0);
sq_pushstring(vm, return_value.c_str(), return_value.size());
return 1;
}
try {
- Scripting::import(arg0, arg1);
+ scripting::import(arg0, arg1);
return 0;
(void) vm;
try {
- Scripting::save_state();
+ scripting::save_state();
return 0;
}
-static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
+static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
{
- (void) vm;
+ SQBool arg0;
+ if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
+ sq_throwerror(vm, _SC("Argument 1 not a bool"));
+ return SQ_ERROR;
+ }
try {
- Scripting::update_worldmap();
+ scripting::debug_collrects(arg0 == SQTrue);
return 0;
sq_throwerror(vm, e.what());
return SQ_ERROR;
} catch(...) {
- sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
return SQ_ERROR;
}
}
-static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
+static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
{
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
}
try {
- Scripting::debug_collrects(arg0 == SQTrue);
+ scripting::debug_show_fps(arg0 == SQTrue);
return 0;
sq_throwerror(vm, e.what());
return SQ_ERROR;
} catch(...) {
- sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
return SQ_ERROR;
}
}
-static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
+static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
{
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
}
try {
- Scripting::debug_show_fps(arg0 == SQTrue);
+ scripting::debug_draw_solids_only(arg0 == SQTrue);
return 0;
sq_throwerror(vm, e.what());
return SQ_ERROR;
} catch(...) {
- sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
return SQ_ERROR;
}
}
-static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
+static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm)
{
SQBool arg0;
if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
}
try {
- Scripting::debug_draw_solids_only(arg0 == SQTrue);
+ scripting::debug_draw_editor_images(arg0 == SQTrue);
return 0;
sq_throwerror(vm, e.what());
return SQ_ERROR;
} catch(...) {
- sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
+ sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'"));
return SQ_ERROR;
}
}
try {
- Scripting::debug_worldmap_ghost(arg0 == SQTrue);
+ scripting::debug_worldmap_ghost(arg0 == SQTrue);
return 0;
}
try {
- Scripting::play_music(arg0);
+ scripting::play_music(arg0);
return 0;
}
try {
- Scripting::play_sound(arg0);
+ scripting::play_sound(arg0);
return 0;
}
try {
- Scripting::set_game_speed(static_cast<float> (arg0));
+ scripting::set_game_speed(static_cast<float> (arg0));
return 0;
(void) vm;
try {
- Scripting::grease();
+ scripting::grease();
return 0;
(void) vm;
try {
- Scripting::invincible();
+ scripting::invincible();
return 0;
(void) vm;
try {
- Scripting::ghost();
+ scripting::ghost();
return 0;
(void) vm;
try {
- Scripting::mortal();
+ scripting::mortal();
return 0;
(void) vm;
try {
- Scripting::restart();
+ scripting::restart();
return 0;
(void) vm;
try {
- Scripting::whereami();
+ scripting::whereami();
return 0;
(void) vm;
try {
- Scripting::gotoend();
+ scripting::gotoend();
return 0;
(void) vm;
try {
- Scripting::camera();
+ scripting::camera();
return 0;
}
try {
- Scripting::set_gamma(static_cast<float> (arg0));
+ scripting::set_gamma(static_cast<float> (arg0));
return 0;
(void) vm;
try {
- Scripting::quit();
+ scripting::quit();
return 0;
{
try {
- int return_value = Scripting::rand();
+ int return_value = scripting::rand();
sq_pushinteger(vm, return_value);
return 1;
}
try {
- Scripting::record_demo(arg0);
+ scripting::record_demo(arg0);
return 0;
}
try {
- Scripting::play_demo(arg0);
+ scripting::play_demo(arg0);
return 0;
}
try {
- Scripting::Level_finish(arg0 == SQTrue);
+ scripting::Level_finish(arg0 == SQTrue);
return 0;
}
try {
- Scripting::Level_spawn(arg0, arg1);
+ scripting::Level_spawn(arg0, arg1);
return 0;
(void) vm;
try {
- Scripting::Level_flip_vertically();
+ scripting::Level_flip_vertically();
return 0;
(void) vm;
try {
- Scripting::Level_toggle_pause();
+ scripting::Level_toggle_pause();
return 0;
}
try {
- Scripting::Level_edit(arg0 == SQTrue);
+ scripting::Level_edit(arg0 == SQTrue);
return 0;
}
-} // end of namespace Wrapper
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook)
+} // namespace wrapper
+void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "AmbientSound", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Camera", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Candle", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "DisplayEffect", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "FloatingImage", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "LevelTime", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Platform", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Player", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "ScriptedObject", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::SSector* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "SSector", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Text", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Thunderstorm", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "TileMap", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "WillOWisp", -1);
sq_remove(v, -2); // remove root table
}
-void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook)
+void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushroottable(v);
sq_pushstring(v, "Wind", -1);
void register_supertux_wrapper(HSQUIRRELVM v)
{
- using namespace Wrapper;
+ using namespace wrapper;
sq_pushstring(v, "ANCHOR_TOP", -1);
sq_pushinteger(v, 16);
throw SquirrelError(v, "Couldn't register function 'save_state'");
}
- sq_pushstring(v, "update_worldmap", -1);
- sq_newclosure(v, &update_worldmap_wrapper, 0);
- sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
- if(SQ_FAILED(sq_createslot(v, -3))) {
- throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
- }
-
sq_pushstring(v, "debug_collrects", -1);
sq_newclosure(v, &debug_collrects_wrapper, 0);
sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
}
+ sq_pushstring(v, "debug_draw_editor_images", -1);
+ sq_newclosure(v, &debug_draw_editor_images_wrapper, 0);
+ sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'");
+ }
+
sq_pushstring(v, "debug_worldmap_ghost", -1);
sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0);
sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
throw SquirrelError(v, "Couldn't register function 'walk'");
}
+ sq_pushstring(v, "set_dir", -1);
+ sq_newclosure(v, &Player_set_dir_wrapper, 0);
+ sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ throw SquirrelError(v, "Couldn't register function 'set_dir'");
+ }
+
sq_pushstring(v, "set_visible", -1);
sq_newclosure(v, &Player_set_visible_wrapper, 0);
sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
}
+ sq_pushstring(v, "kick", -1);
+ sq_newclosure(v, &Player_kick_wrapper, 0);
+ sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ throw SquirrelError(v, "Couldn't register function 'kick'");
+ }
+
sq_pushstring(v, "do_cheer", -1);
sq_newclosure(v, &Player_do_cheer_wrapper, 0);
sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
}
+ sq_pushstring(v, "enable_gravity", -1);
+ sq_newclosure(v, &ScriptedObject_enable_gravity_wrapper, 0);
+ sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ throw SquirrelError(v, "Couldn't register function 'enable_gravity'");
+ }
+
+ sq_pushstring(v, "gravity_enabled", -1);
+ sq_newclosure(v, &ScriptedObject_gravity_enabled_wrapper, 0);
+ sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ throw SquirrelError(v, "Couldn't register function 'gravity_enabled'");
+ }
+
sq_pushstring(v, "set_visible", -1);
sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
}
-} // end of namespace Scripting
+} // namespace scripting
/* EOF */