1/**
2 * WARNING: This file is automatically generated from:
3 * 'src/scripting/wrapper.interface.hpp'
4 * DO NOT CHANGE
5 */
6
7#include "scripting/wrapper.hpp"
8
9#include <assert.h>
10#include <limits>
11#include <sstream>
12
13#include "squirrel/squirrel_error.hpp"
14#include "scripting/wrapper.interface.hpp"
15
16namespace scripting {
17namespace wrapper {
18
19static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
20{
21 auto _this = reinterpret_cast<scripting::AmbientSound*> (ptr);
22 delete _this;
23 return 0;
24}
25
26static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)
27{
28 SQUserPointer data;
29 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
30 sq_throwerror(vm, _SC("'set_pos' called without instance"));
31 return SQ_ERROR;
32 }
33 auto _this = reinterpret_cast<scripting::AmbientSound*> (data);
34
35 if (_this == nullptr) {
36 return SQ_ERROR;
37 }
38
39 SQFloat arg0;
40 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
41 sq_throwerror(vm, _SC("Argument 1 not a float"));
42 return SQ_ERROR;
43 }
44 SQFloat arg1;
45 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
46 sq_throwerror(vm, _SC("Argument 2 not a float"));
47 return SQ_ERROR;
48 }
49
50 try {
51 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
52
53 return 0;
54
55 } catch(std::exception& e) {
56 sq_throwerror(vm, e.what());
57 return SQ_ERROR;
58 } catch(...) {
59 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
60 return SQ_ERROR;
61 }
62
63}
64
65static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)
66{
67 SQUserPointer data;
68 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
69 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
70 return SQ_ERROR;
71 }
72 auto _this = reinterpret_cast<scripting::AmbientSound*> (data);
73
74 if (_this == nullptr) {
75 return SQ_ERROR;
76 }
77
78
79 try {
80 float return_value = _this->get_pos_x();
81
82 sq_pushfloat(vm, return_value);
83 return 1;
84
85 } catch(std::exception& e) {
86 sq_throwerror(vm, e.what());
87 return SQ_ERROR;
88 } catch(...) {
89 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
90 return SQ_ERROR;
91 }
92
93}
94
95static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)
96{
97 SQUserPointer data;
98 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
99 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
100 return SQ_ERROR;
101 }
102 auto _this = reinterpret_cast<scripting::AmbientSound*> (data);
103
104 if (_this == nullptr) {
105 return SQ_ERROR;
106 }
107
108
109 try {
110 float return_value = _this->get_pos_y();
111
112 sq_pushfloat(vm, return_value);
113 return 1;
114
115 } catch(std::exception& e) {
116 sq_throwerror(vm, e.what());
117 return SQ_ERROR;
118 } catch(...) {
119 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
120 return SQ_ERROR;
121 }
122
123}
124
125static SQInteger Background_release_hook(SQUserPointer ptr, SQInteger )
126{
127 auto _this = reinterpret_cast<scripting::Background*> (ptr);
128 delete _this;
129 return 0;
130}
131
132static SQInteger Background_set_image_wrapper(HSQUIRRELVM vm)
133{
134 SQUserPointer data;
135 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
136 sq_throwerror(vm, _SC("'set_image' called without instance"));
137 return SQ_ERROR;
138 }
139 auto _this = reinterpret_cast<scripting::Background*> (data);
140
141 if (_this == nullptr) {
142 return SQ_ERROR;
143 }
144
145 const SQChar* arg0;
146 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
147 sq_throwerror(vm, _SC("Argument 1 not a string"));
148 return SQ_ERROR;
149 }
150
151 try {
152 _this->set_image(arg0);
153
154 return 0;
155
156 } catch(std::exception& e) {
157 sq_throwerror(vm, e.what());
158 return SQ_ERROR;
159 } catch(...) {
160 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_image'"));
161 return SQ_ERROR;
162 }
163
164}
165
166static SQInteger Background_set_images_wrapper(HSQUIRRELVM vm)
167{
168 SQUserPointer data;
169 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
170 sq_throwerror(vm, _SC("'set_images' called without instance"));
171 return SQ_ERROR;
172 }
173 auto _this = reinterpret_cast<scripting::Background*> (data);
174
175 if (_this == nullptr) {
176 return SQ_ERROR;
177 }
178
179 const SQChar* arg0;
180 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
181 sq_throwerror(vm, _SC("Argument 1 not a string"));
182 return SQ_ERROR;
183 }
184 const SQChar* arg1;
185 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
186 sq_throwerror(vm, _SC("Argument 2 not a string"));
187 return SQ_ERROR;
188 }
189 const SQChar* arg2;
190 if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
191 sq_throwerror(vm, _SC("Argument 3 not a string"));
192 return SQ_ERROR;
193 }
194
195 try {
196 _this->set_images(arg0, arg1, arg2);
197
198 return 0;
199
200 } catch(std::exception& e) {
201 sq_throwerror(vm, e.what());
202 return SQ_ERROR;
203 } catch(...) {
204 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_images'"));
205 return SQ_ERROR;
206 }
207
208}
209
210static SQInteger Background_set_speed_wrapper(HSQUIRRELVM vm)
211{
212 SQUserPointer data;
213 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
214 sq_throwerror(vm, _SC("'set_speed' called without instance"));
215 return SQ_ERROR;
216 }
217 auto _this = reinterpret_cast<scripting::Background*> (data);
218
219 if (_this == nullptr) {
220 return SQ_ERROR;
221 }
222
223 SQFloat arg0;
224 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
225 sq_throwerror(vm, _SC("Argument 1 not a float"));
226 return SQ_ERROR;
227 }
228
229 try {
230 _this->set_speed(static_cast<float> (arg0));
231
232 return 0;
233
234 } catch(std::exception& e) {
235 sq_throwerror(vm, e.what());
236 return SQ_ERROR;
237 } catch(...) {
238 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed'"));
239 return SQ_ERROR;
240 }
241
242}
243
244static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
245{
246 auto _this = reinterpret_cast<scripting::Camera*> (ptr);
247 delete _this;
248 return 0;
249}
250
251static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
252{
253 SQUserPointer data;
254 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
255 sq_throwerror(vm, _SC("'reload_config' called without instance"));
256 return SQ_ERROR;
257 }
258 auto _this = reinterpret_cast<scripting::Camera*> (data);
259
260 if (_this == nullptr) {
261 return SQ_ERROR;
262 }
263
264
265 try {
266 _this->reload_config();
267
268 return 0;
269
270 } catch(std::exception& e) {
271 sq_throwerror(vm, e.what());
272 return SQ_ERROR;
273 } catch(...) {
274 sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
275 return SQ_ERROR;
276 }
277
278}
279
280static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
281{
282 SQUserPointer data;
283 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
284 sq_throwerror(vm, _SC("'shake' called without instance"));
285 return SQ_ERROR;
286 }
287 auto _this = reinterpret_cast<scripting::Camera*> (data);
288
289 if (_this == nullptr) {
290 return SQ_ERROR;
291 }
292
293 SQFloat arg0;
294 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
295 sq_throwerror(vm, _SC("Argument 1 not a float"));
296 return SQ_ERROR;
297 }
298 SQFloat arg1;
299 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
300 sq_throwerror(vm, _SC("Argument 2 not a float"));
301 return SQ_ERROR;
302 }
303 SQFloat arg2;
304 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
305 sq_throwerror(vm, _SC("Argument 3 not a float"));
306 return SQ_ERROR;
307 }
308
309 try {
310 _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
311
312 return 0;
313
314 } catch(std::exception& e) {
315 sq_throwerror(vm, e.what());
316 return SQ_ERROR;
317 } catch(...) {
318 sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
319 return SQ_ERROR;
320 }
321
322}
323
324static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
325{
326 SQUserPointer data;
327 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
328 sq_throwerror(vm, _SC("'set_pos' called without instance"));
329 return SQ_ERROR;
330 }
331 auto _this = reinterpret_cast<scripting::Camera*> (data);
332
333 if (_this == nullptr) {
334 return SQ_ERROR;
335 }
336
337 SQFloat arg0;
338 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
339 sq_throwerror(vm, _SC("Argument 1 not a float"));
340 return SQ_ERROR;
341 }
342 SQFloat arg1;
343 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
344 sq_throwerror(vm, _SC("Argument 2 not a float"));
345 return SQ_ERROR;
346 }
347
348 try {
349 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
350
351 return 0;
352
353 } catch(std::exception& e) {
354 sq_throwerror(vm, e.what());
355 return SQ_ERROR;
356 } catch(...) {
357 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
358 return SQ_ERROR;
359 }
360
361}
362
363static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
364{
365 SQUserPointer data;
366 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
367 sq_throwerror(vm, _SC("'set_mode' called without instance"));
368 return SQ_ERROR;
369 }
370 auto _this = reinterpret_cast<scripting::Camera*> (data);
371
372 if (_this == nullptr) {
373 return SQ_ERROR;
374 }
375
376 const SQChar* arg0;
377 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
378 sq_throwerror(vm, _SC("Argument 1 not a string"));
379 return SQ_ERROR;
380 }
381
382 try {
383 _this->set_mode(arg0);
384
385 return 0;
386
387 } catch(std::exception& e) {
388 sq_throwerror(vm, e.what());
389 return SQ_ERROR;
390 } catch(...) {
391 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
392 return SQ_ERROR;
393 }
394
395}
396
397static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
398{
399 SQUserPointer data;
400 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
401 sq_throwerror(vm, _SC("'scroll_to' called without instance"));
402 return SQ_ERROR;
403 }
404 auto _this = reinterpret_cast<scripting::Camera*> (data);
405
406 if (_this == nullptr) {
407 return SQ_ERROR;
408 }
409
410 SQFloat arg0;
411 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
412 sq_throwerror(vm, _SC("Argument 1 not a float"));
413 return SQ_ERROR;
414 }
415 SQFloat arg1;
416 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
417 sq_throwerror(vm, _SC("Argument 2 not a float"));
418 return SQ_ERROR;
419 }
420 SQFloat arg2;
421 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
422 sq_throwerror(vm, _SC("Argument 3 not a float"));
423 return SQ_ERROR;
424 }
425
426 try {
427 _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
428
429 return 0;
430
431 } catch(std::exception& e) {
432 sq_throwerror(vm, e.what());
433 return SQ_ERROR;
434 } catch(...) {
435 sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
436 return SQ_ERROR;
437 }
438
439}
440
441static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
442{
443 auto _this = reinterpret_cast<scripting::Candle*> (ptr);
444 delete _this;
445 return 0;
446}
447
448static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
449{
450 SQUserPointer data;
451 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
452 sq_throwerror(vm, _SC("'get_burning' called without instance"));
453 return SQ_ERROR;
454 }
455 auto _this = reinterpret_cast<scripting::Candle*> (data);
456
457 if (_this == nullptr) {
458 return SQ_ERROR;
459 }
460
461
462 try {
463 bool return_value = _this->get_burning();
464
465 sq_pushbool(vm, return_value);
466 return 1;
467
468 } catch(std::exception& e) {
469 sq_throwerror(vm, e.what());
470 return SQ_ERROR;
471 } catch(...) {
472 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
473 return SQ_ERROR;
474 }
475
476}
477
478static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
479{
480 SQUserPointer data;
481 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
482 sq_throwerror(vm, _SC("'set_burning' called without instance"));
483 return SQ_ERROR;
484 }
485 auto _this = reinterpret_cast<scripting::Candle*> (data);
486
487 if (_this == nullptr) {
488 return SQ_ERROR;
489 }
490
491 SQBool arg0;
492 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
493 sq_throwerror(vm, _SC("Argument 1 not a bool"));
494 return SQ_ERROR;
495 }
496
497 try {
498 _this->set_burning(arg0 == SQTrue);
499
500 return 0;
501
502 } catch(std::exception& e) {
503 sq_throwerror(vm, e.what());
504 return SQ_ERROR;
505 } catch(...) {
506 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
507 return SQ_ERROR;
508 }
509
510}
511
512static SQInteger Dispenser_release_hook(SQUserPointer ptr, SQInteger )
513{
514 auto _this = reinterpret_cast<scripting::Dispenser*> (ptr);
515 delete _this;
516 return 0;
517}
518
519static SQInteger Dispenser_activate_wrapper(HSQUIRRELVM vm)
520{
521 SQUserPointer data;
522 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
523 sq_throwerror(vm, _SC("'activate' called without instance"));
524 return SQ_ERROR;
525 }
526 auto _this = reinterpret_cast<scripting::Dispenser*> (data);
527
528 if (_this == nullptr) {
529 return SQ_ERROR;
530 }
531
532
533 try {
534 _this->activate();
535
536 return 0;
537
538 } catch(std::exception& e) {
539 sq_throwerror(vm, e.what());
540 return SQ_ERROR;
541 } catch(...) {
542 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
543 return SQ_ERROR;
544 }
545
546}
547
548static SQInteger Dispenser_deactivate_wrapper(HSQUIRRELVM vm)
549{
550 SQUserPointer data;
551 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
552 sq_throwerror(vm, _SC("'deactivate' called without instance"));
553 return SQ_ERROR;
554 }
555 auto _this = reinterpret_cast<scripting::Dispenser*> (data);
556
557 if (_this == nullptr) {
558 return SQ_ERROR;
559 }
560
561
562 try {
563 _this->deactivate();
564
565 return 0;
566
567 } catch(std::exception& e) {
568 sq_throwerror(vm, e.what());
569 return SQ_ERROR;
570 } catch(...) {
571 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
572 return SQ_ERROR;
573 }
574
575}
576
577static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
578{
579 auto _this = reinterpret_cast<scripting::DisplayEffect*> (ptr);
580 delete _this;
581 return 0;
582}
583
584static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
585{
586 SQUserPointer data;
587 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
588 sq_throwerror(vm, _SC("'fade_out' called without instance"));
589 return SQ_ERROR;
590 }
591 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
592
593 if (_this == nullptr) {
594 return SQ_ERROR;
595 }
596
597 SQFloat arg0;
598 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
599 sq_throwerror(vm, _SC("Argument 1 not a float"));
600 return SQ_ERROR;
601 }
602
603 try {
604 _this->fade_out(static_cast<float> (arg0));
605
606 return 0;
607
608 } catch(std::exception& e) {
609 sq_throwerror(vm, e.what());
610 return SQ_ERROR;
611 } catch(...) {
612 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
613 return SQ_ERROR;
614 }
615
616}
617
618static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
619{
620 SQUserPointer data;
621 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
622 sq_throwerror(vm, _SC("'fade_in' called without instance"));
623 return SQ_ERROR;
624 }
625 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
626
627 if (_this == nullptr) {
628 return SQ_ERROR;
629 }
630
631 SQFloat arg0;
632 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
633 sq_throwerror(vm, _SC("Argument 1 not a float"));
634 return SQ_ERROR;
635 }
636
637 try {
638 _this->fade_in(static_cast<float> (arg0));
639
640 return 0;
641
642 } catch(std::exception& e) {
643 sq_throwerror(vm, e.what());
644 return SQ_ERROR;
645 } catch(...) {
646 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
647 return SQ_ERROR;
648 }
649
650}
651
652static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
653{
654 SQUserPointer data;
655 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
656 sq_throwerror(vm, _SC("'set_black' called without instance"));
657 return SQ_ERROR;
658 }
659 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
660
661 if (_this == nullptr) {
662 return SQ_ERROR;
663 }
664
665 SQBool arg0;
666 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
667 sq_throwerror(vm, _SC("Argument 1 not a bool"));
668 return SQ_ERROR;
669 }
670
671 try {
672 _this->set_black(arg0 == SQTrue);
673
674 return 0;
675
676 } catch(std::exception& e) {
677 sq_throwerror(vm, e.what());
678 return SQ_ERROR;
679 } catch(...) {
680 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
681 return SQ_ERROR;
682 }
683
684}
685
686static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
687{
688 SQUserPointer data;
689 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
690 sq_throwerror(vm, _SC("'is_black' called without instance"));
691 return SQ_ERROR;
692 }
693 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
694
695 if (_this == nullptr) {
696 return SQ_ERROR;
697 }
698
699
700 try {
701 bool return_value = _this->is_black();
702
703 sq_pushbool(vm, return_value);
704 return 1;
705
706 } catch(std::exception& e) {
707 sq_throwerror(vm, e.what());
708 return SQ_ERROR;
709 } catch(...) {
710 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
711 return SQ_ERROR;
712 }
713
714}
715
716static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
717{
718 SQUserPointer data;
719 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
720 sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
721 return SQ_ERROR;
722 }
723 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
724
725 if (_this == nullptr) {
726 return SQ_ERROR;
727 }
728
729 SQFloat arg0;
730 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
731 sq_throwerror(vm, _SC("Argument 1 not a float"));
732 return SQ_ERROR;
733 }
734
735 try {
736 _this->sixteen_to_nine(static_cast<float> (arg0));
737
738 return 0;
739
740 } catch(std::exception& e) {
741 sq_throwerror(vm, e.what());
742 return SQ_ERROR;
743 } catch(...) {
744 sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
745 return SQ_ERROR;
746 }
747
748}
749
750static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
751{
752 SQUserPointer data;
753 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
754 sq_throwerror(vm, _SC("'four_to_three' called without instance"));
755 return SQ_ERROR;
756 }
757 auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
758
759 if (_this == nullptr) {
760 return SQ_ERROR;
761 }
762
763 SQFloat arg0;
764 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
765 sq_throwerror(vm, _SC("Argument 1 not a float"));
766 return SQ_ERROR;
767 }
768
769 try {
770 _this->four_to_three(static_cast<float> (arg0));
771
772 return 0;
773
774 } catch(std::exception& e) {
775 sq_throwerror(vm, e.what());
776 return SQ_ERROR;
777 } catch(...) {
778 sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
779 return SQ_ERROR;
780 }
781
782}
783
784static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
785{
786 auto _this = reinterpret_cast<scripting::FloatingImage*> (ptr);
787 delete _this;
788 return 0;
789}
790
791static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
792{
793 const SQChar* arg0;
794 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
795 sq_throwerror(vm, _SC("Argument 1 not a string"));
796 return SQ_ERROR;
797 }
798
799 try {
800 auto _this = new scripting::FloatingImage(arg0);
801 if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
802 sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
803 return SQ_ERROR;
804 }
805 sq_setreleasehook(vm, 1, FloatingImage_release_hook);
806
807 return 0;
808
809 } catch(std::exception& e) {
810 sq_throwerror(vm, e.what());
811 return SQ_ERROR;
812 } catch(...) {
813 sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
814 return SQ_ERROR;
815 }
816
817}
818
819static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
820{
821 SQUserPointer data;
822 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
823 sq_throwerror(vm, _SC("'set_layer' called without instance"));
824 return SQ_ERROR;
825 }
826 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
827
828 if (_this == nullptr) {
829 return SQ_ERROR;
830 }
831
832 SQInteger arg0;
833 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
834 sq_throwerror(vm, _SC("Argument 1 not an integer"));
835 return SQ_ERROR;
836 }
837
838 try {
839 _this->set_layer(static_cast<int> (arg0));
840
841 return 0;
842
843 } catch(std::exception& e) {
844 sq_throwerror(vm, e.what());
845 return SQ_ERROR;
846 } catch(...) {
847 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
848 return SQ_ERROR;
849 }
850
851}
852
853static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
854{
855 SQUserPointer data;
856 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
857 sq_throwerror(vm, _SC("'get_layer' called without instance"));
858 return SQ_ERROR;
859 }
860 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
861
862 if (_this == nullptr) {
863 return SQ_ERROR;
864 }
865
866
867 try {
868 int return_value = _this->get_layer();
869
870 sq_pushinteger(vm, return_value);
871 return 1;
872
873 } catch(std::exception& e) {
874 sq_throwerror(vm, e.what());
875 return SQ_ERROR;
876 } catch(...) {
877 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
878 return SQ_ERROR;
879 }
880
881}
882
883static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
884{
885 SQUserPointer data;
886 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
887 sq_throwerror(vm, _SC("'set_pos' called without instance"));
888 return SQ_ERROR;
889 }
890 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
891
892 if (_this == nullptr) {
893 return SQ_ERROR;
894 }
895
896 SQFloat arg0;
897 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
898 sq_throwerror(vm, _SC("Argument 1 not a float"));
899 return SQ_ERROR;
900 }
901 SQFloat arg1;
902 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
903 sq_throwerror(vm, _SC("Argument 2 not a float"));
904 return SQ_ERROR;
905 }
906
907 try {
908 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
909
910 return 0;
911
912 } catch(std::exception& e) {
913 sq_throwerror(vm, e.what());
914 return SQ_ERROR;
915 } catch(...) {
916 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
917 return SQ_ERROR;
918 }
919
920}
921
922static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
923{
924 SQUserPointer data;
925 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
926 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
927 return SQ_ERROR;
928 }
929 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
930
931 if (_this == nullptr) {
932 return SQ_ERROR;
933 }
934
935
936 try {
937 float return_value = _this->get_pos_x();
938
939 sq_pushfloat(vm, return_value);
940 return 1;
941
942 } catch(std::exception& e) {
943 sq_throwerror(vm, e.what());
944 return SQ_ERROR;
945 } catch(...) {
946 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
947 return SQ_ERROR;
948 }
949
950}
951
952static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
953{
954 SQUserPointer data;
955 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
956 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
957 return SQ_ERROR;
958 }
959 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
960
961 if (_this == nullptr) {
962 return SQ_ERROR;
963 }
964
965
966 try {
967 float return_value = _this->get_pos_y();
968
969 sq_pushfloat(vm, return_value);
970 return 1;
971
972 } catch(std::exception& e) {
973 sq_throwerror(vm, e.what());
974 return SQ_ERROR;
975 } catch(...) {
976 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
977 return SQ_ERROR;
978 }
979
980}
981
982static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
983{
984 SQUserPointer data;
985 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
986 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
987 return SQ_ERROR;
988 }
989 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
990
991 if (_this == nullptr) {
992 return SQ_ERROR;
993 }
994
995 SQInteger arg0;
996 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
997 sq_throwerror(vm, _SC("Argument 1 not an integer"));
998 return SQ_ERROR;
999 }
1000
1001 try {
1002 _this->set_anchor_point(static_cast<int> (arg0));
1003
1004 return 0;
1005
1006 } catch(std::exception& e) {
1007 sq_throwerror(vm, e.what());
1008 return SQ_ERROR;
1009 } catch(...) {
1010 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
1011 return SQ_ERROR;
1012 }
1013
1014}
1015
1016static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
1017{
1018 SQUserPointer data;
1019 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1020 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
1021 return SQ_ERROR;
1022 }
1023 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1024
1025 if (_this == nullptr) {
1026 return SQ_ERROR;
1027 }
1028
1029
1030 try {
1031 int return_value = _this->get_anchor_point();
1032
1033 sq_pushinteger(vm, return_value);
1034 return 1;
1035
1036 } catch(std::exception& e) {
1037 sq_throwerror(vm, e.what());
1038 return SQ_ERROR;
1039 } catch(...) {
1040 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
1041 return SQ_ERROR;
1042 }
1043
1044}
1045
1046static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
1047{
1048 SQUserPointer data;
1049 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1050 sq_throwerror(vm, _SC("'set_visible' called without instance"));
1051 return SQ_ERROR;
1052 }
1053 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1054
1055 if (_this == nullptr) {
1056 return SQ_ERROR;
1057 }
1058
1059 SQBool arg0;
1060 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1061 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1062 return SQ_ERROR;
1063 }
1064
1065 try {
1066 _this->set_visible(arg0 == SQTrue);
1067
1068 return 0;
1069
1070 } catch(std::exception& e) {
1071 sq_throwerror(vm, e.what());
1072 return SQ_ERROR;
1073 } catch(...) {
1074 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
1075 return SQ_ERROR;
1076 }
1077
1078}
1079
1080static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
1081{
1082 SQUserPointer data;
1083 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1084 sq_throwerror(vm, _SC("'get_visible' called without instance"));
1085 return SQ_ERROR;
1086 }
1087 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1088
1089 if (_this == nullptr) {
1090 return SQ_ERROR;
1091 }
1092
1093
1094 try {
1095 bool return_value = _this->get_visible();
1096
1097 sq_pushbool(vm, return_value);
1098 return 1;
1099
1100 } catch(std::exception& e) {
1101 sq_throwerror(vm, e.what());
1102 return SQ_ERROR;
1103 } catch(...) {
1104 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
1105 return SQ_ERROR;
1106 }
1107
1108}
1109
1110static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
1111{
1112 SQUserPointer data;
1113 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1114 sq_throwerror(vm, _SC("'set_action' called without instance"));
1115 return SQ_ERROR;
1116 }
1117 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1118
1119 if (_this == nullptr) {
1120 return SQ_ERROR;
1121 }
1122
1123 const SQChar* arg0;
1124 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1125 sq_throwerror(vm, _SC("Argument 1 not a string"));
1126 return SQ_ERROR;
1127 }
1128
1129 try {
1130 _this->set_action(arg0);
1131
1132 return 0;
1133
1134 } catch(std::exception& e) {
1135 sq_throwerror(vm, e.what());
1136 return SQ_ERROR;
1137 } catch(...) {
1138 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
1139 return SQ_ERROR;
1140 }
1141
1142}
1143
1144static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
1145{
1146 SQUserPointer data;
1147 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1148 sq_throwerror(vm, _SC("'get_action' called without instance"));
1149 return SQ_ERROR;
1150 }
1151 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1152
1153 if (_this == nullptr) {
1154 return SQ_ERROR;
1155 }
1156
1157
1158 try {
1159 std::string return_value = _this->get_action();
1160
1161 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1162 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1163 return 1;
1164
1165 } catch(std::exception& e) {
1166 sq_throwerror(vm, e.what());
1167 return SQ_ERROR;
1168 } catch(...) {
1169 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
1170 return SQ_ERROR;
1171 }
1172
1173}
1174
1175static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
1176{
1177 SQUserPointer data;
1178 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1179 sq_throwerror(vm, _SC("'fade_in' called without instance"));
1180 return SQ_ERROR;
1181 }
1182 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1183
1184 if (_this == nullptr) {
1185 return SQ_ERROR;
1186 }
1187
1188 SQFloat arg0;
1189 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1190 sq_throwerror(vm, _SC("Argument 1 not a float"));
1191 return SQ_ERROR;
1192 }
1193
1194 try {
1195 _this->fade_in(static_cast<float> (arg0));
1196
1197 return 0;
1198
1199 } catch(std::exception& e) {
1200 sq_throwerror(vm, e.what());
1201 return SQ_ERROR;
1202 } catch(...) {
1203 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
1204 return SQ_ERROR;
1205 }
1206
1207}
1208
1209static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
1210{
1211 SQUserPointer data;
1212 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1213 sq_throwerror(vm, _SC("'fade_out' called without instance"));
1214 return SQ_ERROR;
1215 }
1216 auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
1217
1218 if (_this == nullptr) {
1219 return SQ_ERROR;
1220 }
1221
1222 SQFloat arg0;
1223 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1224 sq_throwerror(vm, _SC("Argument 1 not a float"));
1225 return SQ_ERROR;
1226 }
1227
1228 try {
1229 _this->fade_out(static_cast<float> (arg0));
1230
1231 return 0;
1232
1233 } catch(std::exception& e) {
1234 sq_throwerror(vm, e.what());
1235 return SQ_ERROR;
1236 } catch(...) {
1237 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
1238 return SQ_ERROR;
1239 }
1240
1241}
1242
1243static SQInteger Gradient_release_hook(SQUserPointer ptr, SQInteger )
1244{
1245 auto _this = reinterpret_cast<scripting::Gradient*> (ptr);
1246 delete _this;
1247 return 0;
1248}
1249
1250static SQInteger Gradient_set_direction_wrapper(HSQUIRRELVM vm)
1251{
1252 SQUserPointer data;
1253 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1254 sq_throwerror(vm, _SC("'set_direction' called without instance"));
1255 return SQ_ERROR;
1256 }
1257 auto _this = reinterpret_cast<scripting::Gradient*> (data);
1258
1259 if (_this == nullptr) {
1260 return SQ_ERROR;
1261 }
1262
1263 const SQChar* arg0;
1264 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1265 sq_throwerror(vm, _SC("Argument 1 not a string"));
1266 return SQ_ERROR;
1267 }
1268
1269 try {
1270 _this->set_direction(arg0);
1271
1272 return 0;
1273
1274 } catch(std::exception& e) {
1275 sq_throwerror(vm, e.what());
1276 return SQ_ERROR;
1277 } catch(...) {
1278 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_direction'"));
1279 return SQ_ERROR;
1280 }
1281
1282}
1283
1284static SQInteger Gradient_get_direction_wrapper(HSQUIRRELVM vm)
1285{
1286 SQUserPointer data;
1287 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1288 sq_throwerror(vm, _SC("'get_direction' called without instance"));
1289 return SQ_ERROR;
1290 }
1291 auto _this = reinterpret_cast<scripting::Gradient*> (data);
1292
1293 if (_this == nullptr) {
1294 return SQ_ERROR;
1295 }
1296
1297
1298 try {
1299 std::string return_value = _this->get_direction();
1300
1301 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1302 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1303 return 1;
1304
1305 } catch(std::exception& e) {
1306 sq_throwerror(vm, e.what());
1307 return SQ_ERROR;
1308 } catch(...) {
1309 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_direction'"));
1310 return SQ_ERROR;
1311 }
1312
1313}
1314
1315static SQInteger Gradient_set_color1_wrapper(HSQUIRRELVM vm)
1316{
1317 SQUserPointer data;
1318 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1319 sq_throwerror(vm, _SC("'set_color1' called without instance"));
1320 return SQ_ERROR;
1321 }
1322 auto _this = reinterpret_cast<scripting::Gradient*> (data);
1323
1324 if (_this == nullptr) {
1325 return SQ_ERROR;
1326 }
1327
1328 SQFloat arg0;
1329 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1330 sq_throwerror(vm, _SC("Argument 1 not a float"));
1331 return SQ_ERROR;
1332 }
1333 SQFloat arg1;
1334 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1335 sq_throwerror(vm, _SC("Argument 2 not a float"));
1336 return SQ_ERROR;
1337 }
1338 SQFloat arg2;
1339 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
1340 sq_throwerror(vm, _SC("Argument 3 not a float"));
1341 return SQ_ERROR;
1342 }
1343
1344 try {
1345 _this->set_color1(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
1346
1347 return 0;
1348
1349 } catch(std::exception& e) {
1350 sq_throwerror(vm, e.what());
1351 return SQ_ERROR;
1352 } catch(...) {
1353 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color1'"));
1354 return SQ_ERROR;
1355 }
1356
1357}
1358
1359static SQInteger Gradient_set_color2_wrapper(HSQUIRRELVM vm)
1360{
1361 SQUserPointer data;
1362 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1363 sq_throwerror(vm, _SC("'set_color2' called without instance"));
1364 return SQ_ERROR;
1365 }
1366 auto _this = reinterpret_cast<scripting::Gradient*> (data);
1367
1368 if (_this == nullptr) {
1369 return SQ_ERROR;
1370 }
1371
1372 SQFloat arg0;
1373 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1374 sq_throwerror(vm, _SC("Argument 1 not a float"));
1375 return SQ_ERROR;
1376 }
1377 SQFloat arg1;
1378 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1379 sq_throwerror(vm, _SC("Argument 2 not a float"));
1380 return SQ_ERROR;
1381 }
1382 SQFloat arg2;
1383 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
1384 sq_throwerror(vm, _SC("Argument 3 not a float"));
1385 return SQ_ERROR;
1386 }
1387
1388 try {
1389 _this->set_color2(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
1390
1391 return 0;
1392
1393 } catch(std::exception& e) {
1394 sq_throwerror(vm, e.what());
1395 return SQ_ERROR;
1396 } catch(...) {
1397 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color2'"));
1398 return SQ_ERROR;
1399 }
1400
1401}
1402
1403static SQInteger Gradient_swap_colors_wrapper(HSQUIRRELVM vm)
1404{
1405 SQUserPointer data;
1406 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1407 sq_throwerror(vm, _SC("'swap_colors' called without instance"));
1408 return SQ_ERROR;
1409 }
1410 auto _this = reinterpret_cast<scripting::Gradient*> (data);
1411
1412 if (_this == nullptr) {
1413 return SQ_ERROR;
1414 }
1415
1416
1417 try {
1418 _this->swap_colors();
1419
1420 return 0;
1421
1422 } catch(std::exception& e) {
1423 sq_throwerror(vm, e.what());
1424 return SQ_ERROR;
1425 } catch(...) {
1426 sq_throwerror(vm, _SC("Unexpected exception while executing function 'swap_colors'"));
1427 return SQ_ERROR;
1428 }
1429
1430}
1431
1432static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
1433{
1434 auto _this = reinterpret_cast<scripting::LevelTime*> (ptr);
1435 delete _this;
1436 return 0;
1437}
1438
1439static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
1440{
1441 SQUserPointer data;
1442 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1443 sq_throwerror(vm, _SC("'start' called without instance"));
1444 return SQ_ERROR;
1445 }
1446 auto _this = reinterpret_cast<scripting::LevelTime*> (data);
1447
1448 if (_this == nullptr) {
1449 return SQ_ERROR;
1450 }
1451
1452
1453 try {
1454 _this->start();
1455
1456 return 0;
1457
1458 } catch(std::exception& e) {
1459 sq_throwerror(vm, e.what());
1460 return SQ_ERROR;
1461 } catch(...) {
1462 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
1463 return SQ_ERROR;
1464 }
1465
1466}
1467
1468static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
1469{
1470 SQUserPointer data;
1471 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1472 sq_throwerror(vm, _SC("'stop' called without instance"));
1473 return SQ_ERROR;
1474 }
1475 auto _this = reinterpret_cast<scripting::LevelTime*> (data);
1476
1477 if (_this == nullptr) {
1478 return SQ_ERROR;
1479 }
1480
1481
1482 try {
1483 _this->stop();
1484
1485 return 0;
1486
1487 } catch(std::exception& e) {
1488 sq_throwerror(vm, e.what());
1489 return SQ_ERROR;
1490 } catch(...) {
1491 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
1492 return SQ_ERROR;
1493 }
1494
1495}
1496
1497static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
1498{
1499 SQUserPointer data;
1500 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1501 sq_throwerror(vm, _SC("'get_time' called without instance"));
1502 return SQ_ERROR;
1503 }
1504 auto _this = reinterpret_cast<scripting::LevelTime*> (data);
1505
1506 if (_this == nullptr) {
1507 return SQ_ERROR;
1508 }
1509
1510
1511 try {
1512 float return_value = _this->get_time();
1513
1514 sq_pushfloat(vm, return_value);
1515 return 1;
1516
1517 } catch(std::exception& e) {
1518 sq_throwerror(vm, e.what());
1519 return SQ_ERROR;
1520 } catch(...) {
1521 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
1522 return SQ_ERROR;
1523 }
1524
1525}
1526
1527static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
1528{
1529 SQUserPointer data;
1530 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1531 sq_throwerror(vm, _SC("'set_time' called without instance"));
1532 return SQ_ERROR;
1533 }
1534 auto _this = reinterpret_cast<scripting::LevelTime*> (data);
1535
1536 if (_this == nullptr) {
1537 return SQ_ERROR;
1538 }
1539
1540 SQFloat arg0;
1541 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1542 sq_throwerror(vm, _SC("Argument 1 not a float"));
1543 return SQ_ERROR;
1544 }
1545
1546 try {
1547 _this->set_time(static_cast<float> (arg0));
1548
1549 return 0;
1550
1551 } catch(std::exception& e) {
1552 sq_throwerror(vm, e.what());
1553 return SQ_ERROR;
1554 } catch(...) {
1555 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
1556 return SQ_ERROR;
1557 }
1558
1559}
1560
1561static SQInteger ParticleSystem_release_hook(SQUserPointer ptr, SQInteger )
1562{
1563 auto _this = reinterpret_cast<scripting::ParticleSystem*> (ptr);
1564 delete _this;
1565 return 0;
1566}
1567
1568static SQInteger ParticleSystem_set_enabled_wrapper(HSQUIRRELVM vm)
1569{
1570 SQUserPointer data;
1571 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1572 sq_throwerror(vm, _SC("'set_enabled' called without instance"));
1573 return SQ_ERROR;
1574 }
1575 auto _this = reinterpret_cast<scripting::ParticleSystem*> (data);
1576
1577 if (_this == nullptr) {
1578 return SQ_ERROR;
1579 }
1580
1581 SQBool arg0;
1582 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1583 sq_throwerror(vm, _SC("Argument 1 not a bool"));
1584 return SQ_ERROR;
1585 }
1586
1587 try {
1588 _this->set_enabled(arg0 == SQTrue);
1589
1590 return 0;
1591
1592 } catch(std::exception& e) {
1593 sq_throwerror(vm, e.what());
1594 return SQ_ERROR;
1595 } catch(...) {
1596 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'"));
1597 return SQ_ERROR;
1598 }
1599
1600}
1601
1602static SQInteger ParticleSystem_get_enabled_wrapper(HSQUIRRELVM vm)
1603{
1604 SQUserPointer data;
1605 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1606 sq_throwerror(vm, _SC("'get_enabled' called without instance"));
1607 return SQ_ERROR;
1608 }
1609 auto _this = reinterpret_cast<scripting::ParticleSystem*> (data);
1610
1611 if (_this == nullptr) {
1612 return SQ_ERROR;
1613 }
1614
1615
1616 try {
1617 bool return_value = _this->get_enabled();
1618
1619 sq_pushbool(vm, return_value);
1620 return 1;
1621
1622 } catch(std::exception& e) {
1623 sq_throwerror(vm, e.what());
1624 return SQ_ERROR;
1625 } catch(...) {
1626 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'"));
1627 return SQ_ERROR;
1628 }
1629
1630}
1631
1632static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
1633{
1634 auto _this = reinterpret_cast<scripting::Platform*> (ptr);
1635 delete _this;
1636 return 0;
1637}
1638
1639static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
1640{
1641 SQUserPointer data;
1642 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1643 sq_throwerror(vm, _SC("'goto_node' called without instance"));
1644 return SQ_ERROR;
1645 }
1646 auto _this = reinterpret_cast<scripting::Platform*> (data);
1647
1648 if (_this == nullptr) {
1649 return SQ_ERROR;
1650 }
1651
1652 SQInteger arg0;
1653 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1654 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1655 return SQ_ERROR;
1656 }
1657
1658 try {
1659 _this->goto_node(static_cast<int> (arg0));
1660
1661 return 0;
1662
1663 } catch(std::exception& e) {
1664 sq_throwerror(vm, e.what());
1665 return SQ_ERROR;
1666 } catch(...) {
1667 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
1668 return SQ_ERROR;
1669 }
1670
1671}
1672
1673static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
1674{
1675 SQUserPointer data;
1676 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1677 sq_throwerror(vm, _SC("'start_moving' called without instance"));
1678 return SQ_ERROR;
1679 }
1680 auto _this = reinterpret_cast<scripting::Platform*> (data);
1681
1682 if (_this == nullptr) {
1683 return SQ_ERROR;
1684 }
1685
1686
1687 try {
1688 _this->start_moving();
1689
1690 return 0;
1691
1692 } catch(std::exception& e) {
1693 sq_throwerror(vm, e.what());
1694 return SQ_ERROR;
1695 } catch(...) {
1696 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
1697 return SQ_ERROR;
1698 }
1699
1700}
1701
1702static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
1703{
1704 SQUserPointer data;
1705 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1706 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
1707 return SQ_ERROR;
1708 }
1709 auto _this = reinterpret_cast<scripting::Platform*> (data);
1710
1711 if (_this == nullptr) {
1712 return SQ_ERROR;
1713 }
1714
1715
1716 try {
1717 _this->stop_moving();
1718
1719 return 0;
1720
1721 } catch(std::exception& e) {
1722 sq_throwerror(vm, e.what());
1723 return SQ_ERROR;
1724 } catch(...) {
1725 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
1726 return SQ_ERROR;
1727 }
1728
1729}
1730
1731static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
1732{
1733 auto _this = reinterpret_cast<scripting::Player*> (ptr);
1734 delete _this;
1735 return 0;
1736}
1737
1738static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
1739{
1740 SQUserPointer data;
1741 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1742 sq_throwerror(vm, _SC("'add_bonus' called without instance"));
1743 return SQ_ERROR;
1744 }
1745 auto _this = reinterpret_cast<scripting::Player*> (data);
1746
1747 if (_this == nullptr) {
1748 return SQ_ERROR;
1749 }
1750
1751 const SQChar* arg0;
1752 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1753 sq_throwerror(vm, _SC("Argument 1 not a string"));
1754 return SQ_ERROR;
1755 }
1756
1757 try {
1758 bool return_value = _this->add_bonus(arg0);
1759
1760 sq_pushbool(vm, return_value);
1761 return 1;
1762
1763 } catch(std::exception& e) {
1764 sq_throwerror(vm, e.what());
1765 return SQ_ERROR;
1766 } catch(...) {
1767 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
1768 return SQ_ERROR;
1769 }
1770
1771}
1772
1773static SQInteger Player_set_bonus_wrapper(HSQUIRRELVM vm)
1774{
1775 SQUserPointer data;
1776 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1777 sq_throwerror(vm, _SC("'set_bonus' called without instance"));
1778 return SQ_ERROR;
1779 }
1780 auto _this = reinterpret_cast<scripting::Player*> (data);
1781
1782 if (_this == nullptr) {
1783 return SQ_ERROR;
1784 }
1785
1786 const SQChar* arg0;
1787 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1788 sq_throwerror(vm, _SC("Argument 1 not a string"));
1789 return SQ_ERROR;
1790 }
1791
1792 try {
1793 bool return_value = _this->set_bonus(arg0);
1794
1795 sq_pushbool(vm, return_value);
1796 return 1;
1797
1798 } catch(std::exception& e) {
1799 sq_throwerror(vm, e.what());
1800 return SQ_ERROR;
1801 } catch(...) {
1802 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_bonus'"));
1803 return SQ_ERROR;
1804 }
1805
1806}
1807
1808static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
1809{
1810 SQUserPointer data;
1811 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1812 sq_throwerror(vm, _SC("'add_coins' called without instance"));
1813 return SQ_ERROR;
1814 }
1815 auto _this = reinterpret_cast<scripting::Player*> (data);
1816
1817 if (_this == nullptr) {
1818 return SQ_ERROR;
1819 }
1820
1821 SQInteger arg0;
1822 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1823 sq_throwerror(vm, _SC("Argument 1 not an integer"));
1824 return SQ_ERROR;
1825 }
1826
1827 try {
1828 _this->add_coins(static_cast<int> (arg0));
1829
1830 return 0;
1831
1832 } catch(std::exception& e) {
1833 sq_throwerror(vm, e.what());
1834 return SQ_ERROR;
1835 } catch(...) {
1836 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
1837 return SQ_ERROR;
1838 }
1839
1840}
1841
1842static SQInteger Player_get_coins_wrapper(HSQUIRRELVM vm)
1843{
1844 SQUserPointer data;
1845 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1846 sq_throwerror(vm, _SC("'get_coins' called without instance"));
1847 return SQ_ERROR;
1848 }
1849 auto _this = reinterpret_cast<scripting::Player*> (data);
1850
1851 if (_this == nullptr) {
1852 return SQ_ERROR;
1853 }
1854
1855
1856 try {
1857 int return_value = _this->get_coins();
1858
1859 sq_pushinteger(vm, return_value);
1860 return 1;
1861
1862 } catch(std::exception& e) {
1863 sq_throwerror(vm, e.what());
1864 return SQ_ERROR;
1865 } catch(...) {
1866 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_coins'"));
1867 return SQ_ERROR;
1868 }
1869
1870}
1871
1872static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
1873{
1874 SQUserPointer data;
1875 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1876 sq_throwerror(vm, _SC("'make_invincible' called without instance"));
1877 return SQ_ERROR;
1878 }
1879 auto _this = reinterpret_cast<scripting::Player*> (data);
1880
1881 if (_this == nullptr) {
1882 return SQ_ERROR;
1883 }
1884
1885
1886 try {
1887 _this->make_invincible();
1888
1889 return 0;
1890
1891 } catch(std::exception& e) {
1892 sq_throwerror(vm, e.what());
1893 return SQ_ERROR;
1894 } catch(...) {
1895 sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
1896 return SQ_ERROR;
1897 }
1898
1899}
1900
1901static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
1902{
1903 SQUserPointer data;
1904 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1905 sq_throwerror(vm, _SC("'deactivate' called without instance"));
1906 return SQ_ERROR;
1907 }
1908 auto _this = reinterpret_cast<scripting::Player*> (data);
1909
1910 if (_this == nullptr) {
1911 return SQ_ERROR;
1912 }
1913
1914
1915 try {
1916 _this->deactivate();
1917
1918 return 0;
1919
1920 } catch(std::exception& e) {
1921 sq_throwerror(vm, e.what());
1922 return SQ_ERROR;
1923 } catch(...) {
1924 sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
1925 return SQ_ERROR;
1926 }
1927
1928}
1929
1930static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
1931{
1932 SQUserPointer data;
1933 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1934 sq_throwerror(vm, _SC("'activate' called without instance"));
1935 return SQ_ERROR;
1936 }
1937 auto _this = reinterpret_cast<scripting::Player*> (data);
1938
1939 if (_this == nullptr) {
1940 return SQ_ERROR;
1941 }
1942
1943
1944 try {
1945 _this->activate();
1946
1947 return 0;
1948
1949 } catch(std::exception& e) {
1950 sq_throwerror(vm, e.what());
1951 return SQ_ERROR;
1952 } catch(...) {
1953 sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
1954 return SQ_ERROR;
1955 }
1956
1957}
1958
1959static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
1960{
1961 SQUserPointer data;
1962 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1963 sq_throwerror(vm, _SC("'walk' called without instance"));
1964 return SQ_ERROR;
1965 }
1966 auto _this = reinterpret_cast<scripting::Player*> (data);
1967
1968 if (_this == nullptr) {
1969 return SQ_ERROR;
1970 }
1971
1972 SQFloat arg0;
1973 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1974 sq_throwerror(vm, _SC("Argument 1 not a float"));
1975 return SQ_ERROR;
1976 }
1977
1978 try {
1979 _this->walk(static_cast<float> (arg0));
1980
1981 return 0;
1982
1983 } catch(std::exception& e) {
1984 sq_throwerror(vm, e.what());
1985 return SQ_ERROR;
1986 } catch(...) {
1987 sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
1988 return SQ_ERROR;
1989 }
1990
1991}
1992
1993static SQInteger Player_set_dir_wrapper(HSQUIRRELVM vm)
1994{
1995 SQUserPointer data;
1996 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1997 sq_throwerror(vm, _SC("'set_dir' called without instance"));
1998 return SQ_ERROR;
1999 }
2000 auto _this = reinterpret_cast<scripting::Player*> (data);
2001
2002 if (_this == nullptr) {
2003 return SQ_ERROR;
2004 }
2005
2006 SQBool arg0;
2007 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2008 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2009 return SQ_ERROR;
2010 }
2011
2012 try {
2013 _this->set_dir(arg0 == SQTrue);
2014
2015 return 0;
2016
2017 } catch(std::exception& e) {
2018 sq_throwerror(vm, e.what());
2019 return SQ_ERROR;
2020 } catch(...) {
2021 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_dir'"));
2022 return SQ_ERROR;
2023 }
2024
2025}
2026
2027static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
2028{
2029 SQUserPointer data;
2030 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2031 sq_throwerror(vm, _SC("'set_visible' called without instance"));
2032 return SQ_ERROR;
2033 }
2034 auto _this = reinterpret_cast<scripting::Player*> (data);
2035
2036 if (_this == nullptr) {
2037 return SQ_ERROR;
2038 }
2039
2040 SQBool arg0;
2041 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2042 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2043 return SQ_ERROR;
2044 }
2045
2046 try {
2047 _this->set_visible(arg0 == SQTrue);
2048
2049 return 0;
2050
2051 } catch(std::exception& e) {
2052 sq_throwerror(vm, e.what());
2053 return SQ_ERROR;
2054 } catch(...) {
2055 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
2056 return SQ_ERROR;
2057 }
2058
2059}
2060
2061static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
2062{
2063 SQUserPointer data;
2064 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2065 sq_throwerror(vm, _SC("'get_visible' called without instance"));
2066 return SQ_ERROR;
2067 }
2068 auto _this = reinterpret_cast<scripting::Player*> (data);
2069
2070 if (_this == nullptr) {
2071 return SQ_ERROR;
2072 }
2073
2074
2075 try {
2076 bool return_value = _this->get_visible();
2077
2078 sq_pushbool(vm, return_value);
2079 return 1;
2080
2081 } catch(std::exception& e) {
2082 sq_throwerror(vm, e.what());
2083 return SQ_ERROR;
2084 } catch(...) {
2085 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
2086 return SQ_ERROR;
2087 }
2088
2089}
2090
2091static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
2092{
2093 SQUserPointer data;
2094 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2095 sq_throwerror(vm, _SC("'kill' called without instance"));
2096 return SQ_ERROR;
2097 }
2098 auto _this = reinterpret_cast<scripting::Player*> (data);
2099
2100 if (_this == nullptr) {
2101 return SQ_ERROR;
2102 }
2103
2104 SQBool arg0;
2105 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2106 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2107 return SQ_ERROR;
2108 }
2109
2110 try {
2111 _this->kill(arg0 == SQTrue);
2112
2113 return 0;
2114
2115 } catch(std::exception& e) {
2116 sq_throwerror(vm, e.what());
2117 return SQ_ERROR;
2118 } catch(...) {
2119 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
2120 return SQ_ERROR;
2121 }
2122
2123}
2124
2125static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
2126{
2127 SQUserPointer data;
2128 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2129 sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
2130 return SQ_ERROR;
2131 }
2132 auto _this = reinterpret_cast<scripting::Player*> (data);
2133
2134 if (_this == nullptr) {
2135 return SQ_ERROR;
2136 }
2137
2138 SQBool arg0;
2139 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2140 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2141 return SQ_ERROR;
2142 }
2143
2144 try {
2145 _this->set_ghost_mode(arg0 == SQTrue);
2146
2147 return 0;
2148
2149 } catch(std::exception& e) {
2150 sq_throwerror(vm, e.what());
2151 return SQ_ERROR;
2152 } catch(...) {
2153 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
2154 return SQ_ERROR;
2155 }
2156
2157}
2158
2159static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
2160{
2161 SQUserPointer data;
2162 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2163 sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
2164 return SQ_ERROR;
2165 }
2166 auto _this = reinterpret_cast<scripting::Player*> (data);
2167
2168 if (_this == nullptr) {
2169 return SQ_ERROR;
2170 }
2171
2172
2173 try {
2174 bool return_value = _this->get_ghost_mode();
2175
2176 sq_pushbool(vm, return_value);
2177 return 1;
2178
2179 } catch(std::exception& e) {
2180 sq_throwerror(vm, e.what());
2181 return SQ_ERROR;
2182 } catch(...) {
2183 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
2184 return SQ_ERROR;
2185 }
2186
2187}
2188
2189static SQInteger Player_kick_wrapper(HSQUIRRELVM vm)
2190{
2191 SQUserPointer data;
2192 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2193 sq_throwerror(vm, _SC("'kick' called without instance"));
2194 return SQ_ERROR;
2195 }
2196 auto _this = reinterpret_cast<scripting::Player*> (data);
2197
2198 if (_this == nullptr) {
2199 return SQ_ERROR;
2200 }
2201
2202
2203 try {
2204 _this->kick();
2205
2206 return 0;
2207
2208 } catch(std::exception& e) {
2209 sq_throwerror(vm, e.what());
2210 return SQ_ERROR;
2211 } catch(...) {
2212 sq_throwerror(vm, _SC("Unexpected exception while executing function 'kick'"));
2213 return SQ_ERROR;
2214 }
2215
2216}
2217
2218static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
2219{
2220 SQUserPointer data;
2221 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2222 sq_throwerror(vm, _SC("'do_cheer' called without instance"));
2223 return SQ_ERROR;
2224 }
2225 auto _this = reinterpret_cast<scripting::Player*> (data);
2226
2227 if (_this == nullptr) {
2228 return SQ_ERROR;
2229 }
2230
2231
2232 try {
2233 _this->do_cheer();
2234
2235 return 0;
2236
2237 } catch(std::exception& e) {
2238 sq_throwerror(vm, e.what());
2239 return SQ_ERROR;
2240 } catch(...) {
2241 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
2242 return SQ_ERROR;
2243 }
2244
2245}
2246
2247static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
2248{
2249 SQUserPointer data;
2250 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2251 sq_throwerror(vm, _SC("'do_duck' called without instance"));
2252 return SQ_ERROR;
2253 }
2254 auto _this = reinterpret_cast<scripting::Player*> (data);
2255
2256 if (_this == nullptr) {
2257 return SQ_ERROR;
2258 }
2259
2260
2261 try {
2262 _this->do_duck();
2263
2264 return 0;
2265
2266 } catch(std::exception& e) {
2267 sq_throwerror(vm, e.what());
2268 return SQ_ERROR;
2269 } catch(...) {
2270 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
2271 return SQ_ERROR;
2272 }
2273
2274}
2275
2276static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
2277{
2278 SQUserPointer data;
2279 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2280 sq_throwerror(vm, _SC("'do_standup' called without instance"));
2281 return SQ_ERROR;
2282 }
2283 auto _this = reinterpret_cast<scripting::Player*> (data);
2284
2285 if (_this == nullptr) {
2286 return SQ_ERROR;
2287 }
2288
2289
2290 try {
2291 _this->do_standup();
2292
2293 return 0;
2294
2295 } catch(std::exception& e) {
2296 sq_throwerror(vm, e.what());
2297 return SQ_ERROR;
2298 } catch(...) {
2299 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
2300 return SQ_ERROR;
2301 }
2302
2303}
2304
2305static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
2306{
2307 SQUserPointer data;
2308 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2309 sq_throwerror(vm, _SC("'do_backflip' called without instance"));
2310 return SQ_ERROR;
2311 }
2312 auto _this = reinterpret_cast<scripting::Player*> (data);
2313
2314 if (_this == nullptr) {
2315 return SQ_ERROR;
2316 }
2317
2318
2319 try {
2320 _this->do_backflip();
2321
2322 return 0;
2323
2324 } catch(std::exception& e) {
2325 sq_throwerror(vm, e.what());
2326 return SQ_ERROR;
2327 } catch(...) {
2328 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
2329 return SQ_ERROR;
2330 }
2331
2332}
2333
2334static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
2335{
2336 SQUserPointer data;
2337 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2338 sq_throwerror(vm, _SC("'do_jump' called without instance"));
2339 return SQ_ERROR;
2340 }
2341 auto _this = reinterpret_cast<scripting::Player*> (data);
2342
2343 if (_this == nullptr) {
2344 return SQ_ERROR;
2345 }
2346
2347 SQFloat arg0;
2348 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2349 sq_throwerror(vm, _SC("Argument 1 not a float"));
2350 return SQ_ERROR;
2351 }
2352
2353 try {
2354 _this->do_jump(static_cast<float> (arg0));
2355
2356 return 0;
2357
2358 } catch(std::exception& e) {
2359 sq_throwerror(vm, e.what());
2360 return SQ_ERROR;
2361 } catch(...) {
2362 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
2363 return SQ_ERROR;
2364 }
2365
2366}
2367
2368static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
2369{
2370 SQUserPointer data;
2371 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2372 sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
2373 return SQ_ERROR;
2374 }
2375 auto _this = reinterpret_cast<scripting::Player*> (data);
2376
2377 if (_this == nullptr) {
2378 return SQ_ERROR;
2379 }
2380
2381 const SQChar* arg0;
2382 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2383 sq_throwerror(vm, _SC("Argument 1 not a string"));
2384 return SQ_ERROR;
2385 }
2386
2387 try {
2388 _this->trigger_sequence(arg0);
2389
2390 return 0;
2391
2392 } catch(std::exception& e) {
2393 sq_throwerror(vm, e.what());
2394 return SQ_ERROR;
2395 } catch(...) {
2396 sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
2397 return SQ_ERROR;
2398 }
2399
2400}
2401
2402static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
2403{
2404 SQUserPointer data;
2405 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2406 sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
2407 return SQ_ERROR;
2408 }
2409 auto _this = reinterpret_cast<scripting::Player*> (data);
2410
2411 if (_this == nullptr) {
2412 return SQ_ERROR;
2413 }
2414
2415 SQBool arg0;
2416 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2417 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2418 return SQ_ERROR;
2419 }
2420
2421 try {
2422 _this->use_scripting_controller(arg0 == SQTrue);
2423
2424 return 0;
2425
2426 } catch(std::exception& e) {
2427 sq_throwerror(vm, e.what());
2428 return SQ_ERROR;
2429 } catch(...) {
2430 sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
2431 return SQ_ERROR;
2432 }
2433
2434}
2435
2436static SQInteger Player_has_grabbed_wrapper(HSQUIRRELVM vm)
2437{
2438 SQUserPointer data;
2439 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2440 sq_throwerror(vm, _SC("'has_grabbed' called without instance"));
2441 return SQ_ERROR;
2442 }
2443 auto _this = reinterpret_cast<scripting::Player*> (data);
2444
2445 if (_this == nullptr) {
2446 return SQ_ERROR;
2447 }
2448
2449 const SQChar* arg0;
2450 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2451 sq_throwerror(vm, _SC("Argument 1 not a string"));
2452 return SQ_ERROR;
2453 }
2454
2455 try {
2456 bool return_value = _this->has_grabbed(arg0);
2457
2458 sq_pushbool(vm, return_value);
2459 return 1;
2460
2461 } catch(std::exception& e) {
2462 sq_throwerror(vm, e.what());
2463 return SQ_ERROR;
2464 } catch(...) {
2465 sq_throwerror(vm, _SC("Unexpected exception while executing function 'has_grabbed'"));
2466 return SQ_ERROR;
2467 }
2468
2469}
2470
2471static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
2472{
2473 SQUserPointer data;
2474 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2475 sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
2476 return SQ_ERROR;
2477 }
2478 auto _this = reinterpret_cast<scripting::Player*> (data);
2479
2480 if (_this == nullptr) {
2481 return SQ_ERROR;
2482 }
2483
2484 const SQChar* arg0;
2485 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2486 sq_throwerror(vm, _SC("Argument 1 not a string"));
2487 return SQ_ERROR;
2488 }
2489 SQBool arg1;
2490 if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
2491 sq_throwerror(vm, _SC("Argument 2 not a bool"));
2492 return SQ_ERROR;
2493 }
2494
2495 try {
2496 _this->do_scripting_controller(arg0, arg1 == SQTrue);
2497
2498 return 0;
2499
2500 } catch(std::exception& e) {
2501 sq_throwerror(vm, e.what());
2502 return SQ_ERROR;
2503 } catch(...) {
2504 sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
2505 return SQ_ERROR;
2506 }
2507
2508}
2509
2510static SQInteger Player_get_velocity_x_wrapper(HSQUIRRELVM vm)
2511{
2512 SQUserPointer data;
2513 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2514 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
2515 return SQ_ERROR;
2516 }
2517 auto _this = reinterpret_cast<scripting::Player*> (data);
2518
2519 if (_this == nullptr) {
2520 return SQ_ERROR;
2521 }
2522
2523
2524 try {
2525 float return_value = _this->get_velocity_x();
2526
2527 sq_pushfloat(vm, return_value);
2528 return 1;
2529
2530 } catch(std::exception& e) {
2531 sq_throwerror(vm, e.what());
2532 return SQ_ERROR;
2533 } catch(...) {
2534 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
2535 return SQ_ERROR;
2536 }
2537
2538}
2539
2540static SQInteger Player_get_velocity_y_wrapper(HSQUIRRELVM vm)
2541{
2542 SQUserPointer data;
2543 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2544 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
2545 return SQ_ERROR;
2546 }
2547 auto _this = reinterpret_cast<scripting::Player*> (data);
2548
2549 if (_this == nullptr) {
2550 return SQ_ERROR;
2551 }
2552
2553
2554 try {
2555 float return_value = _this->get_velocity_y();
2556
2557 sq_pushfloat(vm, return_value);
2558 return 1;
2559
2560 } catch(std::exception& e) {
2561 sq_throwerror(vm, e.what());
2562 return SQ_ERROR;
2563 } catch(...) {
2564 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
2565 return SQ_ERROR;
2566 }
2567
2568}
2569
2570static SQInteger Rock_release_hook(SQUserPointer ptr, SQInteger )
2571{
2572 auto _this = reinterpret_cast<scripting::Rock*> (ptr);
2573 delete _this;
2574 return 0;
2575}
2576
2577static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
2578{
2579 auto _this = reinterpret_cast<scripting::ScriptedObject*> (ptr);
2580 delete _this;
2581 return 0;
2582}
2583
2584static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
2585{
2586 SQUserPointer data;
2587 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2588 sq_throwerror(vm, _SC("'set_action' called without instance"));
2589 return SQ_ERROR;
2590 }
2591 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2592
2593 if (_this == nullptr) {
2594 return SQ_ERROR;
2595 }
2596
2597 const SQChar* arg0;
2598 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
2599 sq_throwerror(vm, _SC("Argument 1 not a string"));
2600 return SQ_ERROR;
2601 }
2602
2603 try {
2604 _this->set_action(arg0);
2605
2606 return 0;
2607
2608 } catch(std::exception& e) {
2609 sq_throwerror(vm, e.what());
2610 return SQ_ERROR;
2611 } catch(...) {
2612 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
2613 return SQ_ERROR;
2614 }
2615
2616}
2617
2618static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
2619{
2620 SQUserPointer data;
2621 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2622 sq_throwerror(vm, _SC("'get_action' called without instance"));
2623 return SQ_ERROR;
2624 }
2625 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2626
2627 if (_this == nullptr) {
2628 return SQ_ERROR;
2629 }
2630
2631
2632 try {
2633 std::string return_value = _this->get_action();
2634
2635 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
2636 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
2637 return 1;
2638
2639 } catch(std::exception& e) {
2640 sq_throwerror(vm, e.what());
2641 return SQ_ERROR;
2642 } catch(...) {
2643 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
2644 return SQ_ERROR;
2645 }
2646
2647}
2648
2649static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
2650{
2651 SQUserPointer data;
2652 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2653 sq_throwerror(vm, _SC("'move' called without instance"));
2654 return SQ_ERROR;
2655 }
2656 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2657
2658 if (_this == nullptr) {
2659 return SQ_ERROR;
2660 }
2661
2662 SQFloat arg0;
2663 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2664 sq_throwerror(vm, _SC("Argument 1 not a float"));
2665 return SQ_ERROR;
2666 }
2667 SQFloat arg1;
2668 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2669 sq_throwerror(vm, _SC("Argument 2 not a float"));
2670 return SQ_ERROR;
2671 }
2672
2673 try {
2674 _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
2675
2676 return 0;
2677
2678 } catch(std::exception& e) {
2679 sq_throwerror(vm, e.what());
2680 return SQ_ERROR;
2681 } catch(...) {
2682 sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
2683 return SQ_ERROR;
2684 }
2685
2686}
2687
2688static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
2689{
2690 SQUserPointer data;
2691 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2692 sq_throwerror(vm, _SC("'set_pos' called without instance"));
2693 return SQ_ERROR;
2694 }
2695 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2696
2697 if (_this == nullptr) {
2698 return SQ_ERROR;
2699 }
2700
2701 SQFloat arg0;
2702 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2703 sq_throwerror(vm, _SC("Argument 1 not a float"));
2704 return SQ_ERROR;
2705 }
2706 SQFloat arg1;
2707 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2708 sq_throwerror(vm, _SC("Argument 2 not a float"));
2709 return SQ_ERROR;
2710 }
2711
2712 try {
2713 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
2714
2715 return 0;
2716
2717 } catch(std::exception& e) {
2718 sq_throwerror(vm, e.what());
2719 return SQ_ERROR;
2720 } catch(...) {
2721 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
2722 return SQ_ERROR;
2723 }
2724
2725}
2726
2727static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
2728{
2729 SQUserPointer data;
2730 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2731 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
2732 return SQ_ERROR;
2733 }
2734 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2735
2736 if (_this == nullptr) {
2737 return SQ_ERROR;
2738 }
2739
2740
2741 try {
2742 float return_value = _this->get_pos_x();
2743
2744 sq_pushfloat(vm, return_value);
2745 return 1;
2746
2747 } catch(std::exception& e) {
2748 sq_throwerror(vm, e.what());
2749 return SQ_ERROR;
2750 } catch(...) {
2751 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
2752 return SQ_ERROR;
2753 }
2754
2755}
2756
2757static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
2758{
2759 SQUserPointer data;
2760 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2761 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
2762 return SQ_ERROR;
2763 }
2764 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2765
2766 if (_this == nullptr) {
2767 return SQ_ERROR;
2768 }
2769
2770
2771 try {
2772 float return_value = _this->get_pos_y();
2773
2774 sq_pushfloat(vm, return_value);
2775 return 1;
2776
2777 } catch(std::exception& e) {
2778 sq_throwerror(vm, e.what());
2779 return SQ_ERROR;
2780 } catch(...) {
2781 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
2782 return SQ_ERROR;
2783 }
2784
2785}
2786
2787static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
2788{
2789 SQUserPointer data;
2790 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2791 sq_throwerror(vm, _SC("'set_velocity' called without instance"));
2792 return SQ_ERROR;
2793 }
2794 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2795
2796 if (_this == nullptr) {
2797 return SQ_ERROR;
2798 }
2799
2800 SQFloat arg0;
2801 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2802 sq_throwerror(vm, _SC("Argument 1 not a float"));
2803 return SQ_ERROR;
2804 }
2805 SQFloat arg1;
2806 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2807 sq_throwerror(vm, _SC("Argument 2 not a float"));
2808 return SQ_ERROR;
2809 }
2810
2811 try {
2812 _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
2813
2814 return 0;
2815
2816 } catch(std::exception& e) {
2817 sq_throwerror(vm, e.what());
2818 return SQ_ERROR;
2819 } catch(...) {
2820 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
2821 return SQ_ERROR;
2822 }
2823
2824}
2825
2826static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
2827{
2828 SQUserPointer data;
2829 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2830 sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
2831 return SQ_ERROR;
2832 }
2833 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2834
2835 if (_this == nullptr) {
2836 return SQ_ERROR;
2837 }
2838
2839
2840 try {
2841 float return_value = _this->get_velocity_x();
2842
2843 sq_pushfloat(vm, return_value);
2844 return 1;
2845
2846 } catch(std::exception& e) {
2847 sq_throwerror(vm, e.what());
2848 return SQ_ERROR;
2849 } catch(...) {
2850 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
2851 return SQ_ERROR;
2852 }
2853
2854}
2855
2856static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
2857{
2858 SQUserPointer data;
2859 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2860 sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
2861 return SQ_ERROR;
2862 }
2863 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2864
2865 if (_this == nullptr) {
2866 return SQ_ERROR;
2867 }
2868
2869
2870 try {
2871 float return_value = _this->get_velocity_y();
2872
2873 sq_pushfloat(vm, return_value);
2874 return 1;
2875
2876 } catch(std::exception& e) {
2877 sq_throwerror(vm, e.what());
2878 return SQ_ERROR;
2879 } catch(...) {
2880 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
2881 return SQ_ERROR;
2882 }
2883
2884}
2885
2886static SQInteger ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm)
2887{
2888 SQUserPointer data;
2889 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2890 sq_throwerror(vm, _SC("'enable_gravity' called without instance"));
2891 return SQ_ERROR;
2892 }
2893 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2894
2895 if (_this == nullptr) {
2896 return SQ_ERROR;
2897 }
2898
2899 SQBool arg0;
2900 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2901 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2902 return SQ_ERROR;
2903 }
2904
2905 try {
2906 _this->enable_gravity(arg0 == SQTrue);
2907
2908 return 0;
2909
2910 } catch(std::exception& e) {
2911 sq_throwerror(vm, e.what());
2912 return SQ_ERROR;
2913 } catch(...) {
2914 sq_throwerror(vm, _SC("Unexpected exception while executing function 'enable_gravity'"));
2915 return SQ_ERROR;
2916 }
2917
2918}
2919
2920static SQInteger ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm)
2921{
2922 SQUserPointer data;
2923 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2924 sq_throwerror(vm, _SC("'gravity_enabled' called without instance"));
2925 return SQ_ERROR;
2926 }
2927 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2928
2929 if (_this == nullptr) {
2930 return SQ_ERROR;
2931 }
2932
2933
2934 try {
2935 bool return_value = _this->gravity_enabled();
2936
2937 sq_pushbool(vm, return_value);
2938 return 1;
2939
2940 } catch(std::exception& e) {
2941 sq_throwerror(vm, e.what());
2942 return SQ_ERROR;
2943 } catch(...) {
2944 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gravity_enabled'"));
2945 return SQ_ERROR;
2946 }
2947
2948}
2949
2950static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
2951{
2952 SQUserPointer data;
2953 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2954 sq_throwerror(vm, _SC("'set_visible' called without instance"));
2955 return SQ_ERROR;
2956 }
2957 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2958
2959 if (_this == nullptr) {
2960 return SQ_ERROR;
2961 }
2962
2963 SQBool arg0;
2964 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
2965 sq_throwerror(vm, _SC("Argument 1 not a bool"));
2966 return SQ_ERROR;
2967 }
2968
2969 try {
2970 _this->set_visible(arg0 == SQTrue);
2971
2972 return 0;
2973
2974 } catch(std::exception& e) {
2975 sq_throwerror(vm, e.what());
2976 return SQ_ERROR;
2977 } catch(...) {
2978 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
2979 return SQ_ERROR;
2980 }
2981
2982}
2983
2984static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
2985{
2986 SQUserPointer data;
2987 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2988 sq_throwerror(vm, _SC("'is_visible' called without instance"));
2989 return SQ_ERROR;
2990 }
2991 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
2992
2993 if (_this == nullptr) {
2994 return SQ_ERROR;
2995 }
2996
2997
2998 try {
2999 bool return_value = _this->is_visible();
3000
3001 sq_pushbool(vm, return_value);
3002 return 1;
3003
3004 } catch(std::exception& e) {
3005 sq_throwerror(vm, e.what());
3006 return SQ_ERROR;
3007 } catch(...) {
3008 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
3009 return SQ_ERROR;
3010 }
3011
3012}
3013
3014static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
3015{
3016 SQUserPointer data;
3017 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3018 sq_throwerror(vm, _SC("'set_solid' called without instance"));
3019 return SQ_ERROR;
3020 }
3021 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
3022
3023 if (_this == nullptr) {
3024 return SQ_ERROR;
3025 }
3026
3027 SQBool arg0;
3028 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3029 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3030 return SQ_ERROR;
3031 }
3032
3033 try {
3034 _this->set_solid(arg0 == SQTrue);
3035
3036 return 0;
3037
3038 } catch(std::exception& e) {
3039 sq_throwerror(vm, e.what());
3040 return SQ_ERROR;
3041 } catch(...) {
3042 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
3043 return SQ_ERROR;
3044 }
3045
3046}
3047
3048static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
3049{
3050 SQUserPointer data;
3051 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3052 sq_throwerror(vm, _SC("'is_solid' called without instance"));
3053 return SQ_ERROR;
3054 }
3055 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
3056
3057 if (_this == nullptr) {
3058 return SQ_ERROR;
3059 }
3060
3061
3062 try {
3063 bool return_value = _this->is_solid();
3064
3065 sq_pushbool(vm, return_value);
3066 return 1;
3067
3068 } catch(std::exception& e) {
3069 sq_throwerror(vm, e.what());
3070 return SQ_ERROR;
3071 } catch(...) {
3072 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
3073 return SQ_ERROR;
3074 }
3075
3076}
3077
3078static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
3079{
3080 SQUserPointer data;
3081 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3082 sq_throwerror(vm, _SC("'get_name' called without instance"));
3083 return SQ_ERROR;
3084 }
3085 auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
3086
3087 if (_this == nullptr) {
3088 return SQ_ERROR;
3089 }
3090
3091
3092 try {
3093 std::string return_value = _this->get_name();
3094
3095 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
3096 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
3097 return 1;
3098
3099 } catch(std::exception& e) {
3100 sq_throwerror(vm, e.what());
3101 return SQ_ERROR;
3102 } catch(...) {
3103 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
3104 return SQ_ERROR;
3105 }
3106
3107}
3108
3109static SQInteger Sector_release_hook(SQUserPointer ptr, SQInteger )
3110{
3111 auto _this = reinterpret_cast<scripting::Sector*> (ptr);
3112 delete _this;
3113 return 0;
3114}
3115
3116static SQInteger Sector_set_ambient_light_wrapper(HSQUIRRELVM vm)
3117{
3118 SQUserPointer data;
3119 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3120 sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
3121 return SQ_ERROR;
3122 }
3123 auto _this = reinterpret_cast<scripting::Sector*> (data);
3124
3125 if (_this == nullptr) {
3126 return SQ_ERROR;
3127 }
3128
3129 SQFloat arg0;
3130 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3131 sq_throwerror(vm, _SC("Argument 1 not a float"));
3132 return SQ_ERROR;
3133 }
3134 SQFloat arg1;
3135 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3136 sq_throwerror(vm, _SC("Argument 2 not a float"));
3137 return SQ_ERROR;
3138 }
3139 SQFloat arg2;
3140 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3141 sq_throwerror(vm, _SC("Argument 3 not a float"));
3142 return SQ_ERROR;
3143 }
3144
3145 try {
3146 _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
3147
3148 return 0;
3149
3150 } catch(std::exception& e) {
3151 sq_throwerror(vm, e.what());
3152 return SQ_ERROR;
3153 } catch(...) {
3154 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
3155 return SQ_ERROR;
3156 }
3157
3158}
3159
3160static SQInteger Sector_fade_to_ambient_light_wrapper(HSQUIRRELVM vm)
3161{
3162 SQUserPointer data;
3163 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3164 sq_throwerror(vm, _SC("'fade_to_ambient_light' called without instance"));
3165 return SQ_ERROR;
3166 }
3167 auto _this = reinterpret_cast<scripting::Sector*> (data);
3168
3169 if (_this == nullptr) {
3170 return SQ_ERROR;
3171 }
3172
3173 SQFloat arg0;
3174 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3175 sq_throwerror(vm, _SC("Argument 1 not a float"));
3176 return SQ_ERROR;
3177 }
3178 SQFloat arg1;
3179 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3180 sq_throwerror(vm, _SC("Argument 2 not a float"));
3181 return SQ_ERROR;
3182 }
3183 SQFloat arg2;
3184 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
3185 sq_throwerror(vm, _SC("Argument 3 not a float"));
3186 return SQ_ERROR;
3187 }
3188 SQFloat arg3;
3189 if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
3190 sq_throwerror(vm, _SC("Argument 4 not a float"));
3191 return SQ_ERROR;
3192 }
3193
3194 try {
3195 _this->fade_to_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
3196
3197 return 0;
3198
3199 } catch(std::exception& e) {
3200 sq_throwerror(vm, e.what());
3201 return SQ_ERROR;
3202 } catch(...) {
3203 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_to_ambient_light'"));
3204 return SQ_ERROR;
3205 }
3206
3207}
3208
3209static SQInteger Sector_get_ambient_red_wrapper(HSQUIRRELVM vm)
3210{
3211 SQUserPointer data;
3212 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3213 sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
3214 return SQ_ERROR;
3215 }
3216 auto _this = reinterpret_cast<scripting::Sector*> (data);
3217
3218 if (_this == nullptr) {
3219 return SQ_ERROR;
3220 }
3221
3222
3223 try {
3224 float return_value = _this->get_ambient_red();
3225
3226 sq_pushfloat(vm, return_value);
3227 return 1;
3228
3229 } catch(std::exception& e) {
3230 sq_throwerror(vm, e.what());
3231 return SQ_ERROR;
3232 } catch(...) {
3233 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'"));
3234 return SQ_ERROR;
3235 }
3236
3237}
3238
3239static SQInteger Sector_get_ambient_green_wrapper(HSQUIRRELVM vm)
3240{
3241 SQUserPointer data;
3242 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3243 sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
3244 return SQ_ERROR;
3245 }
3246 auto _this = reinterpret_cast<scripting::Sector*> (data);
3247
3248 if (_this == nullptr) {
3249 return SQ_ERROR;
3250 }
3251
3252
3253 try {
3254 float return_value = _this->get_ambient_green();
3255
3256 sq_pushfloat(vm, return_value);
3257 return 1;
3258
3259 } catch(std::exception& e) {
3260 sq_throwerror(vm, e.what());
3261 return SQ_ERROR;
3262 } catch(...) {
3263 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
3264 return SQ_ERROR;
3265 }
3266
3267}
3268
3269static SQInteger Sector_get_ambient_blue_wrapper(HSQUIRRELVM vm)
3270{
3271 SQUserPointer data;
3272 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3273 sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
3274 return SQ_ERROR;
3275 }
3276 auto _this = reinterpret_cast<scripting::Sector*> (data);
3277
3278 if (_this == nullptr) {
3279 return SQ_ERROR;
3280 }
3281
3282
3283 try {
3284 float return_value = _this->get_ambient_blue();
3285
3286 sq_pushfloat(vm, return_value);
3287 return 1;
3288
3289 } catch(std::exception& e) {
3290 sq_throwerror(vm, e.what());
3291 return SQ_ERROR;
3292 } catch(...) {
3293 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
3294 return SQ_ERROR;
3295 }
3296
3297}
3298
3299static SQInteger Sector_set_gravity_wrapper(HSQUIRRELVM vm)
3300{
3301 SQUserPointer data;
3302 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3303 sq_throwerror(vm, _SC("'set_gravity' called without instance"));
3304 return SQ_ERROR;
3305 }
3306 auto _this = reinterpret_cast<scripting::Sector*> (data);
3307
3308 if (_this == nullptr) {
3309 return SQ_ERROR;
3310 }
3311
3312 SQFloat arg0;
3313 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3314 sq_throwerror(vm, _SC("Argument 1 not a float"));
3315 return SQ_ERROR;
3316 }
3317
3318 try {
3319 _this->set_gravity(static_cast<float> (arg0));
3320
3321 return 0;
3322
3323 } catch(std::exception& e) {
3324 sq_throwerror(vm, e.what());
3325 return SQ_ERROR;
3326 } catch(...) {
3327 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'"));
3328 return SQ_ERROR;
3329 }
3330
3331}
3332
3333static SQInteger Sector_set_music_wrapper(HSQUIRRELVM vm)
3334{
3335 SQUserPointer data;
3336 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3337 sq_throwerror(vm, _SC("'set_music' called without instance"));
3338 return SQ_ERROR;
3339 }
3340 auto _this = reinterpret_cast<scripting::Sector*> (data);
3341
3342 if (_this == nullptr) {
3343 return SQ_ERROR;
3344 }
3345
3346 const SQChar* arg0;
3347 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3348 sq_throwerror(vm, _SC("Argument 1 not a string"));
3349 return SQ_ERROR;
3350 }
3351
3352 try {
3353 _this->set_music(arg0);
3354
3355 return 0;
3356
3357 } catch(std::exception& e) {
3358 sq_throwerror(vm, e.what());
3359 return SQ_ERROR;
3360 } catch(...) {
3361 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_music'"));
3362 return SQ_ERROR;
3363 }
3364
3365}
3366
3367static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
3368{
3369 auto _this = reinterpret_cast<scripting::Text*> (ptr);
3370 delete _this;
3371 return 0;
3372}
3373
3374static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
3375{
3376 SQUserPointer data;
3377 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3378 sq_throwerror(vm, _SC("'set_text' called without instance"));
3379 return SQ_ERROR;
3380 }
3381 auto _this = reinterpret_cast<scripting::Text*> (data);
3382
3383 if (_this == nullptr) {
3384 return SQ_ERROR;
3385 }
3386
3387 const SQChar* arg0;
3388 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3389 sq_throwerror(vm, _SC("Argument 1 not a string"));
3390 return SQ_ERROR;
3391 }
3392
3393 try {
3394 _this->set_text(arg0);
3395
3396 return 0;
3397
3398 } catch(std::exception& e) {
3399 sq_throwerror(vm, e.what());
3400 return SQ_ERROR;
3401 } catch(...) {
3402 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
3403 return SQ_ERROR;
3404 }
3405
3406}
3407
3408static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
3409{
3410 SQUserPointer data;
3411 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3412 sq_throwerror(vm, _SC("'set_font' called without instance"));
3413 return SQ_ERROR;
3414 }
3415 auto _this = reinterpret_cast<scripting::Text*> (data);
3416
3417 if (_this == nullptr) {
3418 return SQ_ERROR;
3419 }
3420
3421 const SQChar* arg0;
3422 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3423 sq_throwerror(vm, _SC("Argument 1 not a string"));
3424 return SQ_ERROR;
3425 }
3426
3427 try {
3428 _this->set_font(arg0);
3429
3430 return 0;
3431
3432 } catch(std::exception& e) {
3433 sq_throwerror(vm, e.what());
3434 return SQ_ERROR;
3435 } catch(...) {
3436 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
3437 return SQ_ERROR;
3438 }
3439
3440}
3441
3442static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
3443{
3444 SQUserPointer data;
3445 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3446 sq_throwerror(vm, _SC("'fade_in' called without instance"));
3447 return SQ_ERROR;
3448 }
3449 auto _this = reinterpret_cast<scripting::Text*> (data);
3450
3451 if (_this == nullptr) {
3452 return SQ_ERROR;
3453 }
3454
3455 SQFloat arg0;
3456 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3457 sq_throwerror(vm, _SC("Argument 1 not a float"));
3458 return SQ_ERROR;
3459 }
3460
3461 try {
3462 _this->fade_in(static_cast<float> (arg0));
3463
3464 return 0;
3465
3466 } catch(std::exception& e) {
3467 sq_throwerror(vm, e.what());
3468 return SQ_ERROR;
3469 } catch(...) {
3470 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
3471 return SQ_ERROR;
3472 }
3473
3474}
3475
3476static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
3477{
3478 SQUserPointer data;
3479 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3480 sq_throwerror(vm, _SC("'fade_out' called without instance"));
3481 return SQ_ERROR;
3482 }
3483 auto _this = reinterpret_cast<scripting::Text*> (data);
3484
3485 if (_this == nullptr) {
3486 return SQ_ERROR;
3487 }
3488
3489 SQFloat arg0;
3490 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3491 sq_throwerror(vm, _SC("Argument 1 not a float"));
3492 return SQ_ERROR;
3493 }
3494
3495 try {
3496 _this->fade_out(static_cast<float> (arg0));
3497
3498 return 0;
3499
3500 } catch(std::exception& e) {
3501 sq_throwerror(vm, e.what());
3502 return SQ_ERROR;
3503 } catch(...) {
3504 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
3505 return SQ_ERROR;
3506 }
3507
3508}
3509
3510static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
3511{
3512 SQUserPointer data;
3513 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3514 sq_throwerror(vm, _SC("'set_visible' called without instance"));
3515 return SQ_ERROR;
3516 }
3517 auto _this = reinterpret_cast<scripting::Text*> (data);
3518
3519 if (_this == nullptr) {
3520 return SQ_ERROR;
3521 }
3522
3523 SQBool arg0;
3524 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3525 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3526 return SQ_ERROR;
3527 }
3528
3529 try {
3530 _this->set_visible(arg0 == SQTrue);
3531
3532 return 0;
3533
3534 } catch(std::exception& e) {
3535 sq_throwerror(vm, e.what());
3536 return SQ_ERROR;
3537 } catch(...) {
3538 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
3539 return SQ_ERROR;
3540 }
3541
3542}
3543
3544static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
3545{
3546 SQUserPointer data;
3547 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3548 sq_throwerror(vm, _SC("'set_centered' called without instance"));
3549 return SQ_ERROR;
3550 }
3551 auto _this = reinterpret_cast<scripting::Text*> (data);
3552
3553 if (_this == nullptr) {
3554 return SQ_ERROR;
3555 }
3556
3557 SQBool arg0;
3558 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3559 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3560 return SQ_ERROR;
3561 }
3562
3563 try {
3564 _this->set_centered(arg0 == SQTrue);
3565
3566 return 0;
3567
3568 } catch(std::exception& e) {
3569 sq_throwerror(vm, e.what());
3570 return SQ_ERROR;
3571 } catch(...) {
3572 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
3573 return SQ_ERROR;
3574 }
3575
3576}
3577
3578static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
3579{
3580 SQUserPointer data;
3581 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3582 sq_throwerror(vm, _SC("'set_pos' called without instance"));
3583 return SQ_ERROR;
3584 }
3585 auto _this = reinterpret_cast<scripting::Text*> (data);
3586
3587 if (_this == nullptr) {
3588 return SQ_ERROR;
3589 }
3590
3591 SQFloat arg0;
3592 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3593 sq_throwerror(vm, _SC("Argument 1 not a float"));
3594 return SQ_ERROR;
3595 }
3596 SQFloat arg1;
3597 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3598 sq_throwerror(vm, _SC("Argument 2 not a float"));
3599 return SQ_ERROR;
3600 }
3601
3602 try {
3603 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
3604
3605 return 0;
3606
3607 } catch(std::exception& e) {
3608 sq_throwerror(vm, e.what());
3609 return SQ_ERROR;
3610 } catch(...) {
3611 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
3612 return SQ_ERROR;
3613 }
3614
3615}
3616
3617static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
3618{
3619 SQUserPointer data;
3620 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3621 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
3622 return SQ_ERROR;
3623 }
3624 auto _this = reinterpret_cast<scripting::Text*> (data);
3625
3626 if (_this == nullptr) {
3627 return SQ_ERROR;
3628 }
3629
3630
3631 try {
3632 float return_value = _this->get_pos_x();
3633
3634 sq_pushfloat(vm, return_value);
3635 return 1;
3636
3637 } catch(std::exception& e) {
3638 sq_throwerror(vm, e.what());
3639 return SQ_ERROR;
3640 } catch(...) {
3641 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
3642 return SQ_ERROR;
3643 }
3644
3645}
3646
3647static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
3648{
3649 SQUserPointer data;
3650 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3651 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
3652 return SQ_ERROR;
3653 }
3654 auto _this = reinterpret_cast<scripting::Text*> (data);
3655
3656 if (_this == nullptr) {
3657 return SQ_ERROR;
3658 }
3659
3660
3661 try {
3662 float return_value = _this->get_pos_y();
3663
3664 sq_pushfloat(vm, return_value);
3665 return 1;
3666
3667 } catch(std::exception& e) {
3668 sq_throwerror(vm, e.what());
3669 return SQ_ERROR;
3670 } catch(...) {
3671 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
3672 return SQ_ERROR;
3673 }
3674
3675}
3676
3677static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
3678{
3679 SQUserPointer data;
3680 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3681 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
3682 return SQ_ERROR;
3683 }
3684 auto _this = reinterpret_cast<scripting::Text*> (data);
3685
3686 if (_this == nullptr) {
3687 return SQ_ERROR;
3688 }
3689
3690 SQInteger arg0;
3691 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
3692 sq_throwerror(vm, _SC("Argument 1 not an integer"));
3693 return SQ_ERROR;
3694 }
3695
3696 try {
3697 _this->set_anchor_point(static_cast<int> (arg0));
3698
3699 return 0;
3700
3701 } catch(std::exception& e) {
3702 sq_throwerror(vm, e.what());
3703 return SQ_ERROR;
3704 } catch(...) {
3705 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
3706 return SQ_ERROR;
3707 }
3708
3709}
3710
3711static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
3712{
3713 SQUserPointer data;
3714 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3715 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
3716 return SQ_ERROR;
3717 }
3718 auto _this = reinterpret_cast<scripting::Text*> (data);
3719
3720 if (_this == nullptr) {
3721 return SQ_ERROR;
3722 }
3723
3724
3725 try {
3726 int return_value = _this->get_anchor_point();
3727
3728 sq_pushinteger(vm, return_value);
3729 return 1;
3730
3731 } catch(std::exception& e) {
3732 sq_throwerror(vm, e.what());
3733 return SQ_ERROR;
3734 } catch(...) {
3735 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
3736 return SQ_ERROR;
3737 }
3738
3739}
3740
3741static SQInteger TextArray_release_hook(SQUserPointer ptr, SQInteger )
3742{
3743 auto _this = reinterpret_cast<scripting::TextArray*> (ptr);
3744 delete _this;
3745 return 0;
3746}
3747
3748static SQInteger TextArray_clear_wrapper(HSQUIRRELVM vm)
3749{
3750 SQUserPointer data;
3751 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3752 sq_throwerror(vm, _SC("'clear' called without instance"));
3753 return SQ_ERROR;
3754 }
3755 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3756
3757 if (_this == nullptr) {
3758 return SQ_ERROR;
3759 }
3760
3761
3762 try {
3763 _this->clear();
3764
3765 return 0;
3766
3767 } catch(std::exception& e) {
3768 sq_throwerror(vm, e.what());
3769 return SQ_ERROR;
3770 } catch(...) {
3771 sq_throwerror(vm, _SC("Unexpected exception while executing function 'clear'"));
3772 return SQ_ERROR;
3773 }
3774
3775}
3776
3777static SQInteger TextArray_add_text_wrapper(HSQUIRRELVM vm)
3778{
3779 SQUserPointer data;
3780 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3781 sq_throwerror(vm, _SC("'add_text' called without instance"));
3782 return SQ_ERROR;
3783 }
3784 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3785
3786 if (_this == nullptr) {
3787 return SQ_ERROR;
3788 }
3789
3790 const SQChar* arg0;
3791 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3792 sq_throwerror(vm, _SC("Argument 1 not a string"));
3793 return SQ_ERROR;
3794 }
3795
3796 try {
3797 _this->add_text(arg0);
3798
3799 return 0;
3800
3801 } catch(std::exception& e) {
3802 sq_throwerror(vm, e.what());
3803 return SQ_ERROR;
3804 } catch(...) {
3805 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text'"));
3806 return SQ_ERROR;
3807 }
3808
3809}
3810
3811static SQInteger TextArray_add_text_duration_wrapper(HSQUIRRELVM vm)
3812{
3813 SQUserPointer data;
3814 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3815 sq_throwerror(vm, _SC("'add_text_duration' called without instance"));
3816 return SQ_ERROR;
3817 }
3818 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3819
3820 if (_this == nullptr) {
3821 return SQ_ERROR;
3822 }
3823
3824 const SQChar* arg0;
3825 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
3826 sq_throwerror(vm, _SC("Argument 1 not a string"));
3827 return SQ_ERROR;
3828 }
3829 SQFloat arg1;
3830 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3831 sq_throwerror(vm, _SC("Argument 2 not a float"));
3832 return SQ_ERROR;
3833 }
3834
3835 try {
3836 _this->add_text_duration(arg0, static_cast<float> (arg1));
3837
3838 return 0;
3839
3840 } catch(std::exception& e) {
3841 sq_throwerror(vm, e.what());
3842 return SQ_ERROR;
3843 } catch(...) {
3844 sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text_duration'"));
3845 return SQ_ERROR;
3846 }
3847
3848}
3849
3850static SQInteger TextArray_set_text_index_wrapper(HSQUIRRELVM vm)
3851{
3852 SQUserPointer data;
3853 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3854 sq_throwerror(vm, _SC("'set_text_index' called without instance"));
3855 return SQ_ERROR;
3856 }
3857 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3858
3859 if (_this == nullptr) {
3860 return SQ_ERROR;
3861 }
3862
3863 SQInteger arg0;
3864 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
3865 sq_throwerror(vm, _SC("Argument 1 not an integer"));
3866 return SQ_ERROR;
3867 }
3868
3869 try {
3870 _this->set_text_index(static_cast<int> (arg0));
3871
3872 return 0;
3873
3874 } catch(std::exception& e) {
3875 sq_throwerror(vm, e.what());
3876 return SQ_ERROR;
3877 } catch(...) {
3878 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text_index'"));
3879 return SQ_ERROR;
3880 }
3881
3882}
3883
3884static SQInteger TextArray_set_keep_visible_wrapper(HSQUIRRELVM vm)
3885{
3886 SQUserPointer data;
3887 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3888 sq_throwerror(vm, _SC("'set_keep_visible' called without instance"));
3889 return SQ_ERROR;
3890 }
3891 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3892
3893 if (_this == nullptr) {
3894 return SQ_ERROR;
3895 }
3896
3897 SQBool arg0;
3898 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3899 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3900 return SQ_ERROR;
3901 }
3902
3903 try {
3904 _this->set_keep_visible(arg0 == SQTrue);
3905
3906 return 0;
3907
3908 } catch(std::exception& e) {
3909 sq_throwerror(vm, e.what());
3910 return SQ_ERROR;
3911 } catch(...) {
3912 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_keep_visible'"));
3913 return SQ_ERROR;
3914 }
3915
3916}
3917
3918static SQInteger TextArray_set_fade_transition_wrapper(HSQUIRRELVM vm)
3919{
3920 SQUserPointer data;
3921 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3922 sq_throwerror(vm, _SC("'set_fade_transition' called without instance"));
3923 return SQ_ERROR;
3924 }
3925 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3926
3927 if (_this == nullptr) {
3928 return SQ_ERROR;
3929 }
3930
3931 SQBool arg0;
3932 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
3933 sq_throwerror(vm, _SC("Argument 1 not a bool"));
3934 return SQ_ERROR;
3935 }
3936
3937 try {
3938 _this->set_fade_transition(arg0 == SQTrue);
3939
3940 return 0;
3941
3942 } catch(std::exception& e) {
3943 sq_throwerror(vm, e.what());
3944 return SQ_ERROR;
3945 } catch(...) {
3946 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_transition'"));
3947 return SQ_ERROR;
3948 }
3949
3950}
3951
3952static SQInteger TextArray_set_fade_time_wrapper(HSQUIRRELVM vm)
3953{
3954 SQUserPointer data;
3955 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3956 sq_throwerror(vm, _SC("'set_fade_time' called without instance"));
3957 return SQ_ERROR;
3958 }
3959 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3960
3961 if (_this == nullptr) {
3962 return SQ_ERROR;
3963 }
3964
3965 SQFloat arg0;
3966 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3967 sq_throwerror(vm, _SC("Argument 1 not a float"));
3968 return SQ_ERROR;
3969 }
3970
3971 try {
3972 _this->set_fade_time(static_cast<float> (arg0));
3973
3974 return 0;
3975
3976 } catch(std::exception& e) {
3977 sq_throwerror(vm, e.what());
3978 return SQ_ERROR;
3979 } catch(...) {
3980 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_time'"));
3981 return SQ_ERROR;
3982 }
3983
3984}
3985
3986static SQInteger TextArray_set_done_wrapper(HSQUIRRELVM vm)
3987{
3988 SQUserPointer data;
3989 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3990 sq_throwerror(vm, _SC("'set_done' called without instance"));
3991 return SQ_ERROR;
3992 }
3993 auto _this = reinterpret_cast<scripting::TextArray*> (data);
3994
3995 if (_this == nullptr) {
3996 return SQ_ERROR;
3997 }
3998
3999 SQBool arg0;
4000 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
4001 sq_throwerror(vm, _SC("Argument 1 not a bool"));
4002 return SQ_ERROR;
4003 }
4004
4005 try {
4006 _this->set_done(arg0 == SQTrue);
4007
4008 return 0;
4009
4010 } catch(std::exception& e) {
4011 sq_throwerror(vm, e.what());
4012 return SQ_ERROR;
4013 } catch(...) {
4014 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_done'"));
4015 return SQ_ERROR;
4016 }
4017
4018}
4019
4020static SQInteger TextArray_set_auto_wrapper(HSQUIRRELVM vm)
4021{
4022 SQUserPointer data;
4023 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4024 sq_throwerror(vm, _SC("'set_auto' called without instance"));
4025 return SQ_ERROR;
4026 }
4027 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4028
4029 if (_this == nullptr) {
4030 return SQ_ERROR;
4031 }
4032
4033 SQBool arg0;
4034 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
4035 sq_throwerror(vm, _SC("Argument 1 not a bool"));
4036 return SQ_ERROR;
4037 }
4038
4039 try {
4040 _this->set_auto(arg0 == SQTrue);
4041
4042 return 0;
4043
4044 } catch(std::exception& e) {
4045 sq_throwerror(vm, e.what());
4046 return SQ_ERROR;
4047 } catch(...) {
4048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_auto'"));
4049 return SQ_ERROR;
4050 }
4051
4052}
4053
4054static SQInteger TextArray_next_text_wrapper(HSQUIRRELVM vm)
4055{
4056 SQUserPointer data;
4057 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4058 sq_throwerror(vm, _SC("'next_text' called without instance"));
4059 return SQ_ERROR;
4060 }
4061 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4062
4063 if (_this == nullptr) {
4064 return SQ_ERROR;
4065 }
4066
4067
4068 try {
4069 _this->next_text();
4070
4071 return 0;
4072
4073 } catch(std::exception& e) {
4074 sq_throwerror(vm, e.what());
4075 return SQ_ERROR;
4076 } catch(...) {
4077 sq_throwerror(vm, _SC("Unexpected exception while executing function 'next_text'"));
4078 return SQ_ERROR;
4079 }
4080
4081}
4082
4083static SQInteger TextArray_prev_text_wrapper(HSQUIRRELVM vm)
4084{
4085 SQUserPointer data;
4086 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4087 sq_throwerror(vm, _SC("'prev_text' called without instance"));
4088 return SQ_ERROR;
4089 }
4090 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4091
4092 if (_this == nullptr) {
4093 return SQ_ERROR;
4094 }
4095
4096
4097 try {
4098 _this->prev_text();
4099
4100 return 0;
4101
4102 } catch(std::exception& e) {
4103 sq_throwerror(vm, e.what());
4104 return SQ_ERROR;
4105 } catch(...) {
4106 sq_throwerror(vm, _SC("Unexpected exception while executing function 'prev_text'"));
4107 return SQ_ERROR;
4108 }
4109
4110}
4111
4112static SQInteger TextArray_set_text_wrapper(HSQUIRRELVM vm)
4113{
4114 SQUserPointer data;
4115 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4116 sq_throwerror(vm, _SC("'set_text' called without instance"));
4117 return SQ_ERROR;
4118 }
4119 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4120
4121 if (_this == nullptr) {
4122 return SQ_ERROR;
4123 }
4124
4125 const SQChar* arg0;
4126 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
4127 sq_throwerror(vm, _SC("Argument 1 not a string"));
4128 return SQ_ERROR;
4129 }
4130
4131 try {
4132 _this->set_text(arg0);
4133
4134 return 0;
4135
4136 } catch(std::exception& e) {
4137 sq_throwerror(vm, e.what());
4138 return SQ_ERROR;
4139 } catch(...) {
4140 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
4141 return SQ_ERROR;
4142 }
4143
4144}
4145
4146static SQInteger TextArray_set_font_wrapper(HSQUIRRELVM vm)
4147{
4148 SQUserPointer data;
4149 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4150 sq_throwerror(vm, _SC("'set_font' called without instance"));
4151 return SQ_ERROR;
4152 }
4153 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4154
4155 if (_this == nullptr) {
4156 return SQ_ERROR;
4157 }
4158
4159 const SQChar* arg0;
4160 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
4161 sq_throwerror(vm, _SC("Argument 1 not a string"));
4162 return SQ_ERROR;
4163 }
4164
4165 try {
4166 _this->set_font(arg0);
4167
4168 return 0;
4169
4170 } catch(std::exception& e) {
4171 sq_throwerror(vm, e.what());
4172 return SQ_ERROR;
4173 } catch(...) {
4174 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
4175 return SQ_ERROR;
4176 }
4177
4178}
4179
4180static SQInteger TextArray_fade_in_wrapper(HSQUIRRELVM vm)
4181{
4182 SQUserPointer data;
4183 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4184 sq_throwerror(vm, _SC("'fade_in' called without instance"));
4185 return SQ_ERROR;
4186 }
4187 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4188
4189 if (_this == nullptr) {
4190 return SQ_ERROR;
4191 }
4192
4193 SQFloat arg0;
4194 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4195 sq_throwerror(vm, _SC("Argument 1 not a float"));
4196 return SQ_ERROR;
4197 }
4198
4199 try {
4200 _this->fade_in(static_cast<float> (arg0));
4201
4202 return 0;
4203
4204 } catch(std::exception& e) {
4205 sq_throwerror(vm, e.what());
4206 return SQ_ERROR;
4207 } catch(...) {
4208 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
4209 return SQ_ERROR;
4210 }
4211
4212}
4213
4214static SQInteger TextArray_fade_out_wrapper(HSQUIRRELVM vm)
4215{
4216 SQUserPointer data;
4217 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4218 sq_throwerror(vm, _SC("'fade_out' called without instance"));
4219 return SQ_ERROR;
4220 }
4221 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4222
4223 if (_this == nullptr) {
4224 return SQ_ERROR;
4225 }
4226
4227 SQFloat arg0;
4228 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4229 sq_throwerror(vm, _SC("Argument 1 not a float"));
4230 return SQ_ERROR;
4231 }
4232
4233 try {
4234 _this->fade_out(static_cast<float> (arg0));
4235
4236 return 0;
4237
4238 } catch(std::exception& e) {
4239 sq_throwerror(vm, e.what());
4240 return SQ_ERROR;
4241 } catch(...) {
4242 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
4243 return SQ_ERROR;
4244 }
4245
4246}
4247
4248static SQInteger TextArray_set_visible_wrapper(HSQUIRRELVM vm)
4249{
4250 SQUserPointer data;
4251 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4252 sq_throwerror(vm, _SC("'set_visible' called without instance"));
4253 return SQ_ERROR;
4254 }
4255 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4256
4257 if (_this == nullptr) {
4258 return SQ_ERROR;
4259 }
4260
4261 SQBool arg0;
4262 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
4263 sq_throwerror(vm, _SC("Argument 1 not a bool"));
4264 return SQ_ERROR;
4265 }
4266
4267 try {
4268 _this->set_visible(arg0 == SQTrue);
4269
4270 return 0;
4271
4272 } catch(std::exception& e) {
4273 sq_throwerror(vm, e.what());
4274 return SQ_ERROR;
4275 } catch(...) {
4276 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
4277 return SQ_ERROR;
4278 }
4279
4280}
4281
4282static SQInteger TextArray_set_centered_wrapper(HSQUIRRELVM vm)
4283{
4284 SQUserPointer data;
4285 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4286 sq_throwerror(vm, _SC("'set_centered' called without instance"));
4287 return SQ_ERROR;
4288 }
4289 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4290
4291 if (_this == nullptr) {
4292 return SQ_ERROR;
4293 }
4294
4295 SQBool arg0;
4296 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
4297 sq_throwerror(vm, _SC("Argument 1 not a bool"));
4298 return SQ_ERROR;
4299 }
4300
4301 try {
4302 _this->set_centered(arg0 == SQTrue);
4303
4304 return 0;
4305
4306 } catch(std::exception& e) {
4307 sq_throwerror(vm, e.what());
4308 return SQ_ERROR;
4309 } catch(...) {
4310 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
4311 return SQ_ERROR;
4312 }
4313
4314}
4315
4316static SQInteger TextArray_set_pos_wrapper(HSQUIRRELVM vm)
4317{
4318 SQUserPointer data;
4319 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4320 sq_throwerror(vm, _SC("'set_pos' called without instance"));
4321 return SQ_ERROR;
4322 }
4323 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4324
4325 if (_this == nullptr) {
4326 return SQ_ERROR;
4327 }
4328
4329 SQFloat arg0;
4330 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4331 sq_throwerror(vm, _SC("Argument 1 not a float"));
4332 return SQ_ERROR;
4333 }
4334 SQFloat arg1;
4335 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4336 sq_throwerror(vm, _SC("Argument 2 not a float"));
4337 return SQ_ERROR;
4338 }
4339
4340 try {
4341 _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
4342
4343 return 0;
4344
4345 } catch(std::exception& e) {
4346 sq_throwerror(vm, e.what());
4347 return SQ_ERROR;
4348 } catch(...) {
4349 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
4350 return SQ_ERROR;
4351 }
4352
4353}
4354
4355static SQInteger TextArray_get_pos_x_wrapper(HSQUIRRELVM vm)
4356{
4357 SQUserPointer data;
4358 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4359 sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
4360 return SQ_ERROR;
4361 }
4362 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4363
4364 if (_this == nullptr) {
4365 return SQ_ERROR;
4366 }
4367
4368
4369 try {
4370 float return_value = _this->get_pos_x();
4371
4372 sq_pushfloat(vm, return_value);
4373 return 1;
4374
4375 } catch(std::exception& e) {
4376 sq_throwerror(vm, e.what());
4377 return SQ_ERROR;
4378 } catch(...) {
4379 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
4380 return SQ_ERROR;
4381 }
4382
4383}
4384
4385static SQInteger TextArray_get_pos_y_wrapper(HSQUIRRELVM vm)
4386{
4387 SQUserPointer data;
4388 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4389 sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
4390 return SQ_ERROR;
4391 }
4392 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4393
4394 if (_this == nullptr) {
4395 return SQ_ERROR;
4396 }
4397
4398
4399 try {
4400 float return_value = _this->get_pos_y();
4401
4402 sq_pushfloat(vm, return_value);
4403 return 1;
4404
4405 } catch(std::exception& e) {
4406 sq_throwerror(vm, e.what());
4407 return SQ_ERROR;
4408 } catch(...) {
4409 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
4410 return SQ_ERROR;
4411 }
4412
4413}
4414
4415static SQInteger TextArray_set_anchor_point_wrapper(HSQUIRRELVM vm)
4416{
4417 SQUserPointer data;
4418 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4419 sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
4420 return SQ_ERROR;
4421 }
4422 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4423
4424 if (_this == nullptr) {
4425 return SQ_ERROR;
4426 }
4427
4428 SQInteger arg0;
4429 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
4430 sq_throwerror(vm, _SC("Argument 1 not an integer"));
4431 return SQ_ERROR;
4432 }
4433
4434 try {
4435 _this->set_anchor_point(static_cast<int> (arg0));
4436
4437 return 0;
4438
4439 } catch(std::exception& e) {
4440 sq_throwerror(vm, e.what());
4441 return SQ_ERROR;
4442 } catch(...) {
4443 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
4444 return SQ_ERROR;
4445 }
4446
4447}
4448
4449static SQInteger TextArray_get_anchor_point_wrapper(HSQUIRRELVM vm)
4450{
4451 SQUserPointer data;
4452 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4453 sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
4454 return SQ_ERROR;
4455 }
4456 auto _this = reinterpret_cast<scripting::TextArray*> (data);
4457
4458 if (_this == nullptr) {
4459 return SQ_ERROR;
4460 }
4461
4462
4463 try {
4464 int return_value = _this->get_anchor_point();
4465
4466 sq_pushinteger(vm, return_value);
4467 return 1;
4468
4469 } catch(std::exception& e) {
4470 sq_throwerror(vm, e.what());
4471 return SQ_ERROR;
4472 } catch(...) {
4473 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
4474 return SQ_ERROR;
4475 }
4476
4477}
4478
4479static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
4480{
4481 auto _this = reinterpret_cast<scripting::Thunderstorm*> (ptr);
4482 delete _this;
4483 return 0;
4484}
4485
4486static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
4487{
4488 SQUserPointer data;
4489 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4490 sq_throwerror(vm, _SC("'start' called without instance"));
4491 return SQ_ERROR;
4492 }
4493 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4494
4495 if (_this == nullptr) {
4496 return SQ_ERROR;
4497 }
4498
4499
4500 try {
4501 _this->start();
4502
4503 return 0;
4504
4505 } catch(std::exception& e) {
4506 sq_throwerror(vm, e.what());
4507 return SQ_ERROR;
4508 } catch(...) {
4509 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
4510 return SQ_ERROR;
4511 }
4512
4513}
4514
4515static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
4516{
4517 SQUserPointer data;
4518 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4519 sq_throwerror(vm, _SC("'stop' called without instance"));
4520 return SQ_ERROR;
4521 }
4522 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4523
4524 if (_this == nullptr) {
4525 return SQ_ERROR;
4526 }
4527
4528
4529 try {
4530 _this->stop();
4531
4532 return 0;
4533
4534 } catch(std::exception& e) {
4535 sq_throwerror(vm, e.what());
4536 return SQ_ERROR;
4537 } catch(...) {
4538 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
4539 return SQ_ERROR;
4540 }
4541
4542}
4543
4544static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
4545{
4546 SQUserPointer data;
4547 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4548 sq_throwerror(vm, _SC("'thunder' called without instance"));
4549 return SQ_ERROR;
4550 }
4551 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4552
4553 if (_this == nullptr) {
4554 return SQ_ERROR;
4555 }
4556
4557
4558 try {
4559 _this->thunder();
4560
4561 return 0;
4562
4563 } catch(std::exception& e) {
4564 sq_throwerror(vm, e.what());
4565 return SQ_ERROR;
4566 } catch(...) {
4567 sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
4568 return SQ_ERROR;
4569 }
4570
4571}
4572
4573static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
4574{
4575 SQUserPointer data;
4576 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4577 sq_throwerror(vm, _SC("'lightning' called without instance"));
4578 return SQ_ERROR;
4579 }
4580 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4581
4582 if (_this == nullptr) {
4583 return SQ_ERROR;
4584 }
4585
4586
4587 try {
4588 _this->lightning();
4589
4590 return 0;
4591
4592 } catch(std::exception& e) {
4593 sq_throwerror(vm, e.what());
4594 return SQ_ERROR;
4595 } catch(...) {
4596 sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
4597 return SQ_ERROR;
4598 }
4599
4600}
4601
4602static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
4603{
4604 SQUserPointer data;
4605 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4606 sq_throwerror(vm, _SC("'flash' called without instance"));
4607 return SQ_ERROR;
4608 }
4609 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4610
4611 if (_this == nullptr) {
4612 return SQ_ERROR;
4613 }
4614
4615
4616 try {
4617 _this->flash();
4618
4619 return 0;
4620
4621 } catch(std::exception& e) {
4622 sq_throwerror(vm, e.what());
4623 return SQ_ERROR;
4624 } catch(...) {
4625 sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
4626 return SQ_ERROR;
4627 }
4628
4629}
4630
4631static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
4632{
4633 SQUserPointer data;
4634 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4635 sq_throwerror(vm, _SC("'electrify' called without instance"));
4636 return SQ_ERROR;
4637 }
4638 auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
4639
4640 if (_this == nullptr) {
4641 return SQ_ERROR;
4642 }
4643
4644
4645 try {
4646 _this->electrify();
4647
4648 return 0;
4649
4650 } catch(std::exception& e) {
4651 sq_throwerror(vm, e.what());
4652 return SQ_ERROR;
4653 } catch(...) {
4654 sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
4655 return SQ_ERROR;
4656 }
4657
4658}
4659
4660static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
4661{
4662 auto _this = reinterpret_cast<scripting::TileMap*> (ptr);
4663 delete _this;
4664 return 0;
4665}
4666
4667static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
4668{
4669 SQUserPointer data;
4670 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4671 sq_throwerror(vm, _SC("'goto_node' called without instance"));
4672 return SQ_ERROR;
4673 }
4674 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4675
4676 if (_this == nullptr) {
4677 return SQ_ERROR;
4678 }
4679
4680 SQInteger arg0;
4681 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
4682 sq_throwerror(vm, _SC("Argument 1 not an integer"));
4683 return SQ_ERROR;
4684 }
4685
4686 try {
4687 _this->goto_node(static_cast<int> (arg0));
4688
4689 return 0;
4690
4691 } catch(std::exception& e) {
4692 sq_throwerror(vm, e.what());
4693 return SQ_ERROR;
4694 } catch(...) {
4695 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
4696 return SQ_ERROR;
4697 }
4698
4699}
4700
4701static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
4702{
4703 SQUserPointer data;
4704 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4705 sq_throwerror(vm, _SC("'start_moving' called without instance"));
4706 return SQ_ERROR;
4707 }
4708 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4709
4710 if (_this == nullptr) {
4711 return SQ_ERROR;
4712 }
4713
4714
4715 try {
4716 _this->start_moving();
4717
4718 return 0;
4719
4720 } catch(std::exception& e) {
4721 sq_throwerror(vm, e.what());
4722 return SQ_ERROR;
4723 } catch(...) {
4724 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
4725 return SQ_ERROR;
4726 }
4727
4728}
4729
4730static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
4731{
4732 SQUserPointer data;
4733 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4734 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
4735 return SQ_ERROR;
4736 }
4737 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4738
4739 if (_this == nullptr) {
4740 return SQ_ERROR;
4741 }
4742
4743
4744 try {
4745 _this->stop_moving();
4746
4747 return 0;
4748
4749 } catch(std::exception& e) {
4750 sq_throwerror(vm, e.what());
4751 return SQ_ERROR;
4752 } catch(...) {
4753 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
4754 return SQ_ERROR;
4755 }
4756
4757}
4758
4759static SQInteger TileMap_get_tile_id_wrapper(HSQUIRRELVM vm)
4760{
4761 SQUserPointer data;
4762 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4763 sq_throwerror(vm, _SC("'get_tile_id' called without instance"));
4764 return SQ_ERROR;
4765 }
4766 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4767
4768 if (_this == nullptr) {
4769 return SQ_ERROR;
4770 }
4771
4772 SQInteger arg0;
4773 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
4774 sq_throwerror(vm, _SC("Argument 1 not an integer"));
4775 return SQ_ERROR;
4776 }
4777 SQInteger arg1;
4778 if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
4779 sq_throwerror(vm, _SC("Argument 2 not an integer"));
4780 return SQ_ERROR;
4781 }
4782
4783 try {
4784 int return_value = _this->get_tile_id(static_cast<int> (arg0), static_cast<int> (arg1));
4785
4786 sq_pushinteger(vm, return_value);
4787 return 1;
4788
4789 } catch(std::exception& e) {
4790 sq_throwerror(vm, e.what());
4791 return SQ_ERROR;
4792 } catch(...) {
4793 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id'"));
4794 return SQ_ERROR;
4795 }
4796
4797}
4798
4799static SQInteger TileMap_get_tile_id_at_wrapper(HSQUIRRELVM vm)
4800{
4801 SQUserPointer data;
4802 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4803 sq_throwerror(vm, _SC("'get_tile_id_at' called without instance"));
4804 return SQ_ERROR;
4805 }
4806 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4807
4808 if (_this == nullptr) {
4809 return SQ_ERROR;
4810 }
4811
4812 SQFloat arg0;
4813 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4814 sq_throwerror(vm, _SC("Argument 1 not a float"));
4815 return SQ_ERROR;
4816 }
4817 SQFloat arg1;
4818 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4819 sq_throwerror(vm, _SC("Argument 2 not a float"));
4820 return SQ_ERROR;
4821 }
4822
4823 try {
4824 int return_value = _this->get_tile_id_at(static_cast<float> (arg0), static_cast<float> (arg1));
4825
4826 sq_pushinteger(vm, return_value);
4827 return 1;
4828
4829 } catch(std::exception& e) {
4830 sq_throwerror(vm, e.what());
4831 return SQ_ERROR;
4832 } catch(...) {
4833 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id_at'"));
4834 return SQ_ERROR;
4835 }
4836
4837}
4838
4839static SQInteger TileMap_change_wrapper(HSQUIRRELVM vm)
4840{
4841 SQUserPointer data;
4842 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4843 sq_throwerror(vm, _SC("'change' called without instance"));
4844 return SQ_ERROR;
4845 }
4846 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4847
4848 if (_this == nullptr) {
4849 return SQ_ERROR;
4850 }
4851
4852 SQInteger arg0;
4853 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
4854 sq_throwerror(vm, _SC("Argument 1 not an integer"));
4855 return SQ_ERROR;
4856 }
4857 SQInteger arg1;
4858 if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
4859 sq_throwerror(vm, _SC("Argument 2 not an integer"));
4860 return SQ_ERROR;
4861 }
4862 SQInteger arg2;
4863 if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
4864 sq_throwerror(vm, _SC("Argument 3 not an integer"));
4865 return SQ_ERROR;
4866 }
4867
4868 try {
4869 _this->change(static_cast<int> (arg0), static_cast<int> (arg1), static_cast<int> (arg2));
4870
4871 return 0;
4872
4873 } catch(std::exception& e) {
4874 sq_throwerror(vm, e.what());
4875 return SQ_ERROR;
4876 } catch(...) {
4877 sq_throwerror(vm, _SC("Unexpected exception while executing function 'change'"));
4878 return SQ_ERROR;
4879 }
4880
4881}
4882
4883static SQInteger TileMap_change_at_wrapper(HSQUIRRELVM vm)
4884{
4885 SQUserPointer data;
4886 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4887 sq_throwerror(vm, _SC("'change_at' called without instance"));
4888 return SQ_ERROR;
4889 }
4890 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4891
4892 if (_this == nullptr) {
4893 return SQ_ERROR;
4894 }
4895
4896 SQFloat arg0;
4897 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4898 sq_throwerror(vm, _SC("Argument 1 not a float"));
4899 return SQ_ERROR;
4900 }
4901 SQFloat arg1;
4902 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4903 sq_throwerror(vm, _SC("Argument 2 not a float"));
4904 return SQ_ERROR;
4905 }
4906 SQInteger arg2;
4907 if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
4908 sq_throwerror(vm, _SC("Argument 3 not an integer"));
4909 return SQ_ERROR;
4910 }
4911
4912 try {
4913 _this->change_at(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<int> (arg2));
4914
4915 return 0;
4916
4917 } catch(std::exception& e) {
4918 sq_throwerror(vm, e.what());
4919 return SQ_ERROR;
4920 } catch(...) {
4921 sq_throwerror(vm, _SC("Unexpected exception while executing function 'change_at'"));
4922 return SQ_ERROR;
4923 }
4924
4925}
4926
4927static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
4928{
4929 SQUserPointer data;
4930 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4931 sq_throwerror(vm, _SC("'fade' called without instance"));
4932 return SQ_ERROR;
4933 }
4934 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4935
4936 if (_this == nullptr) {
4937 return SQ_ERROR;
4938 }
4939
4940 SQFloat arg0;
4941 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4942 sq_throwerror(vm, _SC("Argument 1 not a float"));
4943 return SQ_ERROR;
4944 }
4945 SQFloat arg1;
4946 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4947 sq_throwerror(vm, _SC("Argument 2 not a float"));
4948 return SQ_ERROR;
4949 }
4950
4951 try {
4952 _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
4953
4954 return 0;
4955
4956 } catch(std::exception& e) {
4957 sq_throwerror(vm, e.what());
4958 return SQ_ERROR;
4959 } catch(...) {
4960 sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
4961 return SQ_ERROR;
4962 }
4963
4964}
4965
4966static SQInteger TileMap_tint_fade_wrapper(HSQUIRRELVM vm)
4967{
4968 SQUserPointer data;
4969 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4970 sq_throwerror(vm, _SC("'tint_fade' called without instance"));
4971 return SQ_ERROR;
4972 }
4973 auto _this = reinterpret_cast<scripting::TileMap*> (data);
4974
4975 if (_this == nullptr) {
4976 return SQ_ERROR;
4977 }
4978
4979 SQFloat arg0;
4980 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4981 sq_throwerror(vm, _SC("Argument 1 not a float"));
4982 return SQ_ERROR;
4983 }
4984 SQFloat arg1;
4985 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4986 sq_throwerror(vm, _SC("Argument 2 not a float"));
4987 return SQ_ERROR;
4988 }
4989 SQFloat arg2;
4990 if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
4991 sq_throwerror(vm, _SC("Argument 3 not a float"));
4992 return SQ_ERROR;
4993 }
4994 SQFloat arg3;
4995 if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
4996 sq_throwerror(vm, _SC("Argument 4 not a float"));
4997 return SQ_ERROR;
4998 }
4999 SQFloat arg4;
5000 if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
5001 sq_throwerror(vm, _SC("Argument 5 not a float"));
5002 return SQ_ERROR;
5003 }
5004
5005 try {
5006 _this->tint_fade(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4));
5007
5008 return 0;
5009
5010 } catch(std::exception& e) {
5011 sq_throwerror(vm, e.what());
5012 return SQ_ERROR;
5013 } catch(...) {
5014 sq_throwerror(vm, _SC("Unexpected exception while executing function 'tint_fade'"));
5015 return SQ_ERROR;
5016 }
5017
5018}
5019
5020static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
5021{
5022 SQUserPointer data;
5023 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5024 sq_throwerror(vm, _SC("'set_alpha' called without instance"));
5025 return SQ_ERROR;
5026 }
5027 auto _this = reinterpret_cast<scripting::TileMap*> (data);
5028
5029 if (_this == nullptr) {
5030 return SQ_ERROR;
5031 }
5032
5033 SQFloat arg0;
5034 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5035 sq_throwerror(vm, _SC("Argument 1 not a float"));
5036 return SQ_ERROR;
5037 }
5038
5039 try {
5040 _this->set_alpha(static_cast<float> (arg0));
5041
5042 return 0;
5043
5044 } catch(std::exception& e) {
5045 sq_throwerror(vm, e.what());
5046 return SQ_ERROR;
5047 } catch(...) {
5048 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
5049 return SQ_ERROR;
5050 }
5051
5052}
5053
5054static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
5055{
5056 SQUserPointer data;
5057 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5058 sq_throwerror(vm, _SC("'get_alpha' called without instance"));
5059 return SQ_ERROR;
5060 }
5061 auto _this = reinterpret_cast<scripting::TileMap*> (data);
5062
5063 if (_this == nullptr) {
5064 return SQ_ERROR;
5065 }
5066
5067
5068 try {
5069 float return_value = _this->get_alpha();
5070
5071 sq_pushfloat(vm, return_value);
5072 return 1;
5073
5074 } catch(std::exception& e) {
5075 sq_throwerror(vm, e.what());
5076 return SQ_ERROR;
5077 } catch(...) {
5078 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
5079 return SQ_ERROR;
5080 }
5081
5082}
5083
5084static SQInteger TileMap_set_solid_wrapper(HSQUIRRELVM vm)
5085{
5086 SQUserPointer data;
5087 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5088 sq_throwerror(vm, _SC("'set_solid' called without instance"));
5089 return SQ_ERROR;
5090 }
5091 auto _this = reinterpret_cast<scripting::TileMap*> (data);
5092
5093 if (_this == nullptr) {
5094 return SQ_ERROR;
5095 }
5096
5097 SQBool arg0;
5098 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5099 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5100 return SQ_ERROR;
5101 }
5102
5103 try {
5104 _this->set_solid(arg0 == SQTrue);
5105
5106 return 0;
5107
5108 } catch(std::exception& e) {
5109 sq_throwerror(vm, e.what());
5110 return SQ_ERROR;
5111 } catch(...) {
5112 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
5113 return SQ_ERROR;
5114 }
5115
5116}
5117
5118static SQInteger Torch_release_hook(SQUserPointer ptr, SQInteger )
5119{
5120 auto _this = reinterpret_cast<scripting::Torch*> (ptr);
5121 delete _this;
5122 return 0;
5123}
5124
5125static SQInteger Torch_get_burning_wrapper(HSQUIRRELVM vm)
5126{
5127 SQUserPointer data;
5128 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5129 sq_throwerror(vm, _SC("'get_burning' called without instance"));
5130 return SQ_ERROR;
5131 }
5132 auto _this = reinterpret_cast<scripting::Torch*> (data);
5133
5134 if (_this == nullptr) {
5135 return SQ_ERROR;
5136 }
5137
5138
5139 try {
5140 bool return_value = _this->get_burning();
5141
5142 sq_pushbool(vm, return_value);
5143 return 1;
5144
5145 } catch(std::exception& e) {
5146 sq_throwerror(vm, e.what());
5147 return SQ_ERROR;
5148 } catch(...) {
5149 sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
5150 return SQ_ERROR;
5151 }
5152
5153}
5154
5155static SQInteger Torch_set_burning_wrapper(HSQUIRRELVM vm)
5156{
5157 SQUserPointer data;
5158 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5159 sq_throwerror(vm, _SC("'set_burning' called without instance"));
5160 return SQ_ERROR;
5161 }
5162 auto _this = reinterpret_cast<scripting::Torch*> (data);
5163
5164 if (_this == nullptr) {
5165 return SQ_ERROR;
5166 }
5167
5168 SQBool arg0;
5169 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5170 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5171 return SQ_ERROR;
5172 }
5173
5174 try {
5175 _this->set_burning(arg0 == SQTrue);
5176
5177 return 0;
5178
5179 } catch(std::exception& e) {
5180 sq_throwerror(vm, e.what());
5181 return SQ_ERROR;
5182 } catch(...) {
5183 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
5184 return SQ_ERROR;
5185 }
5186
5187}
5188
5189static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
5190{
5191 auto _this = reinterpret_cast<scripting::WillOWisp*> (ptr);
5192 delete _this;
5193 return 0;
5194}
5195
5196static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
5197{
5198 SQUserPointer data;
5199 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5200 sq_throwerror(vm, _SC("'goto_node' called without instance"));
5201 return SQ_ERROR;
5202 }
5203 auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
5204
5205 if (_this == nullptr) {
5206 return SQ_ERROR;
5207 }
5208
5209 SQInteger arg0;
5210 if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
5211 sq_throwerror(vm, _SC("Argument 1 not an integer"));
5212 return SQ_ERROR;
5213 }
5214
5215 try {
5216 _this->goto_node(static_cast<int> (arg0));
5217
5218 return 0;
5219
5220 } catch(std::exception& e) {
5221 sq_throwerror(vm, e.what());
5222 return SQ_ERROR;
5223 } catch(...) {
5224 sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
5225 return SQ_ERROR;
5226 }
5227
5228}
5229
5230static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
5231{
5232 SQUserPointer data;
5233 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5234 sq_throwerror(vm, _SC("'set_state' called without instance"));
5235 return SQ_ERROR;
5236 }
5237 auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
5238
5239 if (_this == nullptr) {
5240 return SQ_ERROR;
5241 }
5242
5243 const SQChar* arg0;
5244 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5245 sq_throwerror(vm, _SC("Argument 1 not a string"));
5246 return SQ_ERROR;
5247 }
5248
5249 try {
5250 _this->set_state(arg0);
5251
5252 return 0;
5253
5254 } catch(std::exception& e) {
5255 sq_throwerror(vm, e.what());
5256 return SQ_ERROR;
5257 } catch(...) {
5258 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
5259 return SQ_ERROR;
5260 }
5261
5262}
5263
5264static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
5265{
5266 SQUserPointer data;
5267 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5268 sq_throwerror(vm, _SC("'start_moving' called without instance"));
5269 return SQ_ERROR;
5270 }
5271 auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
5272
5273 if (_this == nullptr) {
5274 return SQ_ERROR;
5275 }
5276
5277
5278 try {
5279 _this->start_moving();
5280
5281 return 0;
5282
5283 } catch(std::exception& e) {
5284 sq_throwerror(vm, e.what());
5285 return SQ_ERROR;
5286 } catch(...) {
5287 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
5288 return SQ_ERROR;
5289 }
5290
5291}
5292
5293static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
5294{
5295 SQUserPointer data;
5296 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5297 sq_throwerror(vm, _SC("'stop_moving' called without instance"));
5298 return SQ_ERROR;
5299 }
5300 auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
5301
5302 if (_this == nullptr) {
5303 return SQ_ERROR;
5304 }
5305
5306
5307 try {
5308 _this->stop_moving();
5309
5310 return 0;
5311
5312 } catch(std::exception& e) {
5313 sq_throwerror(vm, e.what());
5314 return SQ_ERROR;
5315 } catch(...) {
5316 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
5317 return SQ_ERROR;
5318 }
5319
5320}
5321
5322static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
5323{
5324 auto _this = reinterpret_cast<scripting::Wind*> (ptr);
5325 delete _this;
5326 return 0;
5327}
5328
5329static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
5330{
5331 SQUserPointer data;
5332 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5333 sq_throwerror(vm, _SC("'start' called without instance"));
5334 return SQ_ERROR;
5335 }
5336 auto _this = reinterpret_cast<scripting::Wind*> (data);
5337
5338 if (_this == nullptr) {
5339 return SQ_ERROR;
5340 }
5341
5342
5343 try {
5344 _this->start();
5345
5346 return 0;
5347
5348 } catch(std::exception& e) {
5349 sq_throwerror(vm, e.what());
5350 return SQ_ERROR;
5351 } catch(...) {
5352 sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
5353 return SQ_ERROR;
5354 }
5355
5356}
5357
5358static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
5359{
5360 SQUserPointer data;
5361 if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5362 sq_throwerror(vm, _SC("'stop' called without instance"));
5363 return SQ_ERROR;
5364 }
5365 auto _this = reinterpret_cast<scripting::Wind*> (data);
5366
5367 if (_this == nullptr) {
5368 return SQ_ERROR;
5369 }
5370
5371
5372 try {
5373 _this->stop();
5374
5375 return 0;
5376
5377 } catch(std::exception& e) {
5378 sq_throwerror(vm, e.what());
5379 return SQ_ERROR;
5380 } catch(...) {
5381 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
5382 return SQ_ERROR;
5383 }
5384
5385}
5386
5387static SQInteger display_wrapper(HSQUIRRELVM vm)
5388{
5389 return scripting::display(vm);
5390}
5391
5392static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
5393{
5394 HSQUIRRELVM arg0 = vm;
5395
5396 try {
5397 scripting::print_stacktrace(arg0);
5398
5399 return 0;
5400
5401 } catch(std::exception& e) {
5402 sq_throwerror(vm, e.what());
5403 return SQ_ERROR;
5404 } catch(...) {
5405 sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
5406 return SQ_ERROR;
5407 }
5408
5409}
5410
5411static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
5412{
5413 return scripting::get_current_thread(vm);
5414}
5415
5416static SQInteger is_christmas_wrapper(HSQUIRRELVM vm)
5417{
5418
5419 try {
5420 bool return_value = scripting::is_christmas();
5421
5422 sq_pushbool(vm, return_value);
5423 return 1;
5424
5425 } catch(std::exception& e) {
5426 sq_throwerror(vm, e.what());
5427 return SQ_ERROR;
5428 } catch(...) {
5429 sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_christmas'"));
5430 return SQ_ERROR;
5431 }
5432
5433}
5434
5435static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
5436{
5437 const SQChar* arg0;
5438 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5439 sq_throwerror(vm, _SC("Argument 1 not a string"));
5440 return SQ_ERROR;
5441 }
5442
5443 try {
5444 scripting::display_text_file(arg0);
5445
5446 return 0;
5447
5448 } catch(std::exception& e) {
5449 sq_throwerror(vm, e.what());
5450 return SQ_ERROR;
5451 } catch(...) {
5452 sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
5453 return SQ_ERROR;
5454 }
5455
5456}
5457
5458static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
5459{
5460 const SQChar* arg0;
5461 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5462 sq_throwerror(vm, _SC("Argument 1 not a string"));
5463 return SQ_ERROR;
5464 }
5465
5466 try {
5467 scripting::load_worldmap(arg0);
5468
5469 return 0;
5470
5471 } catch(std::exception& e) {
5472 sq_throwerror(vm, e.what());
5473 return SQ_ERROR;
5474 } catch(...) {
5475 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
5476 return SQ_ERROR;
5477 }
5478
5479}
5480
5481static SQInteger set_next_worldmap_wrapper(HSQUIRRELVM vm)
5482{
5483 const SQChar* arg0;
5484 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5485 sq_throwerror(vm, _SC("Argument 1 not a string"));
5486 return SQ_ERROR;
5487 }
5488 const SQChar* arg1;
5489 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
5490 sq_throwerror(vm, _SC("Argument 2 not a string"));
5491 return SQ_ERROR;
5492 }
5493
5494 try {
5495 scripting::set_next_worldmap(arg0, arg1);
5496
5497 return 0;
5498
5499 } catch(std::exception& e) {
5500 sq_throwerror(vm, e.what());
5501 return SQ_ERROR;
5502 } catch(...) {
5503 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_next_worldmap'"));
5504 return SQ_ERROR;
5505 }
5506
5507}
5508
5509static SQInteger load_level_wrapper(HSQUIRRELVM vm)
5510{
5511 const SQChar* arg0;
5512 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5513 sq_throwerror(vm, _SC("Argument 1 not a string"));
5514 return SQ_ERROR;
5515 }
5516
5517 try {
5518 scripting::load_level(arg0);
5519
5520 return 0;
5521
5522 } catch(std::exception& e) {
5523 sq_throwerror(vm, e.what());
5524 return SQ_ERROR;
5525 } catch(...) {
5526 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
5527 return SQ_ERROR;
5528 }
5529
5530}
5531
5532static SQInteger wait_wrapper(HSQUIRRELVM vm)
5533{
5534 HSQUIRRELVM arg0 = vm;
5535 SQFloat arg1;
5536 if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
5537 sq_throwerror(vm, _SC("Argument 1 not a float"));
5538 return SQ_ERROR;
5539 }
5540
5541 try {
5542 scripting::wait(arg0, static_cast<float> (arg1));
5543
5544 return sq_suspendvm(vm);
5545
5546 } catch(std::exception& e) {
5547 sq_throwerror(vm, e.what());
5548 return SQ_ERROR;
5549 } catch(...) {
5550 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
5551 return SQ_ERROR;
5552 }
5553
5554}
5555
5556static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
5557{
5558 HSQUIRRELVM arg0 = vm;
5559
5560 try {
5561 scripting::wait_for_screenswitch(arg0);
5562
5563 return sq_suspendvm(vm);
5564
5565 } catch(std::exception& e) {
5566 sq_throwerror(vm, e.what());
5567 return SQ_ERROR;
5568 } catch(...) {
5569 sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
5570 return SQ_ERROR;
5571 }
5572
5573}
5574
5575static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
5576{
5577 (void) vm;
5578
5579 try {
5580 scripting::exit_screen();
5581
5582 return 0;
5583
5584 } catch(std::exception& e) {
5585 sq_throwerror(vm, e.what());
5586 return SQ_ERROR;
5587 } catch(...) {
5588 sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
5589 return SQ_ERROR;
5590 }
5591
5592}
5593
5594static SQInteger translate_wrapper(HSQUIRRELVM vm)
5595{
5596 const SQChar* arg0;
5597 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5598 sq_throwerror(vm, _SC("Argument 1 not a string"));
5599 return SQ_ERROR;
5600 }
5601
5602 try {
5603 std::string return_value = scripting::translate(arg0);
5604
5605 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
5606 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
5607 return 1;
5608
5609 } catch(std::exception& e) {
5610 sq_throwerror(vm, e.what());
5611 return SQ_ERROR;
5612 } catch(...) {
5613 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
5614 return SQ_ERROR;
5615 }
5616
5617}
5618
5619static SQInteger __wrapper(HSQUIRRELVM vm)
5620{
5621 const SQChar* arg0;
5622 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5623 sq_throwerror(vm, _SC("Argument 1 not a string"));
5624 return SQ_ERROR;
5625 }
5626
5627 try {
5628 std::string return_value = scripting::_(arg0);
5629
5630 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
5631 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
5632 return 1;
5633
5634 } catch(std::exception& e) {
5635 sq_throwerror(vm, e.what());
5636 return SQ_ERROR;
5637 } catch(...) {
5638 sq_throwerror(vm, _SC("Unexpected exception while executing function '_'"));
5639 return SQ_ERROR;
5640 }
5641
5642}
5643
5644static SQInteger translate_plural_wrapper(HSQUIRRELVM vm)
5645{
5646 const SQChar* arg0;
5647 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5648 sq_throwerror(vm, _SC("Argument 1 not a string"));
5649 return SQ_ERROR;
5650 }
5651 const SQChar* arg1;
5652 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
5653 sq_throwerror(vm, _SC("Argument 2 not a string"));
5654 return SQ_ERROR;
5655 }
5656 SQInteger arg2;
5657 if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
5658 sq_throwerror(vm, _SC("Argument 3 not an integer"));
5659 return SQ_ERROR;
5660 }
5661
5662 try {
5663 std::string return_value = scripting::translate_plural(arg0, arg1, static_cast<int> (arg2));
5664
5665 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
5666 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
5667 return 1;
5668
5669 } catch(std::exception& e) {
5670 sq_throwerror(vm, e.what());
5671 return SQ_ERROR;
5672 } catch(...) {
5673 sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate_plural'"));
5674 return SQ_ERROR;
5675 }
5676
5677}
5678
5679static SQInteger ___wrapper(HSQUIRRELVM vm)
5680{
5681 const SQChar* arg0;
5682 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5683 sq_throwerror(vm, _SC("Argument 1 not a string"));
5684 return SQ_ERROR;
5685 }
5686 const SQChar* arg1;
5687 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
5688 sq_throwerror(vm, _SC("Argument 2 not a string"));
5689 return SQ_ERROR;
5690 }
5691 SQInteger arg2;
5692 if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
5693 sq_throwerror(vm, _SC("Argument 3 not an integer"));
5694 return SQ_ERROR;
5695 }
5696
5697 try {
5698 std::string return_value = scripting::__(arg0, arg1, static_cast<int> (arg2));
5699
5700 assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
5701 sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
5702 return 1;
5703
5704 } catch(std::exception& e) {
5705 sq_throwerror(vm, e.what());
5706 return SQ_ERROR;
5707 } catch(...) {
5708 sq_throwerror(vm, _SC("Unexpected exception while executing function '__'"));
5709 return SQ_ERROR;
5710 }
5711
5712}
5713
5714static SQInteger import_wrapper(HSQUIRRELVM vm)
5715{
5716 HSQUIRRELVM arg0 = vm;
5717 const SQChar* arg1;
5718 if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
5719 sq_throwerror(vm, _SC("Argument 1 not a string"));
5720 return SQ_ERROR;
5721 }
5722
5723 try {
5724 scripting::import(arg0, arg1);
5725
5726 return 0;
5727
5728 } catch(std::exception& e) {
5729 sq_throwerror(vm, e.what());
5730 return SQ_ERROR;
5731 } catch(...) {
5732 sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
5733 return SQ_ERROR;
5734 }
5735
5736}
5737
5738static SQInteger save_state_wrapper(HSQUIRRELVM vm)
5739{
5740 (void) vm;
5741
5742 try {
5743 scripting::save_state();
5744
5745 return 0;
5746
5747 } catch(std::exception& e) {
5748 sq_throwerror(vm, e.what());
5749 return SQ_ERROR;
5750 } catch(...) {
5751 sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
5752 return SQ_ERROR;
5753 }
5754
5755}
5756
5757static SQInteger load_state_wrapper(HSQUIRRELVM vm)
5758{
5759 (void) vm;
5760
5761 try {
5762 scripting::load_state();
5763
5764 return 0;
5765
5766 } catch(std::exception& e) {
5767 sq_throwerror(vm, e.what());
5768 return SQ_ERROR;
5769 } catch(...) {
5770 sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_state'"));
5771 return SQ_ERROR;
5772 }
5773
5774}
5775
5776static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
5777{
5778 SQBool arg0;
5779 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5780 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5781 return SQ_ERROR;
5782 }
5783
5784 try {
5785 scripting::debug_collrects(arg0 == SQTrue);
5786
5787 return 0;
5788
5789 } catch(std::exception& e) {
5790 sq_throwerror(vm, e.what());
5791 return SQ_ERROR;
5792 } catch(...) {
5793 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
5794 return SQ_ERROR;
5795 }
5796
5797}
5798
5799static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
5800{
5801 SQBool arg0;
5802 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5803 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5804 return SQ_ERROR;
5805 }
5806
5807 try {
5808 scripting::debug_show_fps(arg0 == SQTrue);
5809
5810 return 0;
5811
5812 } catch(std::exception& e) {
5813 sq_throwerror(vm, e.what());
5814 return SQ_ERROR;
5815 } catch(...) {
5816 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
5817 return SQ_ERROR;
5818 }
5819
5820}
5821
5822static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
5823{
5824 SQBool arg0;
5825 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5826 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5827 return SQ_ERROR;
5828 }
5829
5830 try {
5831 scripting::debug_draw_solids_only(arg0 == SQTrue);
5832
5833 return 0;
5834
5835 } catch(std::exception& e) {
5836 sq_throwerror(vm, e.what());
5837 return SQ_ERROR;
5838 } catch(...) {
5839 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
5840 return SQ_ERROR;
5841 }
5842
5843}
5844
5845static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm)
5846{
5847 SQBool arg0;
5848 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5849 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5850 return SQ_ERROR;
5851 }
5852
5853 try {
5854 scripting::debug_draw_editor_images(arg0 == SQTrue);
5855
5856 return 0;
5857
5858 } catch(std::exception& e) {
5859 sq_throwerror(vm, e.what());
5860 return SQ_ERROR;
5861 } catch(...) {
5862 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'"));
5863 return SQ_ERROR;
5864 }
5865
5866}
5867
5868static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm)
5869{
5870 SQBool arg0;
5871 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5872 sq_throwerror(vm, _SC("Argument 1 not a bool"));
5873 return SQ_ERROR;
5874 }
5875
5876 try {
5877 scripting::debug_worldmap_ghost(arg0 == SQTrue);
5878
5879 return 0;
5880
5881 } catch(std::exception& e) {
5882 sq_throwerror(vm, e.what());
5883 return SQ_ERROR;
5884 } catch(...) {
5885 sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_worldmap_ghost'"));
5886 return SQ_ERROR;
5887 }
5888
5889}
5890
5891static SQInteger play_music_wrapper(HSQUIRRELVM vm)
5892{
5893 const SQChar* arg0;
5894 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5895 sq_throwerror(vm, _SC("Argument 1 not a string"));
5896 return SQ_ERROR;
5897 }
5898
5899 try {
5900 scripting::play_music(arg0);
5901
5902 return 0;
5903
5904 } catch(std::exception& e) {
5905 sq_throwerror(vm, e.what());
5906 return SQ_ERROR;
5907 } catch(...) {
5908 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
5909 return SQ_ERROR;
5910 }
5911
5912}
5913
5914static SQInteger stop_music_wrapper(HSQUIRRELVM vm)
5915{
5916 SQFloat arg0;
5917 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5918 sq_throwerror(vm, _SC("Argument 1 not a float"));
5919 return SQ_ERROR;
5920 }
5921
5922 try {
5923 scripting::stop_music(static_cast<float> (arg0));
5924
5925 return 0;
5926
5927 } catch(std::exception& e) {
5928 sq_throwerror(vm, e.what());
5929 return SQ_ERROR;
5930 } catch(...) {
5931 sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_music'"));
5932 return SQ_ERROR;
5933 }
5934
5935}
5936
5937static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
5938{
5939 const SQChar* arg0;
5940 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5941 sq_throwerror(vm, _SC("Argument 1 not a string"));
5942 return SQ_ERROR;
5943 }
5944
5945 try {
5946 scripting::play_sound(arg0);
5947
5948 return 0;
5949
5950 } catch(std::exception& e) {
5951 sq_throwerror(vm, e.what());
5952 return SQ_ERROR;
5953 } catch(...) {
5954 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
5955 return SQ_ERROR;
5956 }
5957
5958}
5959
5960static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm)
5961{
5962 SQFloat arg0;
5963 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5964 sq_throwerror(vm, _SC("Argument 1 not a float"));
5965 return SQ_ERROR;
5966 }
5967
5968 try {
5969 scripting::set_game_speed(static_cast<float> (arg0));
5970
5971 return 0;
5972
5973 } catch(std::exception& e) {
5974 sq_throwerror(vm, e.what());
5975 return SQ_ERROR;
5976 } catch(...) {
5977 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'"));
5978 return SQ_ERROR;
5979 }
5980
5981}
5982
5983static SQInteger grease_wrapper(HSQUIRRELVM vm)
5984{
5985 (void) vm;
5986
5987 try {
5988 scripting::grease();
5989
5990 return 0;
5991
5992 } catch(std::exception& e) {
5993 sq_throwerror(vm, e.what());
5994 return SQ_ERROR;
5995 } catch(...) {
5996 sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
5997 return SQ_ERROR;
5998 }
5999
6000}
6001
6002static SQInteger invincible_wrapper(HSQUIRRELVM vm)
6003{
6004 (void) vm;
6005
6006 try {
6007 scripting::invincible();
6008
6009 return 0;
6010
6011 } catch(std::exception& e) {
6012 sq_throwerror(vm, e.what());
6013 return SQ_ERROR;
6014 } catch(...) {
6015 sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
6016 return SQ_ERROR;
6017 }
6018
6019}
6020
6021static SQInteger ghost_wrapper(HSQUIRRELVM vm)
6022{
6023 (void) vm;
6024
6025 try {
6026 scripting::ghost();
6027
6028 return 0;
6029
6030 } catch(std::exception& e) {
6031 sq_throwerror(vm, e.what());
6032 return SQ_ERROR;
6033 } catch(...) {
6034 sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
6035 return SQ_ERROR;
6036 }
6037
6038}
6039
6040static SQInteger mortal_wrapper(HSQUIRRELVM vm)
6041{
6042 (void) vm;
6043
6044 try {
6045 scripting::mortal();
6046
6047 return 0;
6048
6049 } catch(std::exception& e) {
6050 sq_throwerror(vm, e.what());
6051 return SQ_ERROR;
6052 } catch(...) {
6053 sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
6054 return SQ_ERROR;
6055 }
6056
6057}
6058
6059static SQInteger restart_wrapper(HSQUIRRELVM vm)
6060{
6061 (void) vm;
6062
6063 try {
6064 scripting::restart();
6065
6066 return 0;
6067
6068 } catch(std::exception& e) {
6069 sq_throwerror(vm, e.what());
6070 return SQ_ERROR;
6071 } catch(...) {
6072 sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
6073 return SQ_ERROR;
6074 }
6075
6076}
6077
6078static SQInteger whereami_wrapper(HSQUIRRELVM vm)
6079{
6080 (void) vm;
6081
6082 try {
6083 scripting::whereami();
6084
6085 return 0;
6086
6087 } catch(std::exception& e) {
6088 sq_throwerror(vm, e.what());
6089 return SQ_ERROR;
6090 } catch(...) {
6091 sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
6092 return SQ_ERROR;
6093 }
6094
6095}
6096
6097static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
6098{
6099 (void) vm;
6100
6101 try {
6102 scripting::gotoend();
6103
6104 return 0;
6105
6106 } catch(std::exception& e) {
6107 sq_throwerror(vm, e.what());
6108 return SQ_ERROR;
6109 } catch(...) {
6110 sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
6111 return SQ_ERROR;
6112 }
6113
6114}
6115
6116static SQInteger warp_wrapper(HSQUIRRELVM vm)
6117{
6118 SQFloat arg0;
6119 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6120 sq_throwerror(vm, _SC("Argument 1 not a float"));
6121 return SQ_ERROR;
6122 }
6123 SQFloat arg1;
6124 if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6125 sq_throwerror(vm, _SC("Argument 2 not a float"));
6126 return SQ_ERROR;
6127 }
6128
6129 try {
6130 scripting::warp(static_cast<float> (arg0), static_cast<float> (arg1));
6131
6132 return 0;
6133
6134 } catch(std::exception& e) {
6135 sq_throwerror(vm, e.what());
6136 return SQ_ERROR;
6137 } catch(...) {
6138 sq_throwerror(vm, _SC("Unexpected exception while executing function 'warp'"));
6139 return SQ_ERROR;
6140 }
6141
6142}
6143
6144static SQInteger camera_wrapper(HSQUIRRELVM vm)
6145{
6146 (void) vm;
6147
6148 try {
6149 scripting::camera();
6150
6151 return 0;
6152
6153 } catch(std::exception& e) {
6154 sq_throwerror(vm, e.what());
6155 return SQ_ERROR;
6156 } catch(...) {
6157 sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
6158 return SQ_ERROR;
6159 }
6160
6161}
6162
6163static SQInteger set_gamma_wrapper(HSQUIRRELVM vm)
6164{
6165 SQFloat arg0;
6166 if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6167 sq_throwerror(vm, _SC("Argument 1 not a float"));
6168 return SQ_ERROR;
6169 }
6170
6171 try {
6172 scripting::set_gamma(static_cast<float> (arg0));
6173
6174 return 0;
6175
6176 } catch(std::exception& e) {
6177 sq_throwerror(vm, e.what());
6178 return SQ_ERROR;
6179 } catch(...) {
6180 sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'"));
6181 return SQ_ERROR;
6182 }
6183
6184}
6185
6186static SQInteger quit_wrapper(HSQUIRRELVM vm)
6187{
6188 (void) vm;
6189
6190 try {
6191 scripting::quit();
6192
6193 return 0;
6194
6195 } catch(std::exception& e) {
6196 sq_throwerror(vm, e.what());
6197 return SQ_ERROR;
6198 } catch(...) {
6199 sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
6200 return SQ_ERROR;
6201 }
6202
6203}
6204
6205static SQInteger rand_wrapper(HSQUIRRELVM vm)
6206{
6207
6208 try {
6209 int return_value = scripting::rand();
6210
6211 sq_pushinteger(vm, return_value);
6212 return 1;
6213
6214 } catch(std::exception& e) {
6215 sq_throwerror(vm, e.what());
6216 return SQ_ERROR;
6217 } catch(...) {
6218 sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
6219 return SQ_ERROR;
6220 }
6221
6222}
6223
6224static SQInteger record_demo_wrapper(HSQUIRRELVM vm)
6225{
6226 const SQChar* arg0;
6227 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6228 sq_throwerror(vm, _SC("Argument 1 not a string"));
6229 return SQ_ERROR;
6230 }
6231
6232 try {
6233 scripting::record_demo(arg0);
6234
6235 return 0;
6236
6237 } catch(std::exception& e) {
6238 sq_throwerror(vm, e.what());
6239 return SQ_ERROR;
6240 } catch(...) {
6241 sq_throwerror(vm, _SC("Unexpected exception while executing function 'record_demo'"));
6242 return SQ_ERROR;
6243 }
6244
6245}
6246
6247static SQInteger play_demo_wrapper(HSQUIRRELVM vm)
6248{
6249 const SQChar* arg0;
6250 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6251 sq_throwerror(vm, _SC("Argument 1 not a string"));
6252 return SQ_ERROR;
6253 }
6254
6255 try {
6256 scripting::play_demo(arg0);
6257
6258 return 0;
6259
6260 } catch(std::exception& e) {
6261 sq_throwerror(vm, e.what());
6262 return SQ_ERROR;
6263 } catch(...) {
6264 sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_demo'"));
6265 return SQ_ERROR;
6266 }
6267
6268}
6269
6270static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
6271{
6272 SQBool arg0;
6273 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
6274 sq_throwerror(vm, _SC("Argument 1 not a bool"));
6275 return SQ_ERROR;
6276 }
6277
6278 try {
6279 scripting::Level_finish(arg0 == SQTrue);
6280
6281 return 0;
6282
6283 } catch(std::exception& e) {
6284 sq_throwerror(vm, e.what());
6285 return SQ_ERROR;
6286 } catch(...) {
6287 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_finish'"));
6288 return SQ_ERROR;
6289 }
6290
6291}
6292
6293static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
6294{
6295 const SQChar* arg0;
6296 if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6297 sq_throwerror(vm, _SC("Argument 1 not a string"));
6298 return SQ_ERROR;
6299 }
6300 const SQChar* arg1;
6301 if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
6302 sq_throwerror(vm, _SC("Argument 2 not a string"));
6303 return SQ_ERROR;
6304 }
6305
6306 try {
6307 scripting::Level_spawn(arg0, arg1);
6308
6309 return 0;
6310
6311 } catch(std::exception& e) {
6312 sq_throwerror(vm, e.what());
6313 return SQ_ERROR;
6314 } catch(...) {
6315 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn'"));
6316 return SQ_ERROR;
6317 }
6318
6319}
6320
6321static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
6322{
6323 (void) vm;
6324
6325 try {
6326 scripting::Level_flip_vertically();
6327
6328 return 0;
6329
6330 } catch(std::exception& e) {
6331 sq_throwerror(vm, e.what());
6332 return SQ_ERROR;
6333 } catch(...) {
6334 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_flip_vertically'"));
6335 return SQ_ERROR;
6336 }
6337
6338}
6339
6340static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
6341{
6342 (void) vm;
6343
6344 try {
6345 scripting::Level_toggle_pause();
6346
6347 return 0;
6348
6349 } catch(std::exception& e) {
6350 sq_throwerror(vm, e.what());
6351 return SQ_ERROR;
6352 } catch(...) {
6353 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_toggle_pause'"));
6354 return SQ_ERROR;
6355 }
6356
6357}
6358
6359static SQInteger Level_edit_wrapper(HSQUIRRELVM vm)
6360{
6361 SQBool arg0;
6362 if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
6363 sq_throwerror(vm, _SC("Argument 1 not a bool"));
6364 return SQ_ERROR;
6365 }
6366
6367 try {
6368 scripting::Level_edit(arg0 == SQTrue);
6369
6370 return 0;
6371
6372 } catch(std::exception& e) {
6373 sq_throwerror(vm, e.what());
6374 return SQ_ERROR;
6375 } catch(...) {
6376 sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_edit'"));
6377 return SQ_ERROR;
6378 }
6379
6380}
6381
6382} // namespace wrapper
6383void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook)
6384{
6385 using namespace wrapper;
6386
6387 sq_pushroottable(v);
6388 sq_pushstring(v, "AmbientSound", -1);
6389 if(SQ_FAILED(sq_get(v, -2))) {
6390 std::ostringstream msg;
6391 msg << "Couldn't resolved squirrel type 'AmbientSound'";
6392 throw SquirrelError(v, msg.str());
6393 }
6394
6395 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6396 std::ostringstream msg;
6397 msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
6398 throw SquirrelError(v, msg.str());
6399 }
6400 sq_remove(v, -2); // remove object name
6401
6402 if(setup_releasehook) {
6403 sq_setreleasehook(v, -1, AmbientSound_release_hook);
6404 }
6405
6406 sq_remove(v, -2); // remove root table
6407}
6408
6409void create_squirrel_instance(HSQUIRRELVM v, scripting::Background* object, bool setup_releasehook)
6410{
6411 using namespace wrapper;
6412
6413 sq_pushroottable(v);
6414 sq_pushstring(v, "Background", -1);
6415 if(SQ_FAILED(sq_get(v, -2))) {
6416 std::ostringstream msg;
6417 msg << "Couldn't resolved squirrel type 'Background'";
6418 throw SquirrelError(v, msg.str());
6419 }
6420
6421 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6422 std::ostringstream msg;
6423 msg << "Couldn't setup squirrel instance for object of type 'Background'";
6424 throw SquirrelError(v, msg.str());
6425 }
6426 sq_remove(v, -2); // remove object name
6427
6428 if(setup_releasehook) {
6429 sq_setreleasehook(v, -1, Background_release_hook);
6430 }
6431
6432 sq_remove(v, -2); // remove root table
6433}
6434
6435void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook)
6436{
6437 using namespace wrapper;
6438
6439 sq_pushroottable(v);
6440 sq_pushstring(v, "Camera", -1);
6441 if(SQ_FAILED(sq_get(v, -2))) {
6442 std::ostringstream msg;
6443 msg << "Couldn't resolved squirrel type 'Camera'";
6444 throw SquirrelError(v, msg.str());
6445 }
6446
6447 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6448 std::ostringstream msg;
6449 msg << "Couldn't setup squirrel instance for object of type 'Camera'";
6450 throw SquirrelError(v, msg.str());
6451 }
6452 sq_remove(v, -2); // remove object name
6453
6454 if(setup_releasehook) {
6455 sq_setreleasehook(v, -1, Camera_release_hook);
6456 }
6457
6458 sq_remove(v, -2); // remove root table
6459}
6460
6461void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook)
6462{
6463 using namespace wrapper;
6464
6465 sq_pushroottable(v);
6466 sq_pushstring(v, "Candle", -1);
6467 if(SQ_FAILED(sq_get(v, -2))) {
6468 std::ostringstream msg;
6469 msg << "Couldn't resolved squirrel type 'Candle'";
6470 throw SquirrelError(v, msg.str());
6471 }
6472
6473 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6474 std::ostringstream msg;
6475 msg << "Couldn't setup squirrel instance for object of type 'Candle'";
6476 throw SquirrelError(v, msg.str());
6477 }
6478 sq_remove(v, -2); // remove object name
6479
6480 if(setup_releasehook) {
6481 sq_setreleasehook(v, -1, Candle_release_hook);
6482 }
6483
6484 sq_remove(v, -2); // remove root table
6485}
6486
6487void create_squirrel_instance(HSQUIRRELVM v, scripting::Dispenser* object, bool setup_releasehook)
6488{
6489 using namespace wrapper;
6490
6491 sq_pushroottable(v);
6492 sq_pushstring(v, "Dispenser", -1);
6493 if(SQ_FAILED(sq_get(v, -2))) {
6494 std::ostringstream msg;
6495 msg << "Couldn't resolved squirrel type 'Dispenser'";
6496 throw SquirrelError(v, msg.str());
6497 }
6498
6499 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6500 std::ostringstream msg;
6501 msg << "Couldn't setup squirrel instance for object of type 'Dispenser'";
6502 throw SquirrelError(v, msg.str());
6503 }
6504 sq_remove(v, -2); // remove object name
6505
6506 if(setup_releasehook) {
6507 sq_setreleasehook(v, -1, Dispenser_release_hook);
6508 }
6509
6510 sq_remove(v, -2); // remove root table
6511}
6512
6513void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook)
6514{
6515 using namespace wrapper;
6516
6517 sq_pushroottable(v);
6518 sq_pushstring(v, "DisplayEffect", -1);
6519 if(SQ_FAILED(sq_get(v, -2))) {
6520 std::ostringstream msg;
6521 msg << "Couldn't resolved squirrel type 'DisplayEffect'";
6522 throw SquirrelError(v, msg.str());
6523 }
6524
6525 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6526 std::ostringstream msg;
6527 msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
6528 throw SquirrelError(v, msg.str());
6529 }
6530 sq_remove(v, -2); // remove object name
6531
6532 if(setup_releasehook) {
6533 sq_setreleasehook(v, -1, DisplayEffect_release_hook);
6534 }
6535
6536 sq_remove(v, -2); // remove root table
6537}
6538
6539void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook)
6540{
6541 using namespace wrapper;
6542
6543 sq_pushroottable(v);
6544 sq_pushstring(v, "FloatingImage", -1);
6545 if(SQ_FAILED(sq_get(v, -2))) {
6546 std::ostringstream msg;
6547 msg << "Couldn't resolved squirrel type 'FloatingImage'";
6548 throw SquirrelError(v, msg.str());
6549 }
6550
6551 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6552 std::ostringstream msg;
6553 msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
6554 throw SquirrelError(v, msg.str());
6555 }
6556 sq_remove(v, -2); // remove object name
6557
6558 if(setup_releasehook) {
6559 sq_setreleasehook(v, -1, FloatingImage_release_hook);
6560 }
6561
6562 sq_remove(v, -2); // remove root table
6563}
6564
6565void create_squirrel_instance(HSQUIRRELVM v, scripting::Gradient* object, bool setup_releasehook)
6566{
6567 using namespace wrapper;
6568
6569 sq_pushroottable(v);
6570 sq_pushstring(v, "Gradient", -1);
6571 if(SQ_FAILED(sq_get(v, -2))) {
6572 std::ostringstream msg;
6573 msg << "Couldn't resolved squirrel type 'Gradient'";
6574 throw SquirrelError(v, msg.str());
6575 }
6576
6577 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6578 std::ostringstream msg;
6579 msg << "Couldn't setup squirrel instance for object of type 'Gradient'";
6580 throw SquirrelError(v, msg.str());
6581 }
6582 sq_remove(v, -2); // remove object name
6583
6584 if(setup_releasehook) {
6585 sq_setreleasehook(v, -1, Gradient_release_hook);
6586 }
6587
6588 sq_remove(v, -2); // remove root table
6589}
6590
6591void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook)
6592{
6593 using namespace wrapper;
6594
6595 sq_pushroottable(v);
6596 sq_pushstring(v, "LevelTime", -1);
6597 if(SQ_FAILED(sq_get(v, -2))) {
6598 std::ostringstream msg;
6599 msg << "Couldn't resolved squirrel type 'LevelTime'";
6600 throw SquirrelError(v, msg.str());
6601 }
6602
6603 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6604 std::ostringstream msg;
6605 msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
6606 throw SquirrelError(v, msg.str());
6607 }
6608 sq_remove(v, -2); // remove object name
6609
6610 if(setup_releasehook) {
6611 sq_setreleasehook(v, -1, LevelTime_release_hook);
6612 }
6613
6614 sq_remove(v, -2); // remove root table
6615}
6616
6617void create_squirrel_instance(HSQUIRRELVM v, scripting::ParticleSystem* object, bool setup_releasehook)
6618{
6619 using namespace wrapper;
6620
6621 sq_pushroottable(v);
6622 sq_pushstring(v, "ParticleSystem", -1);
6623 if(SQ_FAILED(sq_get(v, -2))) {
6624 std::ostringstream msg;
6625 msg << "Couldn't resolved squirrel type 'ParticleSystem'";
6626 throw SquirrelError(v, msg.str());
6627 }
6628
6629 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6630 std::ostringstream msg;
6631 msg << "Couldn't setup squirrel instance for object of type 'ParticleSystem'";
6632 throw SquirrelError(v, msg.str());
6633 }
6634 sq_remove(v, -2); // remove object name
6635
6636 if(setup_releasehook) {
6637 sq_setreleasehook(v, -1, ParticleSystem_release_hook);
6638 }
6639
6640 sq_remove(v, -2); // remove root table
6641}
6642
6643void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook)
6644{
6645 using namespace wrapper;
6646
6647 sq_pushroottable(v);
6648 sq_pushstring(v, "Platform", -1);
6649 if(SQ_FAILED(sq_get(v, -2))) {
6650 std::ostringstream msg;
6651 msg << "Couldn't resolved squirrel type 'Platform'";
6652 throw SquirrelError(v, msg.str());
6653 }
6654
6655 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6656 std::ostringstream msg;
6657 msg << "Couldn't setup squirrel instance for object of type 'Platform'";
6658 throw SquirrelError(v, msg.str());
6659 }
6660 sq_remove(v, -2); // remove object name
6661
6662 if(setup_releasehook) {
6663 sq_setreleasehook(v, -1, Platform_release_hook);
6664 }
6665
6666 sq_remove(v, -2); // remove root table
6667}
6668
6669void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook)
6670{
6671 using namespace wrapper;
6672
6673 sq_pushroottable(v);
6674 sq_pushstring(v, "Player", -1);
6675 if(SQ_FAILED(sq_get(v, -2))) {
6676 std::ostringstream msg;
6677 msg << "Couldn't resolved squirrel type 'Player'";
6678 throw SquirrelError(v, msg.str());
6679 }
6680
6681 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6682 std::ostringstream msg;
6683 msg << "Couldn't setup squirrel instance for object of type 'Player'";
6684 throw SquirrelError(v, msg.str());
6685 }
6686 sq_remove(v, -2); // remove object name
6687
6688 if(setup_releasehook) {
6689 sq_setreleasehook(v, -1, Player_release_hook);
6690 }
6691
6692 sq_remove(v, -2); // remove root table
6693}
6694
6695void create_squirrel_instance(HSQUIRRELVM v, scripting::Rock* object, bool setup_releasehook)
6696{
6697 using namespace wrapper;
6698
6699 sq_pushroottable(v);
6700 sq_pushstring(v, "Rock", -1);
6701 if(SQ_FAILED(sq_get(v, -2))) {
6702 std::ostringstream msg;
6703 msg << "Couldn't resolved squirrel type 'Rock'";
6704 throw SquirrelError(v, msg.str());
6705 }
6706
6707 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6708 std::ostringstream msg;
6709 msg << "Couldn't setup squirrel instance for object of type 'Rock'";
6710 throw SquirrelError(v, msg.str());
6711 }
6712 sq_remove(v, -2); // remove object name
6713
6714 if(setup_releasehook) {
6715 sq_setreleasehook(v, -1, Rock_release_hook);
6716 }
6717
6718 sq_remove(v, -2); // remove root table
6719}
6720
6721void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook)
6722{
6723 using namespace wrapper;
6724
6725 sq_pushroottable(v);
6726 sq_pushstring(v, "ScriptedObject", -1);
6727 if(SQ_FAILED(sq_get(v, -2))) {
6728 std::ostringstream msg;
6729 msg << "Couldn't resolved squirrel type 'ScriptedObject'";
6730 throw SquirrelError(v, msg.str());
6731 }
6732
6733 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6734 std::ostringstream msg;
6735 msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
6736 throw SquirrelError(v, msg.str());
6737 }
6738 sq_remove(v, -2); // remove object name
6739
6740 if(setup_releasehook) {
6741 sq_setreleasehook(v, -1, ScriptedObject_release_hook);
6742 }
6743
6744 sq_remove(v, -2); // remove root table
6745}
6746
6747void create_squirrel_instance(HSQUIRRELVM v, scripting::Sector* object, bool setup_releasehook)
6748{
6749 using namespace wrapper;
6750
6751 sq_pushroottable(v);
6752 sq_pushstring(v, "Sector", -1);
6753 if(SQ_FAILED(sq_get(v, -2))) {
6754 std::ostringstream msg;
6755 msg << "Couldn't resolved squirrel type 'Sector'";
6756 throw SquirrelError(v, msg.str());
6757 }
6758
6759 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6760 std::ostringstream msg;
6761 msg << "Couldn't setup squirrel instance for object of type 'Sector'";
6762 throw SquirrelError(v, msg.str());
6763 }
6764 sq_remove(v, -2); // remove object name
6765
6766 if(setup_releasehook) {
6767 sq_setreleasehook(v, -1, Sector_release_hook);
6768 }
6769
6770 sq_remove(v, -2); // remove root table
6771}
6772
6773void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook)
6774{
6775 using namespace wrapper;
6776
6777 sq_pushroottable(v);
6778 sq_pushstring(v, "Text", -1);
6779 if(SQ_FAILED(sq_get(v, -2))) {
6780 std::ostringstream msg;
6781 msg << "Couldn't resolved squirrel type 'Text'";
6782 throw SquirrelError(v, msg.str());
6783 }
6784
6785 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6786 std::ostringstream msg;
6787 msg << "Couldn't setup squirrel instance for object of type 'Text'";
6788 throw SquirrelError(v, msg.str());
6789 }
6790 sq_remove(v, -2); // remove object name
6791
6792 if(setup_releasehook) {
6793 sq_setreleasehook(v, -1, Text_release_hook);
6794 }
6795
6796 sq_remove(v, -2); // remove root table
6797}
6798
6799void create_squirrel_instance(HSQUIRRELVM v, scripting::TextArray* object, bool setup_releasehook)
6800{
6801 using namespace wrapper;
6802
6803 sq_pushroottable(v);
6804 sq_pushstring(v, "TextArray", -1);
6805 if(SQ_FAILED(sq_get(v, -2))) {
6806 std::ostringstream msg;
6807 msg << "Couldn't resolved squirrel type 'TextArray'";
6808 throw SquirrelError(v, msg.str());
6809 }
6810
6811 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6812 std::ostringstream msg;
6813 msg << "Couldn't setup squirrel instance for object of type 'TextArray'";
6814 throw SquirrelError(v, msg.str());
6815 }
6816 sq_remove(v, -2); // remove object name
6817
6818 if(setup_releasehook) {
6819 sq_setreleasehook(v, -1, TextArray_release_hook);
6820 }
6821
6822 sq_remove(v, -2); // remove root table
6823}
6824
6825void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook)
6826{
6827 using namespace wrapper;
6828
6829 sq_pushroottable(v);
6830 sq_pushstring(v, "Thunderstorm", -1);
6831 if(SQ_FAILED(sq_get(v, -2))) {
6832 std::ostringstream msg;
6833 msg << "Couldn't resolved squirrel type 'Thunderstorm'";
6834 throw SquirrelError(v, msg.str());
6835 }
6836
6837 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6838 std::ostringstream msg;
6839 msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
6840 throw SquirrelError(v, msg.str());
6841 }
6842 sq_remove(v, -2); // remove object name
6843
6844 if(setup_releasehook) {
6845 sq_setreleasehook(v, -1, Thunderstorm_release_hook);
6846 }
6847
6848 sq_remove(v, -2); // remove root table
6849}
6850
6851void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook)
6852{
6853 using namespace wrapper;
6854
6855 sq_pushroottable(v);
6856 sq_pushstring(v, "TileMap", -1);
6857 if(SQ_FAILED(sq_get(v, -2))) {
6858 std::ostringstream msg;
6859 msg << "Couldn't resolved squirrel type 'TileMap'";
6860 throw SquirrelError(v, msg.str());
6861 }
6862
6863 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6864 std::ostringstream msg;
6865 msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
6866 throw SquirrelError(v, msg.str());
6867 }
6868 sq_remove(v, -2); // remove object name
6869
6870 if(setup_releasehook) {
6871 sq_setreleasehook(v, -1, TileMap_release_hook);
6872 }
6873
6874 sq_remove(v, -2); // remove root table
6875}
6876
6877void create_squirrel_instance(HSQUIRRELVM v, scripting::Torch* object, bool setup_releasehook)
6878{
6879 using namespace wrapper;
6880
6881 sq_pushroottable(v);
6882 sq_pushstring(v, "Torch", -1);
6883 if(SQ_FAILED(sq_get(v, -2))) {
6884 std::ostringstream msg;
6885 msg << "Couldn't resolved squirrel type 'Torch'";
6886 throw SquirrelError(v, msg.str());
6887 }
6888
6889 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6890 std::ostringstream msg;
6891 msg << "Couldn't setup squirrel instance for object of type 'Torch'";
6892 throw SquirrelError(v, msg.str());
6893 }
6894 sq_remove(v, -2); // remove object name
6895
6896 if(setup_releasehook) {
6897 sq_setreleasehook(v, -1, Torch_release_hook);
6898 }
6899
6900 sq_remove(v, -2); // remove root table
6901}
6902
6903void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook)
6904{
6905 using namespace wrapper;
6906
6907 sq_pushroottable(v);
6908 sq_pushstring(v, "WillOWisp", -1);
6909 if(SQ_FAILED(sq_get(v, -2))) {
6910 std::ostringstream msg;
6911 msg << "Couldn't resolved squirrel type 'WillOWisp'";
6912 throw SquirrelError(v, msg.str());
6913 }
6914
6915 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6916 std::ostringstream msg;
6917 msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
6918 throw SquirrelError(v, msg.str());
6919 }
6920 sq_remove(v, -2); // remove object name
6921
6922 if(setup_releasehook) {
6923 sq_setreleasehook(v, -1, WillOWisp_release_hook);
6924 }
6925
6926 sq_remove(v, -2); // remove root table
6927}
6928
6929void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook)
6930{
6931 using namespace wrapper;
6932
6933 sq_pushroottable(v);
6934 sq_pushstring(v, "Wind", -1);
6935 if(SQ_FAILED(sq_get(v, -2))) {
6936 std::ostringstream msg;
6937 msg << "Couldn't resolved squirrel type 'Wind'";
6938 throw SquirrelError(v, msg.str());
6939 }
6940
6941 if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
6942 std::ostringstream msg;
6943 msg << "Couldn't setup squirrel instance for object of type 'Wind'";
6944 throw SquirrelError(v, msg.str());
6945 }
6946 sq_remove(v, -2); // remove object name
6947
6948 if(setup_releasehook) {
6949 sq_setreleasehook(v, -1, Wind_release_hook);
6950 }
6951
6952 sq_remove(v, -2); // remove root table
6953}
6954
6955void register_supertux_wrapper(HSQUIRRELVM v)
6956{
6957 using namespace wrapper;
6958
6959 sq_pushstring(v, "ANCHOR_TOP", -1);
6960 sq_pushinteger(v, 16);
6961 if(SQ_FAILED(sq_createslot(v, -3))) {
6962 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
6963 }
6964
6965 sq_pushstring(v, "ANCHOR_BOTTOM", -1);
6966 sq_pushinteger(v, 32);
6967 if(SQ_FAILED(sq_createslot(v, -3))) {
6968 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
6969 }
6970
6971 sq_pushstring(v, "ANCHOR_LEFT", -1);
6972 sq_pushinteger(v, 1);
6973 if(SQ_FAILED(sq_createslot(v, -3))) {
6974 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
6975 }
6976
6977 sq_pushstring(v, "ANCHOR_RIGHT", -1);
6978 sq_pushinteger(v, 2);
6979 if(SQ_FAILED(sq_createslot(v, -3))) {
6980 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
6981 }
6982
6983 sq_pushstring(v, "ANCHOR_MIDDLE", -1);
6984 sq_pushinteger(v, 0);
6985 if(SQ_FAILED(sq_createslot(v, -3))) {
6986 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
6987 }
6988
6989 sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
6990 sq_pushinteger(v, 17);
6991 if(SQ_FAILED(sq_createslot(v, -3))) {
6992 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
6993 }
6994
6995 sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
6996 sq_pushinteger(v, 18);
6997 if(SQ_FAILED(sq_createslot(v, -3))) {
6998 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
6999 }
7000
7001 sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
7002 sq_pushinteger(v, 33);
7003 if(SQ_FAILED(sq_createslot(v, -3))) {
7004 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
7005 }
7006
7007 sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
7008 sq_pushinteger(v, 34);
7009 if(SQ_FAILED(sq_createslot(v, -3))) {
7010 throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
7011 }
7012
7013 sq_pushstring(v, "display", -1);
7014 sq_newclosure(v, &display_wrapper, 0);
7015 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t.");
7016 if(SQ_FAILED(sq_createslot(v, -3))) {
7017 throw SquirrelError(v, "Couldn't register function 'display'");
7018 }
7019
7020 sq_pushstring(v, "print_stacktrace", -1);
7021 sq_newclosure(v, &print_stacktrace_wrapper, 0);
7022 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7023 if(SQ_FAILED(sq_createslot(v, -3))) {
7024 throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
7025 }
7026
7027 sq_pushstring(v, "get_current_thread", -1);
7028 sq_newclosure(v, &get_current_thread_wrapper, 0);
7029 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t");
7030 if(SQ_FAILED(sq_createslot(v, -3))) {
7031 throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
7032 }
7033
7034 sq_pushstring(v, "is_christmas", -1);
7035 sq_newclosure(v, &is_christmas_wrapper, 0);
7036 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7037 if(SQ_FAILED(sq_createslot(v, -3))) {
7038 throw SquirrelError(v, "Couldn't register function 'is_christmas'");
7039 }
7040
7041 sq_pushstring(v, "display_text_file", -1);
7042 sq_newclosure(v, &display_text_file_wrapper, 0);
7043 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7044 if(SQ_FAILED(sq_createslot(v, -3))) {
7045 throw SquirrelError(v, "Couldn't register function 'display_text_file'");
7046 }
7047
7048 sq_pushstring(v, "load_worldmap", -1);
7049 sq_newclosure(v, &load_worldmap_wrapper, 0);
7050 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7051 if(SQ_FAILED(sq_createslot(v, -3))) {
7052 throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
7053 }
7054
7055 sq_pushstring(v, "set_next_worldmap", -1);
7056 sq_newclosure(v, &set_next_worldmap_wrapper, 0);
7057 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
7058 if(SQ_FAILED(sq_createslot(v, -3))) {
7059 throw SquirrelError(v, "Couldn't register function 'set_next_worldmap'");
7060 }
7061
7062 sq_pushstring(v, "load_level", -1);
7063 sq_newclosure(v, &load_level_wrapper, 0);
7064 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7065 if(SQ_FAILED(sq_createslot(v, -3))) {
7066 throw SquirrelError(v, "Couldn't register function 'load_level'");
7067 }
7068
7069 sq_pushstring(v, "wait", -1);
7070 sq_newclosure(v, &wait_wrapper, 0);
7071 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7072 if(SQ_FAILED(sq_createslot(v, -3))) {
7073 throw SquirrelError(v, "Couldn't register function 'wait'");
7074 }
7075
7076 sq_pushstring(v, "wait_for_screenswitch", -1);
7077 sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
7078 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7079 if(SQ_FAILED(sq_createslot(v, -3))) {
7080 throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
7081 }
7082
7083 sq_pushstring(v, "exit_screen", -1);
7084 sq_newclosure(v, &exit_screen_wrapper, 0);
7085 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7086 if(SQ_FAILED(sq_createslot(v, -3))) {
7087 throw SquirrelError(v, "Couldn't register function 'exit_screen'");
7088 }
7089
7090 sq_pushstring(v, "translate", -1);
7091 sq_newclosure(v, &translate_wrapper, 0);
7092 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7093 if(SQ_FAILED(sq_createslot(v, -3))) {
7094 throw SquirrelError(v, "Couldn't register function 'translate'");
7095 }
7096
7097 sq_pushstring(v, "_", -1);
7098 sq_newclosure(v, &__wrapper, 0);
7099 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7100 if(SQ_FAILED(sq_createslot(v, -3))) {
7101 throw SquirrelError(v, "Couldn't register function '_'");
7102 }
7103
7104 sq_pushstring(v, "translate_plural", -1);
7105 sq_newclosure(v, &translate_plural_wrapper, 0);
7106 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tssi");
7107 if(SQ_FAILED(sq_createslot(v, -3))) {
7108 throw SquirrelError(v, "Couldn't register function 'translate_plural'");
7109 }
7110
7111 sq_pushstring(v, "__", -1);
7112 sq_newclosure(v, &___wrapper, 0);
7113 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tssi");
7114 if(SQ_FAILED(sq_createslot(v, -3))) {
7115 throw SquirrelError(v, "Couldn't register function '__'");
7116 }
7117
7118 sq_pushstring(v, "import", -1);
7119 sq_newclosure(v, &import_wrapper, 0);
7120 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7121 if(SQ_FAILED(sq_createslot(v, -3))) {
7122 throw SquirrelError(v, "Couldn't register function 'import'");
7123 }
7124
7125 sq_pushstring(v, "save_state", -1);
7126 sq_newclosure(v, &save_state_wrapper, 0);
7127 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7128 if(SQ_FAILED(sq_createslot(v, -3))) {
7129 throw SquirrelError(v, "Couldn't register function 'save_state'");
7130 }
7131
7132 sq_pushstring(v, "load_state", -1);
7133 sq_newclosure(v, &load_state_wrapper, 0);
7134 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7135 if(SQ_FAILED(sq_createslot(v, -3))) {
7136 throw SquirrelError(v, "Couldn't register function 'load_state'");
7137 }
7138
7139 sq_pushstring(v, "debug_collrects", -1);
7140 sq_newclosure(v, &debug_collrects_wrapper, 0);
7141 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7142 if(SQ_FAILED(sq_createslot(v, -3))) {
7143 throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
7144 }
7145
7146 sq_pushstring(v, "debug_show_fps", -1);
7147 sq_newclosure(v, &debug_show_fps_wrapper, 0);
7148 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7149 if(SQ_FAILED(sq_createslot(v, -3))) {
7150 throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
7151 }
7152
7153 sq_pushstring(v, "debug_draw_solids_only", -1);
7154 sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
7155 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7156 if(SQ_FAILED(sq_createslot(v, -3))) {
7157 throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
7158 }
7159
7160 sq_pushstring(v, "debug_draw_editor_images", -1);
7161 sq_newclosure(v, &debug_draw_editor_images_wrapper, 0);
7162 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7163 if(SQ_FAILED(sq_createslot(v, -3))) {
7164 throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'");
7165 }
7166
7167 sq_pushstring(v, "debug_worldmap_ghost", -1);
7168 sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0);
7169 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7170 if(SQ_FAILED(sq_createslot(v, -3))) {
7171 throw SquirrelError(v, "Couldn't register function 'debug_worldmap_ghost'");
7172 }
7173
7174 sq_pushstring(v, "play_music", -1);
7175 sq_newclosure(v, &play_music_wrapper, 0);
7176 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7177 if(SQ_FAILED(sq_createslot(v, -3))) {
7178 throw SquirrelError(v, "Couldn't register function 'play_music'");
7179 }
7180
7181 sq_pushstring(v, "stop_music", -1);
7182 sq_newclosure(v, &stop_music_wrapper, 0);
7183 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7184 if(SQ_FAILED(sq_createslot(v, -3))) {
7185 throw SquirrelError(v, "Couldn't register function 'stop_music'");
7186 }
7187
7188 sq_pushstring(v, "play_sound", -1);
7189 sq_newclosure(v, &play_sound_wrapper, 0);
7190 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7191 if(SQ_FAILED(sq_createslot(v, -3))) {
7192 throw SquirrelError(v, "Couldn't register function 'play_sound'");
7193 }
7194
7195 sq_pushstring(v, "set_game_speed", -1);
7196 sq_newclosure(v, &set_game_speed_wrapper, 0);
7197 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7198 if(SQ_FAILED(sq_createslot(v, -3))) {
7199 throw SquirrelError(v, "Couldn't register function 'set_game_speed'");
7200 }
7201
7202 sq_pushstring(v, "grease", -1);
7203 sq_newclosure(v, &grease_wrapper, 0);
7204 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7205 if(SQ_FAILED(sq_createslot(v, -3))) {
7206 throw SquirrelError(v, "Couldn't register function 'grease'");
7207 }
7208
7209 sq_pushstring(v, "invincible", -1);
7210 sq_newclosure(v, &invincible_wrapper, 0);
7211 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7212 if(SQ_FAILED(sq_createslot(v, -3))) {
7213 throw SquirrelError(v, "Couldn't register function 'invincible'");
7214 }
7215
7216 sq_pushstring(v, "ghost", -1);
7217 sq_newclosure(v, &ghost_wrapper, 0);
7218 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7219 if(SQ_FAILED(sq_createslot(v, -3))) {
7220 throw SquirrelError(v, "Couldn't register function 'ghost'");
7221 }
7222
7223 sq_pushstring(v, "mortal", -1);
7224 sq_newclosure(v, &mortal_wrapper, 0);
7225 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7226 if(SQ_FAILED(sq_createslot(v, -3))) {
7227 throw SquirrelError(v, "Couldn't register function 'mortal'");
7228 }
7229
7230 sq_pushstring(v, "restart", -1);
7231 sq_newclosure(v, &restart_wrapper, 0);
7232 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7233 if(SQ_FAILED(sq_createslot(v, -3))) {
7234 throw SquirrelError(v, "Couldn't register function 'restart'");
7235 }
7236
7237 sq_pushstring(v, "whereami", -1);
7238 sq_newclosure(v, &whereami_wrapper, 0);
7239 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7240 if(SQ_FAILED(sq_createslot(v, -3))) {
7241 throw SquirrelError(v, "Couldn't register function 'whereami'");
7242 }
7243
7244 sq_pushstring(v, "gotoend", -1);
7245 sq_newclosure(v, &gotoend_wrapper, 0);
7246 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7247 if(SQ_FAILED(sq_createslot(v, -3))) {
7248 throw SquirrelError(v, "Couldn't register function 'gotoend'");
7249 }
7250
7251 sq_pushstring(v, "warp", -1);
7252 sq_newclosure(v, &warp_wrapper, 0);
7253 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
7254 if(SQ_FAILED(sq_createslot(v, -3))) {
7255 throw SquirrelError(v, "Couldn't register function 'warp'");
7256 }
7257
7258 sq_pushstring(v, "camera", -1);
7259 sq_newclosure(v, &camera_wrapper, 0);
7260 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7261 if(SQ_FAILED(sq_createslot(v, -3))) {
7262 throw SquirrelError(v, "Couldn't register function 'camera'");
7263 }
7264
7265 sq_pushstring(v, "set_gamma", -1);
7266 sq_newclosure(v, &set_gamma_wrapper, 0);
7267 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7268 if(SQ_FAILED(sq_createslot(v, -3))) {
7269 throw SquirrelError(v, "Couldn't register function 'set_gamma'");
7270 }
7271
7272 sq_pushstring(v, "quit", -1);
7273 sq_newclosure(v, &quit_wrapper, 0);
7274 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7275 if(SQ_FAILED(sq_createslot(v, -3))) {
7276 throw SquirrelError(v, "Couldn't register function 'quit'");
7277 }
7278
7279 sq_pushstring(v, "rand", -1);
7280 sq_newclosure(v, &rand_wrapper, 0);
7281 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7282 if(SQ_FAILED(sq_createslot(v, -3))) {
7283 throw SquirrelError(v, "Couldn't register function 'rand'");
7284 }
7285
7286 sq_pushstring(v, "record_demo", -1);
7287 sq_newclosure(v, &record_demo_wrapper, 0);
7288 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7289 if(SQ_FAILED(sq_createslot(v, -3))) {
7290 throw SquirrelError(v, "Couldn't register function 'record_demo'");
7291 }
7292
7293 sq_pushstring(v, "play_demo", -1);
7294 sq_newclosure(v, &play_demo_wrapper, 0);
7295 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7296 if(SQ_FAILED(sq_createslot(v, -3))) {
7297 throw SquirrelError(v, "Couldn't register function 'play_demo'");
7298 }
7299
7300 sq_pushstring(v, "Level_finish", -1);
7301 sq_newclosure(v, &Level_finish_wrapper, 0);
7302 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7303 if(SQ_FAILED(sq_createslot(v, -3))) {
7304 throw SquirrelError(v, "Couldn't register function 'Level_finish'");
7305 }
7306
7307 sq_pushstring(v, "Level_spawn", -1);
7308 sq_newclosure(v, &Level_spawn_wrapper, 0);
7309 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
7310 if(SQ_FAILED(sq_createslot(v, -3))) {
7311 throw SquirrelError(v, "Couldn't register function 'Level_spawn'");
7312 }
7313
7314 sq_pushstring(v, "Level_flip_vertically", -1);
7315 sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
7316 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7317 if(SQ_FAILED(sq_createslot(v, -3))) {
7318 throw SquirrelError(v, "Couldn't register function 'Level_flip_vertically'");
7319 }
7320
7321 sq_pushstring(v, "Level_toggle_pause", -1);
7322 sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
7323 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7324 if(SQ_FAILED(sq_createslot(v, -3))) {
7325 throw SquirrelError(v, "Couldn't register function 'Level_toggle_pause'");
7326 }
7327
7328 sq_pushstring(v, "Level_edit", -1);
7329 sq_newclosure(v, &Level_edit_wrapper, 0);
7330 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7331 if(SQ_FAILED(sq_createslot(v, -3))) {
7332 throw SquirrelError(v, "Couldn't register function 'Level_edit'");
7333 }
7334
7335 // Register class AmbientSound
7336 sq_pushstring(v, "AmbientSound", -1);
7337 if(sq_newclass(v, SQFalse) < 0) {
7338 std::ostringstream msg;
7339 msg << "Couldn't create new class 'AmbientSound'";
7340 throw SquirrelError(v, msg.str());
7341 }
7342 sq_pushstring(v, "set_pos", -1);
7343 sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
7344 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
7345 if(SQ_FAILED(sq_createslot(v, -3))) {
7346 throw SquirrelError(v, "Couldn't register function 'set_pos'");
7347 }
7348
7349 sq_pushstring(v, "get_pos_x", -1);
7350 sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
7351 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7352 if(SQ_FAILED(sq_createslot(v, -3))) {
7353 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
7354 }
7355
7356 sq_pushstring(v, "get_pos_y", -1);
7357 sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
7358 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7359 if(SQ_FAILED(sq_createslot(v, -3))) {
7360 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
7361 }
7362
7363 if(SQ_FAILED(sq_createslot(v, -3))) {
7364 throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
7365 }
7366
7367 // Register class Background
7368 sq_pushstring(v, "Background", -1);
7369 if(sq_newclass(v, SQFalse) < 0) {
7370 std::ostringstream msg;
7371 msg << "Couldn't create new class 'Background'";
7372 throw SquirrelError(v, msg.str());
7373 }
7374 sq_pushstring(v, "set_image", -1);
7375 sq_newclosure(v, &Background_set_image_wrapper, 0);
7376 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7377 if(SQ_FAILED(sq_createslot(v, -3))) {
7378 throw SquirrelError(v, "Couldn't register function 'set_image'");
7379 }
7380
7381 sq_pushstring(v, "set_images", -1);
7382 sq_newclosure(v, &Background_set_images_wrapper, 0);
7383 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsss");
7384 if(SQ_FAILED(sq_createslot(v, -3))) {
7385 throw SquirrelError(v, "Couldn't register function 'set_images'");
7386 }
7387
7388 sq_pushstring(v, "set_speed", -1);
7389 sq_newclosure(v, &Background_set_speed_wrapper, 0);
7390 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7391 if(SQ_FAILED(sq_createslot(v, -3))) {
7392 throw SquirrelError(v, "Couldn't register function 'set_speed'");
7393 }
7394
7395 if(SQ_FAILED(sq_createslot(v, -3))) {
7396 throw SquirrelError(v, "Couldn't register class 'Background'");
7397 }
7398
7399 // Register class Camera
7400 sq_pushstring(v, "Camera", -1);
7401 if(sq_newclass(v, SQFalse) < 0) {
7402 std::ostringstream msg;
7403 msg << "Couldn't create new class 'Camera'";
7404 throw SquirrelError(v, msg.str());
7405 }
7406 sq_pushstring(v, "reload_config", -1);
7407 sq_newclosure(v, &Camera_reload_config_wrapper, 0);
7408 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7409 if(SQ_FAILED(sq_createslot(v, -3))) {
7410 throw SquirrelError(v, "Couldn't register function 'reload_config'");
7411 }
7412
7413 sq_pushstring(v, "shake", -1);
7414 sq_newclosure(v, &Camera_shake_wrapper, 0);
7415 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
7416 if(SQ_FAILED(sq_createslot(v, -3))) {
7417 throw SquirrelError(v, "Couldn't register function 'shake'");
7418 }
7419
7420 sq_pushstring(v, "set_pos", -1);
7421 sq_newclosure(v, &Camera_set_pos_wrapper, 0);
7422 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
7423 if(SQ_FAILED(sq_createslot(v, -3))) {
7424 throw SquirrelError(v, "Couldn't register function 'set_pos'");
7425 }
7426
7427 sq_pushstring(v, "set_mode", -1);
7428 sq_newclosure(v, &Camera_set_mode_wrapper, 0);
7429 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7430 if(SQ_FAILED(sq_createslot(v, -3))) {
7431 throw SquirrelError(v, "Couldn't register function 'set_mode'");
7432 }
7433
7434 sq_pushstring(v, "scroll_to", -1);
7435 sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
7436 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
7437 if(SQ_FAILED(sq_createslot(v, -3))) {
7438 throw SquirrelError(v, "Couldn't register function 'scroll_to'");
7439 }
7440
7441 if(SQ_FAILED(sq_createslot(v, -3))) {
7442 throw SquirrelError(v, "Couldn't register class 'Camera'");
7443 }
7444
7445 // Register class Candle
7446 sq_pushstring(v, "Candle", -1);
7447 if(sq_newclass(v, SQFalse) < 0) {
7448 std::ostringstream msg;
7449 msg << "Couldn't create new class 'Candle'";
7450 throw SquirrelError(v, msg.str());
7451 }
7452 sq_pushstring(v, "get_burning", -1);
7453 sq_newclosure(v, &Candle_get_burning_wrapper, 0);
7454 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7455 if(SQ_FAILED(sq_createslot(v, -3))) {
7456 throw SquirrelError(v, "Couldn't register function 'get_burning'");
7457 }
7458
7459 sq_pushstring(v, "set_burning", -1);
7460 sq_newclosure(v, &Candle_set_burning_wrapper, 0);
7461 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7462 if(SQ_FAILED(sq_createslot(v, -3))) {
7463 throw SquirrelError(v, "Couldn't register function 'set_burning'");
7464 }
7465
7466 if(SQ_FAILED(sq_createslot(v, -3))) {
7467 throw SquirrelError(v, "Couldn't register class 'Candle'");
7468 }
7469
7470 // Register class Dispenser
7471 sq_pushstring(v, "Dispenser", -1);
7472 if(sq_newclass(v, SQFalse) < 0) {
7473 std::ostringstream msg;
7474 msg << "Couldn't create new class 'Dispenser'";
7475 throw SquirrelError(v, msg.str());
7476 }
7477 sq_pushstring(v, "activate", -1);
7478 sq_newclosure(v, &Dispenser_activate_wrapper, 0);
7479 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7480 if(SQ_FAILED(sq_createslot(v, -3))) {
7481 throw SquirrelError(v, "Couldn't register function 'activate'");
7482 }
7483
7484 sq_pushstring(v, "deactivate", -1);
7485 sq_newclosure(v, &Dispenser_deactivate_wrapper, 0);
7486 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7487 if(SQ_FAILED(sq_createslot(v, -3))) {
7488 throw SquirrelError(v, "Couldn't register function 'deactivate'");
7489 }
7490
7491 if(SQ_FAILED(sq_createslot(v, -3))) {
7492 throw SquirrelError(v, "Couldn't register class 'Dispenser'");
7493 }
7494
7495 // Register class DisplayEffect
7496 sq_pushstring(v, "DisplayEffect", -1);
7497 if(sq_newclass(v, SQFalse) < 0) {
7498 std::ostringstream msg;
7499 msg << "Couldn't create new class 'DisplayEffect'";
7500 throw SquirrelError(v, msg.str());
7501 }
7502 sq_pushstring(v, "fade_out", -1);
7503 sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
7504 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7505 if(SQ_FAILED(sq_createslot(v, -3))) {
7506 throw SquirrelError(v, "Couldn't register function 'fade_out'");
7507 }
7508
7509 sq_pushstring(v, "fade_in", -1);
7510 sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
7511 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7512 if(SQ_FAILED(sq_createslot(v, -3))) {
7513 throw SquirrelError(v, "Couldn't register function 'fade_in'");
7514 }
7515
7516 sq_pushstring(v, "set_black", -1);
7517 sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
7518 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7519 if(SQ_FAILED(sq_createslot(v, -3))) {
7520 throw SquirrelError(v, "Couldn't register function 'set_black'");
7521 }
7522
7523 sq_pushstring(v, "is_black", -1);
7524 sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
7525 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7526 if(SQ_FAILED(sq_createslot(v, -3))) {
7527 throw SquirrelError(v, "Couldn't register function 'is_black'");
7528 }
7529
7530 sq_pushstring(v, "sixteen_to_nine", -1);
7531 sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
7532 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7533 if(SQ_FAILED(sq_createslot(v, -3))) {
7534 throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
7535 }
7536
7537 sq_pushstring(v, "four_to_three", -1);
7538 sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
7539 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7540 if(SQ_FAILED(sq_createslot(v, -3))) {
7541 throw SquirrelError(v, "Couldn't register function 'four_to_three'");
7542 }
7543
7544 if(SQ_FAILED(sq_createslot(v, -3))) {
7545 throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
7546 }
7547
7548 // Register class FloatingImage
7549 sq_pushstring(v, "FloatingImage", -1);
7550 if(sq_newclass(v, SQFalse) < 0) {
7551 std::ostringstream msg;
7552 msg << "Couldn't create new class 'FloatingImage'";
7553 throw SquirrelError(v, msg.str());
7554 }
7555 sq_pushstring(v, "constructor", -1);
7556 sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
7557 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7558 if(SQ_FAILED(sq_createslot(v, -3))) {
7559 throw SquirrelError(v, "Couldn't register function 'constructor'");
7560 }
7561
7562 sq_pushstring(v, "set_layer", -1);
7563 sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
7564 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
7565 if(SQ_FAILED(sq_createslot(v, -3))) {
7566 throw SquirrelError(v, "Couldn't register function 'set_layer'");
7567 }
7568
7569 sq_pushstring(v, "get_layer", -1);
7570 sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
7571 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7572 if(SQ_FAILED(sq_createslot(v, -3))) {
7573 throw SquirrelError(v, "Couldn't register function 'get_layer'");
7574 }
7575
7576 sq_pushstring(v, "set_pos", -1);
7577 sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
7578 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
7579 if(SQ_FAILED(sq_createslot(v, -3))) {
7580 throw SquirrelError(v, "Couldn't register function 'set_pos'");
7581 }
7582
7583 sq_pushstring(v, "get_pos_x", -1);
7584 sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
7585 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7586 if(SQ_FAILED(sq_createslot(v, -3))) {
7587 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
7588 }
7589
7590 sq_pushstring(v, "get_pos_y", -1);
7591 sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
7592 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7593 if(SQ_FAILED(sq_createslot(v, -3))) {
7594 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
7595 }
7596
7597 sq_pushstring(v, "set_anchor_point", -1);
7598 sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
7599 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
7600 if(SQ_FAILED(sq_createslot(v, -3))) {
7601 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
7602 }
7603
7604 sq_pushstring(v, "get_anchor_point", -1);
7605 sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
7606 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7607 if(SQ_FAILED(sq_createslot(v, -3))) {
7608 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
7609 }
7610
7611 sq_pushstring(v, "set_visible", -1);
7612 sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
7613 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7614 if(SQ_FAILED(sq_createslot(v, -3))) {
7615 throw SquirrelError(v, "Couldn't register function 'set_visible'");
7616 }
7617
7618 sq_pushstring(v, "get_visible", -1);
7619 sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
7620 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7621 if(SQ_FAILED(sq_createslot(v, -3))) {
7622 throw SquirrelError(v, "Couldn't register function 'get_visible'");
7623 }
7624
7625 sq_pushstring(v, "set_action", -1);
7626 sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
7627 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7628 if(SQ_FAILED(sq_createslot(v, -3))) {
7629 throw SquirrelError(v, "Couldn't register function 'set_action'");
7630 }
7631
7632 sq_pushstring(v, "get_action", -1);
7633 sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
7634 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7635 if(SQ_FAILED(sq_createslot(v, -3))) {
7636 throw SquirrelError(v, "Couldn't register function 'get_action'");
7637 }
7638
7639 sq_pushstring(v, "fade_in", -1);
7640 sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
7641 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7642 if(SQ_FAILED(sq_createslot(v, -3))) {
7643 throw SquirrelError(v, "Couldn't register function 'fade_in'");
7644 }
7645
7646 sq_pushstring(v, "fade_out", -1);
7647 sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
7648 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7649 if(SQ_FAILED(sq_createslot(v, -3))) {
7650 throw SquirrelError(v, "Couldn't register function 'fade_out'");
7651 }
7652
7653 if(SQ_FAILED(sq_createslot(v, -3))) {
7654 throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
7655 }
7656
7657 // Register class Gradient
7658 sq_pushstring(v, "Gradient", -1);
7659 if(sq_newclass(v, SQFalse) < 0) {
7660 std::ostringstream msg;
7661 msg << "Couldn't create new class 'Gradient'";
7662 throw SquirrelError(v, msg.str());
7663 }
7664 sq_pushstring(v, "set_direction", -1);
7665 sq_newclosure(v, &Gradient_set_direction_wrapper, 0);
7666 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7667 if(SQ_FAILED(sq_createslot(v, -3))) {
7668 throw SquirrelError(v, "Couldn't register function 'set_direction'");
7669 }
7670
7671 sq_pushstring(v, "get_direction", -1);
7672 sq_newclosure(v, &Gradient_get_direction_wrapper, 0);
7673 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7674 if(SQ_FAILED(sq_createslot(v, -3))) {
7675 throw SquirrelError(v, "Couldn't register function 'get_direction'");
7676 }
7677
7678 sq_pushstring(v, "set_color1", -1);
7679 sq_newclosure(v, &Gradient_set_color1_wrapper, 0);
7680 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
7681 if(SQ_FAILED(sq_createslot(v, -3))) {
7682 throw SquirrelError(v, "Couldn't register function 'set_color1'");
7683 }
7684
7685 sq_pushstring(v, "set_color2", -1);
7686 sq_newclosure(v, &Gradient_set_color2_wrapper, 0);
7687 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
7688 if(SQ_FAILED(sq_createslot(v, -3))) {
7689 throw SquirrelError(v, "Couldn't register function 'set_color2'");
7690 }
7691
7692 sq_pushstring(v, "swap_colors", -1);
7693 sq_newclosure(v, &Gradient_swap_colors_wrapper, 0);
7694 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7695 if(SQ_FAILED(sq_createslot(v, -3))) {
7696 throw SquirrelError(v, "Couldn't register function 'swap_colors'");
7697 }
7698
7699 if(SQ_FAILED(sq_createslot(v, -3))) {
7700 throw SquirrelError(v, "Couldn't register class 'Gradient'");
7701 }
7702
7703 // Register class LevelTime
7704 sq_pushstring(v, "LevelTime", -1);
7705 if(sq_newclass(v, SQFalse) < 0) {
7706 std::ostringstream msg;
7707 msg << "Couldn't create new class 'LevelTime'";
7708 throw SquirrelError(v, msg.str());
7709 }
7710 sq_pushstring(v, "start", -1);
7711 sq_newclosure(v, &LevelTime_start_wrapper, 0);
7712 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7713 if(SQ_FAILED(sq_createslot(v, -3))) {
7714 throw SquirrelError(v, "Couldn't register function 'start'");
7715 }
7716
7717 sq_pushstring(v, "stop", -1);
7718 sq_newclosure(v, &LevelTime_stop_wrapper, 0);
7719 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7720 if(SQ_FAILED(sq_createslot(v, -3))) {
7721 throw SquirrelError(v, "Couldn't register function 'stop'");
7722 }
7723
7724 sq_pushstring(v, "get_time", -1);
7725 sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
7726 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7727 if(SQ_FAILED(sq_createslot(v, -3))) {
7728 throw SquirrelError(v, "Couldn't register function 'get_time'");
7729 }
7730
7731 sq_pushstring(v, "set_time", -1);
7732 sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
7733 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7734 if(SQ_FAILED(sq_createslot(v, -3))) {
7735 throw SquirrelError(v, "Couldn't register function 'set_time'");
7736 }
7737
7738 if(SQ_FAILED(sq_createslot(v, -3))) {
7739 throw SquirrelError(v, "Couldn't register class 'LevelTime'");
7740 }
7741
7742 // Register class ParticleSystem
7743 sq_pushstring(v, "ParticleSystem", -1);
7744 if(sq_newclass(v, SQFalse) < 0) {
7745 std::ostringstream msg;
7746 msg << "Couldn't create new class 'ParticleSystem'";
7747 throw SquirrelError(v, msg.str());
7748 }
7749 sq_pushstring(v, "set_enabled", -1);
7750 sq_newclosure(v, &ParticleSystem_set_enabled_wrapper, 0);
7751 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7752 if(SQ_FAILED(sq_createslot(v, -3))) {
7753 throw SquirrelError(v, "Couldn't register function 'set_enabled'");
7754 }
7755
7756 sq_pushstring(v, "get_enabled", -1);
7757 sq_newclosure(v, &ParticleSystem_get_enabled_wrapper, 0);
7758 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7759 if(SQ_FAILED(sq_createslot(v, -3))) {
7760 throw SquirrelError(v, "Couldn't register function 'get_enabled'");
7761 }
7762
7763 if(SQ_FAILED(sq_createslot(v, -3))) {
7764 throw SquirrelError(v, "Couldn't register class 'ParticleSystem'");
7765 }
7766
7767 // Register class Platform
7768 sq_pushstring(v, "Platform", -1);
7769 if(sq_newclass(v, SQFalse) < 0) {
7770 std::ostringstream msg;
7771 msg << "Couldn't create new class 'Platform'";
7772 throw SquirrelError(v, msg.str());
7773 }
7774 sq_pushstring(v, "goto_node", -1);
7775 sq_newclosure(v, &Platform_goto_node_wrapper, 0);
7776 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
7777 if(SQ_FAILED(sq_createslot(v, -3))) {
7778 throw SquirrelError(v, "Couldn't register function 'goto_node'");
7779 }
7780
7781 sq_pushstring(v, "start_moving", -1);
7782 sq_newclosure(v, &Platform_start_moving_wrapper, 0);
7783 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7784 if(SQ_FAILED(sq_createslot(v, -3))) {
7785 throw SquirrelError(v, "Couldn't register function 'start_moving'");
7786 }
7787
7788 sq_pushstring(v, "stop_moving", -1);
7789 sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
7790 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7791 if(SQ_FAILED(sq_createslot(v, -3))) {
7792 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
7793 }
7794
7795 if(SQ_FAILED(sq_createslot(v, -3))) {
7796 throw SquirrelError(v, "Couldn't register class 'Platform'");
7797 }
7798
7799 // Register class Player
7800 sq_pushstring(v, "Player", -1);
7801 if(sq_newclass(v, SQFalse) < 0) {
7802 std::ostringstream msg;
7803 msg << "Couldn't create new class 'Player'";
7804 throw SquirrelError(v, msg.str());
7805 }
7806 sq_pushstring(v, "add_bonus", -1);
7807 sq_newclosure(v, &Player_add_bonus_wrapper, 0);
7808 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7809 if(SQ_FAILED(sq_createslot(v, -3))) {
7810 throw SquirrelError(v, "Couldn't register function 'add_bonus'");
7811 }
7812
7813 sq_pushstring(v, "set_bonus", -1);
7814 sq_newclosure(v, &Player_set_bonus_wrapper, 0);
7815 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7816 if(SQ_FAILED(sq_createslot(v, -3))) {
7817 throw SquirrelError(v, "Couldn't register function 'set_bonus'");
7818 }
7819
7820 sq_pushstring(v, "add_coins", -1);
7821 sq_newclosure(v, &Player_add_coins_wrapper, 0);
7822 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
7823 if(SQ_FAILED(sq_createslot(v, -3))) {
7824 throw SquirrelError(v, "Couldn't register function 'add_coins'");
7825 }
7826
7827 sq_pushstring(v, "get_coins", -1);
7828 sq_newclosure(v, &Player_get_coins_wrapper, 0);
7829 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7830 if(SQ_FAILED(sq_createslot(v, -3))) {
7831 throw SquirrelError(v, "Couldn't register function 'get_coins'");
7832 }
7833
7834 sq_pushstring(v, "make_invincible", -1);
7835 sq_newclosure(v, &Player_make_invincible_wrapper, 0);
7836 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7837 if(SQ_FAILED(sq_createslot(v, -3))) {
7838 throw SquirrelError(v, "Couldn't register function 'make_invincible'");
7839 }
7840
7841 sq_pushstring(v, "deactivate", -1);
7842 sq_newclosure(v, &Player_deactivate_wrapper, 0);
7843 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7844 if(SQ_FAILED(sq_createslot(v, -3))) {
7845 throw SquirrelError(v, "Couldn't register function 'deactivate'");
7846 }
7847
7848 sq_pushstring(v, "activate", -1);
7849 sq_newclosure(v, &Player_activate_wrapper, 0);
7850 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7851 if(SQ_FAILED(sq_createslot(v, -3))) {
7852 throw SquirrelError(v, "Couldn't register function 'activate'");
7853 }
7854
7855 sq_pushstring(v, "walk", -1);
7856 sq_newclosure(v, &Player_walk_wrapper, 0);
7857 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7858 if(SQ_FAILED(sq_createslot(v, -3))) {
7859 throw SquirrelError(v, "Couldn't register function 'walk'");
7860 }
7861
7862 sq_pushstring(v, "set_dir", -1);
7863 sq_newclosure(v, &Player_set_dir_wrapper, 0);
7864 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7865 if(SQ_FAILED(sq_createslot(v, -3))) {
7866 throw SquirrelError(v, "Couldn't register function 'set_dir'");
7867 }
7868
7869 sq_pushstring(v, "set_visible", -1);
7870 sq_newclosure(v, &Player_set_visible_wrapper, 0);
7871 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7872 if(SQ_FAILED(sq_createslot(v, -3))) {
7873 throw SquirrelError(v, "Couldn't register function 'set_visible'");
7874 }
7875
7876 sq_pushstring(v, "get_visible", -1);
7877 sq_newclosure(v, &Player_get_visible_wrapper, 0);
7878 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7879 if(SQ_FAILED(sq_createslot(v, -3))) {
7880 throw SquirrelError(v, "Couldn't register function 'get_visible'");
7881 }
7882
7883 sq_pushstring(v, "kill", -1);
7884 sq_newclosure(v, &Player_kill_wrapper, 0);
7885 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7886 if(SQ_FAILED(sq_createslot(v, -3))) {
7887 throw SquirrelError(v, "Couldn't register function 'kill'");
7888 }
7889
7890 sq_pushstring(v, "set_ghost_mode", -1);
7891 sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
7892 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7893 if(SQ_FAILED(sq_createslot(v, -3))) {
7894 throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
7895 }
7896
7897 sq_pushstring(v, "get_ghost_mode", -1);
7898 sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
7899 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7900 if(SQ_FAILED(sq_createslot(v, -3))) {
7901 throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
7902 }
7903
7904 sq_pushstring(v, "kick", -1);
7905 sq_newclosure(v, &Player_kick_wrapper, 0);
7906 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7907 if(SQ_FAILED(sq_createslot(v, -3))) {
7908 throw SquirrelError(v, "Couldn't register function 'kick'");
7909 }
7910
7911 sq_pushstring(v, "do_cheer", -1);
7912 sq_newclosure(v, &Player_do_cheer_wrapper, 0);
7913 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7914 if(SQ_FAILED(sq_createslot(v, -3))) {
7915 throw SquirrelError(v, "Couldn't register function 'do_cheer'");
7916 }
7917
7918 sq_pushstring(v, "do_duck", -1);
7919 sq_newclosure(v, &Player_do_duck_wrapper, 0);
7920 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7921 if(SQ_FAILED(sq_createslot(v, -3))) {
7922 throw SquirrelError(v, "Couldn't register function 'do_duck'");
7923 }
7924
7925 sq_pushstring(v, "do_standup", -1);
7926 sq_newclosure(v, &Player_do_standup_wrapper, 0);
7927 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7928 if(SQ_FAILED(sq_createslot(v, -3))) {
7929 throw SquirrelError(v, "Couldn't register function 'do_standup'");
7930 }
7931
7932 sq_pushstring(v, "do_backflip", -1);
7933 sq_newclosure(v, &Player_do_backflip_wrapper, 0);
7934 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7935 if(SQ_FAILED(sq_createslot(v, -3))) {
7936 throw SquirrelError(v, "Couldn't register function 'do_backflip'");
7937 }
7938
7939 sq_pushstring(v, "do_jump", -1);
7940 sq_newclosure(v, &Player_do_jump_wrapper, 0);
7941 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
7942 if(SQ_FAILED(sq_createslot(v, -3))) {
7943 throw SquirrelError(v, "Couldn't register function 'do_jump'");
7944 }
7945
7946 sq_pushstring(v, "trigger_sequence", -1);
7947 sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
7948 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7949 if(SQ_FAILED(sq_createslot(v, -3))) {
7950 throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
7951 }
7952
7953 sq_pushstring(v, "use_scripting_controller", -1);
7954 sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
7955 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
7956 if(SQ_FAILED(sq_createslot(v, -3))) {
7957 throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
7958 }
7959
7960 sq_pushstring(v, "has_grabbed", -1);
7961 sq_newclosure(v, &Player_has_grabbed_wrapper, 0);
7962 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
7963 if(SQ_FAILED(sq_createslot(v, -3))) {
7964 throw SquirrelError(v, "Couldn't register function 'has_grabbed'");
7965 }
7966
7967 sq_pushstring(v, "do_scripting_controller", -1);
7968 sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
7969 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsb");
7970 if(SQ_FAILED(sq_createslot(v, -3))) {
7971 throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
7972 }
7973
7974 sq_pushstring(v, "get_velocity_x", -1);
7975 sq_newclosure(v, &Player_get_velocity_x_wrapper, 0);
7976 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7977 if(SQ_FAILED(sq_createslot(v, -3))) {
7978 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
7979 }
7980
7981 sq_pushstring(v, "get_velocity_y", -1);
7982 sq_newclosure(v, &Player_get_velocity_y_wrapper, 0);
7983 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
7984 if(SQ_FAILED(sq_createslot(v, -3))) {
7985 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
7986 }
7987
7988 if(SQ_FAILED(sq_createslot(v, -3))) {
7989 throw SquirrelError(v, "Couldn't register class 'Player'");
7990 }
7991
7992 // Register class Rock
7993 sq_pushstring(v, "Rock", -1);
7994 if(sq_newclass(v, SQFalse) < 0) {
7995 std::ostringstream msg;
7996 msg << "Couldn't create new class 'Rock'";
7997 throw SquirrelError(v, msg.str());
7998 }
7999 if(SQ_FAILED(sq_createslot(v, -3))) {
8000 throw SquirrelError(v, "Couldn't register class 'Rock'");
8001 }
8002
8003 // Register class ScriptedObject
8004 sq_pushstring(v, "ScriptedObject", -1);
8005 if(sq_newclass(v, SQFalse) < 0) {
8006 std::ostringstream msg;
8007 msg << "Couldn't create new class 'ScriptedObject'";
8008 throw SquirrelError(v, msg.str());
8009 }
8010 sq_pushstring(v, "set_action", -1);
8011 sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
8012 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8013 if(SQ_FAILED(sq_createslot(v, -3))) {
8014 throw SquirrelError(v, "Couldn't register function 'set_action'");
8015 }
8016
8017 sq_pushstring(v, "get_action", -1);
8018 sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
8019 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8020 if(SQ_FAILED(sq_createslot(v, -3))) {
8021 throw SquirrelError(v, "Couldn't register function 'get_action'");
8022 }
8023
8024 sq_pushstring(v, "move", -1);
8025 sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
8026 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8027 if(SQ_FAILED(sq_createslot(v, -3))) {
8028 throw SquirrelError(v, "Couldn't register function 'move'");
8029 }
8030
8031 sq_pushstring(v, "set_pos", -1);
8032 sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
8033 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8034 if(SQ_FAILED(sq_createslot(v, -3))) {
8035 throw SquirrelError(v, "Couldn't register function 'set_pos'");
8036 }
8037
8038 sq_pushstring(v, "get_pos_x", -1);
8039 sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
8040 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8041 if(SQ_FAILED(sq_createslot(v, -3))) {
8042 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
8043 }
8044
8045 sq_pushstring(v, "get_pos_y", -1);
8046 sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
8047 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8048 if(SQ_FAILED(sq_createslot(v, -3))) {
8049 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
8050 }
8051
8052 sq_pushstring(v, "set_velocity", -1);
8053 sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
8054 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8055 if(SQ_FAILED(sq_createslot(v, -3))) {
8056 throw SquirrelError(v, "Couldn't register function 'set_velocity'");
8057 }
8058
8059 sq_pushstring(v, "get_velocity_x", -1);
8060 sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
8061 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8062 if(SQ_FAILED(sq_createslot(v, -3))) {
8063 throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
8064 }
8065
8066 sq_pushstring(v, "get_velocity_y", -1);
8067 sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
8068 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8069 if(SQ_FAILED(sq_createslot(v, -3))) {
8070 throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
8071 }
8072
8073 sq_pushstring(v, "enable_gravity", -1);
8074 sq_newclosure(v, &ScriptedObject_enable_gravity_wrapper, 0);
8075 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8076 if(SQ_FAILED(sq_createslot(v, -3))) {
8077 throw SquirrelError(v, "Couldn't register function 'enable_gravity'");
8078 }
8079
8080 sq_pushstring(v, "gravity_enabled", -1);
8081 sq_newclosure(v, &ScriptedObject_gravity_enabled_wrapper, 0);
8082 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8083 if(SQ_FAILED(sq_createslot(v, -3))) {
8084 throw SquirrelError(v, "Couldn't register function 'gravity_enabled'");
8085 }
8086
8087 sq_pushstring(v, "set_visible", -1);
8088 sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
8089 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8090 if(SQ_FAILED(sq_createslot(v, -3))) {
8091 throw SquirrelError(v, "Couldn't register function 'set_visible'");
8092 }
8093
8094 sq_pushstring(v, "is_visible", -1);
8095 sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
8096 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8097 if(SQ_FAILED(sq_createslot(v, -3))) {
8098 throw SquirrelError(v, "Couldn't register function 'is_visible'");
8099 }
8100
8101 sq_pushstring(v, "set_solid", -1);
8102 sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
8103 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8104 if(SQ_FAILED(sq_createslot(v, -3))) {
8105 throw SquirrelError(v, "Couldn't register function 'set_solid'");
8106 }
8107
8108 sq_pushstring(v, "is_solid", -1);
8109 sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
8110 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8111 if(SQ_FAILED(sq_createslot(v, -3))) {
8112 throw SquirrelError(v, "Couldn't register function 'is_solid'");
8113 }
8114
8115 sq_pushstring(v, "get_name", -1);
8116 sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
8117 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8118 if(SQ_FAILED(sq_createslot(v, -3))) {
8119 throw SquirrelError(v, "Couldn't register function 'get_name'");
8120 }
8121
8122 if(SQ_FAILED(sq_createslot(v, -3))) {
8123 throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
8124 }
8125
8126 // Register class Sector
8127 sq_pushstring(v, "Sector", -1);
8128 if(sq_newclass(v, SQFalse) < 0) {
8129 std::ostringstream msg;
8130 msg << "Couldn't create new class 'Sector'";
8131 throw SquirrelError(v, msg.str());
8132 }
8133 sq_pushstring(v, "set_ambient_light", -1);
8134 sq_newclosure(v, &Sector_set_ambient_light_wrapper, 0);
8135 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
8136 if(SQ_FAILED(sq_createslot(v, -3))) {
8137 throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
8138 }
8139
8140 sq_pushstring(v, "fade_to_ambient_light", -1);
8141 sq_newclosure(v, &Sector_fade_to_ambient_light_wrapper, 0);
8142 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
8143 if(SQ_FAILED(sq_createslot(v, -3))) {
8144 throw SquirrelError(v, "Couldn't register function 'fade_to_ambient_light'");
8145 }
8146
8147 sq_pushstring(v, "get_ambient_red", -1);
8148 sq_newclosure(v, &Sector_get_ambient_red_wrapper, 0);
8149 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8150 if(SQ_FAILED(sq_createslot(v, -3))) {
8151 throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
8152 }
8153
8154 sq_pushstring(v, "get_ambient_green", -1);
8155 sq_newclosure(v, &Sector_get_ambient_green_wrapper, 0);
8156 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8157 if(SQ_FAILED(sq_createslot(v, -3))) {
8158 throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
8159 }
8160
8161 sq_pushstring(v, "get_ambient_blue", -1);
8162 sq_newclosure(v, &Sector_get_ambient_blue_wrapper, 0);
8163 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8164 if(SQ_FAILED(sq_createslot(v, -3))) {
8165 throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
8166 }
8167
8168 sq_pushstring(v, "set_gravity", -1);
8169 sq_newclosure(v, &Sector_set_gravity_wrapper, 0);
8170 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8171 if(SQ_FAILED(sq_createslot(v, -3))) {
8172 throw SquirrelError(v, "Couldn't register function 'set_gravity'");
8173 }
8174
8175 sq_pushstring(v, "set_music", -1);
8176 sq_newclosure(v, &Sector_set_music_wrapper, 0);
8177 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8178 if(SQ_FAILED(sq_createslot(v, -3))) {
8179 throw SquirrelError(v, "Couldn't register function 'set_music'");
8180 }
8181
8182 if(SQ_FAILED(sq_createslot(v, -3))) {
8183 throw SquirrelError(v, "Couldn't register class 'Sector'");
8184 }
8185
8186 // Register class Text
8187 sq_pushstring(v, "Text", -1);
8188 if(sq_newclass(v, SQFalse) < 0) {
8189 std::ostringstream msg;
8190 msg << "Couldn't create new class 'Text'";
8191 throw SquirrelError(v, msg.str());
8192 }
8193 sq_pushstring(v, "set_text", -1);
8194 sq_newclosure(v, &Text_set_text_wrapper, 0);
8195 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8196 if(SQ_FAILED(sq_createslot(v, -3))) {
8197 throw SquirrelError(v, "Couldn't register function 'set_text'");
8198 }
8199
8200 sq_pushstring(v, "set_font", -1);
8201 sq_newclosure(v, &Text_set_font_wrapper, 0);
8202 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8203 if(SQ_FAILED(sq_createslot(v, -3))) {
8204 throw SquirrelError(v, "Couldn't register function 'set_font'");
8205 }
8206
8207 sq_pushstring(v, "fade_in", -1);
8208 sq_newclosure(v, &Text_fade_in_wrapper, 0);
8209 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8210 if(SQ_FAILED(sq_createslot(v, -3))) {
8211 throw SquirrelError(v, "Couldn't register function 'fade_in'");
8212 }
8213
8214 sq_pushstring(v, "fade_out", -1);
8215 sq_newclosure(v, &Text_fade_out_wrapper, 0);
8216 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8217 if(SQ_FAILED(sq_createslot(v, -3))) {
8218 throw SquirrelError(v, "Couldn't register function 'fade_out'");
8219 }
8220
8221 sq_pushstring(v, "set_visible", -1);
8222 sq_newclosure(v, &Text_set_visible_wrapper, 0);
8223 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8224 if(SQ_FAILED(sq_createslot(v, -3))) {
8225 throw SquirrelError(v, "Couldn't register function 'set_visible'");
8226 }
8227
8228 sq_pushstring(v, "set_centered", -1);
8229 sq_newclosure(v, &Text_set_centered_wrapper, 0);
8230 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8231 if(SQ_FAILED(sq_createslot(v, -3))) {
8232 throw SquirrelError(v, "Couldn't register function 'set_centered'");
8233 }
8234
8235 sq_pushstring(v, "set_pos", -1);
8236 sq_newclosure(v, &Text_set_pos_wrapper, 0);
8237 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8238 if(SQ_FAILED(sq_createslot(v, -3))) {
8239 throw SquirrelError(v, "Couldn't register function 'set_pos'");
8240 }
8241
8242 sq_pushstring(v, "get_pos_x", -1);
8243 sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
8244 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8245 if(SQ_FAILED(sq_createslot(v, -3))) {
8246 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
8247 }
8248
8249 sq_pushstring(v, "get_pos_y", -1);
8250 sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
8251 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8252 if(SQ_FAILED(sq_createslot(v, -3))) {
8253 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
8254 }
8255
8256 sq_pushstring(v, "set_anchor_point", -1);
8257 sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
8258 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
8259 if(SQ_FAILED(sq_createslot(v, -3))) {
8260 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
8261 }
8262
8263 sq_pushstring(v, "get_anchor_point", -1);
8264 sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
8265 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8266 if(SQ_FAILED(sq_createslot(v, -3))) {
8267 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
8268 }
8269
8270 if(SQ_FAILED(sq_createslot(v, -3))) {
8271 throw SquirrelError(v, "Couldn't register class 'Text'");
8272 }
8273
8274 // Register class TextArray
8275 sq_pushstring(v, "TextArray", -1);
8276 if(sq_newclass(v, SQFalse) < 0) {
8277 std::ostringstream msg;
8278 msg << "Couldn't create new class 'TextArray'";
8279 throw SquirrelError(v, msg.str());
8280 }
8281 sq_pushstring(v, "clear", -1);
8282 sq_newclosure(v, &TextArray_clear_wrapper, 0);
8283 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8284 if(SQ_FAILED(sq_createslot(v, -3))) {
8285 throw SquirrelError(v, "Couldn't register function 'clear'");
8286 }
8287
8288 sq_pushstring(v, "add_text", -1);
8289 sq_newclosure(v, &TextArray_add_text_wrapper, 0);
8290 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8291 if(SQ_FAILED(sq_createslot(v, -3))) {
8292 throw SquirrelError(v, "Couldn't register function 'add_text'");
8293 }
8294
8295 sq_pushstring(v, "add_text_duration", -1);
8296 sq_newclosure(v, &TextArray_add_text_duration_wrapper, 0);
8297 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsn");
8298 if(SQ_FAILED(sq_createslot(v, -3))) {
8299 throw SquirrelError(v, "Couldn't register function 'add_text_duration'");
8300 }
8301
8302 sq_pushstring(v, "set_text_index", -1);
8303 sq_newclosure(v, &TextArray_set_text_index_wrapper, 0);
8304 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
8305 if(SQ_FAILED(sq_createslot(v, -3))) {
8306 throw SquirrelError(v, "Couldn't register function 'set_text_index'");
8307 }
8308
8309 sq_pushstring(v, "set_keep_visible", -1);
8310 sq_newclosure(v, &TextArray_set_keep_visible_wrapper, 0);
8311 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8312 if(SQ_FAILED(sq_createslot(v, -3))) {
8313 throw SquirrelError(v, "Couldn't register function 'set_keep_visible'");
8314 }
8315
8316 sq_pushstring(v, "set_fade_transition", -1);
8317 sq_newclosure(v, &TextArray_set_fade_transition_wrapper, 0);
8318 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8319 if(SQ_FAILED(sq_createslot(v, -3))) {
8320 throw SquirrelError(v, "Couldn't register function 'set_fade_transition'");
8321 }
8322
8323 sq_pushstring(v, "set_fade_time", -1);
8324 sq_newclosure(v, &TextArray_set_fade_time_wrapper, 0);
8325 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8326 if(SQ_FAILED(sq_createslot(v, -3))) {
8327 throw SquirrelError(v, "Couldn't register function 'set_fade_time'");
8328 }
8329
8330 sq_pushstring(v, "set_done", -1);
8331 sq_newclosure(v, &TextArray_set_done_wrapper, 0);
8332 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8333 if(SQ_FAILED(sq_createslot(v, -3))) {
8334 throw SquirrelError(v, "Couldn't register function 'set_done'");
8335 }
8336
8337 sq_pushstring(v, "set_auto", -1);
8338 sq_newclosure(v, &TextArray_set_auto_wrapper, 0);
8339 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8340 if(SQ_FAILED(sq_createslot(v, -3))) {
8341 throw SquirrelError(v, "Couldn't register function 'set_auto'");
8342 }
8343
8344 sq_pushstring(v, "next_text", -1);
8345 sq_newclosure(v, &TextArray_next_text_wrapper, 0);
8346 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8347 if(SQ_FAILED(sq_createslot(v, -3))) {
8348 throw SquirrelError(v, "Couldn't register function 'next_text'");
8349 }
8350
8351 sq_pushstring(v, "prev_text", -1);
8352 sq_newclosure(v, &TextArray_prev_text_wrapper, 0);
8353 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8354 if(SQ_FAILED(sq_createslot(v, -3))) {
8355 throw SquirrelError(v, "Couldn't register function 'prev_text'");
8356 }
8357
8358 sq_pushstring(v, "set_text", -1);
8359 sq_newclosure(v, &TextArray_set_text_wrapper, 0);
8360 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8361 if(SQ_FAILED(sq_createslot(v, -3))) {
8362 throw SquirrelError(v, "Couldn't register function 'set_text'");
8363 }
8364
8365 sq_pushstring(v, "set_font", -1);
8366 sq_newclosure(v, &TextArray_set_font_wrapper, 0);
8367 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8368 if(SQ_FAILED(sq_createslot(v, -3))) {
8369 throw SquirrelError(v, "Couldn't register function 'set_font'");
8370 }
8371
8372 sq_pushstring(v, "fade_in", -1);
8373 sq_newclosure(v, &TextArray_fade_in_wrapper, 0);
8374 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8375 if(SQ_FAILED(sq_createslot(v, -3))) {
8376 throw SquirrelError(v, "Couldn't register function 'fade_in'");
8377 }
8378
8379 sq_pushstring(v, "fade_out", -1);
8380 sq_newclosure(v, &TextArray_fade_out_wrapper, 0);
8381 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8382 if(SQ_FAILED(sq_createslot(v, -3))) {
8383 throw SquirrelError(v, "Couldn't register function 'fade_out'");
8384 }
8385
8386 sq_pushstring(v, "set_visible", -1);
8387 sq_newclosure(v, &TextArray_set_visible_wrapper, 0);
8388 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8389 if(SQ_FAILED(sq_createslot(v, -3))) {
8390 throw SquirrelError(v, "Couldn't register function 'set_visible'");
8391 }
8392
8393 sq_pushstring(v, "set_centered", -1);
8394 sq_newclosure(v, &TextArray_set_centered_wrapper, 0);
8395 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8396 if(SQ_FAILED(sq_createslot(v, -3))) {
8397 throw SquirrelError(v, "Couldn't register function 'set_centered'");
8398 }
8399
8400 sq_pushstring(v, "set_pos", -1);
8401 sq_newclosure(v, &TextArray_set_pos_wrapper, 0);
8402 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8403 if(SQ_FAILED(sq_createslot(v, -3))) {
8404 throw SquirrelError(v, "Couldn't register function 'set_pos'");
8405 }
8406
8407 sq_pushstring(v, "get_pos_x", -1);
8408 sq_newclosure(v, &TextArray_get_pos_x_wrapper, 0);
8409 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8410 if(SQ_FAILED(sq_createslot(v, -3))) {
8411 throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
8412 }
8413
8414 sq_pushstring(v, "get_pos_y", -1);
8415 sq_newclosure(v, &TextArray_get_pos_y_wrapper, 0);
8416 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8417 if(SQ_FAILED(sq_createslot(v, -3))) {
8418 throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
8419 }
8420
8421 sq_pushstring(v, "set_anchor_point", -1);
8422 sq_newclosure(v, &TextArray_set_anchor_point_wrapper, 0);
8423 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
8424 if(SQ_FAILED(sq_createslot(v, -3))) {
8425 throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
8426 }
8427
8428 sq_pushstring(v, "get_anchor_point", -1);
8429 sq_newclosure(v, &TextArray_get_anchor_point_wrapper, 0);
8430 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8431 if(SQ_FAILED(sq_createslot(v, -3))) {
8432 throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
8433 }
8434
8435 if(SQ_FAILED(sq_createslot(v, -3))) {
8436 throw SquirrelError(v, "Couldn't register class 'TextArray'");
8437 }
8438
8439 // Register class Thunderstorm
8440 sq_pushstring(v, "Thunderstorm", -1);
8441 if(sq_newclass(v, SQFalse) < 0) {
8442 std::ostringstream msg;
8443 msg << "Couldn't create new class 'Thunderstorm'";
8444 throw SquirrelError(v, msg.str());
8445 }
8446 sq_pushstring(v, "start", -1);
8447 sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
8448 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8449 if(SQ_FAILED(sq_createslot(v, -3))) {
8450 throw SquirrelError(v, "Couldn't register function 'start'");
8451 }
8452
8453 sq_pushstring(v, "stop", -1);
8454 sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
8455 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8456 if(SQ_FAILED(sq_createslot(v, -3))) {
8457 throw SquirrelError(v, "Couldn't register function 'stop'");
8458 }
8459
8460 sq_pushstring(v, "thunder", -1);
8461 sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
8462 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8463 if(SQ_FAILED(sq_createslot(v, -3))) {
8464 throw SquirrelError(v, "Couldn't register function 'thunder'");
8465 }
8466
8467 sq_pushstring(v, "lightning", -1);
8468 sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
8469 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8470 if(SQ_FAILED(sq_createslot(v, -3))) {
8471 throw SquirrelError(v, "Couldn't register function 'lightning'");
8472 }
8473
8474 sq_pushstring(v, "flash", -1);
8475 sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
8476 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8477 if(SQ_FAILED(sq_createslot(v, -3))) {
8478 throw SquirrelError(v, "Couldn't register function 'flash'");
8479 }
8480
8481 sq_pushstring(v, "electrify", -1);
8482 sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
8483 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8484 if(SQ_FAILED(sq_createslot(v, -3))) {
8485 throw SquirrelError(v, "Couldn't register function 'electrify'");
8486 }
8487
8488 if(SQ_FAILED(sq_createslot(v, -3))) {
8489 throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
8490 }
8491
8492 // Register class TileMap
8493 sq_pushstring(v, "TileMap", -1);
8494 if(sq_newclass(v, SQFalse) < 0) {
8495 std::ostringstream msg;
8496 msg << "Couldn't create new class 'TileMap'";
8497 throw SquirrelError(v, msg.str());
8498 }
8499 sq_pushstring(v, "goto_node", -1);
8500 sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
8501 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
8502 if(SQ_FAILED(sq_createslot(v, -3))) {
8503 throw SquirrelError(v, "Couldn't register function 'goto_node'");
8504 }
8505
8506 sq_pushstring(v, "start_moving", -1);
8507 sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
8508 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8509 if(SQ_FAILED(sq_createslot(v, -3))) {
8510 throw SquirrelError(v, "Couldn't register function 'start_moving'");
8511 }
8512
8513 sq_pushstring(v, "stop_moving", -1);
8514 sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
8515 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8516 if(SQ_FAILED(sq_createslot(v, -3))) {
8517 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
8518 }
8519
8520 sq_pushstring(v, "get_tile_id", -1);
8521 sq_newclosure(v, &TileMap_get_tile_id_wrapper, 0);
8522 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tii");
8523 if(SQ_FAILED(sq_createslot(v, -3))) {
8524 throw SquirrelError(v, "Couldn't register function 'get_tile_id'");
8525 }
8526
8527 sq_pushstring(v, "get_tile_id_at", -1);
8528 sq_newclosure(v, &TileMap_get_tile_id_at_wrapper, 0);
8529 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8530 if(SQ_FAILED(sq_createslot(v, -3))) {
8531 throw SquirrelError(v, "Couldn't register function 'get_tile_id_at'");
8532 }
8533
8534 sq_pushstring(v, "change", -1);
8535 sq_newclosure(v, &TileMap_change_wrapper, 0);
8536 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tiii");
8537 if(SQ_FAILED(sq_createslot(v, -3))) {
8538 throw SquirrelError(v, "Couldn't register function 'change'");
8539 }
8540
8541 sq_pushstring(v, "change_at", -1);
8542 sq_newclosure(v, &TileMap_change_at_wrapper, 0);
8543 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnni");
8544 if(SQ_FAILED(sq_createslot(v, -3))) {
8545 throw SquirrelError(v, "Couldn't register function 'change_at'");
8546 }
8547
8548 sq_pushstring(v, "fade", -1);
8549 sq_newclosure(v, &TileMap_fade_wrapper, 0);
8550 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
8551 if(SQ_FAILED(sq_createslot(v, -3))) {
8552 throw SquirrelError(v, "Couldn't register function 'fade'");
8553 }
8554
8555 sq_pushstring(v, "tint_fade", -1);
8556 sq_newclosure(v, &TileMap_tint_fade_wrapper, 0);
8557 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnn");
8558 if(SQ_FAILED(sq_createslot(v, -3))) {
8559 throw SquirrelError(v, "Couldn't register function 'tint_fade'");
8560 }
8561
8562 sq_pushstring(v, "set_alpha", -1);
8563 sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
8564 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
8565 if(SQ_FAILED(sq_createslot(v, -3))) {
8566 throw SquirrelError(v, "Couldn't register function 'set_alpha'");
8567 }
8568
8569 sq_pushstring(v, "get_alpha", -1);
8570 sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
8571 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8572 if(SQ_FAILED(sq_createslot(v, -3))) {
8573 throw SquirrelError(v, "Couldn't register function 'get_alpha'");
8574 }
8575
8576 sq_pushstring(v, "set_solid", -1);
8577 sq_newclosure(v, &TileMap_set_solid_wrapper, 0);
8578 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8579 if(SQ_FAILED(sq_createslot(v, -3))) {
8580 throw SquirrelError(v, "Couldn't register function 'set_solid'");
8581 }
8582
8583 if(SQ_FAILED(sq_createslot(v, -3))) {
8584 throw SquirrelError(v, "Couldn't register class 'TileMap'");
8585 }
8586
8587 // Register class Torch
8588 sq_pushstring(v, "Torch", -1);
8589 if(sq_newclass(v, SQFalse) < 0) {
8590 std::ostringstream msg;
8591 msg << "Couldn't create new class 'Torch'";
8592 throw SquirrelError(v, msg.str());
8593 }
8594 sq_pushstring(v, "get_burning", -1);
8595 sq_newclosure(v, &Torch_get_burning_wrapper, 0);
8596 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8597 if(SQ_FAILED(sq_createslot(v, -3))) {
8598 throw SquirrelError(v, "Couldn't register function 'get_burning'");
8599 }
8600
8601 sq_pushstring(v, "set_burning", -1);
8602 sq_newclosure(v, &Torch_set_burning_wrapper, 0);
8603 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
8604 if(SQ_FAILED(sq_createslot(v, -3))) {
8605 throw SquirrelError(v, "Couldn't register function 'set_burning'");
8606 }
8607
8608 if(SQ_FAILED(sq_createslot(v, -3))) {
8609 throw SquirrelError(v, "Couldn't register class 'Torch'");
8610 }
8611
8612 // Register class WillOWisp
8613 sq_pushstring(v, "WillOWisp", -1);
8614 if(sq_newclass(v, SQFalse) < 0) {
8615 std::ostringstream msg;
8616 msg << "Couldn't create new class 'WillOWisp'";
8617 throw SquirrelError(v, msg.str());
8618 }
8619 sq_pushstring(v, "goto_node", -1);
8620 sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
8621 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
8622 if(SQ_FAILED(sq_createslot(v, -3))) {
8623 throw SquirrelError(v, "Couldn't register function 'goto_node'");
8624 }
8625
8626 sq_pushstring(v, "set_state", -1);
8627 sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
8628 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
8629 if(SQ_FAILED(sq_createslot(v, -3))) {
8630 throw SquirrelError(v, "Couldn't register function 'set_state'");
8631 }
8632
8633 sq_pushstring(v, "start_moving", -1);
8634 sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
8635 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8636 if(SQ_FAILED(sq_createslot(v, -3))) {
8637 throw SquirrelError(v, "Couldn't register function 'start_moving'");
8638 }
8639
8640 sq_pushstring(v, "stop_moving", -1);
8641 sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
8642 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8643 if(SQ_FAILED(sq_createslot(v, -3))) {
8644 throw SquirrelError(v, "Couldn't register function 'stop_moving'");
8645 }
8646
8647 if(SQ_FAILED(sq_createslot(v, -3))) {
8648 throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
8649 }
8650
8651 // Register class Wind
8652 sq_pushstring(v, "Wind", -1);
8653 if(sq_newclass(v, SQFalse) < 0) {
8654 std::ostringstream msg;
8655 msg << "Couldn't create new class 'Wind'";
8656 throw SquirrelError(v, msg.str());
8657 }
8658 sq_pushstring(v, "start", -1);
8659 sq_newclosure(v, &Wind_start_wrapper, 0);
8660 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8661 if(SQ_FAILED(sq_createslot(v, -3))) {
8662 throw SquirrelError(v, "Couldn't register function 'start'");
8663 }
8664
8665 sq_pushstring(v, "stop", -1);
8666 sq_newclosure(v, &Wind_stop_wrapper, 0);
8667 sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
8668 if(SQ_FAILED(sq_createslot(v, -3))) {
8669 throw SquirrelError(v, "Couldn't register function 'stop'");
8670 }
8671
8672 if(SQ_FAILED(sq_createslot(v, -3))) {
8673 throw SquirrelError(v, "Couldn't register class 'Wind'");
8674 }
8675
8676}
8677
8678} // namespace scripting
8679
8680/* EOF */
8681