00001
00007 #include <sstream>
00008
00009 #include "scripting/squirrel_error.hpp"
00010 #include "scripting/wrapper.interface.hpp"
00011
00012 namespace scripting {
00013 namespace wrapper {
00014
00015 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
00016 {
00017 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (ptr);
00018 delete _this;
00019 return 0;
00020 }
00021
00022 static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
00023 {
00024 SQUserPointer data;
00025 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00026 sq_throwerror(vm, _SC("'set_pos' called without instance"));
00027 return SQ_ERROR;
00028 }
00029 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
00030 SQFloat arg0;
00031 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00032 sq_throwerror(vm, _SC("Argument 1 not a float"));
00033 return SQ_ERROR;
00034 }
00035 SQFloat arg1;
00036 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
00037 sq_throwerror(vm, _SC("Argument 2 not a float"));
00038 return SQ_ERROR;
00039 }
00040
00041 try {
00042 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
00043
00044 return 0;
00045
00046 } catch(std::exception& e) {
00047 sq_throwerror(vm, e.what());
00048 return SQ_ERROR;
00049 } catch(...) {
00050 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
00051 return SQ_ERROR;
00052 }
00053
00054 }
00055
00056 static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
00057 {
00058 SQUserPointer data;
00059 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00060 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
00061 return SQ_ERROR;
00062 }
00063 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
00064
00065 try {
00066 float return_value = _this->get_pos_x();
00067
00068 sq_pushfloat(vm, return_value);
00069 return 1;
00070
00071 } catch(std::exception& e) {
00072 sq_throwerror(vm, e.what());
00073 return SQ_ERROR;
00074 } catch(...) {
00075 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
00076 return SQ_ERROR;
00077 }
00078
00079 }
00080
00081 static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
00082 {
00083 SQUserPointer data;
00084 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00085 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
00086 return SQ_ERROR;
00087 }
00088 scripting::AmbientSound* _this = reinterpret_cast<scripting::AmbientSound*> (data);
00089
00090 try {
00091 float return_value = _this->get_pos_y();
00092
00093 sq_pushfloat(vm, return_value);
00094 return 1;
00095
00096 } catch(std::exception& e) {
00097 sq_throwerror(vm, e.what());
00098 return SQ_ERROR;
00099 } catch(...) {
00100 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
00101 return SQ_ERROR;
00102 }
00103
00104 }
00105
00106 static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
00107 {
00108 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (ptr);
00109 delete _this;
00110 return 0;
00111 }
00112
00113 static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
00114 {
00115 SQUserPointer data;
00116 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00117 sq_throwerror(vm, _SC("'reload_config' called without instance"));
00118 return SQ_ERROR;
00119 }
00120 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
00121
00122 try {
00123 _this->reload_config();
00124
00125 return 0;
00126
00127 } catch(std::exception& e) {
00128 sq_throwerror(vm, e.what());
00129 return SQ_ERROR;
00130 } catch(...) {
00131 sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
00132 return SQ_ERROR;
00133 }
00134
00135 }
00136
00137 static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
00138 {
00139 SQUserPointer data;
00140 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00141 sq_throwerror(vm, _SC("'shake' called without instance"));
00142 return SQ_ERROR;
00143 }
00144 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
00145 SQFloat arg0;
00146 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00147 sq_throwerror(vm, _SC("Argument 1 not a float"));
00148 return SQ_ERROR;
00149 }
00150 SQFloat arg1;
00151 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
00152 sq_throwerror(vm, _SC("Argument 2 not a float"));
00153 return SQ_ERROR;
00154 }
00155 SQFloat arg2;
00156 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
00157 sq_throwerror(vm, _SC("Argument 3 not a float"));
00158 return SQ_ERROR;
00159 }
00160
00161 try {
00162 _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
00163
00164 return 0;
00165
00166 } catch(std::exception& e) {
00167 sq_throwerror(vm, e.what());
00168 return SQ_ERROR;
00169 } catch(...) {
00170 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
00171 return SQ_ERROR;
00172 }
00173
00174 }
00175
00176 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
00177 {
00178 SQUserPointer data;
00179 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00180 sq_throwerror(vm, _SC("'set_pos' called without instance"));
00181 return SQ_ERROR;
00182 }
00183 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
00184 SQFloat arg0;
00185 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00186 sq_throwerror(vm, _SC("Argument 1 not a float"));
00187 return SQ_ERROR;
00188 }
00189 SQFloat arg1;
00190 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
00191 sq_throwerror(vm, _SC("Argument 2 not a float"));
00192 return SQ_ERROR;
00193 }
00194
00195 try {
00196 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
00197
00198 return 0;
00199
00200 } catch(std::exception& e) {
00201 sq_throwerror(vm, e.what());
00202 return SQ_ERROR;
00203 } catch(...) {
00204 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
00205 return SQ_ERROR;
00206 }
00207
00208 }
00209
00210 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
00211 {
00212 SQUserPointer data;
00213 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00214 sq_throwerror(vm, _SC("'set_mode' called without instance"));
00215 return SQ_ERROR;
00216 }
00217 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
00218 const SQChar* arg0;
00219 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
00220 sq_throwerror(vm, _SC("Argument 1 not a string"));
00221 return SQ_ERROR;
00222 }
00223
00224 try {
00225 _this->set_mode(arg0);
00226
00227 return 0;
00228
00229 } catch(std::exception& e) {
00230 sq_throwerror(vm, e.what());
00231 return SQ_ERROR;
00232 } catch(...) {
00233 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
00234 return SQ_ERROR;
00235 }
00236
00237 }
00238
00239 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
00240 {
00241 SQUserPointer data;
00242 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00243 sq_throwerror(vm, _SC("'scroll_to' called without instance"));
00244 return SQ_ERROR;
00245 }
00246 scripting::Camera* _this = reinterpret_cast<scripting::Camera*> (data);
00247 SQFloat arg0;
00248 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00249 sq_throwerror(vm, _SC("Argument 1 not a float"));
00250 return SQ_ERROR;
00251 }
00252 SQFloat arg1;
00253 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
00254 sq_throwerror(vm, _SC("Argument 2 not a float"));
00255 return SQ_ERROR;
00256 }
00257 SQFloat arg2;
00258 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
00259 sq_throwerror(vm, _SC("Argument 3 not a float"));
00260 return SQ_ERROR;
00261 }
00262
00263 try {
00264 _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
00265
00266 return 0;
00267
00268 } catch(std::exception& e) {
00269 sq_throwerror(vm, e.what());
00270 return SQ_ERROR;
00271 } catch(...) {
00272 sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
00273 return SQ_ERROR;
00274 }
00275
00276 }
00277
00278 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
00279 {
00280 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (ptr);
00281 delete _this;
00282 return 0;
00283 }
00284
00285 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
00286 {
00287 SQUserPointer data;
00288 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00289 sq_throwerror(vm, _SC("'get_burning' called without instance"));
00290 return SQ_ERROR;
00291 }
00292 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
00293
00294 try {
00295 bool return_value = _this->get_burning();
00296
00297 sq_pushbool(vm, return_value);
00298 return 1;
00299
00300 } catch(std::exception& e) {
00301 sq_throwerror(vm, e.what());
00302 return SQ_ERROR;
00303 } catch(...) {
00304 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
00305 return SQ_ERROR;
00306 }
00307
00308 }
00309
00310 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
00311 {
00312 SQUserPointer data;
00313 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00314 sq_throwerror(vm, _SC("'set_burning' called without instance"));
00315 return SQ_ERROR;
00316 }
00317 scripting::Candle* _this = reinterpret_cast<scripting::Candle*> (data);
00318 SQBool arg0;
00319 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
00320 sq_throwerror(vm, _SC("Argument 1 not a bool"));
00321 return SQ_ERROR;
00322 }
00323
00324 try {
00325 _this->set_burning(arg0 == SQTrue);
00326
00327 return 0;
00328
00329 } catch(std::exception& e) {
00330 sq_throwerror(vm, e.what());
00331 return SQ_ERROR;
00332 } catch(...) {
00333 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
00334 return SQ_ERROR;
00335 }
00336
00337 }
00338
00339 static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
00340 {
00341 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (ptr);
00342 delete _this;
00343 return 0;
00344 }
00345
00346 static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
00347 {
00348 SQUserPointer data;
00349 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00350 sq_throwerror(vm, _SC("'fade_out' called without instance"));
00351 return SQ_ERROR;
00352 }
00353 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00354 SQFloat arg0;
00355 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00356 sq_throwerror(vm, _SC("Argument 1 not a float"));
00357 return SQ_ERROR;
00358 }
00359
00360 try {
00361 _this->fade_out(static_cast<float> (arg0));
00362
00363 return 0;
00364
00365 } catch(std::exception& e) {
00366 sq_throwerror(vm, e.what());
00367 return SQ_ERROR;
00368 } catch(...) {
00369 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
00370 return SQ_ERROR;
00371 }
00372
00373 }
00374
00375 static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
00376 {
00377 SQUserPointer data;
00378 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00379 sq_throwerror(vm, _SC("'fade_in' called without instance"));
00380 return SQ_ERROR;
00381 }
00382 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00383 SQFloat arg0;
00384 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00385 sq_throwerror(vm, _SC("Argument 1 not a float"));
00386 return SQ_ERROR;
00387 }
00388
00389 try {
00390 _this->fade_in(static_cast<float> (arg0));
00391
00392 return 0;
00393
00394 } catch(std::exception& e) {
00395 sq_throwerror(vm, e.what());
00396 return SQ_ERROR;
00397 } catch(...) {
00398 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
00399 return SQ_ERROR;
00400 }
00401
00402 }
00403
00404 static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
00405 {
00406 SQUserPointer data;
00407 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00408 sq_throwerror(vm, _SC("'set_black' called without instance"));
00409 return SQ_ERROR;
00410 }
00411 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00412 SQBool arg0;
00413 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
00414 sq_throwerror(vm, _SC("Argument 1 not a bool"));
00415 return SQ_ERROR;
00416 }
00417
00418 try {
00419 _this->set_black(arg0 == SQTrue);
00420
00421 return 0;
00422
00423 } catch(std::exception& e) {
00424 sq_throwerror(vm, e.what());
00425 return SQ_ERROR;
00426 } catch(...) {
00427 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
00428 return SQ_ERROR;
00429 }
00430
00431 }
00432
00433 static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
00434 {
00435 SQUserPointer data;
00436 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00437 sq_throwerror(vm, _SC("'is_black' called without instance"));
00438 return SQ_ERROR;
00439 }
00440 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00441
00442 try {
00443 bool return_value = _this->is_black();
00444
00445 sq_pushbool(vm, return_value);
00446 return 1;
00447
00448 } catch(std::exception& e) {
00449 sq_throwerror(vm, e.what());
00450 return SQ_ERROR;
00451 } catch(...) {
00452 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
00453 return SQ_ERROR;
00454 }
00455
00456 }
00457
00458 static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
00459 {
00460 SQUserPointer data;
00461 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00462 sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
00463 return SQ_ERROR;
00464 }
00465 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00466 SQFloat arg0;
00467 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00468 sq_throwerror(vm, _SC("Argument 1 not a float"));
00469 return SQ_ERROR;
00470 }
00471
00472 try {
00473 _this->sixteen_to_nine(static_cast<float> (arg0));
00474
00475 return 0;
00476
00477 } catch(std::exception& e) {
00478 sq_throwerror(vm, e.what());
00479 return SQ_ERROR;
00480 } catch(...) {
00481 sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
00482 return SQ_ERROR;
00483 }
00484
00485 }
00486
00487 static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
00488 {
00489 SQUserPointer data;
00490 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00491 sq_throwerror(vm, _SC("'four_to_three' called without instance"));
00492 return SQ_ERROR;
00493 }
00494 scripting::DisplayEffect* _this = reinterpret_cast<scripting::DisplayEffect*> (data);
00495 SQFloat arg0;
00496 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00497 sq_throwerror(vm, _SC("Argument 1 not a float"));
00498 return SQ_ERROR;
00499 }
00500
00501 try {
00502 _this->four_to_three(static_cast<float> (arg0));
00503
00504 return 0;
00505
00506 } catch(std::exception& e) {
00507 sq_throwerror(vm, e.what());
00508 return SQ_ERROR;
00509 } catch(...) {
00510 sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
00511 return SQ_ERROR;
00512 }
00513
00514 }
00515
00516 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
00517 {
00518 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (ptr);
00519 delete _this;
00520 return 0;
00521 }
00522
00523 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
00524 {
00525 const SQChar* arg0;
00526 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
00527 sq_throwerror(vm, _SC("Argument 1 not a string"));
00528 return SQ_ERROR;
00529 }
00530
00531 try {
00532 scripting::FloatingImage* _this = new scripting::FloatingImage(arg0);
00533 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
00534 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
00535 return SQ_ERROR;
00536 }
00537 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
00538
00539 return 0;
00540
00541 } catch(std::exception& e) {
00542 sq_throwerror(vm, e.what());
00543 return SQ_ERROR;
00544 } catch(...) {
00545 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
00546 return SQ_ERROR;
00547 }
00548
00549 }
00550
00551 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
00552 {
00553 SQUserPointer data;
00554 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00555 sq_throwerror(vm, _SC("'set_layer' called without instance"));
00556 return SQ_ERROR;
00557 }
00558 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00559 SQInteger arg0;
00560 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
00561 sq_throwerror(vm, _SC("Argument 1 not an integer"));
00562 return SQ_ERROR;
00563 }
00564
00565 try {
00566 _this->set_layer(static_cast<int> (arg0));
00567
00568 return 0;
00569
00570 } catch(std::exception& e) {
00571 sq_throwerror(vm, e.what());
00572 return SQ_ERROR;
00573 } catch(...) {
00574 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
00575 return SQ_ERROR;
00576 }
00577
00578 }
00579
00580 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
00581 {
00582 SQUserPointer data;
00583 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00584 sq_throwerror(vm, _SC("'get_layer' called without instance"));
00585 return SQ_ERROR;
00586 }
00587 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00588
00589 try {
00590 int return_value = _this->get_layer();
00591
00592 sq_pushinteger(vm, return_value);
00593 return 1;
00594
00595 } catch(std::exception& e) {
00596 sq_throwerror(vm, e.what());
00597 return SQ_ERROR;
00598 } catch(...) {
00599 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
00600 return SQ_ERROR;
00601 }
00602
00603 }
00604
00605 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
00606 {
00607 SQUserPointer data;
00608 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00609 sq_throwerror(vm, _SC("'set_pos' called without instance"));
00610 return SQ_ERROR;
00611 }
00612 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00613 SQFloat arg0;
00614 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00615 sq_throwerror(vm, _SC("Argument 1 not a float"));
00616 return SQ_ERROR;
00617 }
00618 SQFloat arg1;
00619 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
00620 sq_throwerror(vm, _SC("Argument 2 not a float"));
00621 return SQ_ERROR;
00622 }
00623
00624 try {
00625 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
00626
00627 return 0;
00628
00629 } catch(std::exception& e) {
00630 sq_throwerror(vm, e.what());
00631 return SQ_ERROR;
00632 } catch(...) {
00633 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
00634 return SQ_ERROR;
00635 }
00636
00637 }
00638
00639 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
00640 {
00641 SQUserPointer data;
00642 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00643 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
00644 return SQ_ERROR;
00645 }
00646 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00647
00648 try {
00649 float return_value = _this->get_pos_x();
00650
00651 sq_pushfloat(vm, return_value);
00652 return 1;
00653
00654 } catch(std::exception& e) {
00655 sq_throwerror(vm, e.what());
00656 return SQ_ERROR;
00657 } catch(...) {
00658 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
00659 return SQ_ERROR;
00660 }
00661
00662 }
00663
00664 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
00665 {
00666 SQUserPointer data;
00667 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00668 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
00669 return SQ_ERROR;
00670 }
00671 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00672
00673 try {
00674 float return_value = _this->get_pos_y();
00675
00676 sq_pushfloat(vm, return_value);
00677 return 1;
00678
00679 } catch(std::exception& e) {
00680 sq_throwerror(vm, e.what());
00681 return SQ_ERROR;
00682 } catch(...) {
00683 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
00684 return SQ_ERROR;
00685 }
00686
00687 }
00688
00689 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
00690 {
00691 SQUserPointer data;
00692 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00693 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
00694 return SQ_ERROR;
00695 }
00696 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00697 SQInteger arg0;
00698 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
00699 sq_throwerror(vm, _SC("Argument 1 not an integer"));
00700 return SQ_ERROR;
00701 }
00702
00703 try {
00704 _this->set_anchor_point(static_cast<int> (arg0));
00705
00706 return 0;
00707
00708 } catch(std::exception& e) {
00709 sq_throwerror(vm, e.what());
00710 return SQ_ERROR;
00711 } catch(...) {
00712 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
00713 return SQ_ERROR;
00714 }
00715
00716 }
00717
00718 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
00719 {
00720 SQUserPointer data;
00721 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00722 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
00723 return SQ_ERROR;
00724 }
00725 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00726
00727 try {
00728 int return_value = _this->get_anchor_point();
00729
00730 sq_pushinteger(vm, return_value);
00731 return 1;
00732
00733 } catch(std::exception& e) {
00734 sq_throwerror(vm, e.what());
00735 return SQ_ERROR;
00736 } catch(...) {
00737 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
00738 return SQ_ERROR;
00739 }
00740
00741 }
00742
00743 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
00744 {
00745 SQUserPointer data;
00746 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00747 sq_throwerror(vm, _SC("'set_visible' called without instance"));
00748 return SQ_ERROR;
00749 }
00750 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00751 SQBool arg0;
00752 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
00753 sq_throwerror(vm, _SC("Argument 1 not a bool"));
00754 return SQ_ERROR;
00755 }
00756
00757 try {
00758 _this->set_visible(arg0 == SQTrue);
00759
00760 return 0;
00761
00762 } catch(std::exception& e) {
00763 sq_throwerror(vm, e.what());
00764 return SQ_ERROR;
00765 } catch(...) {
00766 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
00767 return SQ_ERROR;
00768 }
00769
00770 }
00771
00772 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
00773 {
00774 SQUserPointer data;
00775 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00776 sq_throwerror(vm, _SC("'get_visible' called without instance"));
00777 return SQ_ERROR;
00778 }
00779 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00780
00781 try {
00782 bool return_value = _this->get_visible();
00783
00784 sq_pushbool(vm, return_value);
00785 return 1;
00786
00787 } catch(std::exception& e) {
00788 sq_throwerror(vm, e.what());
00789 return SQ_ERROR;
00790 } catch(...) {
00791 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
00792 return SQ_ERROR;
00793 }
00794
00795 }
00796
00797 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
00798 {
00799 SQUserPointer data;
00800 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00801 sq_throwerror(vm, _SC("'set_action' called without instance"));
00802 return SQ_ERROR;
00803 }
00804 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00805 const SQChar* arg0;
00806 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
00807 sq_throwerror(vm, _SC("Argument 1 not a string"));
00808 return SQ_ERROR;
00809 }
00810
00811 try {
00812 _this->set_action(arg0);
00813
00814 return 0;
00815
00816 } catch(std::exception& e) {
00817 sq_throwerror(vm, e.what());
00818 return SQ_ERROR;
00819 } catch(...) {
00820 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
00821 return SQ_ERROR;
00822 }
00823
00824 }
00825
00826 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
00827 {
00828 SQUserPointer data;
00829 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00830 sq_throwerror(vm, _SC("'get_action' called without instance"));
00831 return SQ_ERROR;
00832 }
00833 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00834
00835 try {
00836 std::string return_value = _this->get_action();
00837
00838 sq_pushstring(vm, return_value.c_str(), return_value.size());
00839 return 1;
00840
00841 } catch(std::exception& e) {
00842 sq_throwerror(vm, e.what());
00843 return SQ_ERROR;
00844 } catch(...) {
00845 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
00846 return SQ_ERROR;
00847 }
00848
00849 }
00850
00851 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
00852 {
00853 SQUserPointer data;
00854 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00855 sq_throwerror(vm, _SC("'fade_in' called without instance"));
00856 return SQ_ERROR;
00857 }
00858 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00859 SQFloat arg0;
00860 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00861 sq_throwerror(vm, _SC("Argument 1 not a float"));
00862 return SQ_ERROR;
00863 }
00864
00865 try {
00866 _this->fade_in(static_cast<float> (arg0));
00867
00868 return 0;
00869
00870 } catch(std::exception& e) {
00871 sq_throwerror(vm, e.what());
00872 return SQ_ERROR;
00873 } catch(...) {
00874 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
00875 return SQ_ERROR;
00876 }
00877
00878 }
00879
00880 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
00881 {
00882 SQUserPointer data;
00883 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00884 sq_throwerror(vm, _SC("'fade_out' called without instance"));
00885 return SQ_ERROR;
00886 }
00887 scripting::FloatingImage* _this = reinterpret_cast<scripting::FloatingImage*> (data);
00888 SQFloat arg0;
00889 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00890 sq_throwerror(vm, _SC("Argument 1 not a float"));
00891 return SQ_ERROR;
00892 }
00893
00894 try {
00895 _this->fade_out(static_cast<float> (arg0));
00896
00897 return 0;
00898
00899 } catch(std::exception& e) {
00900 sq_throwerror(vm, e.what());
00901 return SQ_ERROR;
00902 } catch(...) {
00903 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
00904 return SQ_ERROR;
00905 }
00906
00907 }
00908
00909 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
00910 {
00911 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (ptr);
00912 delete _this;
00913 return 0;
00914 }
00915
00916 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
00917 {
00918 SQUserPointer data;
00919 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00920 sq_throwerror(vm, _SC("'start' called without instance"));
00921 return SQ_ERROR;
00922 }
00923 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
00924
00925 try {
00926 _this->start();
00927
00928 return 0;
00929
00930 } catch(std::exception& e) {
00931 sq_throwerror(vm, e.what());
00932 return SQ_ERROR;
00933 } catch(...) {
00934 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
00935 return SQ_ERROR;
00936 }
00937
00938 }
00939
00940 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
00941 {
00942 SQUserPointer data;
00943 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00944 sq_throwerror(vm, _SC("'stop' called without instance"));
00945 return SQ_ERROR;
00946 }
00947 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
00948
00949 try {
00950 _this->stop();
00951
00952 return 0;
00953
00954 } catch(std::exception& e) {
00955 sq_throwerror(vm, e.what());
00956 return SQ_ERROR;
00957 } catch(...) {
00958 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
00959 return SQ_ERROR;
00960 }
00961
00962 }
00963
00964 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
00965 {
00966 SQUserPointer data;
00967 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00968 sq_throwerror(vm, _SC("'get_time' called without instance"));
00969 return SQ_ERROR;
00970 }
00971 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
00972
00973 try {
00974 float return_value = _this->get_time();
00975
00976 sq_pushfloat(vm, return_value);
00977 return 1;
00978
00979 } catch(std::exception& e) {
00980 sq_throwerror(vm, e.what());
00981 return SQ_ERROR;
00982 } catch(...) {
00983 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
00984 return SQ_ERROR;
00985 }
00986
00987 }
00988
00989 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
00990 {
00991 SQUserPointer data;
00992 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
00993 sq_throwerror(vm, _SC("'set_time' called without instance"));
00994 return SQ_ERROR;
00995 }
00996 scripting::LevelTime* _this = reinterpret_cast<scripting::LevelTime*> (data);
00997 SQFloat arg0;
00998 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
00999 sq_throwerror(vm, _SC("Argument 1 not a float"));
01000 return SQ_ERROR;
01001 }
01002
01003 try {
01004 _this->set_time(static_cast<float> (arg0));
01005
01006 return 0;
01007
01008 } catch(std::exception& e) {
01009 sq_throwerror(vm, e.what());
01010 return SQ_ERROR;
01011 } catch(...) {
01012 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
01013 return SQ_ERROR;
01014 }
01015
01016 }
01017
01018 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
01019 {
01020 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (ptr);
01021 delete _this;
01022 return 0;
01023 }
01024
01025 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
01026 {
01027 SQUserPointer data;
01028 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01029 sq_throwerror(vm, _SC("'goto_node' called without instance"));
01030 return SQ_ERROR;
01031 }
01032 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
01033 SQInteger arg0;
01034 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
01035 sq_throwerror(vm, _SC("Argument 1 not an integer"));
01036 return SQ_ERROR;
01037 }
01038
01039 try {
01040 _this->goto_node(static_cast<int> (arg0));
01041
01042 return 0;
01043
01044 } catch(std::exception& e) {
01045 sq_throwerror(vm, e.what());
01046 return SQ_ERROR;
01047 } catch(...) {
01048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
01049 return SQ_ERROR;
01050 }
01051
01052 }
01053
01054 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
01055 {
01056 SQUserPointer data;
01057 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01058 sq_throwerror(vm, _SC("'start_moving' called without instance"));
01059 return SQ_ERROR;
01060 }
01061 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
01062
01063 try {
01064 _this->start_moving();
01065
01066 return 0;
01067
01068 } catch(std::exception& e) {
01069 sq_throwerror(vm, e.what());
01070 return SQ_ERROR;
01071 } catch(...) {
01072 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
01073 return SQ_ERROR;
01074 }
01075
01076 }
01077
01078 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
01079 {
01080 SQUserPointer data;
01081 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01082 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
01083 return SQ_ERROR;
01084 }
01085 scripting::Platform* _this = reinterpret_cast<scripting::Platform*> (data);
01086
01087 try {
01088 _this->stop_moving();
01089
01090 return 0;
01091
01092 } catch(std::exception& e) {
01093 sq_throwerror(vm, e.what());
01094 return SQ_ERROR;
01095 } catch(...) {
01096 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
01097 return SQ_ERROR;
01098 }
01099
01100 }
01101
01102 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
01103 {
01104 scripting::Player* _this = reinterpret_cast<scripting::Player*> (ptr);
01105 delete _this;
01106 return 0;
01107 }
01108
01109 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
01110 {
01111 SQUserPointer data;
01112 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01113 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
01114 return SQ_ERROR;
01115 }
01116 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01117 const SQChar* arg0;
01118 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
01119 sq_throwerror(vm, _SC("Argument 1 not a string"));
01120 return SQ_ERROR;
01121 }
01122
01123 try {
01124 bool return_value = _this->add_bonus(arg0);
01125
01126 sq_pushbool(vm, return_value);
01127 return 1;
01128
01129 } catch(std::exception& e) {
01130 sq_throwerror(vm, e.what());
01131 return SQ_ERROR;
01132 } catch(...) {
01133 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
01134 return SQ_ERROR;
01135 }
01136
01137 }
01138
01139 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
01140 {
01141 SQUserPointer data;
01142 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01143 sq_throwerror(vm, _SC("'add_coins' called without instance"));
01144 return SQ_ERROR;
01145 }
01146 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01147 SQInteger arg0;
01148 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
01149 sq_throwerror(vm, _SC("Argument 1 not an integer"));
01150 return SQ_ERROR;
01151 }
01152
01153 try {
01154 _this->add_coins(static_cast<int> (arg0));
01155
01156 return 0;
01157
01158 } catch(std::exception& e) {
01159 sq_throwerror(vm, e.what());
01160 return SQ_ERROR;
01161 } catch(...) {
01162 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
01163 return SQ_ERROR;
01164 }
01165
01166 }
01167
01168 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
01169 {
01170 SQUserPointer data;
01171 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01172 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
01173 return SQ_ERROR;
01174 }
01175 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01176
01177 try {
01178 _this->make_invincible();
01179
01180 return 0;
01181
01182 } catch(std::exception& e) {
01183 sq_throwerror(vm, e.what());
01184 return SQ_ERROR;
01185 } catch(...) {
01186 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
01187 return SQ_ERROR;
01188 }
01189
01190 }
01191
01192 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
01193 {
01194 SQUserPointer data;
01195 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01196 sq_throwerror(vm, _SC("'deactivate' called without instance"));
01197 return SQ_ERROR;
01198 }
01199 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01200
01201 try {
01202 _this->deactivate();
01203
01204 return 0;
01205
01206 } catch(std::exception& e) {
01207 sq_throwerror(vm, e.what());
01208 return SQ_ERROR;
01209 } catch(...) {
01210 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
01211 return SQ_ERROR;
01212 }
01213
01214 }
01215
01216 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
01217 {
01218 SQUserPointer data;
01219 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01220 sq_throwerror(vm, _SC("'activate' called without instance"));
01221 return SQ_ERROR;
01222 }
01223 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01224
01225 try {
01226 _this->activate();
01227
01228 return 0;
01229
01230 } catch(std::exception& e) {
01231 sq_throwerror(vm, e.what());
01232 return SQ_ERROR;
01233 } catch(...) {
01234 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
01235 return SQ_ERROR;
01236 }
01237
01238 }
01239
01240 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
01241 {
01242 SQUserPointer data;
01243 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01244 sq_throwerror(vm, _SC("'walk' called without instance"));
01245 return SQ_ERROR;
01246 }
01247 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01248 SQFloat arg0;
01249 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
01250 sq_throwerror(vm, _SC("Argument 1 not a float"));
01251 return SQ_ERROR;
01252 }
01253
01254 try {
01255 _this->walk(static_cast<float> (arg0));
01256
01257 return 0;
01258
01259 } catch(std::exception& e) {
01260 sq_throwerror(vm, e.what());
01261 return SQ_ERROR;
01262 } catch(...) {
01263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
01264 return SQ_ERROR;
01265 }
01266
01267 }
01268
01269 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
01270 {
01271 SQUserPointer data;
01272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01273 sq_throwerror(vm, _SC("'set_visible' called without instance"));
01274 return SQ_ERROR;
01275 }
01276 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01277 SQBool arg0;
01278 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01279 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01280 return SQ_ERROR;
01281 }
01282
01283 try {
01284 _this->set_visible(arg0 == SQTrue);
01285
01286 return 0;
01287
01288 } catch(std::exception& e) {
01289 sq_throwerror(vm, e.what());
01290 return SQ_ERROR;
01291 } catch(...) {
01292 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
01293 return SQ_ERROR;
01294 }
01295
01296 }
01297
01298 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
01299 {
01300 SQUserPointer data;
01301 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01302 sq_throwerror(vm, _SC("'get_visible' called without instance"));
01303 return SQ_ERROR;
01304 }
01305 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01306
01307 try {
01308 bool return_value = _this->get_visible();
01309
01310 sq_pushbool(vm, return_value);
01311 return 1;
01312
01313 } catch(std::exception& e) {
01314 sq_throwerror(vm, e.what());
01315 return SQ_ERROR;
01316 } catch(...) {
01317 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
01318 return SQ_ERROR;
01319 }
01320
01321 }
01322
01323 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
01324 {
01325 SQUserPointer data;
01326 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01327 sq_throwerror(vm, _SC("'kill' called without instance"));
01328 return SQ_ERROR;
01329 }
01330 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01331 SQBool arg0;
01332 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01333 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01334 return SQ_ERROR;
01335 }
01336
01337 try {
01338 _this->kill(arg0 == SQTrue);
01339
01340 return 0;
01341
01342 } catch(std::exception& e) {
01343 sq_throwerror(vm, e.what());
01344 return SQ_ERROR;
01345 } catch(...) {
01346 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
01347 return SQ_ERROR;
01348 }
01349
01350 }
01351
01352 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
01353 {
01354 SQUserPointer data;
01355 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01356 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
01357 return SQ_ERROR;
01358 }
01359 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01360 SQBool arg0;
01361 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01362 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01363 return SQ_ERROR;
01364 }
01365
01366 try {
01367 _this->set_ghost_mode(arg0 == SQTrue);
01368
01369 return 0;
01370
01371 } catch(std::exception& e) {
01372 sq_throwerror(vm, e.what());
01373 return SQ_ERROR;
01374 } catch(...) {
01375 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
01376 return SQ_ERROR;
01377 }
01378
01379 }
01380
01381 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
01382 {
01383 SQUserPointer data;
01384 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01385 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
01386 return SQ_ERROR;
01387 }
01388 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01389
01390 try {
01391 bool return_value = _this->get_ghost_mode();
01392
01393 sq_pushbool(vm, return_value);
01394 return 1;
01395
01396 } catch(std::exception& e) {
01397 sq_throwerror(vm, e.what());
01398 return SQ_ERROR;
01399 } catch(...) {
01400 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
01401 return SQ_ERROR;
01402 }
01403
01404 }
01405
01406 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
01407 {
01408 SQUserPointer data;
01409 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01410 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
01411 return SQ_ERROR;
01412 }
01413 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01414
01415 try {
01416 _this->do_cheer();
01417
01418 return 0;
01419
01420 } catch(std::exception& e) {
01421 sq_throwerror(vm, e.what());
01422 return SQ_ERROR;
01423 } catch(...) {
01424 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
01425 return SQ_ERROR;
01426 }
01427
01428 }
01429
01430 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
01431 {
01432 SQUserPointer data;
01433 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01434 sq_throwerror(vm, _SC("'do_duck' called without instance"));
01435 return SQ_ERROR;
01436 }
01437 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01438
01439 try {
01440 _this->do_duck();
01441
01442 return 0;
01443
01444 } catch(std::exception& e) {
01445 sq_throwerror(vm, e.what());
01446 return SQ_ERROR;
01447 } catch(...) {
01448 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
01449 return SQ_ERROR;
01450 }
01451
01452 }
01453
01454 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
01455 {
01456 SQUserPointer data;
01457 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01458 sq_throwerror(vm, _SC("'do_standup' called without instance"));
01459 return SQ_ERROR;
01460 }
01461 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01462
01463 try {
01464 _this->do_standup();
01465
01466 return 0;
01467
01468 } catch(std::exception& e) {
01469 sq_throwerror(vm, e.what());
01470 return SQ_ERROR;
01471 } catch(...) {
01472 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
01473 return SQ_ERROR;
01474 }
01475
01476 }
01477
01478 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
01479 {
01480 SQUserPointer data;
01481 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01482 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
01483 return SQ_ERROR;
01484 }
01485 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01486
01487 try {
01488 _this->do_backflip();
01489
01490 return 0;
01491
01492 } catch(std::exception& e) {
01493 sq_throwerror(vm, e.what());
01494 return SQ_ERROR;
01495 } catch(...) {
01496 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
01497 return SQ_ERROR;
01498 }
01499
01500 }
01501
01502 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
01503 {
01504 SQUserPointer data;
01505 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01506 sq_throwerror(vm, _SC("'do_jump' called without instance"));
01507 return SQ_ERROR;
01508 }
01509 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01510 SQFloat arg0;
01511 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
01512 sq_throwerror(vm, _SC("Argument 1 not a float"));
01513 return SQ_ERROR;
01514 }
01515
01516 try {
01517 _this->do_jump(static_cast<float> (arg0));
01518
01519 return 0;
01520
01521 } catch(std::exception& e) {
01522 sq_throwerror(vm, e.what());
01523 return SQ_ERROR;
01524 } catch(...) {
01525 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
01526 return SQ_ERROR;
01527 }
01528
01529 }
01530
01531 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
01532 {
01533 SQUserPointer data;
01534 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01535 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
01536 return SQ_ERROR;
01537 }
01538 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01539 const SQChar* arg0;
01540 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
01541 sq_throwerror(vm, _SC("Argument 1 not a string"));
01542 return SQ_ERROR;
01543 }
01544
01545 try {
01546 _this->trigger_sequence(arg0);
01547
01548 return 0;
01549
01550 } catch(std::exception& e) {
01551 sq_throwerror(vm, e.what());
01552 return SQ_ERROR;
01553 } catch(...) {
01554 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
01555 return SQ_ERROR;
01556 }
01557
01558 }
01559
01560 static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
01561 {
01562 SQUserPointer data;
01563 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01564 sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
01565 return SQ_ERROR;
01566 }
01567 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01568 SQBool arg0;
01569 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01570 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01571 return SQ_ERROR;
01572 }
01573
01574 try {
01575 _this->use_scripting_controller(arg0 == SQTrue);
01576
01577 return 0;
01578
01579 } catch(std::exception& e) {
01580 sq_throwerror(vm, e.what());
01581 return SQ_ERROR;
01582 } catch(...) {
01583 sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
01584 return SQ_ERROR;
01585 }
01586
01587 }
01588
01589 static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
01590 {
01591 SQUserPointer data;
01592 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01593 sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
01594 return SQ_ERROR;
01595 }
01596 scripting::Player* _this = reinterpret_cast<scripting::Player*> (data);
01597 const SQChar* arg0;
01598 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
01599 sq_throwerror(vm, _SC("Argument 1 not a string"));
01600 return SQ_ERROR;
01601 }
01602 SQBool arg1;
01603 if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
01604 sq_throwerror(vm, _SC("Argument 2 not a bool"));
01605 return SQ_ERROR;
01606 }
01607
01608 try {
01609 _this->do_scripting_controller(arg0, arg1 == SQTrue);
01610
01611 return 0;
01612
01613 } catch(std::exception& e) {
01614 sq_throwerror(vm, e.what());
01615 return SQ_ERROR;
01616 } catch(...) {
01617 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
01618 return SQ_ERROR;
01619 }
01620
01621 }
01622
01623 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
01624 {
01625 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (ptr);
01626 delete _this;
01627 return 0;
01628 }
01629
01630 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
01631 {
01632 SQUserPointer data;
01633 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01634 sq_throwerror(vm, _SC("'set_action' called without instance"));
01635 return SQ_ERROR;
01636 }
01637 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01638 const SQChar* arg0;
01639 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
01640 sq_throwerror(vm, _SC("Argument 1 not a string"));
01641 return SQ_ERROR;
01642 }
01643
01644 try {
01645 _this->set_action(arg0);
01646
01647 return 0;
01648
01649 } catch(std::exception& e) {
01650 sq_throwerror(vm, e.what());
01651 return SQ_ERROR;
01652 } catch(...) {
01653 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
01654 return SQ_ERROR;
01655 }
01656
01657 }
01658
01659 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
01660 {
01661 SQUserPointer data;
01662 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01663 sq_throwerror(vm, _SC("'get_action' called without instance"));
01664 return SQ_ERROR;
01665 }
01666 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01667
01668 try {
01669 std::string return_value = _this->get_action();
01670
01671 sq_pushstring(vm, return_value.c_str(), return_value.size());
01672 return 1;
01673
01674 } catch(std::exception& e) {
01675 sq_throwerror(vm, e.what());
01676 return SQ_ERROR;
01677 } catch(...) {
01678 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
01679 return SQ_ERROR;
01680 }
01681
01682 }
01683
01684 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
01685 {
01686 SQUserPointer data;
01687 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01688 sq_throwerror(vm, _SC("'move' called without instance"));
01689 return SQ_ERROR;
01690 }
01691 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01692 SQFloat arg0;
01693 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
01694 sq_throwerror(vm, _SC("Argument 1 not a float"));
01695 return SQ_ERROR;
01696 }
01697 SQFloat arg1;
01698 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
01699 sq_throwerror(vm, _SC("Argument 2 not a float"));
01700 return SQ_ERROR;
01701 }
01702
01703 try {
01704 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
01705
01706 return 0;
01707
01708 } catch(std::exception& e) {
01709 sq_throwerror(vm, e.what());
01710 return SQ_ERROR;
01711 } catch(...) {
01712 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
01713 return SQ_ERROR;
01714 }
01715
01716 }
01717
01718 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
01719 {
01720 SQUserPointer data;
01721 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01722 sq_throwerror(vm, _SC("'set_pos' called without instance"));
01723 return SQ_ERROR;
01724 }
01725 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01726 SQFloat arg0;
01727 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
01728 sq_throwerror(vm, _SC("Argument 1 not a float"));
01729 return SQ_ERROR;
01730 }
01731 SQFloat arg1;
01732 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
01733 sq_throwerror(vm, _SC("Argument 2 not a float"));
01734 return SQ_ERROR;
01735 }
01736
01737 try {
01738 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
01739
01740 return 0;
01741
01742 } catch(std::exception& e) {
01743 sq_throwerror(vm, e.what());
01744 return SQ_ERROR;
01745 } catch(...) {
01746 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
01747 return SQ_ERROR;
01748 }
01749
01750 }
01751
01752 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
01753 {
01754 SQUserPointer data;
01755 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01756 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
01757 return SQ_ERROR;
01758 }
01759 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01760
01761 try {
01762 float return_value = _this->get_pos_x();
01763
01764 sq_pushfloat(vm, return_value);
01765 return 1;
01766
01767 } catch(std::exception& e) {
01768 sq_throwerror(vm, e.what());
01769 return SQ_ERROR;
01770 } catch(...) {
01771 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
01772 return SQ_ERROR;
01773 }
01774
01775 }
01776
01777 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
01778 {
01779 SQUserPointer data;
01780 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01781 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
01782 return SQ_ERROR;
01783 }
01784 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01785
01786 try {
01787 float return_value = _this->get_pos_y();
01788
01789 sq_pushfloat(vm, return_value);
01790 return 1;
01791
01792 } catch(std::exception& e) {
01793 sq_throwerror(vm, e.what());
01794 return SQ_ERROR;
01795 } catch(...) {
01796 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
01797 return SQ_ERROR;
01798 }
01799
01800 }
01801
01802 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
01803 {
01804 SQUserPointer data;
01805 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01806 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
01807 return SQ_ERROR;
01808 }
01809 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01810 SQFloat arg0;
01811 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
01812 sq_throwerror(vm, _SC("Argument 1 not a float"));
01813 return SQ_ERROR;
01814 }
01815 SQFloat arg1;
01816 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
01817 sq_throwerror(vm, _SC("Argument 2 not a float"));
01818 return SQ_ERROR;
01819 }
01820
01821 try {
01822 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
01823
01824 return 0;
01825
01826 } catch(std::exception& e) {
01827 sq_throwerror(vm, e.what());
01828 return SQ_ERROR;
01829 } catch(...) {
01830 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
01831 return SQ_ERROR;
01832 }
01833
01834 }
01835
01836 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
01837 {
01838 SQUserPointer data;
01839 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01840 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
01841 return SQ_ERROR;
01842 }
01843 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01844
01845 try {
01846 float return_value = _this->get_velocity_x();
01847
01848 sq_pushfloat(vm, return_value);
01849 return 1;
01850
01851 } catch(std::exception& e) {
01852 sq_throwerror(vm, e.what());
01853 return SQ_ERROR;
01854 } catch(...) {
01855 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
01856 return SQ_ERROR;
01857 }
01858
01859 }
01860
01861 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
01862 {
01863 SQUserPointer data;
01864 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01865 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
01866 return SQ_ERROR;
01867 }
01868 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01869
01870 try {
01871 float return_value = _this->get_velocity_y();
01872
01873 sq_pushfloat(vm, return_value);
01874 return 1;
01875
01876 } catch(std::exception& e) {
01877 sq_throwerror(vm, e.what());
01878 return SQ_ERROR;
01879 } catch(...) {
01880 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
01881 return SQ_ERROR;
01882 }
01883
01884 }
01885
01886 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
01887 {
01888 SQUserPointer data;
01889 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01890 sq_throwerror(vm, _SC("'set_visible' called without instance"));
01891 return SQ_ERROR;
01892 }
01893 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01894 SQBool arg0;
01895 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01896 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01897 return SQ_ERROR;
01898 }
01899
01900 try {
01901 _this->set_visible(arg0 == SQTrue);
01902
01903 return 0;
01904
01905 } catch(std::exception& e) {
01906 sq_throwerror(vm, e.what());
01907 return SQ_ERROR;
01908 } catch(...) {
01909 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
01910 return SQ_ERROR;
01911 }
01912
01913 }
01914
01915 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
01916 {
01917 SQUserPointer data;
01918 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01919 sq_throwerror(vm, _SC("'is_visible' called without instance"));
01920 return SQ_ERROR;
01921 }
01922 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01923
01924 try {
01925 bool return_value = _this->is_visible();
01926
01927 sq_pushbool(vm, return_value);
01928 return 1;
01929
01930 } catch(std::exception& e) {
01931 sq_throwerror(vm, e.what());
01932 return SQ_ERROR;
01933 } catch(...) {
01934 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
01935 return SQ_ERROR;
01936 }
01937
01938 }
01939
01940 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
01941 {
01942 SQUserPointer data;
01943 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01944 sq_throwerror(vm, _SC("'set_solid' called without instance"));
01945 return SQ_ERROR;
01946 }
01947 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01948 SQBool arg0;
01949 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
01950 sq_throwerror(vm, _SC("Argument 1 not a bool"));
01951 return SQ_ERROR;
01952 }
01953
01954 try {
01955 _this->set_solid(arg0 == SQTrue);
01956
01957 return 0;
01958
01959 } catch(std::exception& e) {
01960 sq_throwerror(vm, e.what());
01961 return SQ_ERROR;
01962 } catch(...) {
01963 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
01964 return SQ_ERROR;
01965 }
01966
01967 }
01968
01969 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
01970 {
01971 SQUserPointer data;
01972 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01973 sq_throwerror(vm, _SC("'is_solid' called without instance"));
01974 return SQ_ERROR;
01975 }
01976 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
01977
01978 try {
01979 bool return_value = _this->is_solid();
01980
01981 sq_pushbool(vm, return_value);
01982 return 1;
01983
01984 } catch(std::exception& e) {
01985 sq_throwerror(vm, e.what());
01986 return SQ_ERROR;
01987 } catch(...) {
01988 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
01989 return SQ_ERROR;
01990 }
01991
01992 }
01993
01994 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
01995 {
01996 SQUserPointer data;
01997 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
01998 sq_throwerror(vm, _SC("'get_name' called without instance"));
01999 return SQ_ERROR;
02000 }
02001 scripting::ScriptedObject* _this = reinterpret_cast<scripting::ScriptedObject*> (data);
02002
02003 try {
02004 std::string return_value = _this->get_name();
02005
02006 sq_pushstring(vm, return_value.c_str(), return_value.size());
02007 return 1;
02008
02009 } catch(std::exception& e) {
02010 sq_throwerror(vm, e.what());
02011 return SQ_ERROR;
02012 } catch(...) {
02013 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
02014 return SQ_ERROR;
02015 }
02016
02017 }
02018
02019 static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger )
02020 {
02021 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (ptr);
02022 delete _this;
02023 return 0;
02024 }
02025
02026 static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm)
02027 {
02028 SQUserPointer data;
02029 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02030 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
02031 return SQ_ERROR;
02032 }
02033 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
02034 SQFloat arg0;
02035 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02036 sq_throwerror(vm, _SC("Argument 1 not a float"));
02037 return SQ_ERROR;
02038 }
02039 SQFloat arg1;
02040 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
02041 sq_throwerror(vm, _SC("Argument 2 not a float"));
02042 return SQ_ERROR;
02043 }
02044 SQFloat arg2;
02045 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
02046 sq_throwerror(vm, _SC("Argument 3 not a float"));
02047 return SQ_ERROR;
02048 }
02049
02050 try {
02051 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
02052
02053 return 0;
02054
02055 } catch(std::exception& e) {
02056 sq_throwerror(vm, e.what());
02057 return SQ_ERROR;
02058 } catch(...) {
02059 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
02060 return SQ_ERROR;
02061 }
02062
02063 }
02064
02065 static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm)
02066 {
02067 SQUserPointer data;
02068 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02069 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
02070 return SQ_ERROR;
02071 }
02072 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
02073
02074 try {
02075 float return_value = _this->get_ambient_red();
02076
02077 sq_pushfloat(vm, return_value);
02078 return 1;
02079
02080 } catch(std::exception& e) {
02081 sq_throwerror(vm, e.what());
02082 return SQ_ERROR;
02083 } catch(...) {
02084 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
02085 return SQ_ERROR;
02086 }
02087
02088 }
02089
02090 static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm)
02091 {
02092 SQUserPointer data;
02093 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02094 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
02095 return SQ_ERROR;
02096 }
02097 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
02098
02099 try {
02100 float return_value = _this->get_ambient_green();
02101
02102 sq_pushfloat(vm, return_value);
02103 return 1;
02104
02105 } catch(std::exception& e) {
02106 sq_throwerror(vm, e.what());
02107 return SQ_ERROR;
02108 } catch(...) {
02109 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
02110 return SQ_ERROR;
02111 }
02112
02113 }
02114
02115 static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
02116 {
02117 SQUserPointer data;
02118 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02119 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
02120 return SQ_ERROR;
02121 }
02122 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
02123
02124 try {
02125 float return_value = _this->get_ambient_blue();
02126
02127 sq_pushfloat(vm, return_value);
02128 return 1;
02129
02130 } catch(std::exception& e) {
02131 sq_throwerror(vm, e.what());
02132 return SQ_ERROR;
02133 } catch(...) {
02134 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
02135 return SQ_ERROR;
02136 }
02137
02138 }
02139
02140 static SQInteger SSector_set_gravity_wrapper(HSQUIRRELVM vm)
02141 {
02142 SQUserPointer data;
02143 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02144 sq_throwerror(vm, _SC("'set_gravity' called without instance"));
02145 return SQ_ERROR;
02146 }
02147 scripting::SSector* _this = reinterpret_cast<scripting::SSector*> (data);
02148 SQFloat arg0;
02149 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02150 sq_throwerror(vm, _SC("Argument 1 not a float"));
02151 return SQ_ERROR;
02152 }
02153
02154 try {
02155 _this->set_gravity(static_cast<float> (arg0));
02156
02157 return 0;
02158
02159 } catch(std::exception& e) {
02160 sq_throwerror(vm, e.what());
02161 return SQ_ERROR;
02162 } catch(...) {
02163 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'"));
02164 return SQ_ERROR;
02165 }
02166
02167 }
02168
02169 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
02170 {
02171 scripting::Text* _this = reinterpret_cast<scripting::Text*> (ptr);
02172 delete _this;
02173 return 0;
02174 }
02175
02176 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
02177 {
02178 SQUserPointer data;
02179 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02180 sq_throwerror(vm, _SC("'set_text' called without instance"));
02181 return SQ_ERROR;
02182 }
02183 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02184 const SQChar* arg0;
02185 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
02186 sq_throwerror(vm, _SC("Argument 1 not a string"));
02187 return SQ_ERROR;
02188 }
02189
02190 try {
02191 _this->set_text(arg0);
02192
02193 return 0;
02194
02195 } catch(std::exception& e) {
02196 sq_throwerror(vm, e.what());
02197 return SQ_ERROR;
02198 } catch(...) {
02199 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
02200 return SQ_ERROR;
02201 }
02202
02203 }
02204
02205 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
02206 {
02207 SQUserPointer data;
02208 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02209 sq_throwerror(vm, _SC("'set_font' called without instance"));
02210 return SQ_ERROR;
02211 }
02212 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02213 const SQChar* arg0;
02214 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
02215 sq_throwerror(vm, _SC("Argument 1 not a string"));
02216 return SQ_ERROR;
02217 }
02218
02219 try {
02220 _this->set_font(arg0);
02221
02222 return 0;
02223
02224 } catch(std::exception& e) {
02225 sq_throwerror(vm, e.what());
02226 return SQ_ERROR;
02227 } catch(...) {
02228 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
02229 return SQ_ERROR;
02230 }
02231
02232 }
02233
02234 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
02235 {
02236 SQUserPointer data;
02237 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02238 sq_throwerror(vm, _SC("'fade_in' called without instance"));
02239 return SQ_ERROR;
02240 }
02241 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02242 SQFloat arg0;
02243 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02244 sq_throwerror(vm, _SC("Argument 1 not a float"));
02245 return SQ_ERROR;
02246 }
02247
02248 try {
02249 _this->fade_in(static_cast<float> (arg0));
02250
02251 return 0;
02252
02253 } catch(std::exception& e) {
02254 sq_throwerror(vm, e.what());
02255 return SQ_ERROR;
02256 } catch(...) {
02257 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
02258 return SQ_ERROR;
02259 }
02260
02261 }
02262
02263 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
02264 {
02265 SQUserPointer data;
02266 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02267 sq_throwerror(vm, _SC("'fade_out' called without instance"));
02268 return SQ_ERROR;
02269 }
02270 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02271 SQFloat arg0;
02272 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02273 sq_throwerror(vm, _SC("Argument 1 not a float"));
02274 return SQ_ERROR;
02275 }
02276
02277 try {
02278 _this->fade_out(static_cast<float> (arg0));
02279
02280 return 0;
02281
02282 } catch(std::exception& e) {
02283 sq_throwerror(vm, e.what());
02284 return SQ_ERROR;
02285 } catch(...) {
02286 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
02287 return SQ_ERROR;
02288 }
02289
02290 }
02291
02292 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
02293 {
02294 SQUserPointer data;
02295 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02296 sq_throwerror(vm, _SC("'set_visible' called without instance"));
02297 return SQ_ERROR;
02298 }
02299 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02300 SQBool arg0;
02301 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
02302 sq_throwerror(vm, _SC("Argument 1 not a bool"));
02303 return SQ_ERROR;
02304 }
02305
02306 try {
02307 _this->set_visible(arg0 == SQTrue);
02308
02309 return 0;
02310
02311 } catch(std::exception& e) {
02312 sq_throwerror(vm, e.what());
02313 return SQ_ERROR;
02314 } catch(...) {
02315 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
02316 return SQ_ERROR;
02317 }
02318
02319 }
02320
02321 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
02322 {
02323 SQUserPointer data;
02324 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02325 sq_throwerror(vm, _SC("'set_centered' called without instance"));
02326 return SQ_ERROR;
02327 }
02328 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02329 SQBool arg0;
02330 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
02331 sq_throwerror(vm, _SC("Argument 1 not a bool"));
02332 return SQ_ERROR;
02333 }
02334
02335 try {
02336 _this->set_centered(arg0 == SQTrue);
02337
02338 return 0;
02339
02340 } catch(std::exception& e) {
02341 sq_throwerror(vm, e.what());
02342 return SQ_ERROR;
02343 } catch(...) {
02344 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
02345 return SQ_ERROR;
02346 }
02347
02348 }
02349
02350 static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
02351 {
02352 SQUserPointer data;
02353 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02354 sq_throwerror(vm, _SC("'set_pos' called without instance"));
02355 return SQ_ERROR;
02356 }
02357 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02358 SQFloat arg0;
02359 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02360 sq_throwerror(vm, _SC("Argument 1 not a float"));
02361 return SQ_ERROR;
02362 }
02363 SQFloat arg1;
02364 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
02365 sq_throwerror(vm, _SC("Argument 2 not a float"));
02366 return SQ_ERROR;
02367 }
02368
02369 try {
02370 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
02371
02372 return 0;
02373
02374 } catch(std::exception& e) {
02375 sq_throwerror(vm, e.what());
02376 return SQ_ERROR;
02377 } catch(...) {
02378 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
02379 return SQ_ERROR;
02380 }
02381
02382 }
02383
02384 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
02385 {
02386 SQUserPointer data;
02387 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02388 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
02389 return SQ_ERROR;
02390 }
02391 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02392
02393 try {
02394 float return_value = _this->get_pos_x();
02395
02396 sq_pushfloat(vm, return_value);
02397 return 1;
02398
02399 } catch(std::exception& e) {
02400 sq_throwerror(vm, e.what());
02401 return SQ_ERROR;
02402 } catch(...) {
02403 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
02404 return SQ_ERROR;
02405 }
02406
02407 }
02408
02409 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
02410 {
02411 SQUserPointer data;
02412 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02413 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
02414 return SQ_ERROR;
02415 }
02416 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02417
02418 try {
02419 float return_value = _this->get_pos_y();
02420
02421 sq_pushfloat(vm, return_value);
02422 return 1;
02423
02424 } catch(std::exception& e) {
02425 sq_throwerror(vm, e.what());
02426 return SQ_ERROR;
02427 } catch(...) {
02428 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
02429 return SQ_ERROR;
02430 }
02431
02432 }
02433
02434 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
02435 {
02436 SQUserPointer data;
02437 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02438 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
02439 return SQ_ERROR;
02440 }
02441 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02442 SQInteger arg0;
02443 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
02444 sq_throwerror(vm, _SC("Argument 1 not an integer"));
02445 return SQ_ERROR;
02446 }
02447
02448 try {
02449 _this->set_anchor_point(static_cast<int> (arg0));
02450
02451 return 0;
02452
02453 } catch(std::exception& e) {
02454 sq_throwerror(vm, e.what());
02455 return SQ_ERROR;
02456 } catch(...) {
02457 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
02458 return SQ_ERROR;
02459 }
02460
02461 }
02462
02463 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
02464 {
02465 SQUserPointer data;
02466 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02467 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
02468 return SQ_ERROR;
02469 }
02470 scripting::Text* _this = reinterpret_cast<scripting::Text*> (data);
02471
02472 try {
02473 int return_value = _this->get_anchor_point();
02474
02475 sq_pushinteger(vm, return_value);
02476 return 1;
02477
02478 } catch(std::exception& e) {
02479 sq_throwerror(vm, e.what());
02480 return SQ_ERROR;
02481 } catch(...) {
02482 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
02483 return SQ_ERROR;
02484 }
02485
02486 }
02487
02488 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
02489 {
02490 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (ptr);
02491 delete _this;
02492 return 0;
02493 }
02494
02495 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
02496 {
02497 SQUserPointer data;
02498 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02499 sq_throwerror(vm, _SC("'start' called without instance"));
02500 return SQ_ERROR;
02501 }
02502 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02503
02504 try {
02505 _this->start();
02506
02507 return 0;
02508
02509 } catch(std::exception& e) {
02510 sq_throwerror(vm, e.what());
02511 return SQ_ERROR;
02512 } catch(...) {
02513 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
02514 return SQ_ERROR;
02515 }
02516
02517 }
02518
02519 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
02520 {
02521 SQUserPointer data;
02522 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02523 sq_throwerror(vm, _SC("'stop' called without instance"));
02524 return SQ_ERROR;
02525 }
02526 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02527
02528 try {
02529 _this->stop();
02530
02531 return 0;
02532
02533 } catch(std::exception& e) {
02534 sq_throwerror(vm, e.what());
02535 return SQ_ERROR;
02536 } catch(...) {
02537 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
02538 return SQ_ERROR;
02539 }
02540
02541 }
02542
02543 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
02544 {
02545 SQUserPointer data;
02546 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02547 sq_throwerror(vm, _SC("'thunder' called without instance"));
02548 return SQ_ERROR;
02549 }
02550 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02551
02552 try {
02553 _this->thunder();
02554
02555 return 0;
02556
02557 } catch(std::exception& e) {
02558 sq_throwerror(vm, e.what());
02559 return SQ_ERROR;
02560 } catch(...) {
02561 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
02562 return SQ_ERROR;
02563 }
02564
02565 }
02566
02567 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
02568 {
02569 SQUserPointer data;
02570 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02571 sq_throwerror(vm, _SC("'lightning' called without instance"));
02572 return SQ_ERROR;
02573 }
02574 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02575
02576 try {
02577 _this->lightning();
02578
02579 return 0;
02580
02581 } catch(std::exception& e) {
02582 sq_throwerror(vm, e.what());
02583 return SQ_ERROR;
02584 } catch(...) {
02585 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
02586 return SQ_ERROR;
02587 }
02588
02589 }
02590
02591 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
02592 {
02593 SQUserPointer data;
02594 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02595 sq_throwerror(vm, _SC("'flash' called without instance"));
02596 return SQ_ERROR;
02597 }
02598 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02599
02600 try {
02601 _this->flash();
02602
02603 return 0;
02604
02605 } catch(std::exception& e) {
02606 sq_throwerror(vm, e.what());
02607 return SQ_ERROR;
02608 } catch(...) {
02609 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
02610 return SQ_ERROR;
02611 }
02612
02613 }
02614
02615 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
02616 {
02617 SQUserPointer data;
02618 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02619 sq_throwerror(vm, _SC("'electrify' called without instance"));
02620 return SQ_ERROR;
02621 }
02622 scripting::Thunderstorm* _this = reinterpret_cast<scripting::Thunderstorm*> (data);
02623
02624 try {
02625 _this->electrify();
02626
02627 return 0;
02628
02629 } catch(std::exception& e) {
02630 sq_throwerror(vm, e.what());
02631 return SQ_ERROR;
02632 } catch(...) {
02633 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
02634 return SQ_ERROR;
02635 }
02636
02637 }
02638
02639 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
02640 {
02641 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (ptr);
02642 delete _this;
02643 return 0;
02644 }
02645
02646 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
02647 {
02648 SQUserPointer data;
02649 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02650 sq_throwerror(vm, _SC("'goto_node' called without instance"));
02651 return SQ_ERROR;
02652 }
02653 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02654 SQInteger arg0;
02655 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
02656 sq_throwerror(vm, _SC("Argument 1 not an integer"));
02657 return SQ_ERROR;
02658 }
02659
02660 try {
02661 _this->goto_node(static_cast<int> (arg0));
02662
02663 return 0;
02664
02665 } catch(std::exception& e) {
02666 sq_throwerror(vm, e.what());
02667 return SQ_ERROR;
02668 } catch(...) {
02669 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
02670 return SQ_ERROR;
02671 }
02672
02673 }
02674
02675 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
02676 {
02677 SQUserPointer data;
02678 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02679 sq_throwerror(vm, _SC("'start_moving' called without instance"));
02680 return SQ_ERROR;
02681 }
02682 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02683
02684 try {
02685 _this->start_moving();
02686
02687 return 0;
02688
02689 } catch(std::exception& e) {
02690 sq_throwerror(vm, e.what());
02691 return SQ_ERROR;
02692 } catch(...) {
02693 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
02694 return SQ_ERROR;
02695 }
02696
02697 }
02698
02699 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
02700 {
02701 SQUserPointer data;
02702 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02703 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
02704 return SQ_ERROR;
02705 }
02706 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02707
02708 try {
02709 _this->stop_moving();
02710
02711 return 0;
02712
02713 } catch(std::exception& e) {
02714 sq_throwerror(vm, e.what());
02715 return SQ_ERROR;
02716 } catch(...) {
02717 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
02718 return SQ_ERROR;
02719 }
02720
02721 }
02722
02723 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
02724 {
02725 SQUserPointer data;
02726 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02727 sq_throwerror(vm, _SC("'fade' called without instance"));
02728 return SQ_ERROR;
02729 }
02730 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02731 SQFloat arg0;
02732 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02733 sq_throwerror(vm, _SC("Argument 1 not a float"));
02734 return SQ_ERROR;
02735 }
02736 SQFloat arg1;
02737 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
02738 sq_throwerror(vm, _SC("Argument 2 not a float"));
02739 return SQ_ERROR;
02740 }
02741
02742 try {
02743 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
02744
02745 return 0;
02746
02747 } catch(std::exception& e) {
02748 sq_throwerror(vm, e.what());
02749 return SQ_ERROR;
02750 } catch(...) {
02751 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
02752 return SQ_ERROR;
02753 }
02754
02755 }
02756
02757 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
02758 {
02759 SQUserPointer data;
02760 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02761 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
02762 return SQ_ERROR;
02763 }
02764 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02765 SQFloat arg0;
02766 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
02767 sq_throwerror(vm, _SC("Argument 1 not a float"));
02768 return SQ_ERROR;
02769 }
02770
02771 try {
02772 _this->set_alpha(static_cast<float> (arg0));
02773
02774 return 0;
02775
02776 } catch(std::exception& e) {
02777 sq_throwerror(vm, e.what());
02778 return SQ_ERROR;
02779 } catch(...) {
02780 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
02781 return SQ_ERROR;
02782 }
02783
02784 }
02785
02786 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
02787 {
02788 SQUserPointer data;
02789 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02790 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
02791 return SQ_ERROR;
02792 }
02793 scripting::TileMap* _this = reinterpret_cast<scripting::TileMap*> (data);
02794
02795 try {
02796 float return_value = _this->get_alpha();
02797
02798 sq_pushfloat(vm, return_value);
02799 return 1;
02800
02801 } catch(std::exception& e) {
02802 sq_throwerror(vm, e.what());
02803 return SQ_ERROR;
02804 } catch(...) {
02805 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
02806 return SQ_ERROR;
02807 }
02808
02809 }
02810
02811 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
02812 {
02813 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (ptr);
02814 delete _this;
02815 return 0;
02816 }
02817
02818 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
02819 {
02820 SQUserPointer data;
02821 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02822 sq_throwerror(vm, _SC("'goto_node' called without instance"));
02823 return SQ_ERROR;
02824 }
02825 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
02826 SQInteger arg0;
02827 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
02828 sq_throwerror(vm, _SC("Argument 1 not an integer"));
02829 return SQ_ERROR;
02830 }
02831
02832 try {
02833 _this->goto_node(static_cast<int> (arg0));
02834
02835 return 0;
02836
02837 } catch(std::exception& e) {
02838 sq_throwerror(vm, e.what());
02839 return SQ_ERROR;
02840 } catch(...) {
02841 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
02842 return SQ_ERROR;
02843 }
02844
02845 }
02846
02847 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
02848 {
02849 SQUserPointer data;
02850 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02851 sq_throwerror(vm, _SC("'set_state' called without instance"));
02852 return SQ_ERROR;
02853 }
02854 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
02855 const SQChar* arg0;
02856 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
02857 sq_throwerror(vm, _SC("Argument 1 not a string"));
02858 return SQ_ERROR;
02859 }
02860
02861 try {
02862 _this->set_state(arg0);
02863
02864 return 0;
02865
02866 } catch(std::exception& e) {
02867 sq_throwerror(vm, e.what());
02868 return SQ_ERROR;
02869 } catch(...) {
02870 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
02871 return SQ_ERROR;
02872 }
02873
02874 }
02875
02876 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
02877 {
02878 SQUserPointer data;
02879 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02880 sq_throwerror(vm, _SC("'start_moving' called without instance"));
02881 return SQ_ERROR;
02882 }
02883 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
02884
02885 try {
02886 _this->start_moving();
02887
02888 return 0;
02889
02890 } catch(std::exception& e) {
02891 sq_throwerror(vm, e.what());
02892 return SQ_ERROR;
02893 } catch(...) {
02894 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
02895 return SQ_ERROR;
02896 }
02897
02898 }
02899
02900 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
02901 {
02902 SQUserPointer data;
02903 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02904 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
02905 return SQ_ERROR;
02906 }
02907 scripting::WillOWisp* _this = reinterpret_cast<scripting::WillOWisp*> (data);
02908
02909 try {
02910 _this->stop_moving();
02911
02912 return 0;
02913
02914 } catch(std::exception& e) {
02915 sq_throwerror(vm, e.what());
02916 return SQ_ERROR;
02917 } catch(...) {
02918 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
02919 return SQ_ERROR;
02920 }
02921
02922 }
02923
02924 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
02925 {
02926 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (ptr);
02927 delete _this;
02928 return 0;
02929 }
02930
02931 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
02932 {
02933 SQUserPointer data;
02934 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02935 sq_throwerror(vm, _SC("'start' called without instance"));
02936 return SQ_ERROR;
02937 }
02938 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
02939
02940 try {
02941 _this->start();
02942
02943 return 0;
02944
02945 } catch(std::exception& e) {
02946 sq_throwerror(vm, e.what());
02947 return SQ_ERROR;
02948 } catch(...) {
02949 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
02950 return SQ_ERROR;
02951 }
02952
02953 }
02954
02955 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
02956 {
02957 SQUserPointer data;
02958 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0)) || !data) {
02959 sq_throwerror(vm, _SC("'stop' called without instance"));
02960 return SQ_ERROR;
02961 }
02962 scripting::Wind* _this = reinterpret_cast<scripting::Wind*> (data);
02963
02964 try {
02965 _this->stop();
02966
02967 return 0;
02968
02969 } catch(std::exception& e) {
02970 sq_throwerror(vm, e.what());
02971 return SQ_ERROR;
02972 } catch(...) {
02973 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
02974 return SQ_ERROR;
02975 }
02976
02977 }
02978
02979 static SQInteger display_wrapper(HSQUIRRELVM vm)
02980 {
02981 return scripting::display(vm);
02982 }
02983
02984 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
02985 {
02986 HSQUIRRELVM arg0 = vm;
02987
02988 try {
02989 scripting::print_stacktrace(arg0);
02990
02991 return 0;
02992
02993 } catch(std::exception& e) {
02994 sq_throwerror(vm, e.what());
02995 return SQ_ERROR;
02996 } catch(...) {
02997 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
02998 return SQ_ERROR;
02999 }
03000
03001 }
03002
03003 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
03004 {
03005 return scripting::get_current_thread(vm);
03006 }
03007
03008 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
03009 {
03010 const SQChar* arg0;
03011 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03012 sq_throwerror(vm, _SC("Argument 1 not a string"));
03013 return SQ_ERROR;
03014 }
03015
03016 try {
03017 scripting::display_text_file(arg0);
03018
03019 return 0;
03020
03021 } catch(std::exception& e) {
03022 sq_throwerror(vm, e.what());
03023 return SQ_ERROR;
03024 } catch(...) {
03025 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
03026 return SQ_ERROR;
03027 }
03028
03029 }
03030
03031 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
03032 {
03033 const SQChar* arg0;
03034 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03035 sq_throwerror(vm, _SC("Argument 1 not a string"));
03036 return SQ_ERROR;
03037 }
03038
03039 try {
03040 scripting::load_worldmap(arg0);
03041
03042 return 0;
03043
03044 } catch(std::exception& e) {
03045 sq_throwerror(vm, e.what());
03046 return SQ_ERROR;
03047 } catch(...) {
03048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
03049 return SQ_ERROR;
03050 }
03051
03052 }
03053
03054 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
03055 {
03056 const SQChar* arg0;
03057 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03058 sq_throwerror(vm, _SC("Argument 1 not a string"));
03059 return SQ_ERROR;
03060 }
03061
03062 try {
03063 scripting::load_level(arg0);
03064
03065 return 0;
03066
03067 } catch(std::exception& e) {
03068 sq_throwerror(vm, e.what());
03069 return SQ_ERROR;
03070 } catch(...) {
03071 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
03072 return SQ_ERROR;
03073 }
03074
03075 }
03076
03077 static SQInteger wait_wrapper(HSQUIRRELVM vm)
03078 {
03079 HSQUIRRELVM arg0 = vm;
03080 SQFloat arg1;
03081 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
03082 sq_throwerror(vm, _SC("Argument 1 not a float"));
03083 return SQ_ERROR;
03084 }
03085
03086 try {
03087 scripting::wait(arg0, static_cast<float> (arg1));
03088
03089 return sq_suspendvm(vm);
03090
03091 } catch(std::exception& e) {
03092 sq_throwerror(vm, e.what());
03093 return SQ_ERROR;
03094 } catch(...) {
03095 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
03096 return SQ_ERROR;
03097 }
03098
03099 }
03100
03101 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
03102 {
03103 HSQUIRRELVM arg0 = vm;
03104
03105 try {
03106 scripting::wait_for_screenswitch(arg0);
03107
03108 return sq_suspendvm(vm);
03109
03110 } catch(std::exception& e) {
03111 sq_throwerror(vm, e.what());
03112 return SQ_ERROR;
03113 } catch(...) {
03114 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
03115 return SQ_ERROR;
03116 }
03117
03118 }
03119
03120 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
03121 {
03122 (void) vm;
03123
03124 try {
03125 scripting::exit_screen();
03126
03127 return 0;
03128
03129 } catch(std::exception& e) {
03130 sq_throwerror(vm, e.what());
03131 return SQ_ERROR;
03132 } catch(...) {
03133 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
03134 return SQ_ERROR;
03135 }
03136
03137 }
03138
03139 static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm)
03140 {
03141 SQFloat arg0;
03142 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
03143 sq_throwerror(vm, _SC("Argument 1 not a float"));
03144 return SQ_ERROR;
03145 }
03146
03147 try {
03148 scripting::fadeout_screen(static_cast<float> (arg0));
03149
03150 return 0;
03151
03152 } catch(std::exception& e) {
03153 sq_throwerror(vm, e.what());
03154 return SQ_ERROR;
03155 } catch(...) {
03156 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'"));
03157 return SQ_ERROR;
03158 }
03159
03160 }
03161
03162 static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm)
03163 {
03164 SQFloat arg0;
03165 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
03166 sq_throwerror(vm, _SC("Argument 1 not a float"));
03167 return SQ_ERROR;
03168 }
03169 SQFloat arg1;
03170 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
03171 sq_throwerror(vm, _SC("Argument 2 not a float"));
03172 return SQ_ERROR;
03173 }
03174 SQFloat arg2;
03175 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
03176 sq_throwerror(vm, _SC("Argument 3 not a float"));
03177 return SQ_ERROR;
03178 }
03179
03180 try {
03181 scripting::shrink_screen(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
03182
03183 return 0;
03184
03185 } catch(std::exception& e) {
03186 sq_throwerror(vm, e.what());
03187 return SQ_ERROR;
03188 } catch(...) {
03189 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'"));
03190 return SQ_ERROR;
03191 }
03192
03193 }
03194
03195 static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm)
03196 {
03197 (void) vm;
03198
03199 try {
03200 scripting::abort_screenfade();
03201
03202 return 0;
03203
03204 } catch(std::exception& e) {
03205 sq_throwerror(vm, e.what());
03206 return SQ_ERROR;
03207 } catch(...) {
03208 sq_throwerror(vm, _SC("Unexpected exception while executing function 'abort_screenfade'"));
03209 return SQ_ERROR;
03210 }
03211
03212 }
03213
03214 static SQInteger translate_wrapper(HSQUIRRELVM vm)
03215 {
03216 const SQChar* arg0;
03217 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03218 sq_throwerror(vm, _SC("Argument 1 not a string"));
03219 return SQ_ERROR;
03220 }
03221
03222 try {
03223 std::string return_value = scripting::translate(arg0);
03224
03225 sq_pushstring(vm, return_value.c_str(), return_value.size());
03226 return 1;
03227
03228 } catch(std::exception& e) {
03229 sq_throwerror(vm, e.what());
03230 return SQ_ERROR;
03231 } catch(...) {
03232 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
03233 return SQ_ERROR;
03234 }
03235
03236 }
03237
03238 static SQInteger import_wrapper(HSQUIRRELVM vm)
03239 {
03240 HSQUIRRELVM arg0 = vm;
03241 const SQChar* arg1;
03242 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
03243 sq_throwerror(vm, _SC("Argument 1 not a string"));
03244 return SQ_ERROR;
03245 }
03246
03247 try {
03248 scripting::import(arg0, arg1);
03249
03250 return 0;
03251
03252 } catch(std::exception& e) {
03253 sq_throwerror(vm, e.what());
03254 return SQ_ERROR;
03255 } catch(...) {
03256 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
03257 return SQ_ERROR;
03258 }
03259
03260 }
03261
03262 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
03263 {
03264 (void) vm;
03265
03266 try {
03267 scripting::save_state();
03268
03269 return 0;
03270
03271 } catch(std::exception& e) {
03272 sq_throwerror(vm, e.what());
03273 return SQ_ERROR;
03274 } catch(...) {
03275 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
03276 return SQ_ERROR;
03277 }
03278
03279 }
03280
03281 static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm)
03282 {
03283 (void) vm;
03284
03285 try {
03286 scripting::update_worldmap();
03287
03288 return 0;
03289
03290 } catch(std::exception& e) {
03291 sq_throwerror(vm, e.what());
03292 return SQ_ERROR;
03293 } catch(...) {
03294 sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'"));
03295 return SQ_ERROR;
03296 }
03297
03298 }
03299
03300 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
03301 {
03302 SQBool arg0;
03303 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03304 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03305 return SQ_ERROR;
03306 }
03307
03308 try {
03309 scripting::debug_collrects(arg0 == SQTrue);
03310
03311 return 0;
03312
03313 } catch(std::exception& e) {
03314 sq_throwerror(vm, e.what());
03315 return SQ_ERROR;
03316 } catch(...) {
03317 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
03318 return SQ_ERROR;
03319 }
03320
03321 }
03322
03323 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
03324 {
03325 SQBool arg0;
03326 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03327 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03328 return SQ_ERROR;
03329 }
03330
03331 try {
03332 scripting::debug_show_fps(arg0 == SQTrue);
03333
03334 return 0;
03335
03336 } catch(std::exception& e) {
03337 sq_throwerror(vm, e.what());
03338 return SQ_ERROR;
03339 } catch(...) {
03340 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
03341 return SQ_ERROR;
03342 }
03343
03344 }
03345
03346 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
03347 {
03348 SQBool arg0;
03349 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03350 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03351 return SQ_ERROR;
03352 }
03353
03354 try {
03355 scripting::debug_draw_solids_only(arg0 == SQTrue);
03356
03357 return 0;
03358
03359 } catch(std::exception& e) {
03360 sq_throwerror(vm, e.what());
03361 return SQ_ERROR;
03362 } catch(...) {
03363 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
03364 return SQ_ERROR;
03365 }
03366
03367 }
03368
03369 static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm)
03370 {
03371 SQBool arg0;
03372 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03373 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03374 return SQ_ERROR;
03375 }
03376
03377 try {
03378 scripting::debug_draw_editor_images(arg0 == SQTrue);
03379
03380 return 0;
03381
03382 } catch(std::exception& e) {
03383 sq_throwerror(vm, e.what());
03384 return SQ_ERROR;
03385 } catch(...) {
03386 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'"));
03387 return SQ_ERROR;
03388 }
03389
03390 }
03391
03392 static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm)
03393 {
03394 SQBool arg0;
03395 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03396 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03397 return SQ_ERROR;
03398 }
03399
03400 try {
03401 scripting::debug_worldmap_ghost(arg0 == SQTrue);
03402
03403 return 0;
03404
03405 } catch(std::exception& e) {
03406 sq_throwerror(vm, e.what());
03407 return SQ_ERROR;
03408 } catch(...) {
03409 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_worldmap_ghost'"));
03410 return SQ_ERROR;
03411 }
03412
03413 }
03414
03415 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
03416 {
03417 const SQChar* arg0;
03418 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03419 sq_throwerror(vm, _SC("Argument 1 not a string"));
03420 return SQ_ERROR;
03421 }
03422
03423 try {
03424 scripting::play_music(arg0);
03425
03426 return 0;
03427
03428 } catch(std::exception& e) {
03429 sq_throwerror(vm, e.what());
03430 return SQ_ERROR;
03431 } catch(...) {
03432 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
03433 return SQ_ERROR;
03434 }
03435
03436 }
03437
03438 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
03439 {
03440 const SQChar* arg0;
03441 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03442 sq_throwerror(vm, _SC("Argument 1 not a string"));
03443 return SQ_ERROR;
03444 }
03445
03446 try {
03447 scripting::play_sound(arg0);
03448
03449 return 0;
03450
03451 } catch(std::exception& e) {
03452 sq_throwerror(vm, e.what());
03453 return SQ_ERROR;
03454 } catch(...) {
03455 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
03456 return SQ_ERROR;
03457 }
03458
03459 }
03460
03461 static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm)
03462 {
03463 SQFloat arg0;
03464 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
03465 sq_throwerror(vm, _SC("Argument 1 not a float"));
03466 return SQ_ERROR;
03467 }
03468
03469 try {
03470 scripting::set_game_speed(static_cast<float> (arg0));
03471
03472 return 0;
03473
03474 } catch(std::exception& e) {
03475 sq_throwerror(vm, e.what());
03476 return SQ_ERROR;
03477 } catch(...) {
03478 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'"));
03479 return SQ_ERROR;
03480 }
03481
03482 }
03483
03484 static SQInteger grease_wrapper(HSQUIRRELVM vm)
03485 {
03486 (void) vm;
03487
03488 try {
03489 scripting::grease();
03490
03491 return 0;
03492
03493 } catch(std::exception& e) {
03494 sq_throwerror(vm, e.what());
03495 return SQ_ERROR;
03496 } catch(...) {
03497 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
03498 return SQ_ERROR;
03499 }
03500
03501 }
03502
03503 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
03504 {
03505 (void) vm;
03506
03507 try {
03508 scripting::invincible();
03509
03510 return 0;
03511
03512 } catch(std::exception& e) {
03513 sq_throwerror(vm, e.what());
03514 return SQ_ERROR;
03515 } catch(...) {
03516 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
03517 return SQ_ERROR;
03518 }
03519
03520 }
03521
03522 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
03523 {
03524 (void) vm;
03525
03526 try {
03527 scripting::ghost();
03528
03529 return 0;
03530
03531 } catch(std::exception& e) {
03532 sq_throwerror(vm, e.what());
03533 return SQ_ERROR;
03534 } catch(...) {
03535 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
03536 return SQ_ERROR;
03537 }
03538
03539 }
03540
03541 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
03542 {
03543 (void) vm;
03544
03545 try {
03546 scripting::mortal();
03547
03548 return 0;
03549
03550 } catch(std::exception& e) {
03551 sq_throwerror(vm, e.what());
03552 return SQ_ERROR;
03553 } catch(...) {
03554 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
03555 return SQ_ERROR;
03556 }
03557
03558 }
03559
03560 static SQInteger restart_wrapper(HSQUIRRELVM vm)
03561 {
03562 (void) vm;
03563
03564 try {
03565 scripting::restart();
03566
03567 return 0;
03568
03569 } catch(std::exception& e) {
03570 sq_throwerror(vm, e.what());
03571 return SQ_ERROR;
03572 } catch(...) {
03573 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
03574 return SQ_ERROR;
03575 }
03576
03577 }
03578
03579 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
03580 {
03581 (void) vm;
03582
03583 try {
03584 scripting::whereami();
03585
03586 return 0;
03587
03588 } catch(std::exception& e) {
03589 sq_throwerror(vm, e.what());
03590 return SQ_ERROR;
03591 } catch(...) {
03592 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
03593 return SQ_ERROR;
03594 }
03595
03596 }
03597
03598 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
03599 {
03600 (void) vm;
03601
03602 try {
03603 scripting::gotoend();
03604
03605 return 0;
03606
03607 } catch(std::exception& e) {
03608 sq_throwerror(vm, e.what());
03609 return SQ_ERROR;
03610 } catch(...) {
03611 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
03612 return SQ_ERROR;
03613 }
03614
03615 }
03616
03617 static SQInteger camera_wrapper(HSQUIRRELVM vm)
03618 {
03619 (void) vm;
03620
03621 try {
03622 scripting::camera();
03623
03624 return 0;
03625
03626 } catch(std::exception& e) {
03627 sq_throwerror(vm, e.what());
03628 return SQ_ERROR;
03629 } catch(...) {
03630 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
03631 return SQ_ERROR;
03632 }
03633
03634 }
03635
03636 static SQInteger set_gamma_wrapper(HSQUIRRELVM vm)
03637 {
03638 SQFloat arg0;
03639 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
03640 sq_throwerror(vm, _SC("Argument 1 not a float"));
03641 return SQ_ERROR;
03642 }
03643
03644 try {
03645 scripting::set_gamma(static_cast<float> (arg0));
03646
03647 return 0;
03648
03649 } catch(std::exception& e) {
03650 sq_throwerror(vm, e.what());
03651 return SQ_ERROR;
03652 } catch(...) {
03653 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'"));
03654 return SQ_ERROR;
03655 }
03656
03657 }
03658
03659 static SQInteger quit_wrapper(HSQUIRRELVM vm)
03660 {
03661 (void) vm;
03662
03663 try {
03664 scripting::quit();
03665
03666 return 0;
03667
03668 } catch(std::exception& e) {
03669 sq_throwerror(vm, e.what());
03670 return SQ_ERROR;
03671 } catch(...) {
03672 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
03673 return SQ_ERROR;
03674 }
03675
03676 }
03677
03678 static SQInteger rand_wrapper(HSQUIRRELVM vm)
03679 {
03680
03681 try {
03682 int return_value = scripting::rand();
03683
03684 sq_pushinteger(vm, return_value);
03685 return 1;
03686
03687 } catch(std::exception& e) {
03688 sq_throwerror(vm, e.what());
03689 return SQ_ERROR;
03690 } catch(...) {
03691 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
03692 return SQ_ERROR;
03693 }
03694
03695 }
03696
03697 static SQInteger record_demo_wrapper(HSQUIRRELVM vm)
03698 {
03699 const SQChar* arg0;
03700 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03701 sq_throwerror(vm, _SC("Argument 1 not a string"));
03702 return SQ_ERROR;
03703 }
03704
03705 try {
03706 scripting::record_demo(arg0);
03707
03708 return 0;
03709
03710 } catch(std::exception& e) {
03711 sq_throwerror(vm, e.what());
03712 return SQ_ERROR;
03713 } catch(...) {
03714 sq_throwerror(vm, _SC("Unexpected exception while executing function 'record_demo'"));
03715 return SQ_ERROR;
03716 }
03717
03718 }
03719
03720 static SQInteger play_demo_wrapper(HSQUIRRELVM vm)
03721 {
03722 const SQChar* arg0;
03723 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03724 sq_throwerror(vm, _SC("Argument 1 not a string"));
03725 return SQ_ERROR;
03726 }
03727
03728 try {
03729 scripting::play_demo(arg0);
03730
03731 return 0;
03732
03733 } catch(std::exception& e) {
03734 sq_throwerror(vm, e.what());
03735 return SQ_ERROR;
03736 } catch(...) {
03737 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_demo'"));
03738 return SQ_ERROR;
03739 }
03740
03741 }
03742
03743 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
03744 {
03745 SQBool arg0;
03746 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03747 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03748 return SQ_ERROR;
03749 }
03750
03751 try {
03752 scripting::Level_finish(arg0 == SQTrue);
03753
03754 return 0;
03755
03756 } catch(std::exception& e) {
03757 sq_throwerror(vm, e.what());
03758 return SQ_ERROR;
03759 } catch(...) {
03760 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_finish'"));
03761 return SQ_ERROR;
03762 }
03763
03764 }
03765
03766 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
03767 {
03768 const SQChar* arg0;
03769 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
03770 sq_throwerror(vm, _SC("Argument 1 not a string"));
03771 return SQ_ERROR;
03772 }
03773 const SQChar* arg1;
03774 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
03775 sq_throwerror(vm, _SC("Argument 2 not a string"));
03776 return SQ_ERROR;
03777 }
03778
03779 try {
03780 scripting::Level_spawn(arg0, arg1);
03781
03782 return 0;
03783
03784 } catch(std::exception& e) {
03785 sq_throwerror(vm, e.what());
03786 return SQ_ERROR;
03787 } catch(...) {
03788 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn'"));
03789 return SQ_ERROR;
03790 }
03791
03792 }
03793
03794 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
03795 {
03796 (void) vm;
03797
03798 try {
03799 scripting::Level_flip_vertically();
03800
03801 return 0;
03802
03803 } catch(std::exception& e) {
03804 sq_throwerror(vm, e.what());
03805 return SQ_ERROR;
03806 } catch(...) {
03807 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_flip_vertically'"));
03808 return SQ_ERROR;
03809 }
03810
03811 }
03812
03813 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
03814 {
03815 (void) vm;
03816
03817 try {
03818 scripting::Level_toggle_pause();
03819
03820 return 0;
03821
03822 } catch(std::exception& e) {
03823 sq_throwerror(vm, e.what());
03824 return SQ_ERROR;
03825 } catch(...) {
03826 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_toggle_pause'"));
03827 return SQ_ERROR;
03828 }
03829
03830 }
03831
03832 static SQInteger Level_edit_wrapper(HSQUIRRELVM vm)
03833 {
03834 SQBool arg0;
03835 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
03836 sq_throwerror(vm, _SC("Argument 1 not a bool"));
03837 return SQ_ERROR;
03838 }
03839
03840 try {
03841 scripting::Level_edit(arg0 == SQTrue);
03842
03843 return 0;
03844
03845 } catch(std::exception& e) {
03846 sq_throwerror(vm, e.what());
03847 return SQ_ERROR;
03848 } catch(...) {
03849 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_edit'"));
03850 return SQ_ERROR;
03851 }
03852
03853 }
03854
03855 }
03856 void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook)
03857 {
03858 using namespace wrapper;
03859
03860 sq_pushroottable(v);
03861 sq_pushstring(v, "AmbientSound", -1);
03862 if(SQ_FAILED(sq_get(v, -2))) {
03863 std::ostringstream msg;
03864 msg << "Couldn't resolved squirrel type 'AmbientSound'";
03865 throw SquirrelError(v, msg.str());
03866 }
03867
03868 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03869 std::ostringstream msg;
03870 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
03871 throw SquirrelError(v, msg.str());
03872 }
03873 sq_remove(v, -2);
03874
03875 if(setup_releasehook) {
03876 sq_setreleasehook(v, -1, AmbientSound_release_hook);
03877 }
03878
03879 sq_remove(v, -2);
03880 }
03881
03882 void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook)
03883 {
03884 using namespace wrapper;
03885
03886 sq_pushroottable(v);
03887 sq_pushstring(v, "Camera", -1);
03888 if(SQ_FAILED(sq_get(v, -2))) {
03889 std::ostringstream msg;
03890 msg << "Couldn't resolved squirrel type 'Camera'";
03891 throw SquirrelError(v, msg.str());
03892 }
03893
03894 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03895 std::ostringstream msg;
03896 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
03897 throw SquirrelError(v, msg.str());
03898 }
03899 sq_remove(v, -2);
03900
03901 if(setup_releasehook) {
03902 sq_setreleasehook(v, -1, Camera_release_hook);
03903 }
03904
03905 sq_remove(v, -2);
03906 }
03907
03908 void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook)
03909 {
03910 using namespace wrapper;
03911
03912 sq_pushroottable(v);
03913 sq_pushstring(v, "Candle", -1);
03914 if(SQ_FAILED(sq_get(v, -2))) {
03915 std::ostringstream msg;
03916 msg << "Couldn't resolved squirrel type 'Candle'";
03917 throw SquirrelError(v, msg.str());
03918 }
03919
03920 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03921 std::ostringstream msg;
03922 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
03923 throw SquirrelError(v, msg.str());
03924 }
03925 sq_remove(v, -2);
03926
03927 if(setup_releasehook) {
03928 sq_setreleasehook(v, -1, Candle_release_hook);
03929 }
03930
03931 sq_remove(v, -2);
03932 }
03933
03934 void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook)
03935 {
03936 using namespace wrapper;
03937
03938 sq_pushroottable(v);
03939 sq_pushstring(v, "DisplayEffect", -1);
03940 if(SQ_FAILED(sq_get(v, -2))) {
03941 std::ostringstream msg;
03942 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
03943 throw SquirrelError(v, msg.str());
03944 }
03945
03946 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03947 std::ostringstream msg;
03948 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
03949 throw SquirrelError(v, msg.str());
03950 }
03951 sq_remove(v, -2);
03952
03953 if(setup_releasehook) {
03954 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
03955 }
03956
03957 sq_remove(v, -2);
03958 }
03959
03960 void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook)
03961 {
03962 using namespace wrapper;
03963
03964 sq_pushroottable(v);
03965 sq_pushstring(v, "FloatingImage", -1);
03966 if(SQ_FAILED(sq_get(v, -2))) {
03967 std::ostringstream msg;
03968 msg << "Couldn't resolved squirrel type 'FloatingImage'";
03969 throw SquirrelError(v, msg.str());
03970 }
03971
03972 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03973 std::ostringstream msg;
03974 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
03975 throw SquirrelError(v, msg.str());
03976 }
03977 sq_remove(v, -2);
03978
03979 if(setup_releasehook) {
03980 sq_setreleasehook(v, -1, FloatingImage_release_hook);
03981 }
03982
03983 sq_remove(v, -2);
03984 }
03985
03986 void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook)
03987 {
03988 using namespace wrapper;
03989
03990 sq_pushroottable(v);
03991 sq_pushstring(v, "LevelTime", -1);
03992 if(SQ_FAILED(sq_get(v, -2))) {
03993 std::ostringstream msg;
03994 msg << "Couldn't resolved squirrel type 'LevelTime'";
03995 throw SquirrelError(v, msg.str());
03996 }
03997
03998 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
03999 std::ostringstream msg;
04000 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
04001 throw SquirrelError(v, msg.str());
04002 }
04003 sq_remove(v, -2);
04004
04005 if(setup_releasehook) {
04006 sq_setreleasehook(v, -1, LevelTime_release_hook);
04007 }
04008
04009 sq_remove(v, -2);
04010 }
04011
04012 void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook)
04013 {
04014 using namespace wrapper;
04015
04016 sq_pushroottable(v);
04017 sq_pushstring(v, "Platform", -1);
04018 if(SQ_FAILED(sq_get(v, -2))) {
04019 std::ostringstream msg;
04020 msg << "Couldn't resolved squirrel type 'Platform'";
04021 throw SquirrelError(v, msg.str());
04022 }
04023
04024 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04025 std::ostringstream msg;
04026 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
04027 throw SquirrelError(v, msg.str());
04028 }
04029 sq_remove(v, -2);
04030
04031 if(setup_releasehook) {
04032 sq_setreleasehook(v, -1, Platform_release_hook);
04033 }
04034
04035 sq_remove(v, -2);
04036 }
04037
04038 void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook)
04039 {
04040 using namespace wrapper;
04041
04042 sq_pushroottable(v);
04043 sq_pushstring(v, "Player", -1);
04044 if(SQ_FAILED(sq_get(v, -2))) {
04045 std::ostringstream msg;
04046 msg << "Couldn't resolved squirrel type 'Player'";
04047 throw SquirrelError(v, msg.str());
04048 }
04049
04050 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04051 std::ostringstream msg;
04052 msg << "Couldn't setup squirrel instance for object of type 'Player'";
04053 throw SquirrelError(v, msg.str());
04054 }
04055 sq_remove(v, -2);
04056
04057 if(setup_releasehook) {
04058 sq_setreleasehook(v, -1, Player_release_hook);
04059 }
04060
04061 sq_remove(v, -2);
04062 }
04063
04064 void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook)
04065 {
04066 using namespace wrapper;
04067
04068 sq_pushroottable(v);
04069 sq_pushstring(v, "ScriptedObject", -1);
04070 if(SQ_FAILED(sq_get(v, -2))) {
04071 std::ostringstream msg;
04072 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
04073 throw SquirrelError(v, msg.str());
04074 }
04075
04076 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04077 std::ostringstream msg;
04078 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
04079 throw SquirrelError(v, msg.str());
04080 }
04081 sq_remove(v, -2);
04082
04083 if(setup_releasehook) {
04084 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
04085 }
04086
04087 sq_remove(v, -2);
04088 }
04089
04090 void create_squirrel_instance(HSQUIRRELVM v, scripting::SSector* object, bool setup_releasehook)
04091 {
04092 using namespace wrapper;
04093
04094 sq_pushroottable(v);
04095 sq_pushstring(v, "SSector", -1);
04096 if(SQ_FAILED(sq_get(v, -2))) {
04097 std::ostringstream msg;
04098 msg << "Couldn't resolved squirrel type 'SSector'";
04099 throw SquirrelError(v, msg.str());
04100 }
04101
04102 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04103 std::ostringstream msg;
04104 msg << "Couldn't setup squirrel instance for object of type 'SSector'";
04105 throw SquirrelError(v, msg.str());
04106 }
04107 sq_remove(v, -2);
04108
04109 if(setup_releasehook) {
04110 sq_setreleasehook(v, -1, SSector_release_hook);
04111 }
04112
04113 sq_remove(v, -2);
04114 }
04115
04116 void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook)
04117 {
04118 using namespace wrapper;
04119
04120 sq_pushroottable(v);
04121 sq_pushstring(v, "Text", -1);
04122 if(SQ_FAILED(sq_get(v, -2))) {
04123 std::ostringstream msg;
04124 msg << "Couldn't resolved squirrel type 'Text'";
04125 throw SquirrelError(v, msg.str());
04126 }
04127
04128 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04129 std::ostringstream msg;
04130 msg << "Couldn't setup squirrel instance for object of type 'Text'";
04131 throw SquirrelError(v, msg.str());
04132 }
04133 sq_remove(v, -2);
04134
04135 if(setup_releasehook) {
04136 sq_setreleasehook(v, -1, Text_release_hook);
04137 }
04138
04139 sq_remove(v, -2);
04140 }
04141
04142 void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook)
04143 {
04144 using namespace wrapper;
04145
04146 sq_pushroottable(v);
04147 sq_pushstring(v, "Thunderstorm", -1);
04148 if(SQ_FAILED(sq_get(v, -2))) {
04149 std::ostringstream msg;
04150 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
04151 throw SquirrelError(v, msg.str());
04152 }
04153
04154 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04155 std::ostringstream msg;
04156 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
04157 throw SquirrelError(v, msg.str());
04158 }
04159 sq_remove(v, -2);
04160
04161 if(setup_releasehook) {
04162 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
04163 }
04164
04165 sq_remove(v, -2);
04166 }
04167
04168 void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook)
04169 {
04170 using namespace wrapper;
04171
04172 sq_pushroottable(v);
04173 sq_pushstring(v, "TileMap", -1);
04174 if(SQ_FAILED(sq_get(v, -2))) {
04175 std::ostringstream msg;
04176 msg << "Couldn't resolved squirrel type 'TileMap'";
04177 throw SquirrelError(v, msg.str());
04178 }
04179
04180 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04181 std::ostringstream msg;
04182 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
04183 throw SquirrelError(v, msg.str());
04184 }
04185 sq_remove(v, -2);
04186
04187 if(setup_releasehook) {
04188 sq_setreleasehook(v, -1, TileMap_release_hook);
04189 }
04190
04191 sq_remove(v, -2);
04192 }
04193
04194 void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook)
04195 {
04196 using namespace wrapper;
04197
04198 sq_pushroottable(v);
04199 sq_pushstring(v, "WillOWisp", -1);
04200 if(SQ_FAILED(sq_get(v, -2))) {
04201 std::ostringstream msg;
04202 msg << "Couldn't resolved squirrel type 'WillOWisp'";
04203 throw SquirrelError(v, msg.str());
04204 }
04205
04206 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04207 std::ostringstream msg;
04208 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
04209 throw SquirrelError(v, msg.str());
04210 }
04211 sq_remove(v, -2);
04212
04213 if(setup_releasehook) {
04214 sq_setreleasehook(v, -1, WillOWisp_release_hook);
04215 }
04216
04217 sq_remove(v, -2);
04218 }
04219
04220 void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook)
04221 {
04222 using namespace wrapper;
04223
04224 sq_pushroottable(v);
04225 sq_pushstring(v, "Wind", -1);
04226 if(SQ_FAILED(sq_get(v, -2))) {
04227 std::ostringstream msg;
04228 msg << "Couldn't resolved squirrel type 'Wind'";
04229 throw SquirrelError(v, msg.str());
04230 }
04231
04232 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
04233 std::ostringstream msg;
04234 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
04235 throw SquirrelError(v, msg.str());
04236 }
04237 sq_remove(v, -2);
04238
04239 if(setup_releasehook) {
04240 sq_setreleasehook(v, -1, Wind_release_hook);
04241 }
04242
04243 sq_remove(v, -2);
04244 }
04245
04246 void register_supertux_wrapper(HSQUIRRELVM v)
04247 {
04248 using namespace wrapper;
04249
04250 sq_pushstring(v, "ANCHOR_TOP", -1);
04251 sq_pushinteger(v, 16);
04252 if(SQ_FAILED(sq_createslot(v, -3))) {
04253 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
04254 }
04255
04256 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
04257 sq_pushinteger(v, 32);
04258 if(SQ_FAILED(sq_createslot(v, -3))) {
04259 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
04260 }
04261
04262 sq_pushstring(v, "ANCHOR_LEFT", -1);
04263 sq_pushinteger(v, 1);
04264 if(SQ_FAILED(sq_createslot(v, -3))) {
04265 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
04266 }
04267
04268 sq_pushstring(v, "ANCHOR_RIGHT", -1);
04269 sq_pushinteger(v, 2);
04270 if(SQ_FAILED(sq_createslot(v, -3))) {
04271 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
04272 }
04273
04274 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
04275 sq_pushinteger(v, 0);
04276 if(SQ_FAILED(sq_createslot(v, -3))) {
04277 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
04278 }
04279
04280 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
04281 sq_pushinteger(v, 17);
04282 if(SQ_FAILED(sq_createslot(v, -3))) {
04283 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
04284 }
04285
04286 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
04287 sq_pushinteger(v, 18);
04288 if(SQ_FAILED(sq_createslot(v, -3))) {
04289 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
04290 }
04291
04292 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
04293 sq_pushinteger(v, 33);
04294 if(SQ_FAILED(sq_createslot(v, -3))) {
04295 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
04296 }
04297
04298 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
04299 sq_pushinteger(v, 34);
04300 if(SQ_FAILED(sq_createslot(v, -3))) {
04301 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
04302 }
04303
04304 sq_pushstring(v, "display", -1);
04305 sq_newclosure(v, &display_wrapper, 0);
04306 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t.");
04307 if(SQ_FAILED(sq_createslot(v, -3))) {
04308 throw SquirrelError(v, "Couldn't register function 'display'");
04309 }
04310
04311 sq_pushstring(v, "print_stacktrace", -1);
04312 sq_newclosure(v, &print_stacktrace_wrapper, 0);
04313 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04314 if(SQ_FAILED(sq_createslot(v, -3))) {
04315 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
04316 }
04317
04318 sq_pushstring(v, "get_current_thread", -1);
04319 sq_newclosure(v, &get_current_thread_wrapper, 0);
04320 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t");
04321 if(SQ_FAILED(sq_createslot(v, -3))) {
04322 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
04323 }
04324
04325 sq_pushstring(v, "display_text_file", -1);
04326 sq_newclosure(v, &display_text_file_wrapper, 0);
04327 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04328 if(SQ_FAILED(sq_createslot(v, -3))) {
04329 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
04330 }
04331
04332 sq_pushstring(v, "load_worldmap", -1);
04333 sq_newclosure(v, &load_worldmap_wrapper, 0);
04334 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04335 if(SQ_FAILED(sq_createslot(v, -3))) {
04336 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
04337 }
04338
04339 sq_pushstring(v, "load_level", -1);
04340 sq_newclosure(v, &load_level_wrapper, 0);
04341 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04342 if(SQ_FAILED(sq_createslot(v, -3))) {
04343 throw SquirrelError(v, "Couldn't register function 'load_level'");
04344 }
04345
04346 sq_pushstring(v, "wait", -1);
04347 sq_newclosure(v, &wait_wrapper, 0);
04348 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04349 if(SQ_FAILED(sq_createslot(v, -3))) {
04350 throw SquirrelError(v, "Couldn't register function 'wait'");
04351 }
04352
04353 sq_pushstring(v, "wait_for_screenswitch", -1);
04354 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
04355 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04356 if(SQ_FAILED(sq_createslot(v, -3))) {
04357 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
04358 }
04359
04360 sq_pushstring(v, "exit_screen", -1);
04361 sq_newclosure(v, &exit_screen_wrapper, 0);
04362 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04363 if(SQ_FAILED(sq_createslot(v, -3))) {
04364 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
04365 }
04366
04367 sq_pushstring(v, "fadeout_screen", -1);
04368 sq_newclosure(v, &fadeout_screen_wrapper, 0);
04369 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04370 if(SQ_FAILED(sq_createslot(v, -3))) {
04371 throw SquirrelError(v, "Couldn't register function 'fadeout_screen'");
04372 }
04373
04374 sq_pushstring(v, "shrink_screen", -1);
04375 sq_newclosure(v, &shrink_screen_wrapper, 0);
04376 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
04377 if(SQ_FAILED(sq_createslot(v, -3))) {
04378 throw SquirrelError(v, "Couldn't register function 'shrink_screen'");
04379 }
04380
04381 sq_pushstring(v, "abort_screenfade", -1);
04382 sq_newclosure(v, &abort_screenfade_wrapper, 0);
04383 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04384 if(SQ_FAILED(sq_createslot(v, -3))) {
04385 throw SquirrelError(v, "Couldn't register function 'abort_screenfade'");
04386 }
04387
04388 sq_pushstring(v, "translate", -1);
04389 sq_newclosure(v, &translate_wrapper, 0);
04390 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04391 if(SQ_FAILED(sq_createslot(v, -3))) {
04392 throw SquirrelError(v, "Couldn't register function 'translate'");
04393 }
04394
04395 sq_pushstring(v, "import", -1);
04396 sq_newclosure(v, &import_wrapper, 0);
04397 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04398 if(SQ_FAILED(sq_createslot(v, -3))) {
04399 throw SquirrelError(v, "Couldn't register function 'import'");
04400 }
04401
04402 sq_pushstring(v, "save_state", -1);
04403 sq_newclosure(v, &save_state_wrapper, 0);
04404 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04405 if(SQ_FAILED(sq_createslot(v, -3))) {
04406 throw SquirrelError(v, "Couldn't register function 'save_state'");
04407 }
04408
04409 sq_pushstring(v, "update_worldmap", -1);
04410 sq_newclosure(v, &update_worldmap_wrapper, 0);
04411 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04412 if(SQ_FAILED(sq_createslot(v, -3))) {
04413 throw SquirrelError(v, "Couldn't register function 'update_worldmap'");
04414 }
04415
04416 sq_pushstring(v, "debug_collrects", -1);
04417 sq_newclosure(v, &debug_collrects_wrapper, 0);
04418 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04419 if(SQ_FAILED(sq_createslot(v, -3))) {
04420 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
04421 }
04422
04423 sq_pushstring(v, "debug_show_fps", -1);
04424 sq_newclosure(v, &debug_show_fps_wrapper, 0);
04425 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04426 if(SQ_FAILED(sq_createslot(v, -3))) {
04427 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
04428 }
04429
04430 sq_pushstring(v, "debug_draw_solids_only", -1);
04431 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
04432 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04433 if(SQ_FAILED(sq_createslot(v, -3))) {
04434 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
04435 }
04436
04437 sq_pushstring(v, "debug_draw_editor_images", -1);
04438 sq_newclosure(v, &debug_draw_editor_images_wrapper, 0);
04439 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04440 if(SQ_FAILED(sq_createslot(v, -3))) {
04441 throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'");
04442 }
04443
04444 sq_pushstring(v, "debug_worldmap_ghost", -1);
04445 sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0);
04446 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04447 if(SQ_FAILED(sq_createslot(v, -3))) {
04448 throw SquirrelError(v, "Couldn't register function 'debug_worldmap_ghost'");
04449 }
04450
04451 sq_pushstring(v, "play_music", -1);
04452 sq_newclosure(v, &play_music_wrapper, 0);
04453 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04454 if(SQ_FAILED(sq_createslot(v, -3))) {
04455 throw SquirrelError(v, "Couldn't register function 'play_music'");
04456 }
04457
04458 sq_pushstring(v, "play_sound", -1);
04459 sq_newclosure(v, &play_sound_wrapper, 0);
04460 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04461 if(SQ_FAILED(sq_createslot(v, -3))) {
04462 throw SquirrelError(v, "Couldn't register function 'play_sound'");
04463 }
04464
04465 sq_pushstring(v, "set_game_speed", -1);
04466 sq_newclosure(v, &set_game_speed_wrapper, 0);
04467 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04468 if(SQ_FAILED(sq_createslot(v, -3))) {
04469 throw SquirrelError(v, "Couldn't register function 'set_game_speed'");
04470 }
04471
04472 sq_pushstring(v, "grease", -1);
04473 sq_newclosure(v, &grease_wrapper, 0);
04474 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04475 if(SQ_FAILED(sq_createslot(v, -3))) {
04476 throw SquirrelError(v, "Couldn't register function 'grease'");
04477 }
04478
04479 sq_pushstring(v, "invincible", -1);
04480 sq_newclosure(v, &invincible_wrapper, 0);
04481 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04482 if(SQ_FAILED(sq_createslot(v, -3))) {
04483 throw SquirrelError(v, "Couldn't register function 'invincible'");
04484 }
04485
04486 sq_pushstring(v, "ghost", -1);
04487 sq_newclosure(v, &ghost_wrapper, 0);
04488 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04489 if(SQ_FAILED(sq_createslot(v, -3))) {
04490 throw SquirrelError(v, "Couldn't register function 'ghost'");
04491 }
04492
04493 sq_pushstring(v, "mortal", -1);
04494 sq_newclosure(v, &mortal_wrapper, 0);
04495 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04496 if(SQ_FAILED(sq_createslot(v, -3))) {
04497 throw SquirrelError(v, "Couldn't register function 'mortal'");
04498 }
04499
04500 sq_pushstring(v, "restart", -1);
04501 sq_newclosure(v, &restart_wrapper, 0);
04502 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04503 if(SQ_FAILED(sq_createslot(v, -3))) {
04504 throw SquirrelError(v, "Couldn't register function 'restart'");
04505 }
04506
04507 sq_pushstring(v, "whereami", -1);
04508 sq_newclosure(v, &whereami_wrapper, 0);
04509 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04510 if(SQ_FAILED(sq_createslot(v, -3))) {
04511 throw SquirrelError(v, "Couldn't register function 'whereami'");
04512 }
04513
04514 sq_pushstring(v, "gotoend", -1);
04515 sq_newclosure(v, &gotoend_wrapper, 0);
04516 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04517 if(SQ_FAILED(sq_createslot(v, -3))) {
04518 throw SquirrelError(v, "Couldn't register function 'gotoend'");
04519 }
04520
04521 sq_pushstring(v, "camera", -1);
04522 sq_newclosure(v, &camera_wrapper, 0);
04523 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04524 if(SQ_FAILED(sq_createslot(v, -3))) {
04525 throw SquirrelError(v, "Couldn't register function 'camera'");
04526 }
04527
04528 sq_pushstring(v, "set_gamma", -1);
04529 sq_newclosure(v, &set_gamma_wrapper, 0);
04530 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04531 if(SQ_FAILED(sq_createslot(v, -3))) {
04532 throw SquirrelError(v, "Couldn't register function 'set_gamma'");
04533 }
04534
04535 sq_pushstring(v, "quit", -1);
04536 sq_newclosure(v, &quit_wrapper, 0);
04537 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04538 if(SQ_FAILED(sq_createslot(v, -3))) {
04539 throw SquirrelError(v, "Couldn't register function 'quit'");
04540 }
04541
04542 sq_pushstring(v, "rand", -1);
04543 sq_newclosure(v, &rand_wrapper, 0);
04544 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04545 if(SQ_FAILED(sq_createslot(v, -3))) {
04546 throw SquirrelError(v, "Couldn't register function 'rand'");
04547 }
04548
04549 sq_pushstring(v, "record_demo", -1);
04550 sq_newclosure(v, &record_demo_wrapper, 0);
04551 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04552 if(SQ_FAILED(sq_createslot(v, -3))) {
04553 throw SquirrelError(v, "Couldn't register function 'record_demo'");
04554 }
04555
04556 sq_pushstring(v, "play_demo", -1);
04557 sq_newclosure(v, &play_demo_wrapper, 0);
04558 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04559 if(SQ_FAILED(sq_createslot(v, -3))) {
04560 throw SquirrelError(v, "Couldn't register function 'play_demo'");
04561 }
04562
04563 sq_pushstring(v, "Level_finish", -1);
04564 sq_newclosure(v, &Level_finish_wrapper, 0);
04565 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04566 if(SQ_FAILED(sq_createslot(v, -3))) {
04567 throw SquirrelError(v, "Couldn't register function 'Level_finish'");
04568 }
04569
04570 sq_pushstring(v, "Level_spawn", -1);
04571 sq_newclosure(v, &Level_spawn_wrapper, 0);
04572 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
04573 if(SQ_FAILED(sq_createslot(v, -3))) {
04574 throw SquirrelError(v, "Couldn't register function 'Level_spawn'");
04575 }
04576
04577 sq_pushstring(v, "Level_flip_vertically", -1);
04578 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
04579 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04580 if(SQ_FAILED(sq_createslot(v, -3))) {
04581 throw SquirrelError(v, "Couldn't register function 'Level_flip_vertically'");
04582 }
04583
04584 sq_pushstring(v, "Level_toggle_pause", -1);
04585 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
04586 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04587 if(SQ_FAILED(sq_createslot(v, -3))) {
04588 throw SquirrelError(v, "Couldn't register function 'Level_toggle_pause'");
04589 }
04590
04591 sq_pushstring(v, "Level_edit", -1);
04592 sq_newclosure(v, &Level_edit_wrapper, 0);
04593 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04594 if(SQ_FAILED(sq_createslot(v, -3))) {
04595 throw SquirrelError(v, "Couldn't register function 'Level_edit'");
04596 }
04597
04598
04599 sq_pushstring(v, "AmbientSound", -1);
04600 if(sq_newclass(v, SQFalse) < 0) {
04601 std::ostringstream msg;
04602 msg << "Couldn't create new class 'AmbientSound'";
04603 throw SquirrelError(v, msg.str());
04604 }
04605 sq_pushstring(v, "set_pos", -1);
04606 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
04607 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
04608 if(SQ_FAILED(sq_createslot(v, -3))) {
04609 throw SquirrelError(v, "Couldn't register function 'set_pos'");
04610 }
04611
04612 sq_pushstring(v, "get_pos_x", -1);
04613 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
04614 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04615 if(SQ_FAILED(sq_createslot(v, -3))) {
04616 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
04617 }
04618
04619 sq_pushstring(v, "get_pos_y", -1);
04620 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
04621 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04622 if(SQ_FAILED(sq_createslot(v, -3))) {
04623 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
04624 }
04625
04626 if(SQ_FAILED(sq_createslot(v, -3))) {
04627 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
04628 }
04629
04630
04631 sq_pushstring(v, "Camera", -1);
04632 if(sq_newclass(v, SQFalse) < 0) {
04633 std::ostringstream msg;
04634 msg << "Couldn't create new class 'Camera'";
04635 throw SquirrelError(v, msg.str());
04636 }
04637 sq_pushstring(v, "reload_config", -1);
04638 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
04639 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04640 if(SQ_FAILED(sq_createslot(v, -3))) {
04641 throw SquirrelError(v, "Couldn't register function 'reload_config'");
04642 }
04643
04644 sq_pushstring(v, "shake", -1);
04645 sq_newclosure(v, &Camera_shake_wrapper, 0);
04646 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
04647 if(SQ_FAILED(sq_createslot(v, -3))) {
04648 throw SquirrelError(v, "Couldn't register function 'shake'");
04649 }
04650
04651 sq_pushstring(v, "set_pos", -1);
04652 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
04653 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
04654 if(SQ_FAILED(sq_createslot(v, -3))) {
04655 throw SquirrelError(v, "Couldn't register function 'set_pos'");
04656 }
04657
04658 sq_pushstring(v, "set_mode", -1);
04659 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
04660 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04661 if(SQ_FAILED(sq_createslot(v, -3))) {
04662 throw SquirrelError(v, "Couldn't register function 'set_mode'");
04663 }
04664
04665 sq_pushstring(v, "scroll_to", -1);
04666 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
04667 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
04668 if(SQ_FAILED(sq_createslot(v, -3))) {
04669 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
04670 }
04671
04672 if(SQ_FAILED(sq_createslot(v, -3))) {
04673 throw SquirrelError(v, "Couldn't register class 'Camera'");
04674 }
04675
04676
04677 sq_pushstring(v, "Candle", -1);
04678 if(sq_newclass(v, SQFalse) < 0) {
04679 std::ostringstream msg;
04680 msg << "Couldn't create new class 'Candle'";
04681 throw SquirrelError(v, msg.str());
04682 }
04683 sq_pushstring(v, "get_burning", -1);
04684 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
04685 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04686 if(SQ_FAILED(sq_createslot(v, -3))) {
04687 throw SquirrelError(v, "Couldn't register function 'get_burning'");
04688 }
04689
04690 sq_pushstring(v, "set_burning", -1);
04691 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
04692 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04693 if(SQ_FAILED(sq_createslot(v, -3))) {
04694 throw SquirrelError(v, "Couldn't register function 'set_burning'");
04695 }
04696
04697 if(SQ_FAILED(sq_createslot(v, -3))) {
04698 throw SquirrelError(v, "Couldn't register class 'Candle'");
04699 }
04700
04701
04702 sq_pushstring(v, "DisplayEffect", -1);
04703 if(sq_newclass(v, SQFalse) < 0) {
04704 std::ostringstream msg;
04705 msg << "Couldn't create new class 'DisplayEffect'";
04706 throw SquirrelError(v, msg.str());
04707 }
04708 sq_pushstring(v, "fade_out", -1);
04709 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
04710 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04711 if(SQ_FAILED(sq_createslot(v, -3))) {
04712 throw SquirrelError(v, "Couldn't register function 'fade_out'");
04713 }
04714
04715 sq_pushstring(v, "fade_in", -1);
04716 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
04717 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04718 if(SQ_FAILED(sq_createslot(v, -3))) {
04719 throw SquirrelError(v, "Couldn't register function 'fade_in'");
04720 }
04721
04722 sq_pushstring(v, "set_black", -1);
04723 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
04724 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04725 if(SQ_FAILED(sq_createslot(v, -3))) {
04726 throw SquirrelError(v, "Couldn't register function 'set_black'");
04727 }
04728
04729 sq_pushstring(v, "is_black", -1);
04730 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
04731 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04732 if(SQ_FAILED(sq_createslot(v, -3))) {
04733 throw SquirrelError(v, "Couldn't register function 'is_black'");
04734 }
04735
04736 sq_pushstring(v, "sixteen_to_nine", -1);
04737 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
04738 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04739 if(SQ_FAILED(sq_createslot(v, -3))) {
04740 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
04741 }
04742
04743 sq_pushstring(v, "four_to_three", -1);
04744 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
04745 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04746 if(SQ_FAILED(sq_createslot(v, -3))) {
04747 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
04748 }
04749
04750 if(SQ_FAILED(sq_createslot(v, -3))) {
04751 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
04752 }
04753
04754
04755 sq_pushstring(v, "FloatingImage", -1);
04756 if(sq_newclass(v, SQFalse) < 0) {
04757 std::ostringstream msg;
04758 msg << "Couldn't create new class 'FloatingImage'";
04759 throw SquirrelError(v, msg.str());
04760 }
04761 sq_pushstring(v, "constructor", -1);
04762 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
04763 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04764 if(SQ_FAILED(sq_createslot(v, -3))) {
04765 throw SquirrelError(v, "Couldn't register function 'constructor'");
04766 }
04767
04768 sq_pushstring(v, "set_layer", -1);
04769 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
04770 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
04771 if(SQ_FAILED(sq_createslot(v, -3))) {
04772 throw SquirrelError(v, "Couldn't register function 'set_layer'");
04773 }
04774
04775 sq_pushstring(v, "get_layer", -1);
04776 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
04777 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04778 if(SQ_FAILED(sq_createslot(v, -3))) {
04779 throw SquirrelError(v, "Couldn't register function 'get_layer'");
04780 }
04781
04782 sq_pushstring(v, "set_pos", -1);
04783 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
04784 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
04785 if(SQ_FAILED(sq_createslot(v, -3))) {
04786 throw SquirrelError(v, "Couldn't register function 'set_pos'");
04787 }
04788
04789 sq_pushstring(v, "get_pos_x", -1);
04790 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
04791 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04792 if(SQ_FAILED(sq_createslot(v, -3))) {
04793 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
04794 }
04795
04796 sq_pushstring(v, "get_pos_y", -1);
04797 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
04798 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04799 if(SQ_FAILED(sq_createslot(v, -3))) {
04800 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
04801 }
04802
04803 sq_pushstring(v, "set_anchor_point", -1);
04804 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
04805 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
04806 if(SQ_FAILED(sq_createslot(v, -3))) {
04807 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
04808 }
04809
04810 sq_pushstring(v, "get_anchor_point", -1);
04811 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
04812 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04813 if(SQ_FAILED(sq_createslot(v, -3))) {
04814 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
04815 }
04816
04817 sq_pushstring(v, "set_visible", -1);
04818 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
04819 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04820 if(SQ_FAILED(sq_createslot(v, -3))) {
04821 throw SquirrelError(v, "Couldn't register function 'set_visible'");
04822 }
04823
04824 sq_pushstring(v, "get_visible", -1);
04825 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
04826 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04827 if(SQ_FAILED(sq_createslot(v, -3))) {
04828 throw SquirrelError(v, "Couldn't register function 'get_visible'");
04829 }
04830
04831 sq_pushstring(v, "set_action", -1);
04832 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
04833 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04834 if(SQ_FAILED(sq_createslot(v, -3))) {
04835 throw SquirrelError(v, "Couldn't register function 'set_action'");
04836 }
04837
04838 sq_pushstring(v, "get_action", -1);
04839 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
04840 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04841 if(SQ_FAILED(sq_createslot(v, -3))) {
04842 throw SquirrelError(v, "Couldn't register function 'get_action'");
04843 }
04844
04845 sq_pushstring(v, "fade_in", -1);
04846 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
04847 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04848 if(SQ_FAILED(sq_createslot(v, -3))) {
04849 throw SquirrelError(v, "Couldn't register function 'fade_in'");
04850 }
04851
04852 sq_pushstring(v, "fade_out", -1);
04853 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
04854 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04855 if(SQ_FAILED(sq_createslot(v, -3))) {
04856 throw SquirrelError(v, "Couldn't register function 'fade_out'");
04857 }
04858
04859 if(SQ_FAILED(sq_createslot(v, -3))) {
04860 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
04861 }
04862
04863
04864 sq_pushstring(v, "LevelTime", -1);
04865 if(sq_newclass(v, SQFalse) < 0) {
04866 std::ostringstream msg;
04867 msg << "Couldn't create new class 'LevelTime'";
04868 throw SquirrelError(v, msg.str());
04869 }
04870 sq_pushstring(v, "start", -1);
04871 sq_newclosure(v, &LevelTime_start_wrapper, 0);
04872 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04873 if(SQ_FAILED(sq_createslot(v, -3))) {
04874 throw SquirrelError(v, "Couldn't register function 'start'");
04875 }
04876
04877 sq_pushstring(v, "stop", -1);
04878 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
04879 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04880 if(SQ_FAILED(sq_createslot(v, -3))) {
04881 throw SquirrelError(v, "Couldn't register function 'stop'");
04882 }
04883
04884 sq_pushstring(v, "get_time", -1);
04885 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
04886 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04887 if(SQ_FAILED(sq_createslot(v, -3))) {
04888 throw SquirrelError(v, "Couldn't register function 'get_time'");
04889 }
04890
04891 sq_pushstring(v, "set_time", -1);
04892 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
04893 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04894 if(SQ_FAILED(sq_createslot(v, -3))) {
04895 throw SquirrelError(v, "Couldn't register function 'set_time'");
04896 }
04897
04898 if(SQ_FAILED(sq_createslot(v, -3))) {
04899 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
04900 }
04901
04902
04903 sq_pushstring(v, "Platform", -1);
04904 if(sq_newclass(v, SQFalse) < 0) {
04905 std::ostringstream msg;
04906 msg << "Couldn't create new class 'Platform'";
04907 throw SquirrelError(v, msg.str());
04908 }
04909 sq_pushstring(v, "goto_node", -1);
04910 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
04911 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
04912 if(SQ_FAILED(sq_createslot(v, -3))) {
04913 throw SquirrelError(v, "Couldn't register function 'goto_node'");
04914 }
04915
04916 sq_pushstring(v, "start_moving", -1);
04917 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
04918 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04919 if(SQ_FAILED(sq_createslot(v, -3))) {
04920 throw SquirrelError(v, "Couldn't register function 'start_moving'");
04921 }
04922
04923 sq_pushstring(v, "stop_moving", -1);
04924 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
04925 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04926 if(SQ_FAILED(sq_createslot(v, -3))) {
04927 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
04928 }
04929
04930 if(SQ_FAILED(sq_createslot(v, -3))) {
04931 throw SquirrelError(v, "Couldn't register class 'Platform'");
04932 }
04933
04934
04935 sq_pushstring(v, "Player", -1);
04936 if(sq_newclass(v, SQFalse) < 0) {
04937 std::ostringstream msg;
04938 msg << "Couldn't create new class 'Player'";
04939 throw SquirrelError(v, msg.str());
04940 }
04941 sq_pushstring(v, "add_bonus", -1);
04942 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
04943 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
04944 if(SQ_FAILED(sq_createslot(v, -3))) {
04945 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
04946 }
04947
04948 sq_pushstring(v, "add_coins", -1);
04949 sq_newclosure(v, &Player_add_coins_wrapper, 0);
04950 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
04951 if(SQ_FAILED(sq_createslot(v, -3))) {
04952 throw SquirrelError(v, "Couldn't register function 'add_coins'");
04953 }
04954
04955 sq_pushstring(v, "make_invincible", -1);
04956 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
04957 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04958 if(SQ_FAILED(sq_createslot(v, -3))) {
04959 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
04960 }
04961
04962 sq_pushstring(v, "deactivate", -1);
04963 sq_newclosure(v, &Player_deactivate_wrapper, 0);
04964 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04965 if(SQ_FAILED(sq_createslot(v, -3))) {
04966 throw SquirrelError(v, "Couldn't register function 'deactivate'");
04967 }
04968
04969 sq_pushstring(v, "activate", -1);
04970 sq_newclosure(v, &Player_activate_wrapper, 0);
04971 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04972 if(SQ_FAILED(sq_createslot(v, -3))) {
04973 throw SquirrelError(v, "Couldn't register function 'activate'");
04974 }
04975
04976 sq_pushstring(v, "walk", -1);
04977 sq_newclosure(v, &Player_walk_wrapper, 0);
04978 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
04979 if(SQ_FAILED(sq_createslot(v, -3))) {
04980 throw SquirrelError(v, "Couldn't register function 'walk'");
04981 }
04982
04983 sq_pushstring(v, "set_visible", -1);
04984 sq_newclosure(v, &Player_set_visible_wrapper, 0);
04985 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
04986 if(SQ_FAILED(sq_createslot(v, -3))) {
04987 throw SquirrelError(v, "Couldn't register function 'set_visible'");
04988 }
04989
04990 sq_pushstring(v, "get_visible", -1);
04991 sq_newclosure(v, &Player_get_visible_wrapper, 0);
04992 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
04993 if(SQ_FAILED(sq_createslot(v, -3))) {
04994 throw SquirrelError(v, "Couldn't register function 'get_visible'");
04995 }
04996
04997 sq_pushstring(v, "kill", -1);
04998 sq_newclosure(v, &Player_kill_wrapper, 0);
04999 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05000 if(SQ_FAILED(sq_createslot(v, -3))) {
05001 throw SquirrelError(v, "Couldn't register function 'kill'");
05002 }
05003
05004 sq_pushstring(v, "set_ghost_mode", -1);
05005 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
05006 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05007 if(SQ_FAILED(sq_createslot(v, -3))) {
05008 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
05009 }
05010
05011 sq_pushstring(v, "get_ghost_mode", -1);
05012 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
05013 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05014 if(SQ_FAILED(sq_createslot(v, -3))) {
05015 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
05016 }
05017
05018 sq_pushstring(v, "do_cheer", -1);
05019 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
05020 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05021 if(SQ_FAILED(sq_createslot(v, -3))) {
05022 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
05023 }
05024
05025 sq_pushstring(v, "do_duck", -1);
05026 sq_newclosure(v, &Player_do_duck_wrapper, 0);
05027 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05028 if(SQ_FAILED(sq_createslot(v, -3))) {
05029 throw SquirrelError(v, "Couldn't register function 'do_duck'");
05030 }
05031
05032 sq_pushstring(v, "do_standup", -1);
05033 sq_newclosure(v, &Player_do_standup_wrapper, 0);
05034 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05035 if(SQ_FAILED(sq_createslot(v, -3))) {
05036 throw SquirrelError(v, "Couldn't register function 'do_standup'");
05037 }
05038
05039 sq_pushstring(v, "do_backflip", -1);
05040 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
05041 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05042 if(SQ_FAILED(sq_createslot(v, -3))) {
05043 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
05044 }
05045
05046 sq_pushstring(v, "do_jump", -1);
05047 sq_newclosure(v, &Player_do_jump_wrapper, 0);
05048 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
05049 if(SQ_FAILED(sq_createslot(v, -3))) {
05050 throw SquirrelError(v, "Couldn't register function 'do_jump'");
05051 }
05052
05053 sq_pushstring(v, "trigger_sequence", -1);
05054 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
05055 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
05056 if(SQ_FAILED(sq_createslot(v, -3))) {
05057 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
05058 }
05059
05060 sq_pushstring(v, "use_scripting_controller", -1);
05061 sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
05062 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05063 if(SQ_FAILED(sq_createslot(v, -3))) {
05064 throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
05065 }
05066
05067 sq_pushstring(v, "do_scripting_controller", -1);
05068 sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
05069 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsb");
05070 if(SQ_FAILED(sq_createslot(v, -3))) {
05071 throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
05072 }
05073
05074 if(SQ_FAILED(sq_createslot(v, -3))) {
05075 throw SquirrelError(v, "Couldn't register class 'Player'");
05076 }
05077
05078
05079 sq_pushstring(v, "ScriptedObject", -1);
05080 if(sq_newclass(v, SQFalse) < 0) {
05081 std::ostringstream msg;
05082 msg << "Couldn't create new class 'ScriptedObject'";
05083 throw SquirrelError(v, msg.str());
05084 }
05085 sq_pushstring(v, "set_action", -1);
05086 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
05087 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
05088 if(SQ_FAILED(sq_createslot(v, -3))) {
05089 throw SquirrelError(v, "Couldn't register function 'set_action'");
05090 }
05091
05092 sq_pushstring(v, "get_action", -1);
05093 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
05094 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05095 if(SQ_FAILED(sq_createslot(v, -3))) {
05096 throw SquirrelError(v, "Couldn't register function 'get_action'");
05097 }
05098
05099 sq_pushstring(v, "move", -1);
05100 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
05101 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
05102 if(SQ_FAILED(sq_createslot(v, -3))) {
05103 throw SquirrelError(v, "Couldn't register function 'move'");
05104 }
05105
05106 sq_pushstring(v, "set_pos", -1);
05107 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
05108 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
05109 if(SQ_FAILED(sq_createslot(v, -3))) {
05110 throw SquirrelError(v, "Couldn't register function 'set_pos'");
05111 }
05112
05113 sq_pushstring(v, "get_pos_x", -1);
05114 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
05115 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05116 if(SQ_FAILED(sq_createslot(v, -3))) {
05117 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
05118 }
05119
05120 sq_pushstring(v, "get_pos_y", -1);
05121 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
05122 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05123 if(SQ_FAILED(sq_createslot(v, -3))) {
05124 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
05125 }
05126
05127 sq_pushstring(v, "set_velocity", -1);
05128 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
05129 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
05130 if(SQ_FAILED(sq_createslot(v, -3))) {
05131 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
05132 }
05133
05134 sq_pushstring(v, "get_velocity_x", -1);
05135 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
05136 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05137 if(SQ_FAILED(sq_createslot(v, -3))) {
05138 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
05139 }
05140
05141 sq_pushstring(v, "get_velocity_y", -1);
05142 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
05143 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05144 if(SQ_FAILED(sq_createslot(v, -3))) {
05145 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
05146 }
05147
05148 sq_pushstring(v, "set_visible", -1);
05149 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
05150 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05151 if(SQ_FAILED(sq_createslot(v, -3))) {
05152 throw SquirrelError(v, "Couldn't register function 'set_visible'");
05153 }
05154
05155 sq_pushstring(v, "is_visible", -1);
05156 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
05157 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05158 if(SQ_FAILED(sq_createslot(v, -3))) {
05159 throw SquirrelError(v, "Couldn't register function 'is_visible'");
05160 }
05161
05162 sq_pushstring(v, "set_solid", -1);
05163 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
05164 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05165 if(SQ_FAILED(sq_createslot(v, -3))) {
05166 throw SquirrelError(v, "Couldn't register function 'set_solid'");
05167 }
05168
05169 sq_pushstring(v, "is_solid", -1);
05170 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
05171 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05172 if(SQ_FAILED(sq_createslot(v, -3))) {
05173 throw SquirrelError(v, "Couldn't register function 'is_solid'");
05174 }
05175
05176 sq_pushstring(v, "get_name", -1);
05177 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
05178 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05179 if(SQ_FAILED(sq_createslot(v, -3))) {
05180 throw SquirrelError(v, "Couldn't register function 'get_name'");
05181 }
05182
05183 if(SQ_FAILED(sq_createslot(v, -3))) {
05184 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
05185 }
05186
05187
05188 sq_pushstring(v, "SSector", -1);
05189 if(sq_newclass(v, SQFalse) < 0) {
05190 std::ostringstream msg;
05191 msg << "Couldn't create new class 'SSector'";
05192 throw SquirrelError(v, msg.str());
05193 }
05194 sq_pushstring(v, "set_ambient_light", -1);
05195 sq_newclosure(v, &SSector_set_ambient_light_wrapper, 0);
05196 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
05197 if(SQ_FAILED(sq_createslot(v, -3))) {
05198 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
05199 }
05200
05201 sq_pushstring(v, "get_ambient_red", -1);
05202 sq_newclosure(v, &SSector_get_ambient_red_wrapper, 0);
05203 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05204 if(SQ_FAILED(sq_createslot(v, -3))) {
05205 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
05206 }
05207
05208 sq_pushstring(v, "get_ambient_green", -1);
05209 sq_newclosure(v, &SSector_get_ambient_green_wrapper, 0);
05210 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05211 if(SQ_FAILED(sq_createslot(v, -3))) {
05212 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
05213 }
05214
05215 sq_pushstring(v, "get_ambient_blue", -1);
05216 sq_newclosure(v, &SSector_get_ambient_blue_wrapper, 0);
05217 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05218 if(SQ_FAILED(sq_createslot(v, -3))) {
05219 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
05220 }
05221
05222 sq_pushstring(v, "set_gravity", -1);
05223 sq_newclosure(v, &SSector_set_gravity_wrapper, 0);
05224 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
05225 if(SQ_FAILED(sq_createslot(v, -3))) {
05226 throw SquirrelError(v, "Couldn't register function 'set_gravity'");
05227 }
05228
05229 if(SQ_FAILED(sq_createslot(v, -3))) {
05230 throw SquirrelError(v, "Couldn't register class 'SSector'");
05231 }
05232
05233
05234 sq_pushstring(v, "Text", -1);
05235 if(sq_newclass(v, SQFalse) < 0) {
05236 std::ostringstream msg;
05237 msg << "Couldn't create new class 'Text'";
05238 throw SquirrelError(v, msg.str());
05239 }
05240 sq_pushstring(v, "set_text", -1);
05241 sq_newclosure(v, &Text_set_text_wrapper, 0);
05242 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
05243 if(SQ_FAILED(sq_createslot(v, -3))) {
05244 throw SquirrelError(v, "Couldn't register function 'set_text'");
05245 }
05246
05247 sq_pushstring(v, "set_font", -1);
05248 sq_newclosure(v, &Text_set_font_wrapper, 0);
05249 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
05250 if(SQ_FAILED(sq_createslot(v, -3))) {
05251 throw SquirrelError(v, "Couldn't register function 'set_font'");
05252 }
05253
05254 sq_pushstring(v, "fade_in", -1);
05255 sq_newclosure(v, &Text_fade_in_wrapper, 0);
05256 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
05257 if(SQ_FAILED(sq_createslot(v, -3))) {
05258 throw SquirrelError(v, "Couldn't register function 'fade_in'");
05259 }
05260
05261 sq_pushstring(v, "fade_out", -1);
05262 sq_newclosure(v, &Text_fade_out_wrapper, 0);
05263 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
05264 if(SQ_FAILED(sq_createslot(v, -3))) {
05265 throw SquirrelError(v, "Couldn't register function 'fade_out'");
05266 }
05267
05268 sq_pushstring(v, "set_visible", -1);
05269 sq_newclosure(v, &Text_set_visible_wrapper, 0);
05270 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05271 if(SQ_FAILED(sq_createslot(v, -3))) {
05272 throw SquirrelError(v, "Couldn't register function 'set_visible'");
05273 }
05274
05275 sq_pushstring(v, "set_centered", -1);
05276 sq_newclosure(v, &Text_set_centered_wrapper, 0);
05277 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
05278 if(SQ_FAILED(sq_createslot(v, -3))) {
05279 throw SquirrelError(v, "Couldn't register function 'set_centered'");
05280 }
05281
05282 sq_pushstring(v, "set_pos", -1);
05283 sq_newclosure(v, &Text_set_pos_wrapper, 0);
05284 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
05285 if(SQ_FAILED(sq_createslot(v, -3))) {
05286 throw SquirrelError(v, "Couldn't register function 'set_pos'");
05287 }
05288
05289 sq_pushstring(v, "get_pos_x", -1);
05290 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
05291 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05292 if(SQ_FAILED(sq_createslot(v, -3))) {
05293 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
05294 }
05295
05296 sq_pushstring(v, "get_pos_y", -1);
05297 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
05298 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05299 if(SQ_FAILED(sq_createslot(v, -3))) {
05300 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
05301 }
05302
05303 sq_pushstring(v, "set_anchor_point", -1);
05304 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
05305 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
05306 if(SQ_FAILED(sq_createslot(v, -3))) {
05307 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
05308 }
05309
05310 sq_pushstring(v, "get_anchor_point", -1);
05311 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
05312 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05313 if(SQ_FAILED(sq_createslot(v, -3))) {
05314 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
05315 }
05316
05317 if(SQ_FAILED(sq_createslot(v, -3))) {
05318 throw SquirrelError(v, "Couldn't register class 'Text'");
05319 }
05320
05321
05322 sq_pushstring(v, "Thunderstorm", -1);
05323 if(sq_newclass(v, SQFalse) < 0) {
05324 std::ostringstream msg;
05325 msg << "Couldn't create new class 'Thunderstorm'";
05326 throw SquirrelError(v, msg.str());
05327 }
05328 sq_pushstring(v, "start", -1);
05329 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
05330 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05331 if(SQ_FAILED(sq_createslot(v, -3))) {
05332 throw SquirrelError(v, "Couldn't register function 'start'");
05333 }
05334
05335 sq_pushstring(v, "stop", -1);
05336 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
05337 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05338 if(SQ_FAILED(sq_createslot(v, -3))) {
05339 throw SquirrelError(v, "Couldn't register function 'stop'");
05340 }
05341
05342 sq_pushstring(v, "thunder", -1);
05343 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
05344 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05345 if(SQ_FAILED(sq_createslot(v, -3))) {
05346 throw SquirrelError(v, "Couldn't register function 'thunder'");
05347 }
05348
05349 sq_pushstring(v, "lightning", -1);
05350 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
05351 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05352 if(SQ_FAILED(sq_createslot(v, -3))) {
05353 throw SquirrelError(v, "Couldn't register function 'lightning'");
05354 }
05355
05356 sq_pushstring(v, "flash", -1);
05357 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
05358 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05359 if(SQ_FAILED(sq_createslot(v, -3))) {
05360 throw SquirrelError(v, "Couldn't register function 'flash'");
05361 }
05362
05363 sq_pushstring(v, "electrify", -1);
05364 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
05365 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05366 if(SQ_FAILED(sq_createslot(v, -3))) {
05367 throw SquirrelError(v, "Couldn't register function 'electrify'");
05368 }
05369
05370 if(SQ_FAILED(sq_createslot(v, -3))) {
05371 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
05372 }
05373
05374
05375 sq_pushstring(v, "TileMap", -1);
05376 if(sq_newclass(v, SQFalse) < 0) {
05377 std::ostringstream msg;
05378 msg << "Couldn't create new class 'TileMap'";
05379 throw SquirrelError(v, msg.str());
05380 }
05381 sq_pushstring(v, "goto_node", -1);
05382 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
05383 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
05384 if(SQ_FAILED(sq_createslot(v, -3))) {
05385 throw SquirrelError(v, "Couldn't register function 'goto_node'");
05386 }
05387
05388 sq_pushstring(v, "start_moving", -1);
05389 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
05390 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05391 if(SQ_FAILED(sq_createslot(v, -3))) {
05392 throw SquirrelError(v, "Couldn't register function 'start_moving'");
05393 }
05394
05395 sq_pushstring(v, "stop_moving", -1);
05396 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
05397 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05398 if(SQ_FAILED(sq_createslot(v, -3))) {
05399 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
05400 }
05401
05402 sq_pushstring(v, "fade", -1);
05403 sq_newclosure(v, &TileMap_fade_wrapper, 0);
05404 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
05405 if(SQ_FAILED(sq_createslot(v, -3))) {
05406 throw SquirrelError(v, "Couldn't register function 'fade'");
05407 }
05408
05409 sq_pushstring(v, "set_alpha", -1);
05410 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
05411 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
05412 if(SQ_FAILED(sq_createslot(v, -3))) {
05413 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
05414 }
05415
05416 sq_pushstring(v, "get_alpha", -1);
05417 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
05418 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05419 if(SQ_FAILED(sq_createslot(v, -3))) {
05420 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
05421 }
05422
05423 if(SQ_FAILED(sq_createslot(v, -3))) {
05424 throw SquirrelError(v, "Couldn't register class 'TileMap'");
05425 }
05426
05427
05428 sq_pushstring(v, "WillOWisp", -1);
05429 if(sq_newclass(v, SQFalse) < 0) {
05430 std::ostringstream msg;
05431 msg << "Couldn't create new class 'WillOWisp'";
05432 throw SquirrelError(v, msg.str());
05433 }
05434 sq_pushstring(v, "goto_node", -1);
05435 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
05436 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
05437 if(SQ_FAILED(sq_createslot(v, -3))) {
05438 throw SquirrelError(v, "Couldn't register function 'goto_node'");
05439 }
05440
05441 sq_pushstring(v, "set_state", -1);
05442 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
05443 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
05444 if(SQ_FAILED(sq_createslot(v, -3))) {
05445 throw SquirrelError(v, "Couldn't register function 'set_state'");
05446 }
05447
05448 sq_pushstring(v, "start_moving", -1);
05449 sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
05450 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05451 if(SQ_FAILED(sq_createslot(v, -3))) {
05452 throw SquirrelError(v, "Couldn't register function 'start_moving'");
05453 }
05454
05455 sq_pushstring(v, "stop_moving", -1);
05456 sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
05457 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05458 if(SQ_FAILED(sq_createslot(v, -3))) {
05459 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
05460 }
05461
05462 if(SQ_FAILED(sq_createslot(v, -3))) {
05463 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
05464 }
05465
05466
05467 sq_pushstring(v, "Wind", -1);
05468 if(sq_newclass(v, SQFalse) < 0) {
05469 std::ostringstream msg;
05470 msg << "Couldn't create new class 'Wind'";
05471 throw SquirrelError(v, msg.str());
05472 }
05473 sq_pushstring(v, "start", -1);
05474 sq_newclosure(v, &Wind_start_wrapper, 0);
05475 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05476 if(SQ_FAILED(sq_createslot(v, -3))) {
05477 throw SquirrelError(v, "Couldn't register function 'start'");
05478 }
05479
05480 sq_pushstring(v, "stop", -1);
05481 sq_newclosure(v, &Wind_stop_wrapper, 0);
05482 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
05483 if(SQ_FAILED(sq_createslot(v, -3))) {
05484 throw SquirrelError(v, "Couldn't register function 'stop'");
05485 }
05486
05487 if(SQ_FAILED(sq_createslot(v, -3))) {
05488 throw SquirrelError(v, "Couldn't register class 'Wind'");
05489 }
05490
05491 }
05492
05493 }
05494
05495