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 
16 namespace scripting {
17 namespace wrapper {
18 
AmbientSound_release_hook(SQUserPointer ptr,SQInteger)19 static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger )
20 {
21   auto _this = reinterpret_cast<scripting::AmbientSound*> (ptr);
22   delete _this;
23   return 0;
24 }
25 
AmbientSound_set_pos_wrapper(HSQUIRRELVM vm)26 static 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 
AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm)65 static 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 
AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm)95 static 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 
Background_release_hook(SQUserPointer ptr,SQInteger)125 static SQInteger Background_release_hook(SQUserPointer ptr, SQInteger )
126 {
127   auto _this = reinterpret_cast<scripting::Background*> (ptr);
128   delete _this;
129   return 0;
130 }
131 
Background_set_image_wrapper(HSQUIRRELVM vm)132 static 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 
Background_set_images_wrapper(HSQUIRRELVM vm)166 static 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 
Background_set_speed_wrapper(HSQUIRRELVM vm)210 static 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 
Background_get_color_red_wrapper(HSQUIRRELVM vm)244 static SQInteger Background_get_color_red_wrapper(HSQUIRRELVM vm)
245 {
246   SQUserPointer data;
247   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
248     sq_throwerror(vm, _SC("'get_color_red' called without instance"));
249     return SQ_ERROR;
250   }
251   auto _this = reinterpret_cast<scripting::Background*> (data);
252 
253   if (_this == nullptr) {
254     return SQ_ERROR;
255   }
256 
257 
258   try {
259     float return_value = _this->get_color_red();
260 
261     sq_pushfloat(vm, return_value);
262     return 1;
263 
264   } catch(std::exception& e) {
265     sq_throwerror(vm, e.what());
266     return SQ_ERROR;
267   } catch(...) {
268     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_red'"));
269     return SQ_ERROR;
270   }
271 
272 }
273 
Background_get_color_green_wrapper(HSQUIRRELVM vm)274 static SQInteger Background_get_color_green_wrapper(HSQUIRRELVM vm)
275 {
276   SQUserPointer data;
277   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
278     sq_throwerror(vm, _SC("'get_color_green' called without instance"));
279     return SQ_ERROR;
280   }
281   auto _this = reinterpret_cast<scripting::Background*> (data);
282 
283   if (_this == nullptr) {
284     return SQ_ERROR;
285   }
286 
287 
288   try {
289     float return_value = _this->get_color_green();
290 
291     sq_pushfloat(vm, return_value);
292     return 1;
293 
294   } catch(std::exception& e) {
295     sq_throwerror(vm, e.what());
296     return SQ_ERROR;
297   } catch(...) {
298     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_green'"));
299     return SQ_ERROR;
300   }
301 
302 }
303 
Background_get_color_blue_wrapper(HSQUIRRELVM vm)304 static SQInteger Background_get_color_blue_wrapper(HSQUIRRELVM vm)
305 {
306   SQUserPointer data;
307   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
308     sq_throwerror(vm, _SC("'get_color_blue' called without instance"));
309     return SQ_ERROR;
310   }
311   auto _this = reinterpret_cast<scripting::Background*> (data);
312 
313   if (_this == nullptr) {
314     return SQ_ERROR;
315   }
316 
317 
318   try {
319     float return_value = _this->get_color_blue();
320 
321     sq_pushfloat(vm, return_value);
322     return 1;
323 
324   } catch(std::exception& e) {
325     sq_throwerror(vm, e.what());
326     return SQ_ERROR;
327   } catch(...) {
328     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_blue'"));
329     return SQ_ERROR;
330   }
331 
332 }
333 
Background_get_color_alpha_wrapper(HSQUIRRELVM vm)334 static SQInteger Background_get_color_alpha_wrapper(HSQUIRRELVM vm)
335 {
336   SQUserPointer data;
337   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
338     sq_throwerror(vm, _SC("'get_color_alpha' called without instance"));
339     return SQ_ERROR;
340   }
341   auto _this = reinterpret_cast<scripting::Background*> (data);
342 
343   if (_this == nullptr) {
344     return SQ_ERROR;
345   }
346 
347 
348   try {
349     float return_value = _this->get_color_alpha();
350 
351     sq_pushfloat(vm, return_value);
352     return 1;
353 
354   } catch(std::exception& e) {
355     sq_throwerror(vm, e.what());
356     return SQ_ERROR;
357   } catch(...) {
358     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_color_alpha'"));
359     return SQ_ERROR;
360   }
361 
362 }
363 
Background_set_color_wrapper(HSQUIRRELVM vm)364 static SQInteger Background_set_color_wrapper(HSQUIRRELVM vm)
365 {
366   SQUserPointer data;
367   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
368     sq_throwerror(vm, _SC("'set_color' called without instance"));
369     return SQ_ERROR;
370   }
371   auto _this = reinterpret_cast<scripting::Background*> (data);
372 
373   if (_this == nullptr) {
374     return SQ_ERROR;
375   }
376 
377   SQFloat arg0;
378   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
379     sq_throwerror(vm, _SC("Argument 1 not a float"));
380     return SQ_ERROR;
381   }
382   SQFloat arg1;
383   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
384     sq_throwerror(vm, _SC("Argument 2 not a float"));
385     return SQ_ERROR;
386   }
387   SQFloat arg2;
388   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
389     sq_throwerror(vm, _SC("Argument 3 not a float"));
390     return SQ_ERROR;
391   }
392   SQFloat arg3;
393   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
394     sq_throwerror(vm, _SC("Argument 4 not a float"));
395     return SQ_ERROR;
396   }
397 
398   try {
399     _this->set_color(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
400 
401     return 0;
402 
403   } catch(std::exception& e) {
404     sq_throwerror(vm, e.what());
405     return SQ_ERROR;
406   } catch(...) {
407     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color'"));
408     return SQ_ERROR;
409   }
410 
411 }
412 
Background_fade_color_wrapper(HSQUIRRELVM vm)413 static SQInteger Background_fade_color_wrapper(HSQUIRRELVM vm)
414 {
415   SQUserPointer data;
416   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
417     sq_throwerror(vm, _SC("'fade_color' called without instance"));
418     return SQ_ERROR;
419   }
420   auto _this = reinterpret_cast<scripting::Background*> (data);
421 
422   if (_this == nullptr) {
423     return SQ_ERROR;
424   }
425 
426   SQFloat arg0;
427   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
428     sq_throwerror(vm, _SC("Argument 1 not a float"));
429     return SQ_ERROR;
430   }
431   SQFloat arg1;
432   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
433     sq_throwerror(vm, _SC("Argument 2 not a float"));
434     return SQ_ERROR;
435   }
436   SQFloat arg2;
437   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
438     sq_throwerror(vm, _SC("Argument 3 not a float"));
439     return SQ_ERROR;
440   }
441   SQFloat arg3;
442   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
443     sq_throwerror(vm, _SC("Argument 4 not a float"));
444     return SQ_ERROR;
445   }
446   SQFloat arg4;
447   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
448     sq_throwerror(vm, _SC("Argument 5 not a float"));
449     return SQ_ERROR;
450   }
451 
452   try {
453     _this->fade_color(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4));
454 
455     return 0;
456 
457   } catch(std::exception& e) {
458     sq_throwerror(vm, e.what());
459     return SQ_ERROR;
460   } catch(...) {
461     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color'"));
462     return SQ_ERROR;
463   }
464 
465 }
466 
BadGuy_release_hook(SQUserPointer ptr,SQInteger)467 static SQInteger BadGuy_release_hook(SQUserPointer ptr, SQInteger )
468 {
469   auto _this = reinterpret_cast<scripting::BadGuy*> (ptr);
470   delete _this;
471   return 0;
472 }
473 
BadGuy_kill_wrapper(HSQUIRRELVM vm)474 static SQInteger BadGuy_kill_wrapper(HSQUIRRELVM vm)
475 {
476   SQUserPointer data;
477   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
478     sq_throwerror(vm, _SC("'kill' called without instance"));
479     return SQ_ERROR;
480   }
481   auto _this = reinterpret_cast<scripting::BadGuy*> (data);
482 
483   if (_this == nullptr) {
484     return SQ_ERROR;
485   }
486 
487 
488   try {
489     _this->kill();
490 
491     return 0;
492 
493   } catch(std::exception& e) {
494     sq_throwerror(vm, e.what());
495     return SQ_ERROR;
496   } catch(...) {
497     sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
498     return SQ_ERROR;
499   }
500 
501 }
502 
BadGuy_ignite_wrapper(HSQUIRRELVM vm)503 static SQInteger BadGuy_ignite_wrapper(HSQUIRRELVM vm)
504 {
505   SQUserPointer data;
506   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
507     sq_throwerror(vm, _SC("'ignite' called without instance"));
508     return SQ_ERROR;
509   }
510   auto _this = reinterpret_cast<scripting::BadGuy*> (data);
511 
512   if (_this == nullptr) {
513     return SQ_ERROR;
514   }
515 
516 
517   try {
518     _this->ignite();
519 
520     return 0;
521 
522   } catch(std::exception& e) {
523     sq_throwerror(vm, e.what());
524     return SQ_ERROR;
525   } catch(...) {
526     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ignite'"));
527     return SQ_ERROR;
528   }
529 
530 }
531 
BadGuy_set_action_wrapper(HSQUIRRELVM vm)532 static SQInteger BadGuy_set_action_wrapper(HSQUIRRELVM vm)
533 {
534   SQUserPointer data;
535   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
536     sq_throwerror(vm, _SC("'set_action' called without instance"));
537     return SQ_ERROR;
538   }
539   auto _this = reinterpret_cast<scripting::BadGuy*> (data);
540 
541   if (_this == nullptr) {
542     return SQ_ERROR;
543   }
544 
545   const SQChar* arg0;
546   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
547     sq_throwerror(vm, _SC("Argument 1 not a string"));
548     return SQ_ERROR;
549   }
550   SQInteger arg1;
551   if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
552     sq_throwerror(vm, _SC("Argument 2 not an integer"));
553     return SQ_ERROR;
554   }
555 
556   try {
557     _this->set_action(arg0, static_cast<int> (arg1));
558 
559     return 0;
560 
561   } catch(std::exception& e) {
562     sq_throwerror(vm, e.what());
563     return SQ_ERROR;
564   } catch(...) {
565     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
566     return SQ_ERROR;
567   }
568 
569 }
570 
BadGuy_set_sprite_wrapper(HSQUIRRELVM vm)571 static SQInteger BadGuy_set_sprite_wrapper(HSQUIRRELVM vm)
572 {
573   SQUserPointer data;
574   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
575     sq_throwerror(vm, _SC("'set_sprite' called without instance"));
576     return SQ_ERROR;
577   }
578   auto _this = reinterpret_cast<scripting::BadGuy*> (data);
579 
580   if (_this == nullptr) {
581     return SQ_ERROR;
582   }
583 
584   const SQChar* arg0;
585   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
586     sq_throwerror(vm, _SC("Argument 1 not a string"));
587     return SQ_ERROR;
588   }
589 
590   try {
591     _this->set_sprite(arg0);
592 
593     return 0;
594 
595   } catch(std::exception& e) {
596     sq_throwerror(vm, e.what());
597     return SQ_ERROR;
598   } catch(...) {
599     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_sprite'"));
600     return SQ_ERROR;
601   }
602 
603 }
604 
Camera_release_hook(SQUserPointer ptr,SQInteger)605 static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger )
606 {
607   auto _this = reinterpret_cast<scripting::Camera*> (ptr);
608   delete _this;
609   return 0;
610 }
611 
Camera_reload_config_wrapper(HSQUIRRELVM vm)612 static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm)
613 {
614   SQUserPointer data;
615   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
616     sq_throwerror(vm, _SC("'reload_config' called without instance"));
617     return SQ_ERROR;
618   }
619   auto _this = reinterpret_cast<scripting::Camera*> (data);
620 
621   if (_this == nullptr) {
622     return SQ_ERROR;
623   }
624 
625 
626   try {
627     _this->reload_config();
628 
629     return 0;
630 
631   } catch(std::exception& e) {
632     sq_throwerror(vm, e.what());
633     return SQ_ERROR;
634   } catch(...) {
635     sq_throwerror(vm, _SC("Unexpected exception while executing function 'reload_config'"));
636     return SQ_ERROR;
637   }
638 
639 }
640 
Camera_shake_wrapper(HSQUIRRELVM vm)641 static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm)
642 {
643   SQUserPointer data;
644   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
645     sq_throwerror(vm, _SC("'shake' called without instance"));
646     return SQ_ERROR;
647   }
648   auto _this = reinterpret_cast<scripting::Camera*> (data);
649 
650   if (_this == nullptr) {
651     return SQ_ERROR;
652   }
653 
654   SQFloat arg0;
655   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
656     sq_throwerror(vm, _SC("Argument 1 not a float"));
657     return SQ_ERROR;
658   }
659   SQFloat arg1;
660   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
661     sq_throwerror(vm, _SC("Argument 2 not a float"));
662     return SQ_ERROR;
663   }
664   SQFloat arg2;
665   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
666     sq_throwerror(vm, _SC("Argument 3 not a float"));
667     return SQ_ERROR;
668   }
669 
670   try {
671     _this->shake(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
672 
673     return 0;
674 
675   } catch(std::exception& e) {
676     sq_throwerror(vm, e.what());
677     return SQ_ERROR;
678   } catch(...) {
679     sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'"));
680     return SQ_ERROR;
681   }
682 
683 }
684 
Camera_set_pos_wrapper(HSQUIRRELVM vm)685 static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm)
686 {
687   SQUserPointer data;
688   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
689     sq_throwerror(vm, _SC("'set_pos' called without instance"));
690     return SQ_ERROR;
691   }
692   auto _this = reinterpret_cast<scripting::Camera*> (data);
693 
694   if (_this == nullptr) {
695     return SQ_ERROR;
696   }
697 
698   SQFloat arg0;
699   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
700     sq_throwerror(vm, _SC("Argument 1 not a float"));
701     return SQ_ERROR;
702   }
703   SQFloat arg1;
704   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
705     sq_throwerror(vm, _SC("Argument 2 not a float"));
706     return SQ_ERROR;
707   }
708 
709   try {
710     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
711 
712     return 0;
713 
714   } catch(std::exception& e) {
715     sq_throwerror(vm, e.what());
716     return SQ_ERROR;
717   } catch(...) {
718     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
719     return SQ_ERROR;
720   }
721 
722 }
723 
Camera_set_mode_wrapper(HSQUIRRELVM vm)724 static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm)
725 {
726   SQUserPointer data;
727   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
728     sq_throwerror(vm, _SC("'set_mode' called without instance"));
729     return SQ_ERROR;
730   }
731   auto _this = reinterpret_cast<scripting::Camera*> (data);
732 
733   if (_this == nullptr) {
734     return SQ_ERROR;
735   }
736 
737   const SQChar* arg0;
738   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
739     sq_throwerror(vm, _SC("Argument 1 not a string"));
740     return SQ_ERROR;
741   }
742 
743   try {
744     _this->set_mode(arg0);
745 
746     return 0;
747 
748   } catch(std::exception& e) {
749     sq_throwerror(vm, e.what());
750     return SQ_ERROR;
751   } catch(...) {
752     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'"));
753     return SQ_ERROR;
754   }
755 
756 }
757 
Camera_scroll_to_wrapper(HSQUIRRELVM vm)758 static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm)
759 {
760   SQUserPointer data;
761   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
762     sq_throwerror(vm, _SC("'scroll_to' called without instance"));
763     return SQ_ERROR;
764   }
765   auto _this = reinterpret_cast<scripting::Camera*> (data);
766 
767   if (_this == nullptr) {
768     return SQ_ERROR;
769   }
770 
771   SQFloat arg0;
772   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
773     sq_throwerror(vm, _SC("Argument 1 not a float"));
774     return SQ_ERROR;
775   }
776   SQFloat arg1;
777   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
778     sq_throwerror(vm, _SC("Argument 2 not a float"));
779     return SQ_ERROR;
780   }
781   SQFloat arg2;
782   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
783     sq_throwerror(vm, _SC("Argument 3 not a float"));
784     return SQ_ERROR;
785   }
786 
787   try {
788     _this->scroll_to(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
789 
790     return 0;
791 
792   } catch(std::exception& e) {
793     sq_throwerror(vm, e.what());
794     return SQ_ERROR;
795   } catch(...) {
796     sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'"));
797     return SQ_ERROR;
798   }
799 
800 }
801 
Camera_get_current_scale_wrapper(HSQUIRRELVM vm)802 static SQInteger Camera_get_current_scale_wrapper(HSQUIRRELVM vm)
803 {
804   SQUserPointer data;
805   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
806     sq_throwerror(vm, _SC("'get_current_scale' called without instance"));
807     return SQ_ERROR;
808   }
809   auto _this = reinterpret_cast<scripting::Camera*> (data);
810 
811   if (_this == nullptr) {
812     return SQ_ERROR;
813   }
814 
815 
816   try {
817     float return_value = _this->get_current_scale();
818 
819     sq_pushfloat(vm, return_value);
820     return 1;
821 
822   } catch(std::exception& e) {
823     sq_throwerror(vm, e.what());
824     return SQ_ERROR;
825   } catch(...) {
826     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_current_scale'"));
827     return SQ_ERROR;
828   }
829 
830 }
831 
Camera_get_target_scale_wrapper(HSQUIRRELVM vm)832 static SQInteger Camera_get_target_scale_wrapper(HSQUIRRELVM vm)
833 {
834   SQUserPointer data;
835   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
836     sq_throwerror(vm, _SC("'get_target_scale' called without instance"));
837     return SQ_ERROR;
838   }
839   auto _this = reinterpret_cast<scripting::Camera*> (data);
840 
841   if (_this == nullptr) {
842     return SQ_ERROR;
843   }
844 
845 
846   try {
847     float return_value = _this->get_target_scale();
848 
849     sq_pushfloat(vm, return_value);
850     return 1;
851 
852   } catch(std::exception& e) {
853     sq_throwerror(vm, e.what());
854     return SQ_ERROR;
855   } catch(...) {
856     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_target_scale'"));
857     return SQ_ERROR;
858   }
859 
860 }
861 
Camera_set_scale_wrapper(HSQUIRRELVM vm)862 static SQInteger Camera_set_scale_wrapper(HSQUIRRELVM vm)
863 {
864   SQUserPointer data;
865   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
866     sq_throwerror(vm, _SC("'set_scale' called without instance"));
867     return SQ_ERROR;
868   }
869   auto _this = reinterpret_cast<scripting::Camera*> (data);
870 
871   if (_this == nullptr) {
872     return SQ_ERROR;
873   }
874 
875   SQFloat arg0;
876   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
877     sq_throwerror(vm, _SC("Argument 1 not a float"));
878     return SQ_ERROR;
879   }
880 
881   try {
882     _this->set_scale(static_cast<float> (arg0));
883 
884     return 0;
885 
886   } catch(std::exception& e) {
887     sq_throwerror(vm, e.what());
888     return SQ_ERROR;
889   } catch(...) {
890     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_scale'"));
891     return SQ_ERROR;
892   }
893 
894 }
895 
Camera_scale_wrapper(HSQUIRRELVM vm)896 static SQInteger Camera_scale_wrapper(HSQUIRRELVM vm)
897 {
898   SQUserPointer data;
899   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
900     sq_throwerror(vm, _SC("'scale' called without instance"));
901     return SQ_ERROR;
902   }
903   auto _this = reinterpret_cast<scripting::Camera*> (data);
904 
905   if (_this == nullptr) {
906     return SQ_ERROR;
907   }
908 
909   SQFloat arg0;
910   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
911     sq_throwerror(vm, _SC("Argument 1 not a float"));
912     return SQ_ERROR;
913   }
914   SQFloat arg1;
915   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
916     sq_throwerror(vm, _SC("Argument 2 not a float"));
917     return SQ_ERROR;
918   }
919 
920   try {
921     _this->scale(static_cast<float> (arg0), static_cast<float> (arg1));
922 
923     return 0;
924 
925   } catch(std::exception& e) {
926     sq_throwerror(vm, e.what());
927     return SQ_ERROR;
928   } catch(...) {
929     sq_throwerror(vm, _SC("Unexpected exception while executing function 'scale'"));
930     return SQ_ERROR;
931   }
932 
933 }
934 
Camera_ease_scale_wrapper(HSQUIRRELVM vm)935 static SQInteger Camera_ease_scale_wrapper(HSQUIRRELVM vm)
936 {
937   SQUserPointer data;
938   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
939     sq_throwerror(vm, _SC("'ease_scale' called without instance"));
940     return SQ_ERROR;
941   }
942   auto _this = reinterpret_cast<scripting::Camera*> (data);
943 
944   if (_this == nullptr) {
945     return SQ_ERROR;
946   }
947 
948   SQFloat arg0;
949   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
950     sq_throwerror(vm, _SC("Argument 1 not a float"));
951     return SQ_ERROR;
952   }
953   SQFloat arg1;
954   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
955     sq_throwerror(vm, _SC("Argument 2 not a float"));
956     return SQ_ERROR;
957   }
958   const SQChar* arg2;
959   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
960     sq_throwerror(vm, _SC("Argument 3 not a string"));
961     return SQ_ERROR;
962   }
963 
964   try {
965     _this->ease_scale(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
966 
967     return 0;
968 
969   } catch(std::exception& e) {
970     sq_throwerror(vm, e.what());
971     return SQ_ERROR;
972   } catch(...) {
973     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_scale'"));
974     return SQ_ERROR;
975   }
976 
977 }
978 
Candle_release_hook(SQUserPointer ptr,SQInteger)979 static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger )
980 {
981   auto _this = reinterpret_cast<scripting::Candle*> (ptr);
982   delete _this;
983   return 0;
984 }
985 
Candle_get_burning_wrapper(HSQUIRRELVM vm)986 static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm)
987 {
988   SQUserPointer data;
989   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
990     sq_throwerror(vm, _SC("'get_burning' called without instance"));
991     return SQ_ERROR;
992   }
993   auto _this = reinterpret_cast<scripting::Candle*> (data);
994 
995   if (_this == nullptr) {
996     return SQ_ERROR;
997   }
998 
999 
1000   try {
1001     bool return_value = _this->get_burning();
1002 
1003     sq_pushbool(vm, return_value);
1004     return 1;
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 'get_burning'"));
1011     return SQ_ERROR;
1012   }
1013 
1014 }
1015 
Candle_set_burning_wrapper(HSQUIRRELVM vm)1016 static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm)
1017 {
1018   SQUserPointer data;
1019   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1020     sq_throwerror(vm, _SC("'set_burning' called without instance"));
1021     return SQ_ERROR;
1022   }
1023   auto _this = reinterpret_cast<scripting::Candle*> (data);
1024 
1025   if (_this == nullptr) {
1026     return SQ_ERROR;
1027   }
1028 
1029   SQBool arg0;
1030   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1031     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1032     return SQ_ERROR;
1033   }
1034 
1035   try {
1036     _this->set_burning(arg0 == SQTrue);
1037 
1038     return 0;
1039 
1040   } catch(std::exception& e) {
1041     sq_throwerror(vm, e.what());
1042     return SQ_ERROR;
1043   } catch(...) {
1044     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
1045     return SQ_ERROR;
1046   }
1047 
1048 }
1049 
Clouds_release_hook(SQUserPointer ptr,SQInteger)1050 static SQInteger Clouds_release_hook(SQUserPointer ptr, SQInteger )
1051 {
1052   auto _this = reinterpret_cast<scripting::Clouds*> (ptr);
1053   delete _this;
1054   return 0;
1055 }
1056 
Clouds_set_enabled_wrapper(HSQUIRRELVM vm)1057 static SQInteger Clouds_set_enabled_wrapper(HSQUIRRELVM vm)
1058 {
1059   SQUserPointer data;
1060   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1061     sq_throwerror(vm, _SC("'set_enabled' called without instance"));
1062     return SQ_ERROR;
1063   }
1064   auto _this = reinterpret_cast<scripting::Clouds*> (data);
1065 
1066   if (_this == nullptr) {
1067     return SQ_ERROR;
1068   }
1069 
1070   SQBool arg0;
1071   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1072     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1073     return SQ_ERROR;
1074   }
1075 
1076   try {
1077     _this->set_enabled(arg0 == SQTrue);
1078 
1079     return 0;
1080 
1081   } catch(std::exception& e) {
1082     sq_throwerror(vm, e.what());
1083     return SQ_ERROR;
1084   } catch(...) {
1085     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'"));
1086     return SQ_ERROR;
1087   }
1088 
1089 }
1090 
Clouds_get_enabled_wrapper(HSQUIRRELVM vm)1091 static SQInteger Clouds_get_enabled_wrapper(HSQUIRRELVM vm)
1092 {
1093   SQUserPointer data;
1094   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1095     sq_throwerror(vm, _SC("'get_enabled' called without instance"));
1096     return SQ_ERROR;
1097   }
1098   auto _this = reinterpret_cast<scripting::Clouds*> (data);
1099 
1100   if (_this == nullptr) {
1101     return SQ_ERROR;
1102   }
1103 
1104 
1105   try {
1106     bool return_value = _this->get_enabled();
1107 
1108     sq_pushbool(vm, return_value);
1109     return 1;
1110 
1111   } catch(std::exception& e) {
1112     sq_throwerror(vm, e.what());
1113     return SQ_ERROR;
1114   } catch(...) {
1115     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'"));
1116     return SQ_ERROR;
1117   }
1118 
1119 }
1120 
Clouds_fade_speed_wrapper(HSQUIRRELVM vm)1121 static SQInteger Clouds_fade_speed_wrapper(HSQUIRRELVM vm)
1122 {
1123   SQUserPointer data;
1124   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1125     sq_throwerror(vm, _SC("'fade_speed' called without instance"));
1126     return SQ_ERROR;
1127   }
1128   auto _this = reinterpret_cast<scripting::Clouds*> (data);
1129 
1130   if (_this == nullptr) {
1131     return SQ_ERROR;
1132   }
1133 
1134   SQFloat arg0;
1135   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1136     sq_throwerror(vm, _SC("Argument 1 not a float"));
1137     return SQ_ERROR;
1138   }
1139   SQFloat arg1;
1140   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1141     sq_throwerror(vm, _SC("Argument 2 not a float"));
1142     return SQ_ERROR;
1143   }
1144 
1145   try {
1146     _this->fade_speed(static_cast<float> (arg0), static_cast<float> (arg1));
1147 
1148     return 0;
1149 
1150   } catch(std::exception& e) {
1151     sq_throwerror(vm, e.what());
1152     return SQ_ERROR;
1153   } catch(...) {
1154     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'"));
1155     return SQ_ERROR;
1156   }
1157 
1158 }
1159 
Clouds_fade_amount_wrapper(HSQUIRRELVM vm)1160 static SQInteger Clouds_fade_amount_wrapper(HSQUIRRELVM vm)
1161 {
1162   SQUserPointer data;
1163   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1164     sq_throwerror(vm, _SC("'fade_amount' called without instance"));
1165     return SQ_ERROR;
1166   }
1167   auto _this = reinterpret_cast<scripting::Clouds*> (data);
1168 
1169   if (_this == nullptr) {
1170     return SQ_ERROR;
1171   }
1172 
1173   SQInteger arg0;
1174   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1175     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1176     return SQ_ERROR;
1177   }
1178   SQFloat arg1;
1179   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1180     sq_throwerror(vm, _SC("Argument 2 not a float"));
1181     return SQ_ERROR;
1182   }
1183   SQFloat arg2;
1184   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
1185     sq_throwerror(vm, _SC("Argument 3 not a float"));
1186     return SQ_ERROR;
1187   }
1188 
1189   try {
1190     _this->fade_amount(static_cast<int> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
1191 
1192     return 0;
1193 
1194   } catch(std::exception& e) {
1195     sq_throwerror(vm, e.what());
1196     return SQ_ERROR;
1197   } catch(...) {
1198     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_amount'"));
1199     return SQ_ERROR;
1200   }
1201 
1202 }
1203 
Clouds_set_amount_wrapper(HSQUIRRELVM vm)1204 static SQInteger Clouds_set_amount_wrapper(HSQUIRRELVM vm)
1205 {
1206   SQUserPointer data;
1207   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1208     sq_throwerror(vm, _SC("'set_amount' called without instance"));
1209     return SQ_ERROR;
1210   }
1211   auto _this = reinterpret_cast<scripting::Clouds*> (data);
1212 
1213   if (_this == nullptr) {
1214     return SQ_ERROR;
1215   }
1216 
1217   SQInteger arg0;
1218   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1219     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1220     return SQ_ERROR;
1221   }
1222   SQFloat arg1;
1223   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1224     sq_throwerror(vm, _SC("Argument 2 not a float"));
1225     return SQ_ERROR;
1226   }
1227 
1228   try {
1229     _this->set_amount(static_cast<int> (arg0), static_cast<float> (arg1));
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 'set_amount'"));
1238     return SQ_ERROR;
1239   }
1240 
1241 }
1242 
CustomParticles_release_hook(SQUserPointer ptr,SQInteger)1243 static SQInteger CustomParticles_release_hook(SQUserPointer ptr, SQInteger )
1244 {
1245   auto _this = reinterpret_cast<scripting::CustomParticles*> (ptr);
1246   delete _this;
1247   return 0;
1248 }
1249 
CustomParticles_set_enabled_wrapper(HSQUIRRELVM vm)1250 static SQInteger CustomParticles_set_enabled_wrapper(HSQUIRRELVM vm)
1251 {
1252   SQUserPointer data;
1253   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1254     sq_throwerror(vm, _SC("'set_enabled' called without instance"));
1255     return SQ_ERROR;
1256   }
1257   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1258 
1259   if (_this == nullptr) {
1260     return SQ_ERROR;
1261   }
1262 
1263   SQBool arg0;
1264   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1265     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1266     return SQ_ERROR;
1267   }
1268 
1269   try {
1270     _this->set_enabled(arg0 == SQTrue);
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_enabled'"));
1279     return SQ_ERROR;
1280   }
1281 
1282 }
1283 
CustomParticles_get_enabled_wrapper(HSQUIRRELVM vm)1284 static SQInteger CustomParticles_get_enabled_wrapper(HSQUIRRELVM vm)
1285 {
1286   SQUserPointer data;
1287   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1288     sq_throwerror(vm, _SC("'get_enabled' called without instance"));
1289     return SQ_ERROR;
1290   }
1291   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1292 
1293   if (_this == nullptr) {
1294     return SQ_ERROR;
1295   }
1296 
1297 
1298   try {
1299     bool return_value = _this->get_enabled();
1300 
1301     sq_pushbool(vm, return_value);
1302     return 1;
1303 
1304   } catch(std::exception& e) {
1305     sq_throwerror(vm, e.what());
1306     return SQ_ERROR;
1307   } catch(...) {
1308     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'"));
1309     return SQ_ERROR;
1310   }
1311 
1312 }
1313 
CustomParticles_clear_wrapper(HSQUIRRELVM vm)1314 static SQInteger CustomParticles_clear_wrapper(HSQUIRRELVM vm)
1315 {
1316   SQUserPointer data;
1317   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1318     sq_throwerror(vm, _SC("'clear' called without instance"));
1319     return SQ_ERROR;
1320   }
1321   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1322 
1323   if (_this == nullptr) {
1324     return SQ_ERROR;
1325   }
1326 
1327 
1328   try {
1329     _this->clear();
1330 
1331     return 0;
1332 
1333   } catch(std::exception& e) {
1334     sq_throwerror(vm, e.what());
1335     return SQ_ERROR;
1336   } catch(...) {
1337     sq_throwerror(vm, _SC("Unexpected exception while executing function 'clear'"));
1338     return SQ_ERROR;
1339   }
1340 
1341 }
1342 
CustomParticles_spawn_particles_wrapper(HSQUIRRELVM vm)1343 static SQInteger CustomParticles_spawn_particles_wrapper(HSQUIRRELVM vm)
1344 {
1345   SQUserPointer data;
1346   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1347     sq_throwerror(vm, _SC("'spawn_particles' called without instance"));
1348     return SQ_ERROR;
1349   }
1350   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1351 
1352   if (_this == nullptr) {
1353     return SQ_ERROR;
1354   }
1355 
1356   SQInteger arg0;
1357   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1358     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1359     return SQ_ERROR;
1360   }
1361   SQBool arg1;
1362   if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
1363     sq_throwerror(vm, _SC("Argument 2 not a bool"));
1364     return SQ_ERROR;
1365   }
1366 
1367   try {
1368     _this->spawn_particles(static_cast<int> (arg0), arg1 == SQTrue);
1369 
1370     return 0;
1371 
1372   } catch(std::exception& e) {
1373     sq_throwerror(vm, e.what());
1374     return SQ_ERROR;
1375   } catch(...) {
1376     sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn_particles'"));
1377     return SQ_ERROR;
1378   }
1379 
1380 }
1381 
CustomParticles_get_max_amount_wrapper(HSQUIRRELVM vm)1382 static SQInteger CustomParticles_get_max_amount_wrapper(HSQUIRRELVM vm)
1383 {
1384   SQUserPointer data;
1385   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1386     sq_throwerror(vm, _SC("'get_max_amount' called without instance"));
1387     return SQ_ERROR;
1388   }
1389   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1390 
1391   if (_this == nullptr) {
1392     return SQ_ERROR;
1393   }
1394 
1395 
1396   try {
1397     int return_value = _this->get_max_amount();
1398 
1399     sq_pushinteger(vm, return_value);
1400     return 1;
1401 
1402   } catch(std::exception& e) {
1403     sq_throwerror(vm, e.what());
1404     return SQ_ERROR;
1405   } catch(...) {
1406     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_max_amount'"));
1407     return SQ_ERROR;
1408   }
1409 
1410 }
1411 
CustomParticles_set_max_amount_wrapper(HSQUIRRELVM vm)1412 static SQInteger CustomParticles_set_max_amount_wrapper(HSQUIRRELVM vm)
1413 {
1414   SQUserPointer data;
1415   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1416     sq_throwerror(vm, _SC("'set_max_amount' called without instance"));
1417     return SQ_ERROR;
1418   }
1419   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1420 
1421   if (_this == nullptr) {
1422     return SQ_ERROR;
1423   }
1424 
1425   SQInteger arg0;
1426   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
1427     sq_throwerror(vm, _SC("Argument 1 not an integer"));
1428     return SQ_ERROR;
1429   }
1430 
1431   try {
1432     _this->set_max_amount(static_cast<int> (arg0));
1433 
1434     return 0;
1435 
1436   } catch(std::exception& e) {
1437     sq_throwerror(vm, e.what());
1438     return SQ_ERROR;
1439   } catch(...) {
1440     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_max_amount'"));
1441     return SQ_ERROR;
1442   }
1443 
1444 }
1445 
CustomParticles_get_birth_mode_wrapper(HSQUIRRELVM vm)1446 static SQInteger CustomParticles_get_birth_mode_wrapper(HSQUIRRELVM vm)
1447 {
1448   SQUserPointer data;
1449   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1450     sq_throwerror(vm, _SC("'get_birth_mode' called without instance"));
1451     return SQ_ERROR;
1452   }
1453   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1454 
1455   if (_this == nullptr) {
1456     return SQ_ERROR;
1457   }
1458 
1459 
1460   try {
1461     std::string return_value = _this->get_birth_mode();
1462 
1463     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1464     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1465     return 1;
1466 
1467   } catch(std::exception& e) {
1468     sq_throwerror(vm, e.what());
1469     return SQ_ERROR;
1470   } catch(...) {
1471     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_mode'"));
1472     return SQ_ERROR;
1473   }
1474 
1475 }
1476 
CustomParticles_set_birth_mode_wrapper(HSQUIRRELVM vm)1477 static SQInteger CustomParticles_set_birth_mode_wrapper(HSQUIRRELVM vm)
1478 {
1479   SQUserPointer data;
1480   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1481     sq_throwerror(vm, _SC("'set_birth_mode' called without instance"));
1482     return SQ_ERROR;
1483   }
1484   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1485 
1486   if (_this == nullptr) {
1487     return SQ_ERROR;
1488   }
1489 
1490   const SQChar* arg0;
1491   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1492     sq_throwerror(vm, _SC("Argument 1 not a string"));
1493     return SQ_ERROR;
1494   }
1495 
1496   try {
1497     _this->set_birth_mode(arg0);
1498 
1499     return 0;
1500 
1501   } catch(std::exception& e) {
1502     sq_throwerror(vm, e.what());
1503     return SQ_ERROR;
1504   } catch(...) {
1505     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_mode'"));
1506     return SQ_ERROR;
1507   }
1508 
1509 }
1510 
CustomParticles_get_death_mode_wrapper(HSQUIRRELVM vm)1511 static SQInteger CustomParticles_get_death_mode_wrapper(HSQUIRRELVM vm)
1512 {
1513   SQUserPointer data;
1514   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1515     sq_throwerror(vm, _SC("'get_death_mode' called without instance"));
1516     return SQ_ERROR;
1517   }
1518   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1519 
1520   if (_this == nullptr) {
1521     return SQ_ERROR;
1522   }
1523 
1524 
1525   try {
1526     std::string return_value = _this->get_death_mode();
1527 
1528     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1529     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1530     return 1;
1531 
1532   } catch(std::exception& e) {
1533     sq_throwerror(vm, e.what());
1534     return SQ_ERROR;
1535   } catch(...) {
1536     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_mode'"));
1537     return SQ_ERROR;
1538   }
1539 
1540 }
1541 
CustomParticles_set_death_mode_wrapper(HSQUIRRELVM vm)1542 static SQInteger CustomParticles_set_death_mode_wrapper(HSQUIRRELVM vm)
1543 {
1544   SQUserPointer data;
1545   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1546     sq_throwerror(vm, _SC("'set_death_mode' called without instance"));
1547     return SQ_ERROR;
1548   }
1549   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1550 
1551   if (_this == nullptr) {
1552     return SQ_ERROR;
1553   }
1554 
1555   const SQChar* arg0;
1556   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1557     sq_throwerror(vm, _SC("Argument 1 not a string"));
1558     return SQ_ERROR;
1559   }
1560 
1561   try {
1562     _this->set_death_mode(arg0);
1563 
1564     return 0;
1565 
1566   } catch(std::exception& e) {
1567     sq_throwerror(vm, e.what());
1568     return SQ_ERROR;
1569   } catch(...) {
1570     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_mode'"));
1571     return SQ_ERROR;
1572   }
1573 
1574 }
1575 
CustomParticles_get_rotation_mode_wrapper(HSQUIRRELVM vm)1576 static SQInteger CustomParticles_get_rotation_mode_wrapper(HSQUIRRELVM vm)
1577 {
1578   SQUserPointer data;
1579   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1580     sq_throwerror(vm, _SC("'get_rotation_mode' called without instance"));
1581     return SQ_ERROR;
1582   }
1583   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1584 
1585   if (_this == nullptr) {
1586     return SQ_ERROR;
1587   }
1588 
1589 
1590   try {
1591     std::string return_value = _this->get_rotation_mode();
1592 
1593     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1594     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1595     return 1;
1596 
1597   } catch(std::exception& e) {
1598     sq_throwerror(vm, e.what());
1599     return SQ_ERROR;
1600   } catch(...) {
1601     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_mode'"));
1602     return SQ_ERROR;
1603   }
1604 
1605 }
1606 
CustomParticles_set_rotation_mode_wrapper(HSQUIRRELVM vm)1607 static SQInteger CustomParticles_set_rotation_mode_wrapper(HSQUIRRELVM vm)
1608 {
1609   SQUserPointer data;
1610   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1611     sq_throwerror(vm, _SC("'set_rotation_mode' called without instance"));
1612     return SQ_ERROR;
1613   }
1614   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1615 
1616   if (_this == nullptr) {
1617     return SQ_ERROR;
1618   }
1619 
1620   const SQChar* arg0;
1621   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1622     sq_throwerror(vm, _SC("Argument 1 not a string"));
1623     return SQ_ERROR;
1624   }
1625 
1626   try {
1627     _this->set_rotation_mode(arg0);
1628 
1629     return 0;
1630 
1631   } catch(std::exception& e) {
1632     sq_throwerror(vm, e.what());
1633     return SQ_ERROR;
1634   } catch(...) {
1635     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_mode'"));
1636     return SQ_ERROR;
1637   }
1638 
1639 }
1640 
CustomParticles_get_collision_mode_wrapper(HSQUIRRELVM vm)1641 static SQInteger CustomParticles_get_collision_mode_wrapper(HSQUIRRELVM vm)
1642 {
1643   SQUserPointer data;
1644   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1645     sq_throwerror(vm, _SC("'get_collision_mode' called without instance"));
1646     return SQ_ERROR;
1647   }
1648   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1649 
1650   if (_this == nullptr) {
1651     return SQ_ERROR;
1652   }
1653 
1654 
1655   try {
1656     std::string return_value = _this->get_collision_mode();
1657 
1658     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1659     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1660     return 1;
1661 
1662   } catch(std::exception& e) {
1663     sq_throwerror(vm, e.what());
1664     return SQ_ERROR;
1665   } catch(...) {
1666     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_collision_mode'"));
1667     return SQ_ERROR;
1668   }
1669 
1670 }
1671 
CustomParticles_set_collision_mode_wrapper(HSQUIRRELVM vm)1672 static SQInteger CustomParticles_set_collision_mode_wrapper(HSQUIRRELVM vm)
1673 {
1674   SQUserPointer data;
1675   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1676     sq_throwerror(vm, _SC("'set_collision_mode' called without instance"));
1677     return SQ_ERROR;
1678   }
1679   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1680 
1681   if (_this == nullptr) {
1682     return SQ_ERROR;
1683   }
1684 
1685   const SQChar* arg0;
1686   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1687     sq_throwerror(vm, _SC("Argument 1 not a string"));
1688     return SQ_ERROR;
1689   }
1690 
1691   try {
1692     _this->set_collision_mode(arg0);
1693 
1694     return 0;
1695 
1696   } catch(std::exception& e) {
1697     sq_throwerror(vm, e.what());
1698     return SQ_ERROR;
1699   } catch(...) {
1700     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_collision_mode'"));
1701     return SQ_ERROR;
1702   }
1703 
1704 }
1705 
CustomParticles_get_offscreen_mode_wrapper(HSQUIRRELVM vm)1706 static SQInteger CustomParticles_get_offscreen_mode_wrapper(HSQUIRRELVM vm)
1707 {
1708   SQUserPointer data;
1709   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1710     sq_throwerror(vm, _SC("'get_offscreen_mode' called without instance"));
1711     return SQ_ERROR;
1712   }
1713   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1714 
1715   if (_this == nullptr) {
1716     return SQ_ERROR;
1717   }
1718 
1719 
1720   try {
1721     std::string return_value = _this->get_offscreen_mode();
1722 
1723     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
1724     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
1725     return 1;
1726 
1727   } catch(std::exception& e) {
1728     sq_throwerror(vm, e.what());
1729     return SQ_ERROR;
1730   } catch(...) {
1731     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_offscreen_mode'"));
1732     return SQ_ERROR;
1733   }
1734 
1735 }
1736 
CustomParticles_set_offscreen_mode_wrapper(HSQUIRRELVM vm)1737 static SQInteger CustomParticles_set_offscreen_mode_wrapper(HSQUIRRELVM vm)
1738 {
1739   SQUserPointer data;
1740   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1741     sq_throwerror(vm, _SC("'set_offscreen_mode' called without instance"));
1742     return SQ_ERROR;
1743   }
1744   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1745 
1746   if (_this == nullptr) {
1747     return SQ_ERROR;
1748   }
1749 
1750   const SQChar* arg0;
1751   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
1752     sq_throwerror(vm, _SC("Argument 1 not a string"));
1753     return SQ_ERROR;
1754   }
1755 
1756   try {
1757     _this->set_offscreen_mode(arg0);
1758 
1759     return 0;
1760 
1761   } catch(std::exception& e) {
1762     sq_throwerror(vm, e.what());
1763     return SQ_ERROR;
1764   } catch(...) {
1765     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_offscreen_mode'"));
1766     return SQ_ERROR;
1767   }
1768 
1769 }
1770 
CustomParticles_get_cover_screen_wrapper(HSQUIRRELVM vm)1771 static SQInteger CustomParticles_get_cover_screen_wrapper(HSQUIRRELVM vm)
1772 {
1773   SQUserPointer data;
1774   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1775     sq_throwerror(vm, _SC("'get_cover_screen' called without instance"));
1776     return SQ_ERROR;
1777   }
1778   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1779 
1780   if (_this == nullptr) {
1781     return SQ_ERROR;
1782   }
1783 
1784 
1785   try {
1786     bool return_value = _this->get_cover_screen();
1787 
1788     sq_pushbool(vm, return_value);
1789     return 1;
1790 
1791   } catch(std::exception& e) {
1792     sq_throwerror(vm, e.what());
1793     return SQ_ERROR;
1794   } catch(...) {
1795     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_cover_screen'"));
1796     return SQ_ERROR;
1797   }
1798 
1799 }
1800 
CustomParticles_set_cover_screen_wrapper(HSQUIRRELVM vm)1801 static SQInteger CustomParticles_set_cover_screen_wrapper(HSQUIRRELVM vm)
1802 {
1803   SQUserPointer data;
1804   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1805     sq_throwerror(vm, _SC("'set_cover_screen' called without instance"));
1806     return SQ_ERROR;
1807   }
1808   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1809 
1810   if (_this == nullptr) {
1811     return SQ_ERROR;
1812   }
1813 
1814   SQBool arg0;
1815   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
1816     sq_throwerror(vm, _SC("Argument 1 not a bool"));
1817     return SQ_ERROR;
1818   }
1819 
1820   try {
1821     _this->set_cover_screen(arg0 == SQTrue);
1822 
1823     return 0;
1824 
1825   } catch(std::exception& e) {
1826     sq_throwerror(vm, e.what());
1827     return SQ_ERROR;
1828   } catch(...) {
1829     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_cover_screen'"));
1830     return SQ_ERROR;
1831   }
1832 
1833 }
1834 
CustomParticles_get_delay_wrapper(HSQUIRRELVM vm)1835 static SQInteger CustomParticles_get_delay_wrapper(HSQUIRRELVM vm)
1836 {
1837   SQUserPointer data;
1838   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1839     sq_throwerror(vm, _SC("'get_delay' called without instance"));
1840     return SQ_ERROR;
1841   }
1842   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1843 
1844   if (_this == nullptr) {
1845     return SQ_ERROR;
1846   }
1847 
1848 
1849   try {
1850     float return_value = _this->get_delay();
1851 
1852     sq_pushfloat(vm, return_value);
1853     return 1;
1854 
1855   } catch(std::exception& e) {
1856     sq_throwerror(vm, e.what());
1857     return SQ_ERROR;
1858   } catch(...) {
1859     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_delay'"));
1860     return SQ_ERROR;
1861   }
1862 
1863 }
1864 
CustomParticles_set_delay_wrapper(HSQUIRRELVM vm)1865 static SQInteger CustomParticles_set_delay_wrapper(HSQUIRRELVM vm)
1866 {
1867   SQUserPointer data;
1868   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1869     sq_throwerror(vm, _SC("'set_delay' called without instance"));
1870     return SQ_ERROR;
1871   }
1872   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1873 
1874   if (_this == nullptr) {
1875     return SQ_ERROR;
1876   }
1877 
1878   SQFloat arg0;
1879   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1880     sq_throwerror(vm, _SC("Argument 1 not a float"));
1881     return SQ_ERROR;
1882   }
1883 
1884   try {
1885     _this->set_delay(static_cast<float> (arg0));
1886 
1887     return 0;
1888 
1889   } catch(std::exception& e) {
1890     sq_throwerror(vm, e.what());
1891     return SQ_ERROR;
1892   } catch(...) {
1893     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_delay'"));
1894     return SQ_ERROR;
1895   }
1896 
1897 }
1898 
CustomParticles_fade_delay_wrapper(HSQUIRRELVM vm)1899 static SQInteger CustomParticles_fade_delay_wrapper(HSQUIRRELVM vm)
1900 {
1901   SQUserPointer data;
1902   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1903     sq_throwerror(vm, _SC("'fade_delay' called without instance"));
1904     return SQ_ERROR;
1905   }
1906   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1907 
1908   if (_this == nullptr) {
1909     return SQ_ERROR;
1910   }
1911 
1912   SQFloat arg0;
1913   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1914     sq_throwerror(vm, _SC("Argument 1 not a float"));
1915     return SQ_ERROR;
1916   }
1917   SQFloat arg1;
1918   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1919     sq_throwerror(vm, _SC("Argument 2 not a float"));
1920     return SQ_ERROR;
1921   }
1922 
1923   try {
1924     _this->fade_delay(static_cast<float> (arg0), static_cast<float> (arg1));
1925 
1926     return 0;
1927 
1928   } catch(std::exception& e) {
1929     sq_throwerror(vm, e.what());
1930     return SQ_ERROR;
1931   } catch(...) {
1932     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_delay'"));
1933     return SQ_ERROR;
1934   }
1935 
1936 }
1937 
CustomParticles_ease_delay_wrapper(HSQUIRRELVM vm)1938 static SQInteger CustomParticles_ease_delay_wrapper(HSQUIRRELVM vm)
1939 {
1940   SQUserPointer data;
1941   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1942     sq_throwerror(vm, _SC("'ease_delay' called without instance"));
1943     return SQ_ERROR;
1944   }
1945   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1946 
1947   if (_this == nullptr) {
1948     return SQ_ERROR;
1949   }
1950 
1951   SQFloat arg0;
1952   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
1953     sq_throwerror(vm, _SC("Argument 1 not a float"));
1954     return SQ_ERROR;
1955   }
1956   SQFloat arg1;
1957   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
1958     sq_throwerror(vm, _SC("Argument 2 not a float"));
1959     return SQ_ERROR;
1960   }
1961   const SQChar* arg2;
1962   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
1963     sq_throwerror(vm, _SC("Argument 3 not a string"));
1964     return SQ_ERROR;
1965   }
1966 
1967   try {
1968     _this->ease_delay(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
1969 
1970     return 0;
1971 
1972   } catch(std::exception& e) {
1973     sq_throwerror(vm, e.what());
1974     return SQ_ERROR;
1975   } catch(...) {
1976     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_delay'"));
1977     return SQ_ERROR;
1978   }
1979 
1980 }
1981 
CustomParticles_get_lifetime_wrapper(HSQUIRRELVM vm)1982 static SQInteger CustomParticles_get_lifetime_wrapper(HSQUIRRELVM vm)
1983 {
1984   SQUserPointer data;
1985   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
1986     sq_throwerror(vm, _SC("'get_lifetime' called without instance"));
1987     return SQ_ERROR;
1988   }
1989   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
1990 
1991   if (_this == nullptr) {
1992     return SQ_ERROR;
1993   }
1994 
1995 
1996   try {
1997     float return_value = _this->get_lifetime();
1998 
1999     sq_pushfloat(vm, return_value);
2000     return 1;
2001 
2002   } catch(std::exception& e) {
2003     sq_throwerror(vm, e.what());
2004     return SQ_ERROR;
2005   } catch(...) {
2006     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_lifetime'"));
2007     return SQ_ERROR;
2008   }
2009 
2010 }
2011 
CustomParticles_set_lifetime_wrapper(HSQUIRRELVM vm)2012 static SQInteger CustomParticles_set_lifetime_wrapper(HSQUIRRELVM vm)
2013 {
2014   SQUserPointer data;
2015   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2016     sq_throwerror(vm, _SC("'set_lifetime' called without instance"));
2017     return SQ_ERROR;
2018   }
2019   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2020 
2021   if (_this == nullptr) {
2022     return SQ_ERROR;
2023   }
2024 
2025   SQFloat arg0;
2026   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2027     sq_throwerror(vm, _SC("Argument 1 not a float"));
2028     return SQ_ERROR;
2029   }
2030 
2031   try {
2032     _this->set_lifetime(static_cast<float> (arg0));
2033 
2034     return 0;
2035 
2036   } catch(std::exception& e) {
2037     sq_throwerror(vm, e.what());
2038     return SQ_ERROR;
2039   } catch(...) {
2040     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_lifetime'"));
2041     return SQ_ERROR;
2042   }
2043 
2044 }
2045 
CustomParticles_fade_lifetime_wrapper(HSQUIRRELVM vm)2046 static SQInteger CustomParticles_fade_lifetime_wrapper(HSQUIRRELVM vm)
2047 {
2048   SQUserPointer data;
2049   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2050     sq_throwerror(vm, _SC("'fade_lifetime' called without instance"));
2051     return SQ_ERROR;
2052   }
2053   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2054 
2055   if (_this == nullptr) {
2056     return SQ_ERROR;
2057   }
2058 
2059   SQFloat arg0;
2060   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2061     sq_throwerror(vm, _SC("Argument 1 not a float"));
2062     return SQ_ERROR;
2063   }
2064   SQFloat arg1;
2065   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2066     sq_throwerror(vm, _SC("Argument 2 not a float"));
2067     return SQ_ERROR;
2068   }
2069 
2070   try {
2071     _this->fade_lifetime(static_cast<float> (arg0), static_cast<float> (arg1));
2072 
2073     return 0;
2074 
2075   } catch(std::exception& e) {
2076     sq_throwerror(vm, e.what());
2077     return SQ_ERROR;
2078   } catch(...) {
2079     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_lifetime'"));
2080     return SQ_ERROR;
2081   }
2082 
2083 }
2084 
CustomParticles_ease_lifetime_wrapper(HSQUIRRELVM vm)2085 static SQInteger CustomParticles_ease_lifetime_wrapper(HSQUIRRELVM vm)
2086 {
2087   SQUserPointer data;
2088   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2089     sq_throwerror(vm, _SC("'ease_lifetime' called without instance"));
2090     return SQ_ERROR;
2091   }
2092   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2093 
2094   if (_this == nullptr) {
2095     return SQ_ERROR;
2096   }
2097 
2098   SQFloat arg0;
2099   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2100     sq_throwerror(vm, _SC("Argument 1 not a float"));
2101     return SQ_ERROR;
2102   }
2103   SQFloat arg1;
2104   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2105     sq_throwerror(vm, _SC("Argument 2 not a float"));
2106     return SQ_ERROR;
2107   }
2108   const SQChar* arg2;
2109   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2110     sq_throwerror(vm, _SC("Argument 3 not a string"));
2111     return SQ_ERROR;
2112   }
2113 
2114   try {
2115     _this->ease_lifetime(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2116 
2117     return 0;
2118 
2119   } catch(std::exception& e) {
2120     sq_throwerror(vm, e.what());
2121     return SQ_ERROR;
2122   } catch(...) {
2123     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_lifetime'"));
2124     return SQ_ERROR;
2125   }
2126 
2127 }
2128 
CustomParticles_get_lifetime_variation_wrapper(HSQUIRRELVM vm)2129 static SQInteger CustomParticles_get_lifetime_variation_wrapper(HSQUIRRELVM vm)
2130 {
2131   SQUserPointer data;
2132   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2133     sq_throwerror(vm, _SC("'get_lifetime_variation' called without instance"));
2134     return SQ_ERROR;
2135   }
2136   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2137 
2138   if (_this == nullptr) {
2139     return SQ_ERROR;
2140   }
2141 
2142 
2143   try {
2144     float return_value = _this->get_lifetime_variation();
2145 
2146     sq_pushfloat(vm, return_value);
2147     return 1;
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 'get_lifetime_variation'"));
2154     return SQ_ERROR;
2155   }
2156 
2157 }
2158 
CustomParticles_set_lifetime_variation_wrapper(HSQUIRRELVM vm)2159 static SQInteger CustomParticles_set_lifetime_variation_wrapper(HSQUIRRELVM vm)
2160 {
2161   SQUserPointer data;
2162   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2163     sq_throwerror(vm, _SC("'set_lifetime_variation' called without instance"));
2164     return SQ_ERROR;
2165   }
2166   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2167 
2168   if (_this == nullptr) {
2169     return SQ_ERROR;
2170   }
2171 
2172   SQFloat arg0;
2173   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2174     sq_throwerror(vm, _SC("Argument 1 not a float"));
2175     return SQ_ERROR;
2176   }
2177 
2178   try {
2179     _this->set_lifetime_variation(static_cast<float> (arg0));
2180 
2181     return 0;
2182 
2183   } catch(std::exception& e) {
2184     sq_throwerror(vm, e.what());
2185     return SQ_ERROR;
2186   } catch(...) {
2187     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_lifetime_variation'"));
2188     return SQ_ERROR;
2189   }
2190 
2191 }
2192 
CustomParticles_fade_lifetime_variation_wrapper(HSQUIRRELVM vm)2193 static SQInteger CustomParticles_fade_lifetime_variation_wrapper(HSQUIRRELVM vm)
2194 {
2195   SQUserPointer data;
2196   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2197     sq_throwerror(vm, _SC("'fade_lifetime_variation' called without instance"));
2198     return SQ_ERROR;
2199   }
2200   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2201 
2202   if (_this == nullptr) {
2203     return SQ_ERROR;
2204   }
2205 
2206   SQFloat arg0;
2207   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2208     sq_throwerror(vm, _SC("Argument 1 not a float"));
2209     return SQ_ERROR;
2210   }
2211   SQFloat arg1;
2212   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2213     sq_throwerror(vm, _SC("Argument 2 not a float"));
2214     return SQ_ERROR;
2215   }
2216 
2217   try {
2218     _this->fade_lifetime_variation(static_cast<float> (arg0), static_cast<float> (arg1));
2219 
2220     return 0;
2221 
2222   } catch(std::exception& e) {
2223     sq_throwerror(vm, e.what());
2224     return SQ_ERROR;
2225   } catch(...) {
2226     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_lifetime_variation'"));
2227     return SQ_ERROR;
2228   }
2229 
2230 }
2231 
CustomParticles_ease_lifetime_variation_wrapper(HSQUIRRELVM vm)2232 static SQInteger CustomParticles_ease_lifetime_variation_wrapper(HSQUIRRELVM vm)
2233 {
2234   SQUserPointer data;
2235   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2236     sq_throwerror(vm, _SC("'ease_lifetime_variation' called without instance"));
2237     return SQ_ERROR;
2238   }
2239   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2240 
2241   if (_this == nullptr) {
2242     return SQ_ERROR;
2243   }
2244 
2245   SQFloat arg0;
2246   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2247     sq_throwerror(vm, _SC("Argument 1 not a float"));
2248     return SQ_ERROR;
2249   }
2250   SQFloat arg1;
2251   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2252     sq_throwerror(vm, _SC("Argument 2 not a float"));
2253     return SQ_ERROR;
2254   }
2255   const SQChar* arg2;
2256   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2257     sq_throwerror(vm, _SC("Argument 3 not a string"));
2258     return SQ_ERROR;
2259   }
2260 
2261   try {
2262     _this->ease_lifetime_variation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
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 'ease_lifetime_variation'"));
2271     return SQ_ERROR;
2272   }
2273 
2274 }
2275 
CustomParticles_get_birth_time_wrapper(HSQUIRRELVM vm)2276 static SQInteger CustomParticles_get_birth_time_wrapper(HSQUIRRELVM vm)
2277 {
2278   SQUserPointer data;
2279   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2280     sq_throwerror(vm, _SC("'get_birth_time' called without instance"));
2281     return SQ_ERROR;
2282   }
2283   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2284 
2285   if (_this == nullptr) {
2286     return SQ_ERROR;
2287   }
2288 
2289 
2290   try {
2291     float return_value = _this->get_birth_time();
2292 
2293     sq_pushfloat(vm, return_value);
2294     return 1;
2295 
2296   } catch(std::exception& e) {
2297     sq_throwerror(vm, e.what());
2298     return SQ_ERROR;
2299   } catch(...) {
2300     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_time'"));
2301     return SQ_ERROR;
2302   }
2303 
2304 }
2305 
CustomParticles_set_birth_time_wrapper(HSQUIRRELVM vm)2306 static SQInteger CustomParticles_set_birth_time_wrapper(HSQUIRRELVM vm)
2307 {
2308   SQUserPointer data;
2309   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2310     sq_throwerror(vm, _SC("'set_birth_time' called without instance"));
2311     return SQ_ERROR;
2312   }
2313   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2314 
2315   if (_this == nullptr) {
2316     return SQ_ERROR;
2317   }
2318 
2319   SQFloat arg0;
2320   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2321     sq_throwerror(vm, _SC("Argument 1 not a float"));
2322     return SQ_ERROR;
2323   }
2324 
2325   try {
2326     _this->set_birth_time(static_cast<float> (arg0));
2327 
2328     return 0;
2329 
2330   } catch(std::exception& e) {
2331     sq_throwerror(vm, e.what());
2332     return SQ_ERROR;
2333   } catch(...) {
2334     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_time'"));
2335     return SQ_ERROR;
2336   }
2337 
2338 }
2339 
CustomParticles_fade_birth_time_wrapper(HSQUIRRELVM vm)2340 static SQInteger CustomParticles_fade_birth_time_wrapper(HSQUIRRELVM vm)
2341 {
2342   SQUserPointer data;
2343   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2344     sq_throwerror(vm, _SC("'fade_birth_time' called without instance"));
2345     return SQ_ERROR;
2346   }
2347   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2348 
2349   if (_this == nullptr) {
2350     return SQ_ERROR;
2351   }
2352 
2353   SQFloat arg0;
2354   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2355     sq_throwerror(vm, _SC("Argument 1 not a float"));
2356     return SQ_ERROR;
2357   }
2358   SQFloat arg1;
2359   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2360     sq_throwerror(vm, _SC("Argument 2 not a float"));
2361     return SQ_ERROR;
2362   }
2363 
2364   try {
2365     _this->fade_birth_time(static_cast<float> (arg0), static_cast<float> (arg1));
2366 
2367     return 0;
2368 
2369   } catch(std::exception& e) {
2370     sq_throwerror(vm, e.what());
2371     return SQ_ERROR;
2372   } catch(...) {
2373     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_birth_time'"));
2374     return SQ_ERROR;
2375   }
2376 
2377 }
2378 
CustomParticles_ease_birth_time_wrapper(HSQUIRRELVM vm)2379 static SQInteger CustomParticles_ease_birth_time_wrapper(HSQUIRRELVM vm)
2380 {
2381   SQUserPointer data;
2382   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2383     sq_throwerror(vm, _SC("'ease_birth_time' called without instance"));
2384     return SQ_ERROR;
2385   }
2386   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2387 
2388   if (_this == nullptr) {
2389     return SQ_ERROR;
2390   }
2391 
2392   SQFloat arg0;
2393   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2394     sq_throwerror(vm, _SC("Argument 1 not a float"));
2395     return SQ_ERROR;
2396   }
2397   SQFloat arg1;
2398   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2399     sq_throwerror(vm, _SC("Argument 2 not a float"));
2400     return SQ_ERROR;
2401   }
2402   const SQChar* arg2;
2403   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2404     sq_throwerror(vm, _SC("Argument 3 not a string"));
2405     return SQ_ERROR;
2406   }
2407 
2408   try {
2409     _this->ease_birth_time(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2410 
2411     return 0;
2412 
2413   } catch(std::exception& e) {
2414     sq_throwerror(vm, e.what());
2415     return SQ_ERROR;
2416   } catch(...) {
2417     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_birth_time'"));
2418     return SQ_ERROR;
2419   }
2420 
2421 }
2422 
CustomParticles_get_birth_time_variation_wrapper(HSQUIRRELVM vm)2423 static SQInteger CustomParticles_get_birth_time_variation_wrapper(HSQUIRRELVM vm)
2424 {
2425   SQUserPointer data;
2426   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2427     sq_throwerror(vm, _SC("'get_birth_time_variation' called without instance"));
2428     return SQ_ERROR;
2429   }
2430   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2431 
2432   if (_this == nullptr) {
2433     return SQ_ERROR;
2434   }
2435 
2436 
2437   try {
2438     float return_value = _this->get_birth_time_variation();
2439 
2440     sq_pushfloat(vm, return_value);
2441     return 1;
2442 
2443   } catch(std::exception& e) {
2444     sq_throwerror(vm, e.what());
2445     return SQ_ERROR;
2446   } catch(...) {
2447     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_birth_time_variation'"));
2448     return SQ_ERROR;
2449   }
2450 
2451 }
2452 
CustomParticles_set_birth_time_variation_wrapper(HSQUIRRELVM vm)2453 static SQInteger CustomParticles_set_birth_time_variation_wrapper(HSQUIRRELVM vm)
2454 {
2455   SQUserPointer data;
2456   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2457     sq_throwerror(vm, _SC("'set_birth_time_variation' called without instance"));
2458     return SQ_ERROR;
2459   }
2460   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2461 
2462   if (_this == nullptr) {
2463     return SQ_ERROR;
2464   }
2465 
2466   SQFloat arg0;
2467   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2468     sq_throwerror(vm, _SC("Argument 1 not a float"));
2469     return SQ_ERROR;
2470   }
2471 
2472   try {
2473     _this->set_birth_time_variation(static_cast<float> (arg0));
2474 
2475     return 0;
2476 
2477   } catch(std::exception& e) {
2478     sq_throwerror(vm, e.what());
2479     return SQ_ERROR;
2480   } catch(...) {
2481     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_birth_time_variation'"));
2482     return SQ_ERROR;
2483   }
2484 
2485 }
2486 
CustomParticles_fade_birth_time_variation_wrapper(HSQUIRRELVM vm)2487 static SQInteger CustomParticles_fade_birth_time_variation_wrapper(HSQUIRRELVM vm)
2488 {
2489   SQUserPointer data;
2490   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2491     sq_throwerror(vm, _SC("'fade_birth_time_variation' called without instance"));
2492     return SQ_ERROR;
2493   }
2494   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2495 
2496   if (_this == nullptr) {
2497     return SQ_ERROR;
2498   }
2499 
2500   SQFloat arg0;
2501   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2502     sq_throwerror(vm, _SC("Argument 1 not a float"));
2503     return SQ_ERROR;
2504   }
2505   SQFloat arg1;
2506   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2507     sq_throwerror(vm, _SC("Argument 2 not a float"));
2508     return SQ_ERROR;
2509   }
2510 
2511   try {
2512     _this->fade_birth_time_variation(static_cast<float> (arg0), static_cast<float> (arg1));
2513 
2514     return 0;
2515 
2516   } catch(std::exception& e) {
2517     sq_throwerror(vm, e.what());
2518     return SQ_ERROR;
2519   } catch(...) {
2520     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_birth_time_variation'"));
2521     return SQ_ERROR;
2522   }
2523 
2524 }
2525 
CustomParticles_ease_birth_time_variation_wrapper(HSQUIRRELVM vm)2526 static SQInteger CustomParticles_ease_birth_time_variation_wrapper(HSQUIRRELVM vm)
2527 {
2528   SQUserPointer data;
2529   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2530     sq_throwerror(vm, _SC("'ease_birth_time_variation' called without instance"));
2531     return SQ_ERROR;
2532   }
2533   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2534 
2535   if (_this == nullptr) {
2536     return SQ_ERROR;
2537   }
2538 
2539   SQFloat arg0;
2540   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2541     sq_throwerror(vm, _SC("Argument 1 not a float"));
2542     return SQ_ERROR;
2543   }
2544   SQFloat arg1;
2545   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2546     sq_throwerror(vm, _SC("Argument 2 not a float"));
2547     return SQ_ERROR;
2548   }
2549   const SQChar* arg2;
2550   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2551     sq_throwerror(vm, _SC("Argument 3 not a string"));
2552     return SQ_ERROR;
2553   }
2554 
2555   try {
2556     _this->ease_birth_time_variation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2557 
2558     return 0;
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 'ease_birth_time_variation'"));
2565     return SQ_ERROR;
2566   }
2567 
2568 }
2569 
CustomParticles_get_death_time_wrapper(HSQUIRRELVM vm)2570 static SQInteger CustomParticles_get_death_time_wrapper(HSQUIRRELVM vm)
2571 {
2572   SQUserPointer data;
2573   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2574     sq_throwerror(vm, _SC("'get_death_time' called without instance"));
2575     return SQ_ERROR;
2576   }
2577   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2578 
2579   if (_this == nullptr) {
2580     return SQ_ERROR;
2581   }
2582 
2583 
2584   try {
2585     float return_value = _this->get_death_time();
2586 
2587     sq_pushfloat(vm, return_value);
2588     return 1;
2589 
2590   } catch(std::exception& e) {
2591     sq_throwerror(vm, e.what());
2592     return SQ_ERROR;
2593   } catch(...) {
2594     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_time'"));
2595     return SQ_ERROR;
2596   }
2597 
2598 }
2599 
CustomParticles_set_death_time_wrapper(HSQUIRRELVM vm)2600 static SQInteger CustomParticles_set_death_time_wrapper(HSQUIRRELVM vm)
2601 {
2602   SQUserPointer data;
2603   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2604     sq_throwerror(vm, _SC("'set_death_time' called without instance"));
2605     return SQ_ERROR;
2606   }
2607   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2608 
2609   if (_this == nullptr) {
2610     return SQ_ERROR;
2611   }
2612 
2613   SQFloat arg0;
2614   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2615     sq_throwerror(vm, _SC("Argument 1 not a float"));
2616     return SQ_ERROR;
2617   }
2618 
2619   try {
2620     _this->set_death_time(static_cast<float> (arg0));
2621 
2622     return 0;
2623 
2624   } catch(std::exception& e) {
2625     sq_throwerror(vm, e.what());
2626     return SQ_ERROR;
2627   } catch(...) {
2628     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_time'"));
2629     return SQ_ERROR;
2630   }
2631 
2632 }
2633 
CustomParticles_fade_death_time_wrapper(HSQUIRRELVM vm)2634 static SQInteger CustomParticles_fade_death_time_wrapper(HSQUIRRELVM vm)
2635 {
2636   SQUserPointer data;
2637   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2638     sq_throwerror(vm, _SC("'fade_death_time' called without instance"));
2639     return SQ_ERROR;
2640   }
2641   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2642 
2643   if (_this == nullptr) {
2644     return SQ_ERROR;
2645   }
2646 
2647   SQFloat arg0;
2648   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2649     sq_throwerror(vm, _SC("Argument 1 not a float"));
2650     return SQ_ERROR;
2651   }
2652   SQFloat arg1;
2653   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2654     sq_throwerror(vm, _SC("Argument 2 not a float"));
2655     return SQ_ERROR;
2656   }
2657 
2658   try {
2659     _this->fade_death_time(static_cast<float> (arg0), static_cast<float> (arg1));
2660 
2661     return 0;
2662 
2663   } catch(std::exception& e) {
2664     sq_throwerror(vm, e.what());
2665     return SQ_ERROR;
2666   } catch(...) {
2667     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_death_time'"));
2668     return SQ_ERROR;
2669   }
2670 
2671 }
2672 
CustomParticles_ease_death_time_wrapper(HSQUIRRELVM vm)2673 static SQInteger CustomParticles_ease_death_time_wrapper(HSQUIRRELVM vm)
2674 {
2675   SQUserPointer data;
2676   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2677     sq_throwerror(vm, _SC("'ease_death_time' called without instance"));
2678     return SQ_ERROR;
2679   }
2680   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2681 
2682   if (_this == nullptr) {
2683     return SQ_ERROR;
2684   }
2685 
2686   SQFloat arg0;
2687   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2688     sq_throwerror(vm, _SC("Argument 1 not a float"));
2689     return SQ_ERROR;
2690   }
2691   SQFloat arg1;
2692   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2693     sq_throwerror(vm, _SC("Argument 2 not a float"));
2694     return SQ_ERROR;
2695   }
2696   const SQChar* arg2;
2697   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2698     sq_throwerror(vm, _SC("Argument 3 not a string"));
2699     return SQ_ERROR;
2700   }
2701 
2702   try {
2703     _this->ease_death_time(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2704 
2705     return 0;
2706 
2707   } catch(std::exception& e) {
2708     sq_throwerror(vm, e.what());
2709     return SQ_ERROR;
2710   } catch(...) {
2711     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_death_time'"));
2712     return SQ_ERROR;
2713   }
2714 
2715 }
2716 
CustomParticles_get_death_time_variation_wrapper(HSQUIRRELVM vm)2717 static SQInteger CustomParticles_get_death_time_variation_wrapper(HSQUIRRELVM vm)
2718 {
2719   SQUserPointer data;
2720   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2721     sq_throwerror(vm, _SC("'get_death_time_variation' called without instance"));
2722     return SQ_ERROR;
2723   }
2724   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2725 
2726   if (_this == nullptr) {
2727     return SQ_ERROR;
2728   }
2729 
2730 
2731   try {
2732     float return_value = _this->get_death_time_variation();
2733 
2734     sq_pushfloat(vm, return_value);
2735     return 1;
2736 
2737   } catch(std::exception& e) {
2738     sq_throwerror(vm, e.what());
2739     return SQ_ERROR;
2740   } catch(...) {
2741     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_death_time_variation'"));
2742     return SQ_ERROR;
2743   }
2744 
2745 }
2746 
CustomParticles_set_death_time_variation_wrapper(HSQUIRRELVM vm)2747 static SQInteger CustomParticles_set_death_time_variation_wrapper(HSQUIRRELVM vm)
2748 {
2749   SQUserPointer data;
2750   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2751     sq_throwerror(vm, _SC("'set_death_time_variation' called without instance"));
2752     return SQ_ERROR;
2753   }
2754   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2755 
2756   if (_this == nullptr) {
2757     return SQ_ERROR;
2758   }
2759 
2760   SQFloat arg0;
2761   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2762     sq_throwerror(vm, _SC("Argument 1 not a float"));
2763     return SQ_ERROR;
2764   }
2765 
2766   try {
2767     _this->set_death_time_variation(static_cast<float> (arg0));
2768 
2769     return 0;
2770 
2771   } catch(std::exception& e) {
2772     sq_throwerror(vm, e.what());
2773     return SQ_ERROR;
2774   } catch(...) {
2775     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_death_time_variation'"));
2776     return SQ_ERROR;
2777   }
2778 
2779 }
2780 
CustomParticles_fade_death_time_variation_wrapper(HSQUIRRELVM vm)2781 static SQInteger CustomParticles_fade_death_time_variation_wrapper(HSQUIRRELVM vm)
2782 {
2783   SQUserPointer data;
2784   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2785     sq_throwerror(vm, _SC("'fade_death_time_variation' called without instance"));
2786     return SQ_ERROR;
2787   }
2788   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2789 
2790   if (_this == nullptr) {
2791     return SQ_ERROR;
2792   }
2793 
2794   SQFloat arg0;
2795   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2796     sq_throwerror(vm, _SC("Argument 1 not a float"));
2797     return SQ_ERROR;
2798   }
2799   SQFloat arg1;
2800   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2801     sq_throwerror(vm, _SC("Argument 2 not a float"));
2802     return SQ_ERROR;
2803   }
2804 
2805   try {
2806     _this->fade_death_time_variation(static_cast<float> (arg0), static_cast<float> (arg1));
2807 
2808     return 0;
2809 
2810   } catch(std::exception& e) {
2811     sq_throwerror(vm, e.what());
2812     return SQ_ERROR;
2813   } catch(...) {
2814     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_death_time_variation'"));
2815     return SQ_ERROR;
2816   }
2817 
2818 }
2819 
CustomParticles_ease_death_time_variation_wrapper(HSQUIRRELVM vm)2820 static SQInteger CustomParticles_ease_death_time_variation_wrapper(HSQUIRRELVM vm)
2821 {
2822   SQUserPointer data;
2823   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2824     sq_throwerror(vm, _SC("'ease_death_time_variation' called without instance"));
2825     return SQ_ERROR;
2826   }
2827   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2828 
2829   if (_this == nullptr) {
2830     return SQ_ERROR;
2831   }
2832 
2833   SQFloat arg0;
2834   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2835     sq_throwerror(vm, _SC("Argument 1 not a float"));
2836     return SQ_ERROR;
2837   }
2838   SQFloat arg1;
2839   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2840     sq_throwerror(vm, _SC("Argument 2 not a float"));
2841     return SQ_ERROR;
2842   }
2843   const SQChar* arg2;
2844   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2845     sq_throwerror(vm, _SC("Argument 3 not a string"));
2846     return SQ_ERROR;
2847   }
2848 
2849   try {
2850     _this->ease_death_time_variation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2851 
2852     return 0;
2853 
2854   } catch(std::exception& e) {
2855     sq_throwerror(vm, e.what());
2856     return SQ_ERROR;
2857   } catch(...) {
2858     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_death_time_variation'"));
2859     return SQ_ERROR;
2860   }
2861 
2862 }
2863 
CustomParticles_get_speed_x_wrapper(HSQUIRRELVM vm)2864 static SQInteger CustomParticles_get_speed_x_wrapper(HSQUIRRELVM vm)
2865 {
2866   SQUserPointer data;
2867   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2868     sq_throwerror(vm, _SC("'get_speed_x' called without instance"));
2869     return SQ_ERROR;
2870   }
2871   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2872 
2873   if (_this == nullptr) {
2874     return SQ_ERROR;
2875   }
2876 
2877 
2878   try {
2879     float return_value = _this->get_speed_x();
2880 
2881     sq_pushfloat(vm, return_value);
2882     return 1;
2883 
2884   } catch(std::exception& e) {
2885     sq_throwerror(vm, e.what());
2886     return SQ_ERROR;
2887   } catch(...) {
2888     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_x'"));
2889     return SQ_ERROR;
2890   }
2891 
2892 }
2893 
CustomParticles_set_speed_x_wrapper(HSQUIRRELVM vm)2894 static SQInteger CustomParticles_set_speed_x_wrapper(HSQUIRRELVM vm)
2895 {
2896   SQUserPointer data;
2897   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2898     sq_throwerror(vm, _SC("'set_speed_x' called without instance"));
2899     return SQ_ERROR;
2900   }
2901   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2902 
2903   if (_this == nullptr) {
2904     return SQ_ERROR;
2905   }
2906 
2907   SQFloat arg0;
2908   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2909     sq_throwerror(vm, _SC("Argument 1 not a float"));
2910     return SQ_ERROR;
2911   }
2912 
2913   try {
2914     _this->set_speed_x(static_cast<float> (arg0));
2915 
2916     return 0;
2917 
2918   } catch(std::exception& e) {
2919     sq_throwerror(vm, e.what());
2920     return SQ_ERROR;
2921   } catch(...) {
2922     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_x'"));
2923     return SQ_ERROR;
2924   }
2925 
2926 }
2927 
CustomParticles_fade_speed_x_wrapper(HSQUIRRELVM vm)2928 static SQInteger CustomParticles_fade_speed_x_wrapper(HSQUIRRELVM vm)
2929 {
2930   SQUserPointer data;
2931   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2932     sq_throwerror(vm, _SC("'fade_speed_x' called without instance"));
2933     return SQ_ERROR;
2934   }
2935   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2936 
2937   if (_this == nullptr) {
2938     return SQ_ERROR;
2939   }
2940 
2941   SQFloat arg0;
2942   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2943     sq_throwerror(vm, _SC("Argument 1 not a float"));
2944     return SQ_ERROR;
2945   }
2946   SQFloat arg1;
2947   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2948     sq_throwerror(vm, _SC("Argument 2 not a float"));
2949     return SQ_ERROR;
2950   }
2951 
2952   try {
2953     _this->fade_speed_x(static_cast<float> (arg0), static_cast<float> (arg1));
2954 
2955     return 0;
2956 
2957   } catch(std::exception& e) {
2958     sq_throwerror(vm, e.what());
2959     return SQ_ERROR;
2960   } catch(...) {
2961     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_x'"));
2962     return SQ_ERROR;
2963   }
2964 
2965 }
2966 
CustomParticles_ease_speed_x_wrapper(HSQUIRRELVM vm)2967 static SQInteger CustomParticles_ease_speed_x_wrapper(HSQUIRRELVM vm)
2968 {
2969   SQUserPointer data;
2970   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
2971     sq_throwerror(vm, _SC("'ease_speed_x' called without instance"));
2972     return SQ_ERROR;
2973   }
2974   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
2975 
2976   if (_this == nullptr) {
2977     return SQ_ERROR;
2978   }
2979 
2980   SQFloat arg0;
2981   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
2982     sq_throwerror(vm, _SC("Argument 1 not a float"));
2983     return SQ_ERROR;
2984   }
2985   SQFloat arg1;
2986   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
2987     sq_throwerror(vm, _SC("Argument 2 not a float"));
2988     return SQ_ERROR;
2989   }
2990   const SQChar* arg2;
2991   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
2992     sq_throwerror(vm, _SC("Argument 3 not a string"));
2993     return SQ_ERROR;
2994   }
2995 
2996   try {
2997     _this->ease_speed_x(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
2998 
2999     return 0;
3000 
3001   } catch(std::exception& e) {
3002     sq_throwerror(vm, e.what());
3003     return SQ_ERROR;
3004   } catch(...) {
3005     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_x'"));
3006     return SQ_ERROR;
3007   }
3008 
3009 }
3010 
CustomParticles_get_speed_y_wrapper(HSQUIRRELVM vm)3011 static SQInteger CustomParticles_get_speed_y_wrapper(HSQUIRRELVM vm)
3012 {
3013   SQUserPointer data;
3014   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3015     sq_throwerror(vm, _SC("'get_speed_y' called without instance"));
3016     return SQ_ERROR;
3017   }
3018   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3019 
3020   if (_this == nullptr) {
3021     return SQ_ERROR;
3022   }
3023 
3024 
3025   try {
3026     float return_value = _this->get_speed_y();
3027 
3028     sq_pushfloat(vm, return_value);
3029     return 1;
3030 
3031   } catch(std::exception& e) {
3032     sq_throwerror(vm, e.what());
3033     return SQ_ERROR;
3034   } catch(...) {
3035     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_y'"));
3036     return SQ_ERROR;
3037   }
3038 
3039 }
3040 
CustomParticles_set_speed_y_wrapper(HSQUIRRELVM vm)3041 static SQInteger CustomParticles_set_speed_y_wrapper(HSQUIRRELVM vm)
3042 {
3043   SQUserPointer data;
3044   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3045     sq_throwerror(vm, _SC("'set_speed_y' called without instance"));
3046     return SQ_ERROR;
3047   }
3048   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3049 
3050   if (_this == nullptr) {
3051     return SQ_ERROR;
3052   }
3053 
3054   SQFloat arg0;
3055   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3056     sq_throwerror(vm, _SC("Argument 1 not a float"));
3057     return SQ_ERROR;
3058   }
3059 
3060   try {
3061     _this->set_speed_y(static_cast<float> (arg0));
3062 
3063     return 0;
3064 
3065   } catch(std::exception& e) {
3066     sq_throwerror(vm, e.what());
3067     return SQ_ERROR;
3068   } catch(...) {
3069     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_y'"));
3070     return SQ_ERROR;
3071   }
3072 
3073 }
3074 
CustomParticles_fade_speed_y_wrapper(HSQUIRRELVM vm)3075 static SQInteger CustomParticles_fade_speed_y_wrapper(HSQUIRRELVM vm)
3076 {
3077   SQUserPointer data;
3078   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3079     sq_throwerror(vm, _SC("'fade_speed_y' called without instance"));
3080     return SQ_ERROR;
3081   }
3082   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3083 
3084   if (_this == nullptr) {
3085     return SQ_ERROR;
3086   }
3087 
3088   SQFloat arg0;
3089   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3090     sq_throwerror(vm, _SC("Argument 1 not a float"));
3091     return SQ_ERROR;
3092   }
3093   SQFloat arg1;
3094   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3095     sq_throwerror(vm, _SC("Argument 2 not a float"));
3096     return SQ_ERROR;
3097   }
3098 
3099   try {
3100     _this->fade_speed_y(static_cast<float> (arg0), static_cast<float> (arg1));
3101 
3102     return 0;
3103 
3104   } catch(std::exception& e) {
3105     sq_throwerror(vm, e.what());
3106     return SQ_ERROR;
3107   } catch(...) {
3108     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_y'"));
3109     return SQ_ERROR;
3110   }
3111 
3112 }
3113 
CustomParticles_ease_speed_y_wrapper(HSQUIRRELVM vm)3114 static SQInteger CustomParticles_ease_speed_y_wrapper(HSQUIRRELVM vm)
3115 {
3116   SQUserPointer data;
3117   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3118     sq_throwerror(vm, _SC("'ease_speed_y' called without instance"));
3119     return SQ_ERROR;
3120   }
3121   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3122 
3123   if (_this == nullptr) {
3124     return SQ_ERROR;
3125   }
3126 
3127   SQFloat arg0;
3128   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3129     sq_throwerror(vm, _SC("Argument 1 not a float"));
3130     return SQ_ERROR;
3131   }
3132   SQFloat arg1;
3133   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3134     sq_throwerror(vm, _SC("Argument 2 not a float"));
3135     return SQ_ERROR;
3136   }
3137   const SQChar* arg2;
3138   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3139     sq_throwerror(vm, _SC("Argument 3 not a string"));
3140     return SQ_ERROR;
3141   }
3142 
3143   try {
3144     _this->ease_speed_y(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3145 
3146     return 0;
3147 
3148   } catch(std::exception& e) {
3149     sq_throwerror(vm, e.what());
3150     return SQ_ERROR;
3151   } catch(...) {
3152     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_y'"));
3153     return SQ_ERROR;
3154   }
3155 
3156 }
3157 
CustomParticles_get_speed_variation_x_wrapper(HSQUIRRELVM vm)3158 static SQInteger CustomParticles_get_speed_variation_x_wrapper(HSQUIRRELVM vm)
3159 {
3160   SQUserPointer data;
3161   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3162     sq_throwerror(vm, _SC("'get_speed_variation_x' called without instance"));
3163     return SQ_ERROR;
3164   }
3165   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3166 
3167   if (_this == nullptr) {
3168     return SQ_ERROR;
3169   }
3170 
3171 
3172   try {
3173     float return_value = _this->get_speed_variation_x();
3174 
3175     sq_pushfloat(vm, return_value);
3176     return 1;
3177 
3178   } catch(std::exception& e) {
3179     sq_throwerror(vm, e.what());
3180     return SQ_ERROR;
3181   } catch(...) {
3182     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_variation_x'"));
3183     return SQ_ERROR;
3184   }
3185 
3186 }
3187 
CustomParticles_set_speed_variation_x_wrapper(HSQUIRRELVM vm)3188 static SQInteger CustomParticles_set_speed_variation_x_wrapper(HSQUIRRELVM vm)
3189 {
3190   SQUserPointer data;
3191   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3192     sq_throwerror(vm, _SC("'set_speed_variation_x' called without instance"));
3193     return SQ_ERROR;
3194   }
3195   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3196 
3197   if (_this == nullptr) {
3198     return SQ_ERROR;
3199   }
3200 
3201   SQFloat arg0;
3202   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3203     sq_throwerror(vm, _SC("Argument 1 not a float"));
3204     return SQ_ERROR;
3205   }
3206 
3207   try {
3208     _this->set_speed_variation_x(static_cast<float> (arg0));
3209 
3210     return 0;
3211 
3212   } catch(std::exception& e) {
3213     sq_throwerror(vm, e.what());
3214     return SQ_ERROR;
3215   } catch(...) {
3216     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_variation_x'"));
3217     return SQ_ERROR;
3218   }
3219 
3220 }
3221 
CustomParticles_fade_speed_variation_x_wrapper(HSQUIRRELVM vm)3222 static SQInteger CustomParticles_fade_speed_variation_x_wrapper(HSQUIRRELVM vm)
3223 {
3224   SQUserPointer data;
3225   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3226     sq_throwerror(vm, _SC("'fade_speed_variation_x' called without instance"));
3227     return SQ_ERROR;
3228   }
3229   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3230 
3231   if (_this == nullptr) {
3232     return SQ_ERROR;
3233   }
3234 
3235   SQFloat arg0;
3236   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3237     sq_throwerror(vm, _SC("Argument 1 not a float"));
3238     return SQ_ERROR;
3239   }
3240   SQFloat arg1;
3241   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3242     sq_throwerror(vm, _SC("Argument 2 not a float"));
3243     return SQ_ERROR;
3244   }
3245 
3246   try {
3247     _this->fade_speed_variation_x(static_cast<float> (arg0), static_cast<float> (arg1));
3248 
3249     return 0;
3250 
3251   } catch(std::exception& e) {
3252     sq_throwerror(vm, e.what());
3253     return SQ_ERROR;
3254   } catch(...) {
3255     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed_variation_x'"));
3256     return SQ_ERROR;
3257   }
3258 
3259 }
3260 
CustomParticles_ease_speed_variation_x_wrapper(HSQUIRRELVM vm)3261 static SQInteger CustomParticles_ease_speed_variation_x_wrapper(HSQUIRRELVM vm)
3262 {
3263   SQUserPointer data;
3264   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3265     sq_throwerror(vm, _SC("'ease_speed_variation_x' called without instance"));
3266     return SQ_ERROR;
3267   }
3268   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3269 
3270   if (_this == nullptr) {
3271     return SQ_ERROR;
3272   }
3273 
3274   SQFloat arg0;
3275   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3276     sq_throwerror(vm, _SC("Argument 1 not a float"));
3277     return SQ_ERROR;
3278   }
3279   SQFloat arg1;
3280   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3281     sq_throwerror(vm, _SC("Argument 2 not a float"));
3282     return SQ_ERROR;
3283   }
3284   const SQChar* arg2;
3285   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3286     sq_throwerror(vm, _SC("Argument 3 not a string"));
3287     return SQ_ERROR;
3288   }
3289 
3290   try {
3291     _this->ease_speed_variation_x(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3292 
3293     return 0;
3294 
3295   } catch(std::exception& e) {
3296     sq_throwerror(vm, e.what());
3297     return SQ_ERROR;
3298   } catch(...) {
3299     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_variation_x'"));
3300     return SQ_ERROR;
3301   }
3302 
3303 }
3304 
CustomParticles_get_speed_variation_y_wrapper(HSQUIRRELVM vm)3305 static SQInteger CustomParticles_get_speed_variation_y_wrapper(HSQUIRRELVM vm)
3306 {
3307   SQUserPointer data;
3308   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3309     sq_throwerror(vm, _SC("'get_speed_variation_y' called without instance"));
3310     return SQ_ERROR;
3311   }
3312   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3313 
3314   if (_this == nullptr) {
3315     return SQ_ERROR;
3316   }
3317 
3318 
3319   try {
3320     float return_value = _this->get_speed_variation_y();
3321 
3322     sq_pushfloat(vm, return_value);
3323     return 1;
3324 
3325   } catch(std::exception& e) {
3326     sq_throwerror(vm, e.what());
3327     return SQ_ERROR;
3328   } catch(...) {
3329     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_speed_variation_y'"));
3330     return SQ_ERROR;
3331   }
3332 
3333 }
3334 
CustomParticles_set_speed_variation_y_wrapper(HSQUIRRELVM vm)3335 static SQInteger CustomParticles_set_speed_variation_y_wrapper(HSQUIRRELVM vm)
3336 {
3337   SQUserPointer data;
3338   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3339     sq_throwerror(vm, _SC("'set_speed_variation_y' called without instance"));
3340     return SQ_ERROR;
3341   }
3342   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3343 
3344   if (_this == nullptr) {
3345     return SQ_ERROR;
3346   }
3347 
3348   SQFloat arg0;
3349   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3350     sq_throwerror(vm, _SC("Argument 1 not a float"));
3351     return SQ_ERROR;
3352   }
3353 
3354   try {
3355     _this->set_speed_variation_y(static_cast<float> (arg0));
3356 
3357     return 0;
3358 
3359   } catch(std::exception& e) {
3360     sq_throwerror(vm, e.what());
3361     return SQ_ERROR;
3362   } catch(...) {
3363     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed_variation_y'"));
3364     return SQ_ERROR;
3365   }
3366 
3367 }
3368 
CustomParticles_fade_speed_variation_y_wrapper(HSQUIRRELVM vm)3369 static SQInteger CustomParticles_fade_speed_variation_y_wrapper(HSQUIRRELVM vm)
3370 {
3371   SQUserPointer data;
3372   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3373     sq_throwerror(vm, _SC("'fade_speed_variation_y' called without instance"));
3374     return SQ_ERROR;
3375   }
3376   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3377 
3378   if (_this == nullptr) {
3379     return SQ_ERROR;
3380   }
3381 
3382   SQFloat arg0;
3383   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3384     sq_throwerror(vm, _SC("Argument 1 not a float"));
3385     return SQ_ERROR;
3386   }
3387   SQFloat arg1;
3388   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3389     sq_throwerror(vm, _SC("Argument 2 not a float"));
3390     return SQ_ERROR;
3391   }
3392 
3393   try {
3394     _this->fade_speed_variation_y(static_cast<float> (arg0), static_cast<float> (arg1));
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 'fade_speed_variation_y'"));
3403     return SQ_ERROR;
3404   }
3405 
3406 }
3407 
CustomParticles_ease_speed_variation_y_wrapper(HSQUIRRELVM vm)3408 static SQInteger CustomParticles_ease_speed_variation_y_wrapper(HSQUIRRELVM vm)
3409 {
3410   SQUserPointer data;
3411   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3412     sq_throwerror(vm, _SC("'ease_speed_variation_y' called without instance"));
3413     return SQ_ERROR;
3414   }
3415   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3416 
3417   if (_this == nullptr) {
3418     return SQ_ERROR;
3419   }
3420 
3421   SQFloat arg0;
3422   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3423     sq_throwerror(vm, _SC("Argument 1 not a float"));
3424     return SQ_ERROR;
3425   }
3426   SQFloat arg1;
3427   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3428     sq_throwerror(vm, _SC("Argument 2 not a float"));
3429     return SQ_ERROR;
3430   }
3431   const SQChar* arg2;
3432   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3433     sq_throwerror(vm, _SC("Argument 3 not a string"));
3434     return SQ_ERROR;
3435   }
3436 
3437   try {
3438     _this->ease_speed_variation_y(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3439 
3440     return 0;
3441 
3442   } catch(std::exception& e) {
3443     sq_throwerror(vm, e.what());
3444     return SQ_ERROR;
3445   } catch(...) {
3446     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed_variation_y'"));
3447     return SQ_ERROR;
3448   }
3449 
3450 }
3451 
CustomParticles_get_acceleration_x_wrapper(HSQUIRRELVM vm)3452 static SQInteger CustomParticles_get_acceleration_x_wrapper(HSQUIRRELVM vm)
3453 {
3454   SQUserPointer data;
3455   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3456     sq_throwerror(vm, _SC("'get_acceleration_x' called without instance"));
3457     return SQ_ERROR;
3458   }
3459   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3460 
3461   if (_this == nullptr) {
3462     return SQ_ERROR;
3463   }
3464 
3465 
3466   try {
3467     float return_value = _this->get_acceleration_x();
3468 
3469     sq_pushfloat(vm, return_value);
3470     return 1;
3471 
3472   } catch(std::exception& e) {
3473     sq_throwerror(vm, e.what());
3474     return SQ_ERROR;
3475   } catch(...) {
3476     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_acceleration_x'"));
3477     return SQ_ERROR;
3478   }
3479 
3480 }
3481 
CustomParticles_set_acceleration_x_wrapper(HSQUIRRELVM vm)3482 static SQInteger CustomParticles_set_acceleration_x_wrapper(HSQUIRRELVM vm)
3483 {
3484   SQUserPointer data;
3485   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3486     sq_throwerror(vm, _SC("'set_acceleration_x' called without instance"));
3487     return SQ_ERROR;
3488   }
3489   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3490 
3491   if (_this == nullptr) {
3492     return SQ_ERROR;
3493   }
3494 
3495   SQFloat arg0;
3496   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3497     sq_throwerror(vm, _SC("Argument 1 not a float"));
3498     return SQ_ERROR;
3499   }
3500 
3501   try {
3502     _this->set_acceleration_x(static_cast<float> (arg0));
3503 
3504     return 0;
3505 
3506   } catch(std::exception& e) {
3507     sq_throwerror(vm, e.what());
3508     return SQ_ERROR;
3509   } catch(...) {
3510     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_acceleration_x'"));
3511     return SQ_ERROR;
3512   }
3513 
3514 }
3515 
CustomParticles_fade_acceleration_x_wrapper(HSQUIRRELVM vm)3516 static SQInteger CustomParticles_fade_acceleration_x_wrapper(HSQUIRRELVM vm)
3517 {
3518   SQUserPointer data;
3519   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3520     sq_throwerror(vm, _SC("'fade_acceleration_x' called without instance"));
3521     return SQ_ERROR;
3522   }
3523   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3524 
3525   if (_this == nullptr) {
3526     return SQ_ERROR;
3527   }
3528 
3529   SQFloat arg0;
3530   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3531     sq_throwerror(vm, _SC("Argument 1 not a float"));
3532     return SQ_ERROR;
3533   }
3534   SQFloat arg1;
3535   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3536     sq_throwerror(vm, _SC("Argument 2 not a float"));
3537     return SQ_ERROR;
3538   }
3539 
3540   try {
3541     _this->fade_acceleration_x(static_cast<float> (arg0), static_cast<float> (arg1));
3542 
3543     return 0;
3544 
3545   } catch(std::exception& e) {
3546     sq_throwerror(vm, e.what());
3547     return SQ_ERROR;
3548   } catch(...) {
3549     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_acceleration_x'"));
3550     return SQ_ERROR;
3551   }
3552 
3553 }
3554 
CustomParticles_ease_acceleration_x_wrapper(HSQUIRRELVM vm)3555 static SQInteger CustomParticles_ease_acceleration_x_wrapper(HSQUIRRELVM vm)
3556 {
3557   SQUserPointer data;
3558   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3559     sq_throwerror(vm, _SC("'ease_acceleration_x' called without instance"));
3560     return SQ_ERROR;
3561   }
3562   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3563 
3564   if (_this == nullptr) {
3565     return SQ_ERROR;
3566   }
3567 
3568   SQFloat arg0;
3569   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3570     sq_throwerror(vm, _SC("Argument 1 not a float"));
3571     return SQ_ERROR;
3572   }
3573   SQFloat arg1;
3574   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3575     sq_throwerror(vm, _SC("Argument 2 not a float"));
3576     return SQ_ERROR;
3577   }
3578   const SQChar* arg2;
3579   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3580     sq_throwerror(vm, _SC("Argument 3 not a string"));
3581     return SQ_ERROR;
3582   }
3583 
3584   try {
3585     _this->ease_acceleration_x(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3586 
3587     return 0;
3588 
3589   } catch(std::exception& e) {
3590     sq_throwerror(vm, e.what());
3591     return SQ_ERROR;
3592   } catch(...) {
3593     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_acceleration_x'"));
3594     return SQ_ERROR;
3595   }
3596 
3597 }
3598 
CustomParticles_get_acceleration_y_wrapper(HSQUIRRELVM vm)3599 static SQInteger CustomParticles_get_acceleration_y_wrapper(HSQUIRRELVM vm)
3600 {
3601   SQUserPointer data;
3602   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3603     sq_throwerror(vm, _SC("'get_acceleration_y' called without instance"));
3604     return SQ_ERROR;
3605   }
3606   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3607 
3608   if (_this == nullptr) {
3609     return SQ_ERROR;
3610   }
3611 
3612 
3613   try {
3614     float return_value = _this->get_acceleration_y();
3615 
3616     sq_pushfloat(vm, return_value);
3617     return 1;
3618 
3619   } catch(std::exception& e) {
3620     sq_throwerror(vm, e.what());
3621     return SQ_ERROR;
3622   } catch(...) {
3623     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_acceleration_y'"));
3624     return SQ_ERROR;
3625   }
3626 
3627 }
3628 
CustomParticles_set_acceleration_y_wrapper(HSQUIRRELVM vm)3629 static SQInteger CustomParticles_set_acceleration_y_wrapper(HSQUIRRELVM vm)
3630 {
3631   SQUserPointer data;
3632   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3633     sq_throwerror(vm, _SC("'set_acceleration_y' called without instance"));
3634     return SQ_ERROR;
3635   }
3636   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3637 
3638   if (_this == nullptr) {
3639     return SQ_ERROR;
3640   }
3641 
3642   SQFloat arg0;
3643   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3644     sq_throwerror(vm, _SC("Argument 1 not a float"));
3645     return SQ_ERROR;
3646   }
3647 
3648   try {
3649     _this->set_acceleration_y(static_cast<float> (arg0));
3650 
3651     return 0;
3652 
3653   } catch(std::exception& e) {
3654     sq_throwerror(vm, e.what());
3655     return SQ_ERROR;
3656   } catch(...) {
3657     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_acceleration_y'"));
3658     return SQ_ERROR;
3659   }
3660 
3661 }
3662 
CustomParticles_fade_acceleration_y_wrapper(HSQUIRRELVM vm)3663 static SQInteger CustomParticles_fade_acceleration_y_wrapper(HSQUIRRELVM vm)
3664 {
3665   SQUserPointer data;
3666   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3667     sq_throwerror(vm, _SC("'fade_acceleration_y' called without instance"));
3668     return SQ_ERROR;
3669   }
3670   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3671 
3672   if (_this == nullptr) {
3673     return SQ_ERROR;
3674   }
3675 
3676   SQFloat arg0;
3677   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3678     sq_throwerror(vm, _SC("Argument 1 not a float"));
3679     return SQ_ERROR;
3680   }
3681   SQFloat arg1;
3682   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3683     sq_throwerror(vm, _SC("Argument 2 not a float"));
3684     return SQ_ERROR;
3685   }
3686 
3687   try {
3688     _this->fade_acceleration_y(static_cast<float> (arg0), static_cast<float> (arg1));
3689 
3690     return 0;
3691 
3692   } catch(std::exception& e) {
3693     sq_throwerror(vm, e.what());
3694     return SQ_ERROR;
3695   } catch(...) {
3696     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_acceleration_y'"));
3697     return SQ_ERROR;
3698   }
3699 
3700 }
3701 
CustomParticles_ease_acceleration_y_wrapper(HSQUIRRELVM vm)3702 static SQInteger CustomParticles_ease_acceleration_y_wrapper(HSQUIRRELVM vm)
3703 {
3704   SQUserPointer data;
3705   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3706     sq_throwerror(vm, _SC("'ease_acceleration_y' called without instance"));
3707     return SQ_ERROR;
3708   }
3709   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3710 
3711   if (_this == nullptr) {
3712     return SQ_ERROR;
3713   }
3714 
3715   SQFloat arg0;
3716   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3717     sq_throwerror(vm, _SC("Argument 1 not a float"));
3718     return SQ_ERROR;
3719   }
3720   SQFloat arg1;
3721   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3722     sq_throwerror(vm, _SC("Argument 2 not a float"));
3723     return SQ_ERROR;
3724   }
3725   const SQChar* arg2;
3726   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3727     sq_throwerror(vm, _SC("Argument 3 not a string"));
3728     return SQ_ERROR;
3729   }
3730 
3731   try {
3732     _this->ease_acceleration_y(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3733 
3734     return 0;
3735 
3736   } catch(std::exception& e) {
3737     sq_throwerror(vm, e.what());
3738     return SQ_ERROR;
3739   } catch(...) {
3740     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_acceleration_y'"));
3741     return SQ_ERROR;
3742   }
3743 
3744 }
3745 
CustomParticles_get_friction_x_wrapper(HSQUIRRELVM vm)3746 static SQInteger CustomParticles_get_friction_x_wrapper(HSQUIRRELVM vm)
3747 {
3748   SQUserPointer data;
3749   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3750     sq_throwerror(vm, _SC("'get_friction_x' called without instance"));
3751     return SQ_ERROR;
3752   }
3753   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3754 
3755   if (_this == nullptr) {
3756     return SQ_ERROR;
3757   }
3758 
3759 
3760   try {
3761     float return_value = _this->get_friction_x();
3762 
3763     sq_pushfloat(vm, return_value);
3764     return 1;
3765 
3766   } catch(std::exception& e) {
3767     sq_throwerror(vm, e.what());
3768     return SQ_ERROR;
3769   } catch(...) {
3770     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_friction_x'"));
3771     return SQ_ERROR;
3772   }
3773 
3774 }
3775 
CustomParticles_set_friction_x_wrapper(HSQUIRRELVM vm)3776 static SQInteger CustomParticles_set_friction_x_wrapper(HSQUIRRELVM vm)
3777 {
3778   SQUserPointer data;
3779   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3780     sq_throwerror(vm, _SC("'set_friction_x' called without instance"));
3781     return SQ_ERROR;
3782   }
3783   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3784 
3785   if (_this == nullptr) {
3786     return SQ_ERROR;
3787   }
3788 
3789   SQFloat arg0;
3790   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3791     sq_throwerror(vm, _SC("Argument 1 not a float"));
3792     return SQ_ERROR;
3793   }
3794 
3795   try {
3796     _this->set_friction_x(static_cast<float> (arg0));
3797 
3798     return 0;
3799 
3800   } catch(std::exception& e) {
3801     sq_throwerror(vm, e.what());
3802     return SQ_ERROR;
3803   } catch(...) {
3804     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_friction_x'"));
3805     return SQ_ERROR;
3806   }
3807 
3808 }
3809 
CustomParticles_fade_friction_x_wrapper(HSQUIRRELVM vm)3810 static SQInteger CustomParticles_fade_friction_x_wrapper(HSQUIRRELVM vm)
3811 {
3812   SQUserPointer data;
3813   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3814     sq_throwerror(vm, _SC("'fade_friction_x' called without instance"));
3815     return SQ_ERROR;
3816   }
3817   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3818 
3819   if (_this == nullptr) {
3820     return SQ_ERROR;
3821   }
3822 
3823   SQFloat arg0;
3824   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3825     sq_throwerror(vm, _SC("Argument 1 not a float"));
3826     return SQ_ERROR;
3827   }
3828   SQFloat arg1;
3829   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3830     sq_throwerror(vm, _SC("Argument 2 not a float"));
3831     return SQ_ERROR;
3832   }
3833 
3834   try {
3835     _this->fade_friction_x(static_cast<float> (arg0), static_cast<float> (arg1));
3836 
3837     return 0;
3838 
3839   } catch(std::exception& e) {
3840     sq_throwerror(vm, e.what());
3841     return SQ_ERROR;
3842   } catch(...) {
3843     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_friction_x'"));
3844     return SQ_ERROR;
3845   }
3846 
3847 }
3848 
CustomParticles_ease_friction_x_wrapper(HSQUIRRELVM vm)3849 static SQInteger CustomParticles_ease_friction_x_wrapper(HSQUIRRELVM vm)
3850 {
3851   SQUserPointer data;
3852   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3853     sq_throwerror(vm, _SC("'ease_friction_x' called without instance"));
3854     return SQ_ERROR;
3855   }
3856   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3857 
3858   if (_this == nullptr) {
3859     return SQ_ERROR;
3860   }
3861 
3862   SQFloat arg0;
3863   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3864     sq_throwerror(vm, _SC("Argument 1 not a float"));
3865     return SQ_ERROR;
3866   }
3867   SQFloat arg1;
3868   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3869     sq_throwerror(vm, _SC("Argument 2 not a float"));
3870     return SQ_ERROR;
3871   }
3872   const SQChar* arg2;
3873   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
3874     sq_throwerror(vm, _SC("Argument 3 not a string"));
3875     return SQ_ERROR;
3876   }
3877 
3878   try {
3879     _this->ease_friction_x(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
3880 
3881     return 0;
3882 
3883   } catch(std::exception& e) {
3884     sq_throwerror(vm, e.what());
3885     return SQ_ERROR;
3886   } catch(...) {
3887     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_friction_x'"));
3888     return SQ_ERROR;
3889   }
3890 
3891 }
3892 
CustomParticles_get_friction_y_wrapper(HSQUIRRELVM vm)3893 static SQInteger CustomParticles_get_friction_y_wrapper(HSQUIRRELVM vm)
3894 {
3895   SQUserPointer data;
3896   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3897     sq_throwerror(vm, _SC("'get_friction_y' called without instance"));
3898     return SQ_ERROR;
3899   }
3900   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3901 
3902   if (_this == nullptr) {
3903     return SQ_ERROR;
3904   }
3905 
3906 
3907   try {
3908     float return_value = _this->get_friction_y();
3909 
3910     sq_pushfloat(vm, return_value);
3911     return 1;
3912 
3913   } catch(std::exception& e) {
3914     sq_throwerror(vm, e.what());
3915     return SQ_ERROR;
3916   } catch(...) {
3917     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_friction_y'"));
3918     return SQ_ERROR;
3919   }
3920 
3921 }
3922 
CustomParticles_set_friction_y_wrapper(HSQUIRRELVM vm)3923 static SQInteger CustomParticles_set_friction_y_wrapper(HSQUIRRELVM vm)
3924 {
3925   SQUserPointer data;
3926   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3927     sq_throwerror(vm, _SC("'set_friction_y' called without instance"));
3928     return SQ_ERROR;
3929   }
3930   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3931 
3932   if (_this == nullptr) {
3933     return SQ_ERROR;
3934   }
3935 
3936   SQFloat arg0;
3937   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3938     sq_throwerror(vm, _SC("Argument 1 not a float"));
3939     return SQ_ERROR;
3940   }
3941 
3942   try {
3943     _this->set_friction_y(static_cast<float> (arg0));
3944 
3945     return 0;
3946 
3947   } catch(std::exception& e) {
3948     sq_throwerror(vm, e.what());
3949     return SQ_ERROR;
3950   } catch(...) {
3951     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_friction_y'"));
3952     return SQ_ERROR;
3953   }
3954 
3955 }
3956 
CustomParticles_fade_friction_y_wrapper(HSQUIRRELVM vm)3957 static SQInteger CustomParticles_fade_friction_y_wrapper(HSQUIRRELVM vm)
3958 {
3959   SQUserPointer data;
3960   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
3961     sq_throwerror(vm, _SC("'fade_friction_y' called without instance"));
3962     return SQ_ERROR;
3963   }
3964   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
3965 
3966   if (_this == nullptr) {
3967     return SQ_ERROR;
3968   }
3969 
3970   SQFloat arg0;
3971   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
3972     sq_throwerror(vm, _SC("Argument 1 not a float"));
3973     return SQ_ERROR;
3974   }
3975   SQFloat arg1;
3976   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
3977     sq_throwerror(vm, _SC("Argument 2 not a float"));
3978     return SQ_ERROR;
3979   }
3980 
3981   try {
3982     _this->fade_friction_y(static_cast<float> (arg0), static_cast<float> (arg1));
3983 
3984     return 0;
3985 
3986   } catch(std::exception& e) {
3987     sq_throwerror(vm, e.what());
3988     return SQ_ERROR;
3989   } catch(...) {
3990     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_friction_y'"));
3991     return SQ_ERROR;
3992   }
3993 
3994 }
3995 
CustomParticles_ease_friction_y_wrapper(HSQUIRRELVM vm)3996 static SQInteger CustomParticles_ease_friction_y_wrapper(HSQUIRRELVM vm)
3997 {
3998   SQUserPointer data;
3999   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4000     sq_throwerror(vm, _SC("'ease_friction_y' called without instance"));
4001     return SQ_ERROR;
4002   }
4003   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4004 
4005   if (_this == nullptr) {
4006     return SQ_ERROR;
4007   }
4008 
4009   SQFloat arg0;
4010   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4011     sq_throwerror(vm, _SC("Argument 1 not a float"));
4012     return SQ_ERROR;
4013   }
4014   SQFloat arg1;
4015   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4016     sq_throwerror(vm, _SC("Argument 2 not a float"));
4017     return SQ_ERROR;
4018   }
4019   const SQChar* arg2;
4020   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4021     sq_throwerror(vm, _SC("Argument 3 not a string"));
4022     return SQ_ERROR;
4023   }
4024 
4025   try {
4026     _this->ease_friction_y(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4027 
4028     return 0;
4029 
4030   } catch(std::exception& e) {
4031     sq_throwerror(vm, e.what());
4032     return SQ_ERROR;
4033   } catch(...) {
4034     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_friction_y'"));
4035     return SQ_ERROR;
4036   }
4037 
4038 }
4039 
CustomParticles_get_feather_factor_wrapper(HSQUIRRELVM vm)4040 static SQInteger CustomParticles_get_feather_factor_wrapper(HSQUIRRELVM vm)
4041 {
4042   SQUserPointer data;
4043   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4044     sq_throwerror(vm, _SC("'get_feather_factor' called without instance"));
4045     return SQ_ERROR;
4046   }
4047   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4048 
4049   if (_this == nullptr) {
4050     return SQ_ERROR;
4051   }
4052 
4053 
4054   try {
4055     float return_value = _this->get_feather_factor();
4056 
4057     sq_pushfloat(vm, return_value);
4058     return 1;
4059 
4060   } catch(std::exception& e) {
4061     sq_throwerror(vm, e.what());
4062     return SQ_ERROR;
4063   } catch(...) {
4064     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_feather_factor'"));
4065     return SQ_ERROR;
4066   }
4067 
4068 }
4069 
CustomParticles_set_feather_factor_wrapper(HSQUIRRELVM vm)4070 static SQInteger CustomParticles_set_feather_factor_wrapper(HSQUIRRELVM vm)
4071 {
4072   SQUserPointer data;
4073   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4074     sq_throwerror(vm, _SC("'set_feather_factor' called without instance"));
4075     return SQ_ERROR;
4076   }
4077   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4078 
4079   if (_this == nullptr) {
4080     return SQ_ERROR;
4081   }
4082 
4083   SQFloat arg0;
4084   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4085     sq_throwerror(vm, _SC("Argument 1 not a float"));
4086     return SQ_ERROR;
4087   }
4088 
4089   try {
4090     _this->set_feather_factor(static_cast<float> (arg0));
4091 
4092     return 0;
4093 
4094   } catch(std::exception& e) {
4095     sq_throwerror(vm, e.what());
4096     return SQ_ERROR;
4097   } catch(...) {
4098     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_feather_factor'"));
4099     return SQ_ERROR;
4100   }
4101 
4102 }
4103 
CustomParticles_fade_feather_factor_wrapper(HSQUIRRELVM vm)4104 static SQInteger CustomParticles_fade_feather_factor_wrapper(HSQUIRRELVM vm)
4105 {
4106   SQUserPointer data;
4107   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4108     sq_throwerror(vm, _SC("'fade_feather_factor' called without instance"));
4109     return SQ_ERROR;
4110   }
4111   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4112 
4113   if (_this == nullptr) {
4114     return SQ_ERROR;
4115   }
4116 
4117   SQFloat arg0;
4118   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4119     sq_throwerror(vm, _SC("Argument 1 not a float"));
4120     return SQ_ERROR;
4121   }
4122   SQFloat arg1;
4123   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4124     sq_throwerror(vm, _SC("Argument 2 not a float"));
4125     return SQ_ERROR;
4126   }
4127 
4128   try {
4129     _this->fade_feather_factor(static_cast<float> (arg0), static_cast<float> (arg1));
4130 
4131     return 0;
4132 
4133   } catch(std::exception& e) {
4134     sq_throwerror(vm, e.what());
4135     return SQ_ERROR;
4136   } catch(...) {
4137     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_feather_factor'"));
4138     return SQ_ERROR;
4139   }
4140 
4141 }
4142 
CustomParticles_ease_feather_factor_wrapper(HSQUIRRELVM vm)4143 static SQInteger CustomParticles_ease_feather_factor_wrapper(HSQUIRRELVM vm)
4144 {
4145   SQUserPointer data;
4146   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4147     sq_throwerror(vm, _SC("'ease_feather_factor' called without instance"));
4148     return SQ_ERROR;
4149   }
4150   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4151 
4152   if (_this == nullptr) {
4153     return SQ_ERROR;
4154   }
4155 
4156   SQFloat arg0;
4157   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4158     sq_throwerror(vm, _SC("Argument 1 not a float"));
4159     return SQ_ERROR;
4160   }
4161   SQFloat arg1;
4162   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4163     sq_throwerror(vm, _SC("Argument 2 not a float"));
4164     return SQ_ERROR;
4165   }
4166   const SQChar* arg2;
4167   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4168     sq_throwerror(vm, _SC("Argument 3 not a string"));
4169     return SQ_ERROR;
4170   }
4171 
4172   try {
4173     _this->ease_feather_factor(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4174 
4175     return 0;
4176 
4177   } catch(std::exception& e) {
4178     sq_throwerror(vm, e.what());
4179     return SQ_ERROR;
4180   } catch(...) {
4181     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_feather_factor'"));
4182     return SQ_ERROR;
4183   }
4184 
4185 }
4186 
CustomParticles_get_rotation_wrapper(HSQUIRRELVM vm)4187 static SQInteger CustomParticles_get_rotation_wrapper(HSQUIRRELVM vm)
4188 {
4189   SQUserPointer data;
4190   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4191     sq_throwerror(vm, _SC("'get_rotation' called without instance"));
4192     return SQ_ERROR;
4193   }
4194   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4195 
4196   if (_this == nullptr) {
4197     return SQ_ERROR;
4198   }
4199 
4200 
4201   try {
4202     float return_value = _this->get_rotation();
4203 
4204     sq_pushfloat(vm, return_value);
4205     return 1;
4206 
4207   } catch(std::exception& e) {
4208     sq_throwerror(vm, e.what());
4209     return SQ_ERROR;
4210   } catch(...) {
4211     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation'"));
4212     return SQ_ERROR;
4213   }
4214 
4215 }
4216 
CustomParticles_set_rotation_wrapper(HSQUIRRELVM vm)4217 static SQInteger CustomParticles_set_rotation_wrapper(HSQUIRRELVM vm)
4218 {
4219   SQUserPointer data;
4220   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4221     sq_throwerror(vm, _SC("'set_rotation' called without instance"));
4222     return SQ_ERROR;
4223   }
4224   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4225 
4226   if (_this == nullptr) {
4227     return SQ_ERROR;
4228   }
4229 
4230   SQFloat arg0;
4231   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4232     sq_throwerror(vm, _SC("Argument 1 not a float"));
4233     return SQ_ERROR;
4234   }
4235 
4236   try {
4237     _this->set_rotation(static_cast<float> (arg0));
4238 
4239     return 0;
4240 
4241   } catch(std::exception& e) {
4242     sq_throwerror(vm, e.what());
4243     return SQ_ERROR;
4244   } catch(...) {
4245     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation'"));
4246     return SQ_ERROR;
4247   }
4248 
4249 }
4250 
CustomParticles_fade_rotation_wrapper(HSQUIRRELVM vm)4251 static SQInteger CustomParticles_fade_rotation_wrapper(HSQUIRRELVM vm)
4252 {
4253   SQUserPointer data;
4254   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4255     sq_throwerror(vm, _SC("'fade_rotation' called without instance"));
4256     return SQ_ERROR;
4257   }
4258   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4259 
4260   if (_this == nullptr) {
4261     return SQ_ERROR;
4262   }
4263 
4264   SQFloat arg0;
4265   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4266     sq_throwerror(vm, _SC("Argument 1 not a float"));
4267     return SQ_ERROR;
4268   }
4269   SQFloat arg1;
4270   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4271     sq_throwerror(vm, _SC("Argument 2 not a float"));
4272     return SQ_ERROR;
4273   }
4274 
4275   try {
4276     _this->fade_rotation(static_cast<float> (arg0), static_cast<float> (arg1));
4277 
4278     return 0;
4279 
4280   } catch(std::exception& e) {
4281     sq_throwerror(vm, e.what());
4282     return SQ_ERROR;
4283   } catch(...) {
4284     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation'"));
4285     return SQ_ERROR;
4286   }
4287 
4288 }
4289 
CustomParticles_ease_rotation_wrapper(HSQUIRRELVM vm)4290 static SQInteger CustomParticles_ease_rotation_wrapper(HSQUIRRELVM vm)
4291 {
4292   SQUserPointer data;
4293   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4294     sq_throwerror(vm, _SC("'ease_rotation' called without instance"));
4295     return SQ_ERROR;
4296   }
4297   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4298 
4299   if (_this == nullptr) {
4300     return SQ_ERROR;
4301   }
4302 
4303   SQFloat arg0;
4304   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4305     sq_throwerror(vm, _SC("Argument 1 not a float"));
4306     return SQ_ERROR;
4307   }
4308   SQFloat arg1;
4309   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4310     sq_throwerror(vm, _SC("Argument 2 not a float"));
4311     return SQ_ERROR;
4312   }
4313   const SQChar* arg2;
4314   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4315     sq_throwerror(vm, _SC("Argument 3 not a string"));
4316     return SQ_ERROR;
4317   }
4318 
4319   try {
4320     _this->ease_rotation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4321 
4322     return 0;
4323 
4324   } catch(std::exception& e) {
4325     sq_throwerror(vm, e.what());
4326     return SQ_ERROR;
4327   } catch(...) {
4328     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation'"));
4329     return SQ_ERROR;
4330   }
4331 
4332 }
4333 
CustomParticles_get_rotation_variation_wrapper(HSQUIRRELVM vm)4334 static SQInteger CustomParticles_get_rotation_variation_wrapper(HSQUIRRELVM vm)
4335 {
4336   SQUserPointer data;
4337   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4338     sq_throwerror(vm, _SC("'get_rotation_variation' called without instance"));
4339     return SQ_ERROR;
4340   }
4341   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4342 
4343   if (_this == nullptr) {
4344     return SQ_ERROR;
4345   }
4346 
4347 
4348   try {
4349     float return_value = _this->get_rotation_variation();
4350 
4351     sq_pushfloat(vm, return_value);
4352     return 1;
4353 
4354   } catch(std::exception& e) {
4355     sq_throwerror(vm, e.what());
4356     return SQ_ERROR;
4357   } catch(...) {
4358     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_variation'"));
4359     return SQ_ERROR;
4360   }
4361 
4362 }
4363 
CustomParticles_set_rotation_variation_wrapper(HSQUIRRELVM vm)4364 static SQInteger CustomParticles_set_rotation_variation_wrapper(HSQUIRRELVM vm)
4365 {
4366   SQUserPointer data;
4367   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4368     sq_throwerror(vm, _SC("'set_rotation_variation' called without instance"));
4369     return SQ_ERROR;
4370   }
4371   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4372 
4373   if (_this == nullptr) {
4374     return SQ_ERROR;
4375   }
4376 
4377   SQFloat arg0;
4378   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4379     sq_throwerror(vm, _SC("Argument 1 not a float"));
4380     return SQ_ERROR;
4381   }
4382 
4383   try {
4384     _this->set_rotation_variation(static_cast<float> (arg0));
4385 
4386     return 0;
4387 
4388   } catch(std::exception& e) {
4389     sq_throwerror(vm, e.what());
4390     return SQ_ERROR;
4391   } catch(...) {
4392     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_variation'"));
4393     return SQ_ERROR;
4394   }
4395 
4396 }
4397 
CustomParticles_fade_rotation_variation_wrapper(HSQUIRRELVM vm)4398 static SQInteger CustomParticles_fade_rotation_variation_wrapper(HSQUIRRELVM vm)
4399 {
4400   SQUserPointer data;
4401   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4402     sq_throwerror(vm, _SC("'fade_rotation_variation' called without instance"));
4403     return SQ_ERROR;
4404   }
4405   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4406 
4407   if (_this == nullptr) {
4408     return SQ_ERROR;
4409   }
4410 
4411   SQFloat arg0;
4412   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4413     sq_throwerror(vm, _SC("Argument 1 not a float"));
4414     return SQ_ERROR;
4415   }
4416   SQFloat arg1;
4417   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4418     sq_throwerror(vm, _SC("Argument 2 not a float"));
4419     return SQ_ERROR;
4420   }
4421 
4422   try {
4423     _this->fade_rotation_variation(static_cast<float> (arg0), static_cast<float> (arg1));
4424 
4425     return 0;
4426 
4427   } catch(std::exception& e) {
4428     sq_throwerror(vm, e.what());
4429     return SQ_ERROR;
4430   } catch(...) {
4431     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_variation'"));
4432     return SQ_ERROR;
4433   }
4434 
4435 }
4436 
CustomParticles_ease_rotation_variation_wrapper(HSQUIRRELVM vm)4437 static SQInteger CustomParticles_ease_rotation_variation_wrapper(HSQUIRRELVM vm)
4438 {
4439   SQUserPointer data;
4440   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4441     sq_throwerror(vm, _SC("'ease_rotation_variation' called without instance"));
4442     return SQ_ERROR;
4443   }
4444   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4445 
4446   if (_this == nullptr) {
4447     return SQ_ERROR;
4448   }
4449 
4450   SQFloat arg0;
4451   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4452     sq_throwerror(vm, _SC("Argument 1 not a float"));
4453     return SQ_ERROR;
4454   }
4455   SQFloat arg1;
4456   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4457     sq_throwerror(vm, _SC("Argument 2 not a float"));
4458     return SQ_ERROR;
4459   }
4460   const SQChar* arg2;
4461   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4462     sq_throwerror(vm, _SC("Argument 3 not a string"));
4463     return SQ_ERROR;
4464   }
4465 
4466   try {
4467     _this->ease_rotation_variation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4468 
4469     return 0;
4470 
4471   } catch(std::exception& e) {
4472     sq_throwerror(vm, e.what());
4473     return SQ_ERROR;
4474   } catch(...) {
4475     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_variation'"));
4476     return SQ_ERROR;
4477   }
4478 
4479 }
4480 
CustomParticles_get_rotation_speed_wrapper(HSQUIRRELVM vm)4481 static SQInteger CustomParticles_get_rotation_speed_wrapper(HSQUIRRELVM vm)
4482 {
4483   SQUserPointer data;
4484   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4485     sq_throwerror(vm, _SC("'get_rotation_speed' called without instance"));
4486     return SQ_ERROR;
4487   }
4488   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4489 
4490   if (_this == nullptr) {
4491     return SQ_ERROR;
4492   }
4493 
4494 
4495   try {
4496     float return_value = _this->get_rotation_speed();
4497 
4498     sq_pushfloat(vm, return_value);
4499     return 1;
4500 
4501   } catch(std::exception& e) {
4502     sq_throwerror(vm, e.what());
4503     return SQ_ERROR;
4504   } catch(...) {
4505     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_speed'"));
4506     return SQ_ERROR;
4507   }
4508 
4509 }
4510 
CustomParticles_set_rotation_speed_wrapper(HSQUIRRELVM vm)4511 static SQInteger CustomParticles_set_rotation_speed_wrapper(HSQUIRRELVM vm)
4512 {
4513   SQUserPointer data;
4514   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4515     sq_throwerror(vm, _SC("'set_rotation_speed' called without instance"));
4516     return SQ_ERROR;
4517   }
4518   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4519 
4520   if (_this == nullptr) {
4521     return SQ_ERROR;
4522   }
4523 
4524   SQFloat arg0;
4525   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4526     sq_throwerror(vm, _SC("Argument 1 not a float"));
4527     return SQ_ERROR;
4528   }
4529 
4530   try {
4531     _this->set_rotation_speed(static_cast<float> (arg0));
4532 
4533     return 0;
4534 
4535   } catch(std::exception& e) {
4536     sq_throwerror(vm, e.what());
4537     return SQ_ERROR;
4538   } catch(...) {
4539     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_speed'"));
4540     return SQ_ERROR;
4541   }
4542 
4543 }
4544 
CustomParticles_fade_rotation_speed_wrapper(HSQUIRRELVM vm)4545 static SQInteger CustomParticles_fade_rotation_speed_wrapper(HSQUIRRELVM vm)
4546 {
4547   SQUserPointer data;
4548   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4549     sq_throwerror(vm, _SC("'fade_rotation_speed' called without instance"));
4550     return SQ_ERROR;
4551   }
4552   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4553 
4554   if (_this == nullptr) {
4555     return SQ_ERROR;
4556   }
4557 
4558   SQFloat arg0;
4559   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4560     sq_throwerror(vm, _SC("Argument 1 not a float"));
4561     return SQ_ERROR;
4562   }
4563   SQFloat arg1;
4564   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4565     sq_throwerror(vm, _SC("Argument 2 not a float"));
4566     return SQ_ERROR;
4567   }
4568 
4569   try {
4570     _this->fade_rotation_speed(static_cast<float> (arg0), static_cast<float> (arg1));
4571 
4572     return 0;
4573 
4574   } catch(std::exception& e) {
4575     sq_throwerror(vm, e.what());
4576     return SQ_ERROR;
4577   } catch(...) {
4578     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_speed'"));
4579     return SQ_ERROR;
4580   }
4581 
4582 }
4583 
CustomParticles_ease_rotation_speed_wrapper(HSQUIRRELVM vm)4584 static SQInteger CustomParticles_ease_rotation_speed_wrapper(HSQUIRRELVM vm)
4585 {
4586   SQUserPointer data;
4587   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4588     sq_throwerror(vm, _SC("'ease_rotation_speed' called without instance"));
4589     return SQ_ERROR;
4590   }
4591   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4592 
4593   if (_this == nullptr) {
4594     return SQ_ERROR;
4595   }
4596 
4597   SQFloat arg0;
4598   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4599     sq_throwerror(vm, _SC("Argument 1 not a float"));
4600     return SQ_ERROR;
4601   }
4602   SQFloat arg1;
4603   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4604     sq_throwerror(vm, _SC("Argument 2 not a float"));
4605     return SQ_ERROR;
4606   }
4607   const SQChar* arg2;
4608   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4609     sq_throwerror(vm, _SC("Argument 3 not a string"));
4610     return SQ_ERROR;
4611   }
4612 
4613   try {
4614     _this->ease_rotation_speed(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4615 
4616     return 0;
4617 
4618   } catch(std::exception& e) {
4619     sq_throwerror(vm, e.what());
4620     return SQ_ERROR;
4621   } catch(...) {
4622     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_speed'"));
4623     return SQ_ERROR;
4624   }
4625 
4626 }
4627 
CustomParticles_get_rotation_speed_variation_wrapper(HSQUIRRELVM vm)4628 static SQInteger CustomParticles_get_rotation_speed_variation_wrapper(HSQUIRRELVM vm)
4629 {
4630   SQUserPointer data;
4631   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4632     sq_throwerror(vm, _SC("'get_rotation_speed_variation' called without instance"));
4633     return SQ_ERROR;
4634   }
4635   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4636 
4637   if (_this == nullptr) {
4638     return SQ_ERROR;
4639   }
4640 
4641 
4642   try {
4643     float return_value = _this->get_rotation_speed_variation();
4644 
4645     sq_pushfloat(vm, return_value);
4646     return 1;
4647 
4648   } catch(std::exception& e) {
4649     sq_throwerror(vm, e.what());
4650     return SQ_ERROR;
4651   } catch(...) {
4652     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_speed_variation'"));
4653     return SQ_ERROR;
4654   }
4655 
4656 }
4657 
CustomParticles_set_rotation_speed_variation_wrapper(HSQUIRRELVM vm)4658 static SQInteger CustomParticles_set_rotation_speed_variation_wrapper(HSQUIRRELVM vm)
4659 {
4660   SQUserPointer data;
4661   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4662     sq_throwerror(vm, _SC("'set_rotation_speed_variation' called without instance"));
4663     return SQ_ERROR;
4664   }
4665   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4666 
4667   if (_this == nullptr) {
4668     return SQ_ERROR;
4669   }
4670 
4671   SQFloat arg0;
4672   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4673     sq_throwerror(vm, _SC("Argument 1 not a float"));
4674     return SQ_ERROR;
4675   }
4676 
4677   try {
4678     _this->set_rotation_speed_variation(static_cast<float> (arg0));
4679 
4680     return 0;
4681 
4682   } catch(std::exception& e) {
4683     sq_throwerror(vm, e.what());
4684     return SQ_ERROR;
4685   } catch(...) {
4686     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_speed_variation'"));
4687     return SQ_ERROR;
4688   }
4689 
4690 }
4691 
CustomParticles_fade_rotation_speed_variation_wrapper(HSQUIRRELVM vm)4692 static SQInteger CustomParticles_fade_rotation_speed_variation_wrapper(HSQUIRRELVM vm)
4693 {
4694   SQUserPointer data;
4695   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4696     sq_throwerror(vm, _SC("'fade_rotation_speed_variation' called without instance"));
4697     return SQ_ERROR;
4698   }
4699   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4700 
4701   if (_this == nullptr) {
4702     return SQ_ERROR;
4703   }
4704 
4705   SQFloat arg0;
4706   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4707     sq_throwerror(vm, _SC("Argument 1 not a float"));
4708     return SQ_ERROR;
4709   }
4710   SQFloat arg1;
4711   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4712     sq_throwerror(vm, _SC("Argument 2 not a float"));
4713     return SQ_ERROR;
4714   }
4715 
4716   try {
4717     _this->fade_rotation_speed_variation(static_cast<float> (arg0), static_cast<float> (arg1));
4718 
4719     return 0;
4720 
4721   } catch(std::exception& e) {
4722     sq_throwerror(vm, e.what());
4723     return SQ_ERROR;
4724   } catch(...) {
4725     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_speed_variation'"));
4726     return SQ_ERROR;
4727   }
4728 
4729 }
4730 
CustomParticles_ease_rotation_speed_variation_wrapper(HSQUIRRELVM vm)4731 static SQInteger CustomParticles_ease_rotation_speed_variation_wrapper(HSQUIRRELVM vm)
4732 {
4733   SQUserPointer data;
4734   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4735     sq_throwerror(vm, _SC("'ease_rotation_speed_variation' called without instance"));
4736     return SQ_ERROR;
4737   }
4738   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4739 
4740   if (_this == nullptr) {
4741     return SQ_ERROR;
4742   }
4743 
4744   SQFloat arg0;
4745   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4746     sq_throwerror(vm, _SC("Argument 1 not a float"));
4747     return SQ_ERROR;
4748   }
4749   SQFloat arg1;
4750   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4751     sq_throwerror(vm, _SC("Argument 2 not a float"));
4752     return SQ_ERROR;
4753   }
4754   const SQChar* arg2;
4755   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4756     sq_throwerror(vm, _SC("Argument 3 not a string"));
4757     return SQ_ERROR;
4758   }
4759 
4760   try {
4761     _this->ease_rotation_speed_variation(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4762 
4763     return 0;
4764 
4765   } catch(std::exception& e) {
4766     sq_throwerror(vm, e.what());
4767     return SQ_ERROR;
4768   } catch(...) {
4769     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_speed_variation'"));
4770     return SQ_ERROR;
4771   }
4772 
4773 }
4774 
CustomParticles_get_rotation_acceleration_wrapper(HSQUIRRELVM vm)4775 static SQInteger CustomParticles_get_rotation_acceleration_wrapper(HSQUIRRELVM vm)
4776 {
4777   SQUserPointer data;
4778   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4779     sq_throwerror(vm, _SC("'get_rotation_acceleration' called without instance"));
4780     return SQ_ERROR;
4781   }
4782   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4783 
4784   if (_this == nullptr) {
4785     return SQ_ERROR;
4786   }
4787 
4788 
4789   try {
4790     float return_value = _this->get_rotation_acceleration();
4791 
4792     sq_pushfloat(vm, return_value);
4793     return 1;
4794 
4795   } catch(std::exception& e) {
4796     sq_throwerror(vm, e.what());
4797     return SQ_ERROR;
4798   } catch(...) {
4799     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_acceleration'"));
4800     return SQ_ERROR;
4801   }
4802 
4803 }
4804 
CustomParticles_set_rotation_acceleration_wrapper(HSQUIRRELVM vm)4805 static SQInteger CustomParticles_set_rotation_acceleration_wrapper(HSQUIRRELVM vm)
4806 {
4807   SQUserPointer data;
4808   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4809     sq_throwerror(vm, _SC("'set_rotation_acceleration' called without instance"));
4810     return SQ_ERROR;
4811   }
4812   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4813 
4814   if (_this == nullptr) {
4815     return SQ_ERROR;
4816   }
4817 
4818   SQFloat arg0;
4819   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4820     sq_throwerror(vm, _SC("Argument 1 not a float"));
4821     return SQ_ERROR;
4822   }
4823 
4824   try {
4825     _this->set_rotation_acceleration(static_cast<float> (arg0));
4826 
4827     return 0;
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 'set_rotation_acceleration'"));
4834     return SQ_ERROR;
4835   }
4836 
4837 }
4838 
CustomParticles_fade_rotation_acceleration_wrapper(HSQUIRRELVM vm)4839 static SQInteger CustomParticles_fade_rotation_acceleration_wrapper(HSQUIRRELVM vm)
4840 {
4841   SQUserPointer data;
4842   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4843     sq_throwerror(vm, _SC("'fade_rotation_acceleration' called without instance"));
4844     return SQ_ERROR;
4845   }
4846   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4847 
4848   if (_this == nullptr) {
4849     return SQ_ERROR;
4850   }
4851 
4852   SQFloat arg0;
4853   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4854     sq_throwerror(vm, _SC("Argument 1 not a float"));
4855     return SQ_ERROR;
4856   }
4857   SQFloat arg1;
4858   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4859     sq_throwerror(vm, _SC("Argument 2 not a float"));
4860     return SQ_ERROR;
4861   }
4862 
4863   try {
4864     _this->fade_rotation_acceleration(static_cast<float> (arg0), static_cast<float> (arg1));
4865 
4866     return 0;
4867 
4868   } catch(std::exception& e) {
4869     sq_throwerror(vm, e.what());
4870     return SQ_ERROR;
4871   } catch(...) {
4872     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_acceleration'"));
4873     return SQ_ERROR;
4874   }
4875 
4876 }
4877 
CustomParticles_ease_rotation_acceleration_wrapper(HSQUIRRELVM vm)4878 static SQInteger CustomParticles_ease_rotation_acceleration_wrapper(HSQUIRRELVM vm)
4879 {
4880   SQUserPointer data;
4881   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4882     sq_throwerror(vm, _SC("'ease_rotation_acceleration' called without instance"));
4883     return SQ_ERROR;
4884   }
4885   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4886 
4887   if (_this == nullptr) {
4888     return SQ_ERROR;
4889   }
4890 
4891   SQFloat arg0;
4892   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4893     sq_throwerror(vm, _SC("Argument 1 not a float"));
4894     return SQ_ERROR;
4895   }
4896   SQFloat arg1;
4897   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
4898     sq_throwerror(vm, _SC("Argument 2 not a float"));
4899     return SQ_ERROR;
4900   }
4901   const SQChar* arg2;
4902   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
4903     sq_throwerror(vm, _SC("Argument 3 not a string"));
4904     return SQ_ERROR;
4905   }
4906 
4907   try {
4908     _this->ease_rotation_acceleration(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
4909 
4910     return 0;
4911 
4912   } catch(std::exception& e) {
4913     sq_throwerror(vm, e.what());
4914     return SQ_ERROR;
4915   } catch(...) {
4916     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_acceleration'"));
4917     return SQ_ERROR;
4918   }
4919 
4920 }
4921 
CustomParticles_get_rotation_decceleration_wrapper(HSQUIRRELVM vm)4922 static SQInteger CustomParticles_get_rotation_decceleration_wrapper(HSQUIRRELVM vm)
4923 {
4924   SQUserPointer data;
4925   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4926     sq_throwerror(vm, _SC("'get_rotation_decceleration' called without instance"));
4927     return SQ_ERROR;
4928   }
4929   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4930 
4931   if (_this == nullptr) {
4932     return SQ_ERROR;
4933   }
4934 
4935 
4936   try {
4937     float return_value = _this->get_rotation_decceleration();
4938 
4939     sq_pushfloat(vm, return_value);
4940     return 1;
4941 
4942   } catch(std::exception& e) {
4943     sq_throwerror(vm, e.what());
4944     return SQ_ERROR;
4945   } catch(...) {
4946     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_rotation_decceleration'"));
4947     return SQ_ERROR;
4948   }
4949 
4950 }
4951 
CustomParticles_set_rotation_decceleration_wrapper(HSQUIRRELVM vm)4952 static SQInteger CustomParticles_set_rotation_decceleration_wrapper(HSQUIRRELVM vm)
4953 {
4954   SQUserPointer data;
4955   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4956     sq_throwerror(vm, _SC("'set_rotation_decceleration' called without instance"));
4957     return SQ_ERROR;
4958   }
4959   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4960 
4961   if (_this == nullptr) {
4962     return SQ_ERROR;
4963   }
4964 
4965   SQFloat arg0;
4966   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
4967     sq_throwerror(vm, _SC("Argument 1 not a float"));
4968     return SQ_ERROR;
4969   }
4970 
4971   try {
4972     _this->set_rotation_decceleration(static_cast<float> (arg0));
4973 
4974     return 0;
4975 
4976   } catch(std::exception& e) {
4977     sq_throwerror(vm, e.what());
4978     return SQ_ERROR;
4979   } catch(...) {
4980     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_rotation_decceleration'"));
4981     return SQ_ERROR;
4982   }
4983 
4984 }
4985 
CustomParticles_fade_rotation_decceleration_wrapper(HSQUIRRELVM vm)4986 static SQInteger CustomParticles_fade_rotation_decceleration_wrapper(HSQUIRRELVM vm)
4987 {
4988   SQUserPointer data;
4989   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
4990     sq_throwerror(vm, _SC("'fade_rotation_decceleration' called without instance"));
4991     return SQ_ERROR;
4992   }
4993   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
4994 
4995   if (_this == nullptr) {
4996     return SQ_ERROR;
4997   }
4998 
4999   SQFloat arg0;
5000   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5001     sq_throwerror(vm, _SC("Argument 1 not a float"));
5002     return SQ_ERROR;
5003   }
5004   SQFloat arg1;
5005   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
5006     sq_throwerror(vm, _SC("Argument 2 not a float"));
5007     return SQ_ERROR;
5008   }
5009 
5010   try {
5011     _this->fade_rotation_decceleration(static_cast<float> (arg0), static_cast<float> (arg1));
5012 
5013     return 0;
5014 
5015   } catch(std::exception& e) {
5016     sq_throwerror(vm, e.what());
5017     return SQ_ERROR;
5018   } catch(...) {
5019     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_rotation_decceleration'"));
5020     return SQ_ERROR;
5021   }
5022 
5023 }
5024 
CustomParticles_ease_rotation_decceleration_wrapper(HSQUIRRELVM vm)5025 static SQInteger CustomParticles_ease_rotation_decceleration_wrapper(HSQUIRRELVM vm)
5026 {
5027   SQUserPointer data;
5028   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5029     sq_throwerror(vm, _SC("'ease_rotation_decceleration' called without instance"));
5030     return SQ_ERROR;
5031   }
5032   auto _this = reinterpret_cast<scripting::CustomParticles*> (data);
5033 
5034   if (_this == nullptr) {
5035     return SQ_ERROR;
5036   }
5037 
5038   SQFloat arg0;
5039   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5040     sq_throwerror(vm, _SC("Argument 1 not a float"));
5041     return SQ_ERROR;
5042   }
5043   SQFloat arg1;
5044   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
5045     sq_throwerror(vm, _SC("Argument 2 not a float"));
5046     return SQ_ERROR;
5047   }
5048   const SQChar* arg2;
5049   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
5050     sq_throwerror(vm, _SC("Argument 3 not a string"));
5051     return SQ_ERROR;
5052   }
5053 
5054   try {
5055     _this->ease_rotation_decceleration(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
5056 
5057     return 0;
5058 
5059   } catch(std::exception& e) {
5060     sq_throwerror(vm, e.what());
5061     return SQ_ERROR;
5062   } catch(...) {
5063     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_rotation_decceleration'"));
5064     return SQ_ERROR;
5065   }
5066 
5067 }
5068 
Decal_release_hook(SQUserPointer ptr,SQInteger)5069 static SQInteger Decal_release_hook(SQUserPointer ptr, SQInteger )
5070 {
5071   auto _this = reinterpret_cast<scripting::Decal*> (ptr);
5072   delete _this;
5073   return 0;
5074 }
5075 
Decal_fade_sprite_wrapper(HSQUIRRELVM vm)5076 static SQInteger Decal_fade_sprite_wrapper(HSQUIRRELVM vm)
5077 {
5078   SQUserPointer data;
5079   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5080     sq_throwerror(vm, _SC("'fade_sprite' called without instance"));
5081     return SQ_ERROR;
5082   }
5083   auto _this = reinterpret_cast<scripting::Decal*> (data);
5084 
5085   if (_this == nullptr) {
5086     return SQ_ERROR;
5087   }
5088 
5089   const SQChar* arg0;
5090   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5091     sq_throwerror(vm, _SC("Argument 1 not a string"));
5092     return SQ_ERROR;
5093   }
5094   SQFloat arg1;
5095   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
5096     sq_throwerror(vm, _SC("Argument 2 not a float"));
5097     return SQ_ERROR;
5098   }
5099 
5100   try {
5101     _this->fade_sprite(arg0, static_cast<float> (arg1));
5102 
5103     return 0;
5104 
5105   } catch(std::exception& e) {
5106     sq_throwerror(vm, e.what());
5107     return SQ_ERROR;
5108   } catch(...) {
5109     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_sprite'"));
5110     return SQ_ERROR;
5111   }
5112 
5113 }
5114 
Decal_change_sprite_wrapper(HSQUIRRELVM vm)5115 static SQInteger Decal_change_sprite_wrapper(HSQUIRRELVM vm)
5116 {
5117   SQUserPointer data;
5118   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5119     sq_throwerror(vm, _SC("'change_sprite' called without instance"));
5120     return SQ_ERROR;
5121   }
5122   auto _this = reinterpret_cast<scripting::Decal*> (data);
5123 
5124   if (_this == nullptr) {
5125     return SQ_ERROR;
5126   }
5127 
5128   const SQChar* arg0;
5129   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5130     sq_throwerror(vm, _SC("Argument 1 not a string"));
5131     return SQ_ERROR;
5132   }
5133 
5134   try {
5135     _this->change_sprite(arg0);
5136 
5137     return 0;
5138 
5139   } catch(std::exception& e) {
5140     sq_throwerror(vm, e.what());
5141     return SQ_ERROR;
5142   } catch(...) {
5143     sq_throwerror(vm, _SC("Unexpected exception while executing function 'change_sprite'"));
5144     return SQ_ERROR;
5145   }
5146 
5147 }
5148 
Decal_fade_in_wrapper(HSQUIRRELVM vm)5149 static SQInteger Decal_fade_in_wrapper(HSQUIRRELVM vm)
5150 {
5151   SQUserPointer data;
5152   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5153     sq_throwerror(vm, _SC("'fade_in' called without instance"));
5154     return SQ_ERROR;
5155   }
5156   auto _this = reinterpret_cast<scripting::Decal*> (data);
5157 
5158   if (_this == nullptr) {
5159     return SQ_ERROR;
5160   }
5161 
5162   SQFloat arg0;
5163   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5164     sq_throwerror(vm, _SC("Argument 1 not a float"));
5165     return SQ_ERROR;
5166   }
5167 
5168   try {
5169     _this->fade_in(static_cast<float> (arg0));
5170 
5171     return 0;
5172 
5173   } catch(std::exception& e) {
5174     sq_throwerror(vm, e.what());
5175     return SQ_ERROR;
5176   } catch(...) {
5177     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
5178     return SQ_ERROR;
5179   }
5180 
5181 }
5182 
Decal_fade_out_wrapper(HSQUIRRELVM vm)5183 static SQInteger Decal_fade_out_wrapper(HSQUIRRELVM vm)
5184 {
5185   SQUserPointer data;
5186   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5187     sq_throwerror(vm, _SC("'fade_out' called without instance"));
5188     return SQ_ERROR;
5189   }
5190   auto _this = reinterpret_cast<scripting::Decal*> (data);
5191 
5192   if (_this == nullptr) {
5193     return SQ_ERROR;
5194   }
5195 
5196   SQFloat arg0;
5197   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5198     sq_throwerror(vm, _SC("Argument 1 not a float"));
5199     return SQ_ERROR;
5200   }
5201 
5202   try {
5203     _this->fade_out(static_cast<float> (arg0));
5204 
5205     return 0;
5206 
5207   } catch(std::exception& e) {
5208     sq_throwerror(vm, e.what());
5209     return SQ_ERROR;
5210   } catch(...) {
5211     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
5212     return SQ_ERROR;
5213   }
5214 
5215 }
5216 
Dispenser_release_hook(SQUserPointer ptr,SQInteger)5217 static SQInteger Dispenser_release_hook(SQUserPointer ptr, SQInteger )
5218 {
5219   auto _this = reinterpret_cast<scripting::Dispenser*> (ptr);
5220   delete _this;
5221   return 0;
5222 }
5223 
Dispenser_activate_wrapper(HSQUIRRELVM vm)5224 static SQInteger Dispenser_activate_wrapper(HSQUIRRELVM vm)
5225 {
5226   SQUserPointer data;
5227   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5228     sq_throwerror(vm, _SC("'activate' called without instance"));
5229     return SQ_ERROR;
5230   }
5231   auto _this = reinterpret_cast<scripting::Dispenser*> (data);
5232 
5233   if (_this == nullptr) {
5234     return SQ_ERROR;
5235   }
5236 
5237 
5238   try {
5239     _this->activate();
5240 
5241     return 0;
5242 
5243   } catch(std::exception& e) {
5244     sq_throwerror(vm, e.what());
5245     return SQ_ERROR;
5246   } catch(...) {
5247     sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
5248     return SQ_ERROR;
5249   }
5250 
5251 }
5252 
Dispenser_deactivate_wrapper(HSQUIRRELVM vm)5253 static SQInteger Dispenser_deactivate_wrapper(HSQUIRRELVM vm)
5254 {
5255   SQUserPointer data;
5256   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5257     sq_throwerror(vm, _SC("'deactivate' called without instance"));
5258     return SQ_ERROR;
5259   }
5260   auto _this = reinterpret_cast<scripting::Dispenser*> (data);
5261 
5262   if (_this == nullptr) {
5263     return SQ_ERROR;
5264   }
5265 
5266 
5267   try {
5268     _this->deactivate();
5269 
5270     return 0;
5271 
5272   } catch(std::exception& e) {
5273     sq_throwerror(vm, e.what());
5274     return SQ_ERROR;
5275   } catch(...) {
5276     sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
5277     return SQ_ERROR;
5278   }
5279 
5280 }
5281 
DisplayEffect_release_hook(SQUserPointer ptr,SQInteger)5282 static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger )
5283 {
5284   auto _this = reinterpret_cast<scripting::DisplayEffect*> (ptr);
5285   delete _this;
5286   return 0;
5287 }
5288 
DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)5289 static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm)
5290 {
5291   SQUserPointer data;
5292   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5293     sq_throwerror(vm, _SC("'fade_out' called without instance"));
5294     return SQ_ERROR;
5295   }
5296   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5297 
5298   if (_this == nullptr) {
5299     return SQ_ERROR;
5300   }
5301 
5302   SQFloat arg0;
5303   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5304     sq_throwerror(vm, _SC("Argument 1 not a float"));
5305     return SQ_ERROR;
5306   }
5307 
5308   try {
5309     _this->fade_out(static_cast<float> (arg0));
5310 
5311     return 0;
5312 
5313   } catch(std::exception& e) {
5314     sq_throwerror(vm, e.what());
5315     return SQ_ERROR;
5316   } catch(...) {
5317     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
5318     return SQ_ERROR;
5319   }
5320 
5321 }
5322 
DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)5323 static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm)
5324 {
5325   SQUserPointer data;
5326   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5327     sq_throwerror(vm, _SC("'fade_in' called without instance"));
5328     return SQ_ERROR;
5329   }
5330   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5331 
5332   if (_this == nullptr) {
5333     return SQ_ERROR;
5334   }
5335 
5336   SQFloat arg0;
5337   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5338     sq_throwerror(vm, _SC("Argument 1 not a float"));
5339     return SQ_ERROR;
5340   }
5341 
5342   try {
5343     _this->fade_in(static_cast<float> (arg0));
5344 
5345     return 0;
5346 
5347   } catch(std::exception& e) {
5348     sq_throwerror(vm, e.what());
5349     return SQ_ERROR;
5350   } catch(...) {
5351     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
5352     return SQ_ERROR;
5353   }
5354 
5355 }
5356 
DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)5357 static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm)
5358 {
5359   SQUserPointer data;
5360   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5361     sq_throwerror(vm, _SC("'set_black' called without instance"));
5362     return SQ_ERROR;
5363   }
5364   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5365 
5366   if (_this == nullptr) {
5367     return SQ_ERROR;
5368   }
5369 
5370   SQBool arg0;
5371   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5372     sq_throwerror(vm, _SC("Argument 1 not a bool"));
5373     return SQ_ERROR;
5374   }
5375 
5376   try {
5377     _this->set_black(arg0 == SQTrue);
5378 
5379     return 0;
5380 
5381   } catch(std::exception& e) {
5382     sq_throwerror(vm, e.what());
5383     return SQ_ERROR;
5384   } catch(...) {
5385     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'"));
5386     return SQ_ERROR;
5387   }
5388 
5389 }
5390 
DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)5391 static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm)
5392 {
5393   SQUserPointer data;
5394   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5395     sq_throwerror(vm, _SC("'is_black' called without instance"));
5396     return SQ_ERROR;
5397   }
5398   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5399 
5400   if (_this == nullptr) {
5401     return SQ_ERROR;
5402   }
5403 
5404 
5405   try {
5406     bool return_value = _this->is_black();
5407 
5408     sq_pushbool(vm, return_value);
5409     return 1;
5410 
5411   } catch(std::exception& e) {
5412     sq_throwerror(vm, e.what());
5413     return SQ_ERROR;
5414   } catch(...) {
5415     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'"));
5416     return SQ_ERROR;
5417   }
5418 
5419 }
5420 
DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)5421 static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm)
5422 {
5423   SQUserPointer data;
5424   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5425     sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance"));
5426     return SQ_ERROR;
5427   }
5428   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5429 
5430   if (_this == nullptr) {
5431     return SQ_ERROR;
5432   }
5433 
5434   SQFloat arg0;
5435   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5436     sq_throwerror(vm, _SC("Argument 1 not a float"));
5437     return SQ_ERROR;
5438   }
5439 
5440   try {
5441     _this->sixteen_to_nine(static_cast<float> (arg0));
5442 
5443     return 0;
5444 
5445   } catch(std::exception& e) {
5446     sq_throwerror(vm, e.what());
5447     return SQ_ERROR;
5448   } catch(...) {
5449     sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'"));
5450     return SQ_ERROR;
5451   }
5452 
5453 }
5454 
DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)5455 static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm)
5456 {
5457   SQUserPointer data;
5458   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5459     sq_throwerror(vm, _SC("'four_to_three' called without instance"));
5460     return SQ_ERROR;
5461   }
5462   auto _this = reinterpret_cast<scripting::DisplayEffect*> (data);
5463 
5464   if (_this == nullptr) {
5465     return SQ_ERROR;
5466   }
5467 
5468   SQFloat arg0;
5469   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5470     sq_throwerror(vm, _SC("Argument 1 not a float"));
5471     return SQ_ERROR;
5472   }
5473 
5474   try {
5475     _this->four_to_three(static_cast<float> (arg0));
5476 
5477     return 0;
5478 
5479   } catch(std::exception& e) {
5480     sq_throwerror(vm, e.what());
5481     return SQ_ERROR;
5482   } catch(...) {
5483     sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'"));
5484     return SQ_ERROR;
5485   }
5486 
5487 }
5488 
FloatingImage_release_hook(SQUserPointer ptr,SQInteger)5489 static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger )
5490 {
5491   auto _this = reinterpret_cast<scripting::FloatingImage*> (ptr);
5492   delete _this;
5493   return 0;
5494 }
5495 
FloatingImage_constructor_wrapper(HSQUIRRELVM vm)5496 static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm)
5497 {
5498   const SQChar* arg0;
5499   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5500     sq_throwerror(vm, _SC("Argument 1 not a string"));
5501     return SQ_ERROR;
5502   }
5503 
5504   try {
5505     auto _this = new scripting::FloatingImage(arg0);
5506   if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) {
5507     sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class"));
5508     return SQ_ERROR;
5509   }
5510   sq_setreleasehook(vm, 1, FloatingImage_release_hook);
5511 
5512     return 0;
5513 
5514   } catch(std::exception& e) {
5515     sq_throwerror(vm, e.what());
5516     return SQ_ERROR;
5517   } catch(...) {
5518     sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'"));
5519     return SQ_ERROR;
5520   }
5521 
5522 }
5523 
FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)5524 static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm)
5525 {
5526   SQUserPointer data;
5527   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5528     sq_throwerror(vm, _SC("'set_layer' called without instance"));
5529     return SQ_ERROR;
5530   }
5531   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5532 
5533   if (_this == nullptr) {
5534     return SQ_ERROR;
5535   }
5536 
5537   SQInteger arg0;
5538   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
5539     sq_throwerror(vm, _SC("Argument 1 not an integer"));
5540     return SQ_ERROR;
5541   }
5542 
5543   try {
5544     _this->set_layer(static_cast<int> (arg0));
5545 
5546     return 0;
5547 
5548   } catch(std::exception& e) {
5549     sq_throwerror(vm, e.what());
5550     return SQ_ERROR;
5551   } catch(...) {
5552     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'"));
5553     return SQ_ERROR;
5554   }
5555 
5556 }
5557 
FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)5558 static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm)
5559 {
5560   SQUserPointer data;
5561   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5562     sq_throwerror(vm, _SC("'get_layer' called without instance"));
5563     return SQ_ERROR;
5564   }
5565   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5566 
5567   if (_this == nullptr) {
5568     return SQ_ERROR;
5569   }
5570 
5571 
5572   try {
5573     int return_value = _this->get_layer();
5574 
5575     sq_pushinteger(vm, return_value);
5576     return 1;
5577 
5578   } catch(std::exception& e) {
5579     sq_throwerror(vm, e.what());
5580     return SQ_ERROR;
5581   } catch(...) {
5582     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'"));
5583     return SQ_ERROR;
5584   }
5585 
5586 }
5587 
FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)5588 static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm)
5589 {
5590   SQUserPointer data;
5591   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5592     sq_throwerror(vm, _SC("'set_pos' called without instance"));
5593     return SQ_ERROR;
5594   }
5595   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5596 
5597   if (_this == nullptr) {
5598     return SQ_ERROR;
5599   }
5600 
5601   SQFloat arg0;
5602   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5603     sq_throwerror(vm, _SC("Argument 1 not a float"));
5604     return SQ_ERROR;
5605   }
5606   SQFloat arg1;
5607   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
5608     sq_throwerror(vm, _SC("Argument 2 not a float"));
5609     return SQ_ERROR;
5610   }
5611 
5612   try {
5613     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
5614 
5615     return 0;
5616 
5617   } catch(std::exception& e) {
5618     sq_throwerror(vm, e.what());
5619     return SQ_ERROR;
5620   } catch(...) {
5621     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
5622     return SQ_ERROR;
5623   }
5624 
5625 }
5626 
FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)5627 static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm)
5628 {
5629   SQUserPointer data;
5630   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5631     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
5632     return SQ_ERROR;
5633   }
5634   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5635 
5636   if (_this == nullptr) {
5637     return SQ_ERROR;
5638   }
5639 
5640 
5641   try {
5642     float return_value = _this->get_pos_x();
5643 
5644     sq_pushfloat(vm, return_value);
5645     return 1;
5646 
5647   } catch(std::exception& e) {
5648     sq_throwerror(vm, e.what());
5649     return SQ_ERROR;
5650   } catch(...) {
5651     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
5652     return SQ_ERROR;
5653   }
5654 
5655 }
5656 
FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)5657 static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm)
5658 {
5659   SQUserPointer data;
5660   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5661     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
5662     return SQ_ERROR;
5663   }
5664   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5665 
5666   if (_this == nullptr) {
5667     return SQ_ERROR;
5668   }
5669 
5670 
5671   try {
5672     float return_value = _this->get_pos_y();
5673 
5674     sq_pushfloat(vm, return_value);
5675     return 1;
5676 
5677   } catch(std::exception& e) {
5678     sq_throwerror(vm, e.what());
5679     return SQ_ERROR;
5680   } catch(...) {
5681     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
5682     return SQ_ERROR;
5683   }
5684 
5685 }
5686 
FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)5687 static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm)
5688 {
5689   SQUserPointer data;
5690   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5691     sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
5692     return SQ_ERROR;
5693   }
5694   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5695 
5696   if (_this == nullptr) {
5697     return SQ_ERROR;
5698   }
5699 
5700   SQInteger arg0;
5701   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
5702     sq_throwerror(vm, _SC("Argument 1 not an integer"));
5703     return SQ_ERROR;
5704   }
5705 
5706   try {
5707     _this->set_anchor_point(static_cast<int> (arg0));
5708 
5709     return 0;
5710 
5711   } catch(std::exception& e) {
5712     sq_throwerror(vm, e.what());
5713     return SQ_ERROR;
5714   } catch(...) {
5715     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
5716     return SQ_ERROR;
5717   }
5718 
5719 }
5720 
FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)5721 static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm)
5722 {
5723   SQUserPointer data;
5724   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5725     sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
5726     return SQ_ERROR;
5727   }
5728   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5729 
5730   if (_this == nullptr) {
5731     return SQ_ERROR;
5732   }
5733 
5734 
5735   try {
5736     int return_value = _this->get_anchor_point();
5737 
5738     sq_pushinteger(vm, return_value);
5739     return 1;
5740 
5741   } catch(std::exception& e) {
5742     sq_throwerror(vm, e.what());
5743     return SQ_ERROR;
5744   } catch(...) {
5745     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
5746     return SQ_ERROR;
5747   }
5748 
5749 }
5750 
FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)5751 static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm)
5752 {
5753   SQUserPointer data;
5754   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5755     sq_throwerror(vm, _SC("'set_visible' called without instance"));
5756     return SQ_ERROR;
5757   }
5758   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5759 
5760   if (_this == nullptr) {
5761     return SQ_ERROR;
5762   }
5763 
5764   SQBool arg0;
5765   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
5766     sq_throwerror(vm, _SC("Argument 1 not a bool"));
5767     return SQ_ERROR;
5768   }
5769 
5770   try {
5771     _this->set_visible(arg0 == SQTrue);
5772 
5773     return 0;
5774 
5775   } catch(std::exception& e) {
5776     sq_throwerror(vm, e.what());
5777     return SQ_ERROR;
5778   } catch(...) {
5779     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
5780     return SQ_ERROR;
5781   }
5782 
5783 }
5784 
FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)5785 static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm)
5786 {
5787   SQUserPointer data;
5788   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5789     sq_throwerror(vm, _SC("'get_visible' called without instance"));
5790     return SQ_ERROR;
5791   }
5792   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5793 
5794   if (_this == nullptr) {
5795     return SQ_ERROR;
5796   }
5797 
5798 
5799   try {
5800     bool return_value = _this->get_visible();
5801 
5802     sq_pushbool(vm, return_value);
5803     return 1;
5804 
5805   } catch(std::exception& e) {
5806     sq_throwerror(vm, e.what());
5807     return SQ_ERROR;
5808   } catch(...) {
5809     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
5810     return SQ_ERROR;
5811   }
5812 
5813 }
5814 
FloatingImage_set_action_wrapper(HSQUIRRELVM vm)5815 static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm)
5816 {
5817   SQUserPointer data;
5818   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5819     sq_throwerror(vm, _SC("'set_action' called without instance"));
5820     return SQ_ERROR;
5821   }
5822   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5823 
5824   if (_this == nullptr) {
5825     return SQ_ERROR;
5826   }
5827 
5828   const SQChar* arg0;
5829   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
5830     sq_throwerror(vm, _SC("Argument 1 not a string"));
5831     return SQ_ERROR;
5832   }
5833 
5834   try {
5835     _this->set_action(arg0);
5836 
5837     return 0;
5838 
5839   } catch(std::exception& e) {
5840     sq_throwerror(vm, e.what());
5841     return SQ_ERROR;
5842   } catch(...) {
5843     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
5844     return SQ_ERROR;
5845   }
5846 
5847 }
5848 
FloatingImage_get_action_wrapper(HSQUIRRELVM vm)5849 static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm)
5850 {
5851   SQUserPointer data;
5852   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5853     sq_throwerror(vm, _SC("'get_action' called without instance"));
5854     return SQ_ERROR;
5855   }
5856   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5857 
5858   if (_this == nullptr) {
5859     return SQ_ERROR;
5860   }
5861 
5862 
5863   try {
5864     std::string return_value = _this->get_action();
5865 
5866     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
5867     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
5868     return 1;
5869 
5870   } catch(std::exception& e) {
5871     sq_throwerror(vm, e.what());
5872     return SQ_ERROR;
5873   } catch(...) {
5874     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
5875     return SQ_ERROR;
5876   }
5877 
5878 }
5879 
FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)5880 static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm)
5881 {
5882   SQUserPointer data;
5883   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5884     sq_throwerror(vm, _SC("'fade_in' called without instance"));
5885     return SQ_ERROR;
5886   }
5887   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5888 
5889   if (_this == nullptr) {
5890     return SQ_ERROR;
5891   }
5892 
5893   SQFloat arg0;
5894   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5895     sq_throwerror(vm, _SC("Argument 1 not a float"));
5896     return SQ_ERROR;
5897   }
5898 
5899   try {
5900     _this->fade_in(static_cast<float> (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 'fade_in'"));
5909     return SQ_ERROR;
5910   }
5911 
5912 }
5913 
FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)5914 static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm)
5915 {
5916   SQUserPointer data;
5917   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5918     sq_throwerror(vm, _SC("'fade_out' called without instance"));
5919     return SQ_ERROR;
5920   }
5921   auto _this = reinterpret_cast<scripting::FloatingImage*> (data);
5922 
5923   if (_this == nullptr) {
5924     return SQ_ERROR;
5925   }
5926 
5927   SQFloat arg0;
5928   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5929     sq_throwerror(vm, _SC("Argument 1 not a float"));
5930     return SQ_ERROR;
5931   }
5932 
5933   try {
5934     _this->fade_out(static_cast<float> (arg0));
5935 
5936     return 0;
5937 
5938   } catch(std::exception& e) {
5939     sq_throwerror(vm, e.what());
5940     return SQ_ERROR;
5941   } catch(...) {
5942     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
5943     return SQ_ERROR;
5944   }
5945 
5946 }
5947 
GameObjectManager_release_hook(SQUserPointer ptr,SQInteger)5948 static SQInteger GameObjectManager_release_hook(SQUserPointer ptr, SQInteger )
5949 {
5950   auto _this = reinterpret_cast<scripting::GameObjectManager*> (ptr);
5951   delete _this;
5952   return 0;
5953 }
5954 
GameObjectManager_set_ambient_light_wrapper(HSQUIRRELVM vm)5955 static SQInteger GameObjectManager_set_ambient_light_wrapper(HSQUIRRELVM vm)
5956 {
5957   SQUserPointer data;
5958   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
5959     sq_throwerror(vm, _SC("'set_ambient_light' called without instance"));
5960     return SQ_ERROR;
5961   }
5962   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
5963 
5964   if (_this == nullptr) {
5965     return SQ_ERROR;
5966   }
5967 
5968   SQFloat arg0;
5969   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
5970     sq_throwerror(vm, _SC("Argument 1 not a float"));
5971     return SQ_ERROR;
5972   }
5973   SQFloat arg1;
5974   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
5975     sq_throwerror(vm, _SC("Argument 2 not a float"));
5976     return SQ_ERROR;
5977   }
5978   SQFloat arg2;
5979   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
5980     sq_throwerror(vm, _SC("Argument 3 not a float"));
5981     return SQ_ERROR;
5982   }
5983 
5984   try {
5985     _this->set_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
5986 
5987     return 0;
5988 
5989   } catch(std::exception& e) {
5990     sq_throwerror(vm, e.what());
5991     return SQ_ERROR;
5992   } catch(...) {
5993     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'"));
5994     return SQ_ERROR;
5995   }
5996 
5997 }
5998 
GameObjectManager_fade_to_ambient_light_wrapper(HSQUIRRELVM vm)5999 static SQInteger GameObjectManager_fade_to_ambient_light_wrapper(HSQUIRRELVM vm)
6000 {
6001   SQUserPointer data;
6002   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6003     sq_throwerror(vm, _SC("'fade_to_ambient_light' called without instance"));
6004     return SQ_ERROR;
6005   }
6006   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
6007 
6008   if (_this == nullptr) {
6009     return SQ_ERROR;
6010   }
6011 
6012   SQFloat arg0;
6013   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6014     sq_throwerror(vm, _SC("Argument 1 not a float"));
6015     return SQ_ERROR;
6016   }
6017   SQFloat arg1;
6018   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6019     sq_throwerror(vm, _SC("Argument 2 not a float"));
6020     return SQ_ERROR;
6021   }
6022   SQFloat arg2;
6023   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6024     sq_throwerror(vm, _SC("Argument 3 not a float"));
6025     return SQ_ERROR;
6026   }
6027   SQFloat arg3;
6028   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
6029     sq_throwerror(vm, _SC("Argument 4 not a float"));
6030     return SQ_ERROR;
6031   }
6032 
6033   try {
6034     _this->fade_to_ambient_light(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
6035 
6036     return 0;
6037 
6038   } catch(std::exception& e) {
6039     sq_throwerror(vm, e.what());
6040     return SQ_ERROR;
6041   } catch(...) {
6042     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_to_ambient_light'"));
6043     return SQ_ERROR;
6044   }
6045 
6046 }
6047 
GameObjectManager_get_ambient_red_wrapper(HSQUIRRELVM vm)6048 static SQInteger GameObjectManager_get_ambient_red_wrapper(HSQUIRRELVM vm)
6049 {
6050   SQUserPointer data;
6051   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6052     sq_throwerror(vm, _SC("'get_ambient_red' called without instance"));
6053     return SQ_ERROR;
6054   }
6055   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
6056 
6057   if (_this == nullptr) {
6058     return SQ_ERROR;
6059   }
6060 
6061 
6062   try {
6063     float return_value = _this->get_ambient_red();
6064 
6065     sq_pushfloat(vm, return_value);
6066     return 1;
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 'get_ambient_red'"));
6073     return SQ_ERROR;
6074   }
6075 
6076 }
6077 
GameObjectManager_get_ambient_green_wrapper(HSQUIRRELVM vm)6078 static SQInteger GameObjectManager_get_ambient_green_wrapper(HSQUIRRELVM vm)
6079 {
6080   SQUserPointer data;
6081   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6082     sq_throwerror(vm, _SC("'get_ambient_green' called without instance"));
6083     return SQ_ERROR;
6084   }
6085   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
6086 
6087   if (_this == nullptr) {
6088     return SQ_ERROR;
6089   }
6090 
6091 
6092   try {
6093     float return_value = _this->get_ambient_green();
6094 
6095     sq_pushfloat(vm, return_value);
6096     return 1;
6097 
6098   } catch(std::exception& e) {
6099     sq_throwerror(vm, e.what());
6100     return SQ_ERROR;
6101   } catch(...) {
6102     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'"));
6103     return SQ_ERROR;
6104   }
6105 
6106 }
6107 
GameObjectManager_get_ambient_blue_wrapper(HSQUIRRELVM vm)6108 static SQInteger GameObjectManager_get_ambient_blue_wrapper(HSQUIRRELVM vm)
6109 {
6110   SQUserPointer data;
6111   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6112     sq_throwerror(vm, _SC("'get_ambient_blue' called without instance"));
6113     return SQ_ERROR;
6114   }
6115   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
6116 
6117   if (_this == nullptr) {
6118     return SQ_ERROR;
6119   }
6120 
6121 
6122   try {
6123     float return_value = _this->get_ambient_blue();
6124 
6125     sq_pushfloat(vm, return_value);
6126     return 1;
6127 
6128   } catch(std::exception& e) {
6129     sq_throwerror(vm, e.what());
6130     return SQ_ERROR;
6131   } catch(...) {
6132     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'"));
6133     return SQ_ERROR;
6134   }
6135 
6136 }
6137 
GameObjectManager_set_music_wrapper(HSQUIRRELVM vm)6138 static SQInteger GameObjectManager_set_music_wrapper(HSQUIRRELVM vm)
6139 {
6140   SQUserPointer data;
6141   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6142     sq_throwerror(vm, _SC("'set_music' called without instance"));
6143     return SQ_ERROR;
6144   }
6145   auto _this = reinterpret_cast<scripting::GameObjectManager*> (data);
6146 
6147   if (_this == nullptr) {
6148     return SQ_ERROR;
6149   }
6150 
6151   const SQChar* arg0;
6152   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6153     sq_throwerror(vm, _SC("Argument 1 not a string"));
6154     return SQ_ERROR;
6155   }
6156 
6157   try {
6158     _this->set_music(arg0);
6159 
6160     return 0;
6161 
6162   } catch(std::exception& e) {
6163     sq_throwerror(vm, e.what());
6164     return SQ_ERROR;
6165   } catch(...) {
6166     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_music'"));
6167     return SQ_ERROR;
6168   }
6169 
6170 }
6171 
Gradient_release_hook(SQUserPointer ptr,SQInteger)6172 static SQInteger Gradient_release_hook(SQUserPointer ptr, SQInteger )
6173 {
6174   auto _this = reinterpret_cast<scripting::Gradient*> (ptr);
6175   delete _this;
6176   return 0;
6177 }
6178 
Gradient_set_direction_wrapper(HSQUIRRELVM vm)6179 static SQInteger Gradient_set_direction_wrapper(HSQUIRRELVM vm)
6180 {
6181   SQUserPointer data;
6182   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6183     sq_throwerror(vm, _SC("'set_direction' called without instance"));
6184     return SQ_ERROR;
6185   }
6186   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6187 
6188   if (_this == nullptr) {
6189     return SQ_ERROR;
6190   }
6191 
6192   const SQChar* arg0;
6193   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6194     sq_throwerror(vm, _SC("Argument 1 not a string"));
6195     return SQ_ERROR;
6196   }
6197 
6198   try {
6199     _this->set_direction(arg0);
6200 
6201     return 0;
6202 
6203   } catch(std::exception& e) {
6204     sq_throwerror(vm, e.what());
6205     return SQ_ERROR;
6206   } catch(...) {
6207     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_direction'"));
6208     return SQ_ERROR;
6209   }
6210 
6211 }
6212 
Gradient_get_direction_wrapper(HSQUIRRELVM vm)6213 static SQInteger Gradient_get_direction_wrapper(HSQUIRRELVM vm)
6214 {
6215   SQUserPointer data;
6216   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6217     sq_throwerror(vm, _SC("'get_direction' called without instance"));
6218     return SQ_ERROR;
6219   }
6220   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6221 
6222   if (_this == nullptr) {
6223     return SQ_ERROR;
6224   }
6225 
6226 
6227   try {
6228     std::string return_value = _this->get_direction();
6229 
6230     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
6231     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
6232     return 1;
6233 
6234   } catch(std::exception& e) {
6235     sq_throwerror(vm, e.what());
6236     return SQ_ERROR;
6237   } catch(...) {
6238     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_direction'"));
6239     return SQ_ERROR;
6240   }
6241 
6242 }
6243 
Gradient_set_color1_wrapper(HSQUIRRELVM vm)6244 static SQInteger Gradient_set_color1_wrapper(HSQUIRRELVM vm)
6245 {
6246   SQUserPointer data;
6247   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6248     sq_throwerror(vm, _SC("'set_color1' called without instance"));
6249     return SQ_ERROR;
6250   }
6251   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6252 
6253   if (_this == nullptr) {
6254     return SQ_ERROR;
6255   }
6256 
6257   SQFloat arg0;
6258   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6259     sq_throwerror(vm, _SC("Argument 1 not a float"));
6260     return SQ_ERROR;
6261   }
6262   SQFloat arg1;
6263   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6264     sq_throwerror(vm, _SC("Argument 2 not a float"));
6265     return SQ_ERROR;
6266   }
6267   SQFloat arg2;
6268   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6269     sq_throwerror(vm, _SC("Argument 3 not a float"));
6270     return SQ_ERROR;
6271   }
6272 
6273   try {
6274     _this->set_color1(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
6275 
6276     return 0;
6277 
6278   } catch(std::exception& e) {
6279     sq_throwerror(vm, e.what());
6280     return SQ_ERROR;
6281   } catch(...) {
6282     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color1'"));
6283     return SQ_ERROR;
6284   }
6285 
6286 }
6287 
Gradient_set_color2_wrapper(HSQUIRRELVM vm)6288 static SQInteger Gradient_set_color2_wrapper(HSQUIRRELVM vm)
6289 {
6290   SQUserPointer data;
6291   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6292     sq_throwerror(vm, _SC("'set_color2' called without instance"));
6293     return SQ_ERROR;
6294   }
6295   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6296 
6297   if (_this == nullptr) {
6298     return SQ_ERROR;
6299   }
6300 
6301   SQFloat arg0;
6302   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6303     sq_throwerror(vm, _SC("Argument 1 not a float"));
6304     return SQ_ERROR;
6305   }
6306   SQFloat arg1;
6307   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6308     sq_throwerror(vm, _SC("Argument 2 not a float"));
6309     return SQ_ERROR;
6310   }
6311   SQFloat arg2;
6312   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6313     sq_throwerror(vm, _SC("Argument 3 not a float"));
6314     return SQ_ERROR;
6315   }
6316 
6317   try {
6318     _this->set_color2(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2));
6319 
6320     return 0;
6321 
6322   } catch(std::exception& e) {
6323     sq_throwerror(vm, e.what());
6324     return SQ_ERROR;
6325   } catch(...) {
6326     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color2'"));
6327     return SQ_ERROR;
6328   }
6329 
6330 }
6331 
Gradient_set_colors_wrapper(HSQUIRRELVM vm)6332 static SQInteger Gradient_set_colors_wrapper(HSQUIRRELVM vm)
6333 {
6334   SQUserPointer data;
6335   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6336     sq_throwerror(vm, _SC("'set_colors' called without instance"));
6337     return SQ_ERROR;
6338   }
6339   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6340 
6341   if (_this == nullptr) {
6342     return SQ_ERROR;
6343   }
6344 
6345   SQFloat arg0;
6346   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6347     sq_throwerror(vm, _SC("Argument 1 not a float"));
6348     return SQ_ERROR;
6349   }
6350   SQFloat arg1;
6351   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6352     sq_throwerror(vm, _SC("Argument 2 not a float"));
6353     return SQ_ERROR;
6354   }
6355   SQFloat arg2;
6356   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6357     sq_throwerror(vm, _SC("Argument 3 not a float"));
6358     return SQ_ERROR;
6359   }
6360   SQFloat arg3;
6361   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
6362     sq_throwerror(vm, _SC("Argument 4 not a float"));
6363     return SQ_ERROR;
6364   }
6365   SQFloat arg4;
6366   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
6367     sq_throwerror(vm, _SC("Argument 5 not a float"));
6368     return SQ_ERROR;
6369   }
6370   SQFloat arg5;
6371   if(SQ_FAILED(sq_getfloat(vm, 7, &arg5))) {
6372     sq_throwerror(vm, _SC("Argument 6 not a float"));
6373     return SQ_ERROR;
6374   }
6375 
6376   try {
6377     _this->set_colors(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4), static_cast<float> (arg5));
6378 
6379     return 0;
6380 
6381   } catch(std::exception& e) {
6382     sq_throwerror(vm, e.what());
6383     return SQ_ERROR;
6384   } catch(...) {
6385     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_colors'"));
6386     return SQ_ERROR;
6387   }
6388 
6389 }
6390 
Gradient_fade_color1_wrapper(HSQUIRRELVM vm)6391 static SQInteger Gradient_fade_color1_wrapper(HSQUIRRELVM vm)
6392 {
6393   SQUserPointer data;
6394   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6395     sq_throwerror(vm, _SC("'fade_color1' called without instance"));
6396     return SQ_ERROR;
6397   }
6398   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6399 
6400   if (_this == nullptr) {
6401     return SQ_ERROR;
6402   }
6403 
6404   SQFloat arg0;
6405   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6406     sq_throwerror(vm, _SC("Argument 1 not a float"));
6407     return SQ_ERROR;
6408   }
6409   SQFloat arg1;
6410   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6411     sq_throwerror(vm, _SC("Argument 2 not a float"));
6412     return SQ_ERROR;
6413   }
6414   SQFloat arg2;
6415   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6416     sq_throwerror(vm, _SC("Argument 3 not a float"));
6417     return SQ_ERROR;
6418   }
6419   SQFloat arg3;
6420   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
6421     sq_throwerror(vm, _SC("Argument 4 not a float"));
6422     return SQ_ERROR;
6423   }
6424 
6425   try {
6426     _this->fade_color1(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
6427 
6428     return 0;
6429 
6430   } catch(std::exception& e) {
6431     sq_throwerror(vm, e.what());
6432     return SQ_ERROR;
6433   } catch(...) {
6434     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color1'"));
6435     return SQ_ERROR;
6436   }
6437 
6438 }
6439 
Gradient_fade_color2_wrapper(HSQUIRRELVM vm)6440 static SQInteger Gradient_fade_color2_wrapper(HSQUIRRELVM vm)
6441 {
6442   SQUserPointer data;
6443   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6444     sq_throwerror(vm, _SC("'fade_color2' called without instance"));
6445     return SQ_ERROR;
6446   }
6447   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6448 
6449   if (_this == nullptr) {
6450     return SQ_ERROR;
6451   }
6452 
6453   SQFloat arg0;
6454   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6455     sq_throwerror(vm, _SC("Argument 1 not a float"));
6456     return SQ_ERROR;
6457   }
6458   SQFloat arg1;
6459   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6460     sq_throwerror(vm, _SC("Argument 2 not a float"));
6461     return SQ_ERROR;
6462   }
6463   SQFloat arg2;
6464   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6465     sq_throwerror(vm, _SC("Argument 3 not a float"));
6466     return SQ_ERROR;
6467   }
6468   SQFloat arg3;
6469   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
6470     sq_throwerror(vm, _SC("Argument 4 not a float"));
6471     return SQ_ERROR;
6472   }
6473 
6474   try {
6475     _this->fade_color2(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
6476 
6477     return 0;
6478 
6479   } catch(std::exception& e) {
6480     sq_throwerror(vm, e.what());
6481     return SQ_ERROR;
6482   } catch(...) {
6483     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color2'"));
6484     return SQ_ERROR;
6485   }
6486 
6487 }
6488 
Gradient_fade_colors_wrapper(HSQUIRRELVM vm)6489 static SQInteger Gradient_fade_colors_wrapper(HSQUIRRELVM vm)
6490 {
6491   SQUserPointer data;
6492   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6493     sq_throwerror(vm, _SC("'fade_colors' called without instance"));
6494     return SQ_ERROR;
6495   }
6496   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6497 
6498   if (_this == nullptr) {
6499     return SQ_ERROR;
6500   }
6501 
6502   SQFloat arg0;
6503   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6504     sq_throwerror(vm, _SC("Argument 1 not a float"));
6505     return SQ_ERROR;
6506   }
6507   SQFloat arg1;
6508   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
6509     sq_throwerror(vm, _SC("Argument 2 not a float"));
6510     return SQ_ERROR;
6511   }
6512   SQFloat arg2;
6513   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
6514     sq_throwerror(vm, _SC("Argument 3 not a float"));
6515     return SQ_ERROR;
6516   }
6517   SQFloat arg3;
6518   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
6519     sq_throwerror(vm, _SC("Argument 4 not a float"));
6520     return SQ_ERROR;
6521   }
6522   SQFloat arg4;
6523   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
6524     sq_throwerror(vm, _SC("Argument 5 not a float"));
6525     return SQ_ERROR;
6526   }
6527   SQFloat arg5;
6528   if(SQ_FAILED(sq_getfloat(vm, 7, &arg5))) {
6529     sq_throwerror(vm, _SC("Argument 6 not a float"));
6530     return SQ_ERROR;
6531   }
6532   SQFloat arg6;
6533   if(SQ_FAILED(sq_getfloat(vm, 8, &arg6))) {
6534     sq_throwerror(vm, _SC("Argument 7 not a float"));
6535     return SQ_ERROR;
6536   }
6537 
6538   try {
6539     _this->fade_colors(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4), static_cast<float> (arg5), static_cast<float> (arg6));
6540 
6541     return 0;
6542 
6543   } catch(std::exception& e) {
6544     sq_throwerror(vm, e.what());
6545     return SQ_ERROR;
6546   } catch(...) {
6547     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_colors'"));
6548     return SQ_ERROR;
6549   }
6550 
6551 }
6552 
Gradient_swap_colors_wrapper(HSQUIRRELVM vm)6553 static SQInteger Gradient_swap_colors_wrapper(HSQUIRRELVM vm)
6554 {
6555   SQUserPointer data;
6556   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6557     sq_throwerror(vm, _SC("'swap_colors' called without instance"));
6558     return SQ_ERROR;
6559   }
6560   auto _this = reinterpret_cast<scripting::Gradient*> (data);
6561 
6562   if (_this == nullptr) {
6563     return SQ_ERROR;
6564   }
6565 
6566 
6567   try {
6568     _this->swap_colors();
6569 
6570     return 0;
6571 
6572   } catch(std::exception& e) {
6573     sq_throwerror(vm, e.what());
6574     return SQ_ERROR;
6575   } catch(...) {
6576     sq_throwerror(vm, _SC("Unexpected exception while executing function 'swap_colors'"));
6577     return SQ_ERROR;
6578   }
6579 
6580 }
6581 
LevelTime_release_hook(SQUserPointer ptr,SQInteger)6582 static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger )
6583 {
6584   auto _this = reinterpret_cast<scripting::LevelTime*> (ptr);
6585   delete _this;
6586   return 0;
6587 }
6588 
LevelTime_start_wrapper(HSQUIRRELVM vm)6589 static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm)
6590 {
6591   SQUserPointer data;
6592   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6593     sq_throwerror(vm, _SC("'start' called without instance"));
6594     return SQ_ERROR;
6595   }
6596   auto _this = reinterpret_cast<scripting::LevelTime*> (data);
6597 
6598   if (_this == nullptr) {
6599     return SQ_ERROR;
6600   }
6601 
6602 
6603   try {
6604     _this->start();
6605 
6606     return 0;
6607 
6608   } catch(std::exception& e) {
6609     sq_throwerror(vm, e.what());
6610     return SQ_ERROR;
6611   } catch(...) {
6612     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
6613     return SQ_ERROR;
6614   }
6615 
6616 }
6617 
LevelTime_stop_wrapper(HSQUIRRELVM vm)6618 static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm)
6619 {
6620   SQUserPointer data;
6621   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6622     sq_throwerror(vm, _SC("'stop' called without instance"));
6623     return SQ_ERROR;
6624   }
6625   auto _this = reinterpret_cast<scripting::LevelTime*> (data);
6626 
6627   if (_this == nullptr) {
6628     return SQ_ERROR;
6629   }
6630 
6631 
6632   try {
6633     _this->stop();
6634 
6635     return 0;
6636 
6637   } catch(std::exception& e) {
6638     sq_throwerror(vm, e.what());
6639     return SQ_ERROR;
6640   } catch(...) {
6641     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
6642     return SQ_ERROR;
6643   }
6644 
6645 }
6646 
LevelTime_get_time_wrapper(HSQUIRRELVM vm)6647 static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm)
6648 {
6649   SQUserPointer data;
6650   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6651     sq_throwerror(vm, _SC("'get_time' called without instance"));
6652     return SQ_ERROR;
6653   }
6654   auto _this = reinterpret_cast<scripting::LevelTime*> (data);
6655 
6656   if (_this == nullptr) {
6657     return SQ_ERROR;
6658   }
6659 
6660 
6661   try {
6662     float return_value = _this->get_time();
6663 
6664     sq_pushfloat(vm, return_value);
6665     return 1;
6666 
6667   } catch(std::exception& e) {
6668     sq_throwerror(vm, e.what());
6669     return SQ_ERROR;
6670   } catch(...) {
6671     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'"));
6672     return SQ_ERROR;
6673   }
6674 
6675 }
6676 
LevelTime_set_time_wrapper(HSQUIRRELVM vm)6677 static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm)
6678 {
6679   SQUserPointer data;
6680   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6681     sq_throwerror(vm, _SC("'set_time' called without instance"));
6682     return SQ_ERROR;
6683   }
6684   auto _this = reinterpret_cast<scripting::LevelTime*> (data);
6685 
6686   if (_this == nullptr) {
6687     return SQ_ERROR;
6688   }
6689 
6690   SQFloat arg0;
6691   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
6692     sq_throwerror(vm, _SC("Argument 1 not a float"));
6693     return SQ_ERROR;
6694   }
6695 
6696   try {
6697     _this->set_time(static_cast<float> (arg0));
6698 
6699     return 0;
6700 
6701   } catch(std::exception& e) {
6702     sq_throwerror(vm, e.what());
6703     return SQ_ERROR;
6704   } catch(...) {
6705     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'"));
6706     return SQ_ERROR;
6707   }
6708 
6709 }
6710 
ParticleSystem_release_hook(SQUserPointer ptr,SQInteger)6711 static SQInteger ParticleSystem_release_hook(SQUserPointer ptr, SQInteger )
6712 {
6713   auto _this = reinterpret_cast<scripting::ParticleSystem*> (ptr);
6714   delete _this;
6715   return 0;
6716 }
6717 
ParticleSystem_set_enabled_wrapper(HSQUIRRELVM vm)6718 static SQInteger ParticleSystem_set_enabled_wrapper(HSQUIRRELVM vm)
6719 {
6720   SQUserPointer data;
6721   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6722     sq_throwerror(vm, _SC("'set_enabled' called without instance"));
6723     return SQ_ERROR;
6724   }
6725   auto _this = reinterpret_cast<scripting::ParticleSystem*> (data);
6726 
6727   if (_this == nullptr) {
6728     return SQ_ERROR;
6729   }
6730 
6731   SQBool arg0;
6732   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
6733     sq_throwerror(vm, _SC("Argument 1 not a bool"));
6734     return SQ_ERROR;
6735   }
6736 
6737   try {
6738     _this->set_enabled(arg0 == SQTrue);
6739 
6740     return 0;
6741 
6742   } catch(std::exception& e) {
6743     sq_throwerror(vm, e.what());
6744     return SQ_ERROR;
6745   } catch(...) {
6746     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'"));
6747     return SQ_ERROR;
6748   }
6749 
6750 }
6751 
ParticleSystem_get_enabled_wrapper(HSQUIRRELVM vm)6752 static SQInteger ParticleSystem_get_enabled_wrapper(HSQUIRRELVM vm)
6753 {
6754   SQUserPointer data;
6755   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6756     sq_throwerror(vm, _SC("'get_enabled' called without instance"));
6757     return SQ_ERROR;
6758   }
6759   auto _this = reinterpret_cast<scripting::ParticleSystem*> (data);
6760 
6761   if (_this == nullptr) {
6762     return SQ_ERROR;
6763   }
6764 
6765 
6766   try {
6767     bool return_value = _this->get_enabled();
6768 
6769     sq_pushbool(vm, return_value);
6770     return 1;
6771 
6772   } catch(std::exception& e) {
6773     sq_throwerror(vm, e.what());
6774     return SQ_ERROR;
6775   } catch(...) {
6776     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'"));
6777     return SQ_ERROR;
6778   }
6779 
6780 }
6781 
Platform_release_hook(SQUserPointer ptr,SQInteger)6782 static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger )
6783 {
6784   auto _this = reinterpret_cast<scripting::Platform*> (ptr);
6785   delete _this;
6786   return 0;
6787 }
6788 
Platform_goto_node_wrapper(HSQUIRRELVM vm)6789 static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm)
6790 {
6791   SQUserPointer data;
6792   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6793     sq_throwerror(vm, _SC("'goto_node' called without instance"));
6794     return SQ_ERROR;
6795   }
6796   auto _this = reinterpret_cast<scripting::Platform*> (data);
6797 
6798   if (_this == nullptr) {
6799     return SQ_ERROR;
6800   }
6801 
6802   SQInteger arg0;
6803   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
6804     sq_throwerror(vm, _SC("Argument 1 not an integer"));
6805     return SQ_ERROR;
6806   }
6807 
6808   try {
6809     _this->goto_node(static_cast<int> (arg0));
6810 
6811     return 0;
6812 
6813   } catch(std::exception& e) {
6814     sq_throwerror(vm, e.what());
6815     return SQ_ERROR;
6816   } catch(...) {
6817     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
6818     return SQ_ERROR;
6819   }
6820 
6821 }
6822 
Platform_start_moving_wrapper(HSQUIRRELVM vm)6823 static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm)
6824 {
6825   SQUserPointer data;
6826   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6827     sq_throwerror(vm, _SC("'start_moving' called without instance"));
6828     return SQ_ERROR;
6829   }
6830   auto _this = reinterpret_cast<scripting::Platform*> (data);
6831 
6832   if (_this == nullptr) {
6833     return SQ_ERROR;
6834   }
6835 
6836 
6837   try {
6838     _this->start_moving();
6839 
6840     return 0;
6841 
6842   } catch(std::exception& e) {
6843     sq_throwerror(vm, e.what());
6844     return SQ_ERROR;
6845   } catch(...) {
6846     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
6847     return SQ_ERROR;
6848   }
6849 
6850 }
6851 
Platform_stop_moving_wrapper(HSQUIRRELVM vm)6852 static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm)
6853 {
6854   SQUserPointer data;
6855   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6856     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
6857     return SQ_ERROR;
6858   }
6859   auto _this = reinterpret_cast<scripting::Platform*> (data);
6860 
6861   if (_this == nullptr) {
6862     return SQ_ERROR;
6863   }
6864 
6865 
6866   try {
6867     _this->stop_moving();
6868 
6869     return 0;
6870 
6871   } catch(std::exception& e) {
6872     sq_throwerror(vm, e.what());
6873     return SQ_ERROR;
6874   } catch(...) {
6875     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
6876     return SQ_ERROR;
6877   }
6878 
6879 }
6880 
Platform_set_action_wrapper(HSQUIRRELVM vm)6881 static SQInteger Platform_set_action_wrapper(HSQUIRRELVM vm)
6882 {
6883   SQUserPointer data;
6884   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6885     sq_throwerror(vm, _SC("'set_action' called without instance"));
6886     return SQ_ERROR;
6887   }
6888   auto _this = reinterpret_cast<scripting::Platform*> (data);
6889 
6890   if (_this == nullptr) {
6891     return SQ_ERROR;
6892   }
6893 
6894   const SQChar* arg0;
6895   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6896     sq_throwerror(vm, _SC("Argument 1 not a string"));
6897     return SQ_ERROR;
6898   }
6899   SQInteger arg1;
6900   if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
6901     sq_throwerror(vm, _SC("Argument 2 not an integer"));
6902     return SQ_ERROR;
6903   }
6904 
6905   try {
6906     _this->set_action(arg0, static_cast<int> (arg1));
6907 
6908     return 0;
6909 
6910   } catch(std::exception& e) {
6911     sq_throwerror(vm, e.what());
6912     return SQ_ERROR;
6913   } catch(...) {
6914     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
6915     return SQ_ERROR;
6916   }
6917 
6918 }
6919 
Player_release_hook(SQUserPointer ptr,SQInteger)6920 static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger )
6921 {
6922   auto _this = reinterpret_cast<scripting::Player*> (ptr);
6923   delete _this;
6924   return 0;
6925 }
6926 
Player_add_bonus_wrapper(HSQUIRRELVM vm)6927 static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm)
6928 {
6929   SQUserPointer data;
6930   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6931     sq_throwerror(vm, _SC("'add_bonus' called without instance"));
6932     return SQ_ERROR;
6933   }
6934   auto _this = reinterpret_cast<scripting::Player*> (data);
6935 
6936   if (_this == nullptr) {
6937     return SQ_ERROR;
6938   }
6939 
6940   const SQChar* arg0;
6941   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6942     sq_throwerror(vm, _SC("Argument 1 not a string"));
6943     return SQ_ERROR;
6944   }
6945 
6946   try {
6947     bool return_value = _this->add_bonus(arg0);
6948 
6949     sq_pushbool(vm, return_value);
6950     return 1;
6951 
6952   } catch(std::exception& e) {
6953     sq_throwerror(vm, e.what());
6954     return SQ_ERROR;
6955   } catch(...) {
6956     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'"));
6957     return SQ_ERROR;
6958   }
6959 
6960 }
6961 
Player_set_bonus_wrapper(HSQUIRRELVM vm)6962 static SQInteger Player_set_bonus_wrapper(HSQUIRRELVM vm)
6963 {
6964   SQUserPointer data;
6965   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
6966     sq_throwerror(vm, _SC("'set_bonus' called without instance"));
6967     return SQ_ERROR;
6968   }
6969   auto _this = reinterpret_cast<scripting::Player*> (data);
6970 
6971   if (_this == nullptr) {
6972     return SQ_ERROR;
6973   }
6974 
6975   const SQChar* arg0;
6976   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
6977     sq_throwerror(vm, _SC("Argument 1 not a string"));
6978     return SQ_ERROR;
6979   }
6980 
6981   try {
6982     bool return_value = _this->set_bonus(arg0);
6983 
6984     sq_pushbool(vm, return_value);
6985     return 1;
6986 
6987   } catch(std::exception& e) {
6988     sq_throwerror(vm, e.what());
6989     return SQ_ERROR;
6990   } catch(...) {
6991     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_bonus'"));
6992     return SQ_ERROR;
6993   }
6994 
6995 }
6996 
Player_add_coins_wrapper(HSQUIRRELVM vm)6997 static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm)
6998 {
6999   SQUserPointer data;
7000   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7001     sq_throwerror(vm, _SC("'add_coins' called without instance"));
7002     return SQ_ERROR;
7003   }
7004   auto _this = reinterpret_cast<scripting::Player*> (data);
7005 
7006   if (_this == nullptr) {
7007     return SQ_ERROR;
7008   }
7009 
7010   SQInteger arg0;
7011   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
7012     sq_throwerror(vm, _SC("Argument 1 not an integer"));
7013     return SQ_ERROR;
7014   }
7015 
7016   try {
7017     _this->add_coins(static_cast<int> (arg0));
7018 
7019     return 0;
7020 
7021   } catch(std::exception& e) {
7022     sq_throwerror(vm, e.what());
7023     return SQ_ERROR;
7024   } catch(...) {
7025     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'"));
7026     return SQ_ERROR;
7027   }
7028 
7029 }
7030 
Player_get_coins_wrapper(HSQUIRRELVM vm)7031 static SQInteger Player_get_coins_wrapper(HSQUIRRELVM vm)
7032 {
7033   SQUserPointer data;
7034   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7035     sq_throwerror(vm, _SC("'get_coins' called without instance"));
7036     return SQ_ERROR;
7037   }
7038   auto _this = reinterpret_cast<scripting::Player*> (data);
7039 
7040   if (_this == nullptr) {
7041     return SQ_ERROR;
7042   }
7043 
7044 
7045   try {
7046     int return_value = _this->get_coins();
7047 
7048     sq_pushinteger(vm, return_value);
7049     return 1;
7050 
7051   } catch(std::exception& e) {
7052     sq_throwerror(vm, e.what());
7053     return SQ_ERROR;
7054   } catch(...) {
7055     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_coins'"));
7056     return SQ_ERROR;
7057   }
7058 
7059 }
7060 
Player_make_invincible_wrapper(HSQUIRRELVM vm)7061 static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm)
7062 {
7063   SQUserPointer data;
7064   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7065     sq_throwerror(vm, _SC("'make_invincible' called without instance"));
7066     return SQ_ERROR;
7067   }
7068   auto _this = reinterpret_cast<scripting::Player*> (data);
7069 
7070   if (_this == nullptr) {
7071     return SQ_ERROR;
7072   }
7073 
7074 
7075   try {
7076     _this->make_invincible();
7077 
7078     return 0;
7079 
7080   } catch(std::exception& e) {
7081     sq_throwerror(vm, e.what());
7082     return SQ_ERROR;
7083   } catch(...) {
7084     sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'"));
7085     return SQ_ERROR;
7086   }
7087 
7088 }
7089 
Player_deactivate_wrapper(HSQUIRRELVM vm)7090 static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm)
7091 {
7092   SQUserPointer data;
7093   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7094     sq_throwerror(vm, _SC("'deactivate' called without instance"));
7095     return SQ_ERROR;
7096   }
7097   auto _this = reinterpret_cast<scripting::Player*> (data);
7098 
7099   if (_this == nullptr) {
7100     return SQ_ERROR;
7101   }
7102 
7103 
7104   try {
7105     _this->deactivate();
7106 
7107     return 0;
7108 
7109   } catch(std::exception& e) {
7110     sq_throwerror(vm, e.what());
7111     return SQ_ERROR;
7112   } catch(...) {
7113     sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'"));
7114     return SQ_ERROR;
7115   }
7116 
7117 }
7118 
Player_activate_wrapper(HSQUIRRELVM vm)7119 static SQInteger Player_activate_wrapper(HSQUIRRELVM vm)
7120 {
7121   SQUserPointer data;
7122   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7123     sq_throwerror(vm, _SC("'activate' called without instance"));
7124     return SQ_ERROR;
7125   }
7126   auto _this = reinterpret_cast<scripting::Player*> (data);
7127 
7128   if (_this == nullptr) {
7129     return SQ_ERROR;
7130   }
7131 
7132 
7133   try {
7134     _this->activate();
7135 
7136     return 0;
7137 
7138   } catch(std::exception& e) {
7139     sq_throwerror(vm, e.what());
7140     return SQ_ERROR;
7141   } catch(...) {
7142     sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'"));
7143     return SQ_ERROR;
7144   }
7145 
7146 }
7147 
Player_walk_wrapper(HSQUIRRELVM vm)7148 static SQInteger Player_walk_wrapper(HSQUIRRELVM vm)
7149 {
7150   SQUserPointer data;
7151   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7152     sq_throwerror(vm, _SC("'walk' called without instance"));
7153     return SQ_ERROR;
7154   }
7155   auto _this = reinterpret_cast<scripting::Player*> (data);
7156 
7157   if (_this == nullptr) {
7158     return SQ_ERROR;
7159   }
7160 
7161   SQFloat arg0;
7162   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
7163     sq_throwerror(vm, _SC("Argument 1 not a float"));
7164     return SQ_ERROR;
7165   }
7166 
7167   try {
7168     _this->walk(static_cast<float> (arg0));
7169 
7170     return 0;
7171 
7172   } catch(std::exception& e) {
7173     sq_throwerror(vm, e.what());
7174     return SQ_ERROR;
7175   } catch(...) {
7176     sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'"));
7177     return SQ_ERROR;
7178   }
7179 
7180 }
7181 
Player_set_dir_wrapper(HSQUIRRELVM vm)7182 static SQInteger Player_set_dir_wrapper(HSQUIRRELVM vm)
7183 {
7184   SQUserPointer data;
7185   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7186     sq_throwerror(vm, _SC("'set_dir' called without instance"));
7187     return SQ_ERROR;
7188   }
7189   auto _this = reinterpret_cast<scripting::Player*> (data);
7190 
7191   if (_this == nullptr) {
7192     return SQ_ERROR;
7193   }
7194 
7195   SQBool arg0;
7196   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7197     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7198     return SQ_ERROR;
7199   }
7200 
7201   try {
7202     _this->set_dir(arg0 == SQTrue);
7203 
7204     return 0;
7205 
7206   } catch(std::exception& e) {
7207     sq_throwerror(vm, e.what());
7208     return SQ_ERROR;
7209   } catch(...) {
7210     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_dir'"));
7211     return SQ_ERROR;
7212   }
7213 
7214 }
7215 
Player_set_visible_wrapper(HSQUIRRELVM vm)7216 static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm)
7217 {
7218   SQUserPointer data;
7219   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7220     sq_throwerror(vm, _SC("'set_visible' called without instance"));
7221     return SQ_ERROR;
7222   }
7223   auto _this = reinterpret_cast<scripting::Player*> (data);
7224 
7225   if (_this == nullptr) {
7226     return SQ_ERROR;
7227   }
7228 
7229   SQBool arg0;
7230   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7231     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7232     return SQ_ERROR;
7233   }
7234 
7235   try {
7236     _this->set_visible(arg0 == SQTrue);
7237 
7238     return 0;
7239 
7240   } catch(std::exception& e) {
7241     sq_throwerror(vm, e.what());
7242     return SQ_ERROR;
7243   } catch(...) {
7244     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
7245     return SQ_ERROR;
7246   }
7247 
7248 }
7249 
Player_get_visible_wrapper(HSQUIRRELVM vm)7250 static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm)
7251 {
7252   SQUserPointer data;
7253   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7254     sq_throwerror(vm, _SC("'get_visible' called without instance"));
7255     return SQ_ERROR;
7256   }
7257   auto _this = reinterpret_cast<scripting::Player*> (data);
7258 
7259   if (_this == nullptr) {
7260     return SQ_ERROR;
7261   }
7262 
7263 
7264   try {
7265     bool return_value = _this->get_visible();
7266 
7267     sq_pushbool(vm, return_value);
7268     return 1;
7269 
7270   } catch(std::exception& e) {
7271     sq_throwerror(vm, e.what());
7272     return SQ_ERROR;
7273   } catch(...) {
7274     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'"));
7275     return SQ_ERROR;
7276   }
7277 
7278 }
7279 
Player_kill_wrapper(HSQUIRRELVM vm)7280 static SQInteger Player_kill_wrapper(HSQUIRRELVM vm)
7281 {
7282   SQUserPointer data;
7283   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7284     sq_throwerror(vm, _SC("'kill' called without instance"));
7285     return SQ_ERROR;
7286   }
7287   auto _this = reinterpret_cast<scripting::Player*> (data);
7288 
7289   if (_this == nullptr) {
7290     return SQ_ERROR;
7291   }
7292 
7293   SQBool arg0;
7294   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7295     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7296     return SQ_ERROR;
7297   }
7298 
7299   try {
7300     _this->kill(arg0 == SQTrue);
7301 
7302     return 0;
7303 
7304   } catch(std::exception& e) {
7305     sq_throwerror(vm, e.what());
7306     return SQ_ERROR;
7307   } catch(...) {
7308     sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'"));
7309     return SQ_ERROR;
7310   }
7311 
7312 }
7313 
Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)7314 static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm)
7315 {
7316   SQUserPointer data;
7317   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7318     sq_throwerror(vm, _SC("'set_ghost_mode' called without instance"));
7319     return SQ_ERROR;
7320   }
7321   auto _this = reinterpret_cast<scripting::Player*> (data);
7322 
7323   if (_this == nullptr) {
7324     return SQ_ERROR;
7325   }
7326 
7327   SQBool arg0;
7328   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7329     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7330     return SQ_ERROR;
7331   }
7332 
7333   try {
7334     _this->set_ghost_mode(arg0 == SQTrue);
7335 
7336     return 0;
7337 
7338   } catch(std::exception& e) {
7339     sq_throwerror(vm, e.what());
7340     return SQ_ERROR;
7341   } catch(...) {
7342     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'"));
7343     return SQ_ERROR;
7344   }
7345 
7346 }
7347 
Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)7348 static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm)
7349 {
7350   SQUserPointer data;
7351   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7352     sq_throwerror(vm, _SC("'get_ghost_mode' called without instance"));
7353     return SQ_ERROR;
7354   }
7355   auto _this = reinterpret_cast<scripting::Player*> (data);
7356 
7357   if (_this == nullptr) {
7358     return SQ_ERROR;
7359   }
7360 
7361 
7362   try {
7363     bool return_value = _this->get_ghost_mode();
7364 
7365     sq_pushbool(vm, return_value);
7366     return 1;
7367 
7368   } catch(std::exception& e) {
7369     sq_throwerror(vm, e.what());
7370     return SQ_ERROR;
7371   } catch(...) {
7372     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'"));
7373     return SQ_ERROR;
7374   }
7375 
7376 }
7377 
Player_kick_wrapper(HSQUIRRELVM vm)7378 static SQInteger Player_kick_wrapper(HSQUIRRELVM vm)
7379 {
7380   SQUserPointer data;
7381   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7382     sq_throwerror(vm, _SC("'kick' called without instance"));
7383     return SQ_ERROR;
7384   }
7385   auto _this = reinterpret_cast<scripting::Player*> (data);
7386 
7387   if (_this == nullptr) {
7388     return SQ_ERROR;
7389   }
7390 
7391 
7392   try {
7393     _this->kick();
7394 
7395     return 0;
7396 
7397   } catch(std::exception& e) {
7398     sq_throwerror(vm, e.what());
7399     return SQ_ERROR;
7400   } catch(...) {
7401     sq_throwerror(vm, _SC("Unexpected exception while executing function 'kick'"));
7402     return SQ_ERROR;
7403   }
7404 
7405 }
7406 
Player_do_cheer_wrapper(HSQUIRRELVM vm)7407 static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm)
7408 {
7409   SQUserPointer data;
7410   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7411     sq_throwerror(vm, _SC("'do_cheer' called without instance"));
7412     return SQ_ERROR;
7413   }
7414   auto _this = reinterpret_cast<scripting::Player*> (data);
7415 
7416   if (_this == nullptr) {
7417     return SQ_ERROR;
7418   }
7419 
7420 
7421   try {
7422     _this->do_cheer();
7423 
7424     return 0;
7425 
7426   } catch(std::exception& e) {
7427     sq_throwerror(vm, e.what());
7428     return SQ_ERROR;
7429   } catch(...) {
7430     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'"));
7431     return SQ_ERROR;
7432   }
7433 
7434 }
7435 
Player_do_duck_wrapper(HSQUIRRELVM vm)7436 static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm)
7437 {
7438   SQUserPointer data;
7439   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7440     sq_throwerror(vm, _SC("'do_duck' called without instance"));
7441     return SQ_ERROR;
7442   }
7443   auto _this = reinterpret_cast<scripting::Player*> (data);
7444 
7445   if (_this == nullptr) {
7446     return SQ_ERROR;
7447   }
7448 
7449 
7450   try {
7451     _this->do_duck();
7452 
7453     return 0;
7454 
7455   } catch(std::exception& e) {
7456     sq_throwerror(vm, e.what());
7457     return SQ_ERROR;
7458   } catch(...) {
7459     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'"));
7460     return SQ_ERROR;
7461   }
7462 
7463 }
7464 
Player_do_standup_wrapper(HSQUIRRELVM vm)7465 static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm)
7466 {
7467   SQUserPointer data;
7468   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7469     sq_throwerror(vm, _SC("'do_standup' called without instance"));
7470     return SQ_ERROR;
7471   }
7472   auto _this = reinterpret_cast<scripting::Player*> (data);
7473 
7474   if (_this == nullptr) {
7475     return SQ_ERROR;
7476   }
7477 
7478 
7479   try {
7480     _this->do_standup();
7481 
7482     return 0;
7483 
7484   } catch(std::exception& e) {
7485     sq_throwerror(vm, e.what());
7486     return SQ_ERROR;
7487   } catch(...) {
7488     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'"));
7489     return SQ_ERROR;
7490   }
7491 
7492 }
7493 
Player_do_backflip_wrapper(HSQUIRRELVM vm)7494 static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm)
7495 {
7496   SQUserPointer data;
7497   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7498     sq_throwerror(vm, _SC("'do_backflip' called without instance"));
7499     return SQ_ERROR;
7500   }
7501   auto _this = reinterpret_cast<scripting::Player*> (data);
7502 
7503   if (_this == nullptr) {
7504     return SQ_ERROR;
7505   }
7506 
7507 
7508   try {
7509     _this->do_backflip();
7510 
7511     return 0;
7512 
7513   } catch(std::exception& e) {
7514     sq_throwerror(vm, e.what());
7515     return SQ_ERROR;
7516   } catch(...) {
7517     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'"));
7518     return SQ_ERROR;
7519   }
7520 
7521 }
7522 
Player_do_jump_wrapper(HSQUIRRELVM vm)7523 static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm)
7524 {
7525   SQUserPointer data;
7526   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7527     sq_throwerror(vm, _SC("'do_jump' called without instance"));
7528     return SQ_ERROR;
7529   }
7530   auto _this = reinterpret_cast<scripting::Player*> (data);
7531 
7532   if (_this == nullptr) {
7533     return SQ_ERROR;
7534   }
7535 
7536   SQFloat arg0;
7537   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
7538     sq_throwerror(vm, _SC("Argument 1 not a float"));
7539     return SQ_ERROR;
7540   }
7541 
7542   try {
7543     _this->do_jump(static_cast<float> (arg0));
7544 
7545     return 0;
7546 
7547   } catch(std::exception& e) {
7548     sq_throwerror(vm, e.what());
7549     return SQ_ERROR;
7550   } catch(...) {
7551     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'"));
7552     return SQ_ERROR;
7553   }
7554 
7555 }
7556 
Player_trigger_sequence_wrapper(HSQUIRRELVM vm)7557 static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm)
7558 {
7559   SQUserPointer data;
7560   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7561     sq_throwerror(vm, _SC("'trigger_sequence' called without instance"));
7562     return SQ_ERROR;
7563   }
7564   auto _this = reinterpret_cast<scripting::Player*> (data);
7565 
7566   if (_this == nullptr) {
7567     return SQ_ERROR;
7568   }
7569 
7570   const SQChar* arg0;
7571   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
7572     sq_throwerror(vm, _SC("Argument 1 not a string"));
7573     return SQ_ERROR;
7574   }
7575 
7576   try {
7577     _this->trigger_sequence(arg0);
7578 
7579     return 0;
7580 
7581   } catch(std::exception& e) {
7582     sq_throwerror(vm, e.what());
7583     return SQ_ERROR;
7584   } catch(...) {
7585     sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'"));
7586     return SQ_ERROR;
7587   }
7588 
7589 }
7590 
Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)7591 static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm)
7592 {
7593   SQUserPointer data;
7594   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7595     sq_throwerror(vm, _SC("'use_scripting_controller' called without instance"));
7596     return SQ_ERROR;
7597   }
7598   auto _this = reinterpret_cast<scripting::Player*> (data);
7599 
7600   if (_this == nullptr) {
7601     return SQ_ERROR;
7602   }
7603 
7604   SQBool arg0;
7605   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7606     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7607     return SQ_ERROR;
7608   }
7609 
7610   try {
7611     _this->use_scripting_controller(arg0 == SQTrue);
7612 
7613     return 0;
7614 
7615   } catch(std::exception& e) {
7616     sq_throwerror(vm, e.what());
7617     return SQ_ERROR;
7618   } catch(...) {
7619     sq_throwerror(vm, _SC("Unexpected exception while executing function 'use_scripting_controller'"));
7620     return SQ_ERROR;
7621   }
7622 
7623 }
7624 
Player_has_grabbed_wrapper(HSQUIRRELVM vm)7625 static SQInteger Player_has_grabbed_wrapper(HSQUIRRELVM vm)
7626 {
7627   SQUserPointer data;
7628   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7629     sq_throwerror(vm, _SC("'has_grabbed' called without instance"));
7630     return SQ_ERROR;
7631   }
7632   auto _this = reinterpret_cast<scripting::Player*> (data);
7633 
7634   if (_this == nullptr) {
7635     return SQ_ERROR;
7636   }
7637 
7638   const SQChar* arg0;
7639   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
7640     sq_throwerror(vm, _SC("Argument 1 not a string"));
7641     return SQ_ERROR;
7642   }
7643 
7644   try {
7645     bool return_value = _this->has_grabbed(arg0);
7646 
7647     sq_pushbool(vm, return_value);
7648     return 1;
7649 
7650   } catch(std::exception& e) {
7651     sq_throwerror(vm, e.what());
7652     return SQ_ERROR;
7653   } catch(...) {
7654     sq_throwerror(vm, _SC("Unexpected exception while executing function 'has_grabbed'"));
7655     return SQ_ERROR;
7656   }
7657 
7658 }
7659 
Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)7660 static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm)
7661 {
7662   SQUserPointer data;
7663   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7664     sq_throwerror(vm, _SC("'do_scripting_controller' called without instance"));
7665     return SQ_ERROR;
7666   }
7667   auto _this = reinterpret_cast<scripting::Player*> (data);
7668 
7669   if (_this == nullptr) {
7670     return SQ_ERROR;
7671   }
7672 
7673   const SQChar* arg0;
7674   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
7675     sq_throwerror(vm, _SC("Argument 1 not a string"));
7676     return SQ_ERROR;
7677   }
7678   SQBool arg1;
7679   if(SQ_FAILED(sq_getbool(vm, 3, &arg1))) {
7680     sq_throwerror(vm, _SC("Argument 2 not a bool"));
7681     return SQ_ERROR;
7682   }
7683 
7684   try {
7685     _this->do_scripting_controller(arg0, arg1 == SQTrue);
7686 
7687     return 0;
7688 
7689   } catch(std::exception& e) {
7690     sq_throwerror(vm, e.what());
7691     return SQ_ERROR;
7692   } catch(...) {
7693     sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_scripting_controller'"));
7694     return SQ_ERROR;
7695   }
7696 
7697 }
7698 
Player_get_velocity_x_wrapper(HSQUIRRELVM vm)7699 static SQInteger Player_get_velocity_x_wrapper(HSQUIRRELVM vm)
7700 {
7701   SQUserPointer data;
7702   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7703     sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
7704     return SQ_ERROR;
7705   }
7706   auto _this = reinterpret_cast<scripting::Player*> (data);
7707 
7708   if (_this == nullptr) {
7709     return SQ_ERROR;
7710   }
7711 
7712 
7713   try {
7714     float return_value = _this->get_velocity_x();
7715 
7716     sq_pushfloat(vm, return_value);
7717     return 1;
7718 
7719   } catch(std::exception& e) {
7720     sq_throwerror(vm, e.what());
7721     return SQ_ERROR;
7722   } catch(...) {
7723     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
7724     return SQ_ERROR;
7725   }
7726 
7727 }
7728 
Player_get_velocity_y_wrapper(HSQUIRRELVM vm)7729 static SQInteger Player_get_velocity_y_wrapper(HSQUIRRELVM vm)
7730 {
7731   SQUserPointer data;
7732   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7733     sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
7734     return SQ_ERROR;
7735   }
7736   auto _this = reinterpret_cast<scripting::Player*> (data);
7737 
7738   if (_this == nullptr) {
7739     return SQ_ERROR;
7740   }
7741 
7742 
7743   try {
7744     float return_value = _this->get_velocity_y();
7745 
7746     sq_pushfloat(vm, return_value);
7747     return 1;
7748 
7749   } catch(std::exception& e) {
7750     sq_throwerror(vm, e.what());
7751     return SQ_ERROR;
7752   } catch(...) {
7753     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
7754     return SQ_ERROR;
7755   }
7756 
7757 }
7758 
Player_get_x_wrapper(HSQUIRRELVM vm)7759 static SQInteger Player_get_x_wrapper(HSQUIRRELVM vm)
7760 {
7761   SQUserPointer data;
7762   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7763     sq_throwerror(vm, _SC("'get_x' called without instance"));
7764     return SQ_ERROR;
7765   }
7766   auto _this = reinterpret_cast<scripting::Player*> (data);
7767 
7768   if (_this == nullptr) {
7769     return SQ_ERROR;
7770   }
7771 
7772 
7773   try {
7774     float return_value = _this->get_x();
7775 
7776     sq_pushfloat(vm, return_value);
7777     return 1;
7778 
7779   } catch(std::exception& e) {
7780     sq_throwerror(vm, e.what());
7781     return SQ_ERROR;
7782   } catch(...) {
7783     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_x'"));
7784     return SQ_ERROR;
7785   }
7786 
7787 }
7788 
Player_get_y_wrapper(HSQUIRRELVM vm)7789 static SQInteger Player_get_y_wrapper(HSQUIRRELVM vm)
7790 {
7791   SQUserPointer data;
7792   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7793     sq_throwerror(vm, _SC("'get_y' called without instance"));
7794     return SQ_ERROR;
7795   }
7796   auto _this = reinterpret_cast<scripting::Player*> (data);
7797 
7798   if (_this == nullptr) {
7799     return SQ_ERROR;
7800   }
7801 
7802 
7803   try {
7804     float return_value = _this->get_y();
7805 
7806     sq_pushfloat(vm, return_value);
7807     return 1;
7808 
7809   } catch(std::exception& e) {
7810     sq_throwerror(vm, e.what());
7811     return SQ_ERROR;
7812   } catch(...) {
7813     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_y'"));
7814     return SQ_ERROR;
7815   }
7816 
7817 }
7818 
Player_set_pos_wrapper(HSQUIRRELVM vm)7819 static SQInteger Player_set_pos_wrapper(HSQUIRRELVM vm)
7820 {
7821   SQUserPointer data;
7822   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7823     sq_throwerror(vm, _SC("'set_pos' called without instance"));
7824     return SQ_ERROR;
7825   }
7826   auto _this = reinterpret_cast<scripting::Player*> (data);
7827 
7828   if (_this == nullptr) {
7829     return SQ_ERROR;
7830   }
7831 
7832   SQFloat arg0;
7833   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
7834     sq_throwerror(vm, _SC("Argument 1 not a float"));
7835     return SQ_ERROR;
7836   }
7837   SQFloat arg1;
7838   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
7839     sq_throwerror(vm, _SC("Argument 2 not a float"));
7840     return SQ_ERROR;
7841   }
7842 
7843   try {
7844     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
7845 
7846     return 0;
7847 
7848   } catch(std::exception& e) {
7849     sq_throwerror(vm, e.what());
7850     return SQ_ERROR;
7851   } catch(...) {
7852     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
7853     return SQ_ERROR;
7854   }
7855 
7856 }
7857 
Rain_release_hook(SQUserPointer ptr,SQInteger)7858 static SQInteger Rain_release_hook(SQUserPointer ptr, SQInteger )
7859 {
7860   auto _this = reinterpret_cast<scripting::Rain*> (ptr);
7861   delete _this;
7862   return 0;
7863 }
7864 
Rain_set_enabled_wrapper(HSQUIRRELVM vm)7865 static SQInteger Rain_set_enabled_wrapper(HSQUIRRELVM vm)
7866 {
7867   SQUserPointer data;
7868   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7869     sq_throwerror(vm, _SC("'set_enabled' called without instance"));
7870     return SQ_ERROR;
7871   }
7872   auto _this = reinterpret_cast<scripting::Rain*> (data);
7873 
7874   if (_this == nullptr) {
7875     return SQ_ERROR;
7876   }
7877 
7878   SQBool arg0;
7879   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
7880     sq_throwerror(vm, _SC("Argument 1 not a bool"));
7881     return SQ_ERROR;
7882   }
7883 
7884   try {
7885     _this->set_enabled(arg0 == SQTrue);
7886 
7887     return 0;
7888 
7889   } catch(std::exception& e) {
7890     sq_throwerror(vm, e.what());
7891     return SQ_ERROR;
7892   } catch(...) {
7893     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_enabled'"));
7894     return SQ_ERROR;
7895   }
7896 
7897 }
7898 
Rain_get_enabled_wrapper(HSQUIRRELVM vm)7899 static SQInteger Rain_get_enabled_wrapper(HSQUIRRELVM vm)
7900 {
7901   SQUserPointer data;
7902   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7903     sq_throwerror(vm, _SC("'get_enabled' called without instance"));
7904     return SQ_ERROR;
7905   }
7906   auto _this = reinterpret_cast<scripting::Rain*> (data);
7907 
7908   if (_this == nullptr) {
7909     return SQ_ERROR;
7910   }
7911 
7912 
7913   try {
7914     bool return_value = _this->get_enabled();
7915 
7916     sq_pushbool(vm, return_value);
7917     return 1;
7918 
7919   } catch(std::exception& e) {
7920     sq_throwerror(vm, e.what());
7921     return SQ_ERROR;
7922   } catch(...) {
7923     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_enabled'"));
7924     return SQ_ERROR;
7925   }
7926 
7927 }
7928 
Rain_fade_speed_wrapper(HSQUIRRELVM vm)7929 static SQInteger Rain_fade_speed_wrapper(HSQUIRRELVM vm)
7930 {
7931   SQUserPointer data;
7932   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7933     sq_throwerror(vm, _SC("'fade_speed' called without instance"));
7934     return SQ_ERROR;
7935   }
7936   auto _this = reinterpret_cast<scripting::Rain*> (data);
7937 
7938   if (_this == nullptr) {
7939     return SQ_ERROR;
7940   }
7941 
7942   SQFloat arg0;
7943   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
7944     sq_throwerror(vm, _SC("Argument 1 not a float"));
7945     return SQ_ERROR;
7946   }
7947   SQFloat arg1;
7948   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
7949     sq_throwerror(vm, _SC("Argument 2 not a float"));
7950     return SQ_ERROR;
7951   }
7952 
7953   try {
7954     _this->fade_speed(static_cast<float> (arg0), static_cast<float> (arg1));
7955 
7956     return 0;
7957 
7958   } catch(std::exception& e) {
7959     sq_throwerror(vm, e.what());
7960     return SQ_ERROR;
7961   } catch(...) {
7962     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'"));
7963     return SQ_ERROR;
7964   }
7965 
7966 }
7967 
Rain_fade_amount_wrapper(HSQUIRRELVM vm)7968 static SQInteger Rain_fade_amount_wrapper(HSQUIRRELVM vm)
7969 {
7970   SQUserPointer data;
7971   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
7972     sq_throwerror(vm, _SC("'fade_amount' called without instance"));
7973     return SQ_ERROR;
7974   }
7975   auto _this = reinterpret_cast<scripting::Rain*> (data);
7976 
7977   if (_this == nullptr) {
7978     return SQ_ERROR;
7979   }
7980 
7981   SQFloat arg0;
7982   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
7983     sq_throwerror(vm, _SC("Argument 1 not a float"));
7984     return SQ_ERROR;
7985   }
7986   SQFloat arg1;
7987   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
7988     sq_throwerror(vm, _SC("Argument 2 not a float"));
7989     return SQ_ERROR;
7990   }
7991 
7992   try {
7993     _this->fade_amount(static_cast<float> (arg0), static_cast<float> (arg1));
7994 
7995     return 0;
7996 
7997   } catch(std::exception& e) {
7998     sq_throwerror(vm, e.what());
7999     return SQ_ERROR;
8000   } catch(...) {
8001     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_amount'"));
8002     return SQ_ERROR;
8003   }
8004 
8005 }
8006 
Rain_fade_angle_wrapper(HSQUIRRELVM vm)8007 static SQInteger Rain_fade_angle_wrapper(HSQUIRRELVM vm)
8008 {
8009   SQUserPointer data;
8010   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8011     sq_throwerror(vm, _SC("'fade_angle' called without instance"));
8012     return SQ_ERROR;
8013   }
8014   auto _this = reinterpret_cast<scripting::Rain*> (data);
8015 
8016   if (_this == nullptr) {
8017     return SQ_ERROR;
8018   }
8019 
8020   SQFloat arg0;
8021   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8022     sq_throwerror(vm, _SC("Argument 1 not a float"));
8023     return SQ_ERROR;
8024   }
8025   SQFloat arg1;
8026   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8027     sq_throwerror(vm, _SC("Argument 2 not a float"));
8028     return SQ_ERROR;
8029   }
8030   const SQChar* arg2;
8031   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
8032     sq_throwerror(vm, _SC("Argument 3 not a string"));
8033     return SQ_ERROR;
8034   }
8035 
8036   try {
8037     _this->fade_angle(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
8038 
8039     return 0;
8040 
8041   } catch(std::exception& e) {
8042     sq_throwerror(vm, e.what());
8043     return SQ_ERROR;
8044   } catch(...) {
8045     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_angle'"));
8046     return SQ_ERROR;
8047   }
8048 
8049 }
8050 
Rock_release_hook(SQUserPointer ptr,SQInteger)8051 static SQInteger Rock_release_hook(SQUserPointer ptr, SQInteger )
8052 {
8053   auto _this = reinterpret_cast<scripting::Rock*> (ptr);
8054   delete _this;
8055   return 0;
8056 }
8057 
ScriptedObject_release_hook(SQUserPointer ptr,SQInteger)8058 static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger )
8059 {
8060   auto _this = reinterpret_cast<scripting::ScriptedObject*> (ptr);
8061   delete _this;
8062   return 0;
8063 }
8064 
ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)8065 static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm)
8066 {
8067   SQUserPointer data;
8068   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8069     sq_throwerror(vm, _SC("'set_action' called without instance"));
8070     return SQ_ERROR;
8071   }
8072   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8073 
8074   if (_this == nullptr) {
8075     return SQ_ERROR;
8076   }
8077 
8078   const SQChar* arg0;
8079   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
8080     sq_throwerror(vm, _SC("Argument 1 not a string"));
8081     return SQ_ERROR;
8082   }
8083 
8084   try {
8085     _this->set_action(arg0);
8086 
8087     return 0;
8088 
8089   } catch(std::exception& e) {
8090     sq_throwerror(vm, e.what());
8091     return SQ_ERROR;
8092   } catch(...) {
8093     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'"));
8094     return SQ_ERROR;
8095   }
8096 
8097 }
8098 
ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)8099 static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm)
8100 {
8101   SQUserPointer data;
8102   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8103     sq_throwerror(vm, _SC("'get_action' called without instance"));
8104     return SQ_ERROR;
8105   }
8106   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8107 
8108   if (_this == nullptr) {
8109     return SQ_ERROR;
8110   }
8111 
8112 
8113   try {
8114     std::string return_value = _this->get_action();
8115 
8116     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
8117     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
8118     return 1;
8119 
8120   } catch(std::exception& e) {
8121     sq_throwerror(vm, e.what());
8122     return SQ_ERROR;
8123   } catch(...) {
8124     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'"));
8125     return SQ_ERROR;
8126   }
8127 
8128 }
8129 
ScriptedObject_move_wrapper(HSQUIRRELVM vm)8130 static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm)
8131 {
8132   SQUserPointer data;
8133   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8134     sq_throwerror(vm, _SC("'move' called without instance"));
8135     return SQ_ERROR;
8136   }
8137   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8138 
8139   if (_this == nullptr) {
8140     return SQ_ERROR;
8141   }
8142 
8143   SQFloat arg0;
8144   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8145     sq_throwerror(vm, _SC("Argument 1 not a float"));
8146     return SQ_ERROR;
8147   }
8148   SQFloat arg1;
8149   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8150     sq_throwerror(vm, _SC("Argument 2 not a float"));
8151     return SQ_ERROR;
8152   }
8153 
8154   try {
8155     _this->move(static_cast<float> (arg0), static_cast<float> (arg1));
8156 
8157     return 0;
8158 
8159   } catch(std::exception& e) {
8160     sq_throwerror(vm, e.what());
8161     return SQ_ERROR;
8162   } catch(...) {
8163     sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'"));
8164     return SQ_ERROR;
8165   }
8166 
8167 }
8168 
ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)8169 static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm)
8170 {
8171   SQUserPointer data;
8172   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8173     sq_throwerror(vm, _SC("'set_pos' called without instance"));
8174     return SQ_ERROR;
8175   }
8176   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8177 
8178   if (_this == nullptr) {
8179     return SQ_ERROR;
8180   }
8181 
8182   SQFloat arg0;
8183   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8184     sq_throwerror(vm, _SC("Argument 1 not a float"));
8185     return SQ_ERROR;
8186   }
8187   SQFloat arg1;
8188   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8189     sq_throwerror(vm, _SC("Argument 2 not a float"));
8190     return SQ_ERROR;
8191   }
8192 
8193   try {
8194     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
8195 
8196     return 0;
8197 
8198   } catch(std::exception& e) {
8199     sq_throwerror(vm, e.what());
8200     return SQ_ERROR;
8201   } catch(...) {
8202     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
8203     return SQ_ERROR;
8204   }
8205 
8206 }
8207 
ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)8208 static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm)
8209 {
8210   SQUserPointer data;
8211   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8212     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
8213     return SQ_ERROR;
8214   }
8215   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8216 
8217   if (_this == nullptr) {
8218     return SQ_ERROR;
8219   }
8220 
8221 
8222   try {
8223     float return_value = _this->get_pos_x();
8224 
8225     sq_pushfloat(vm, return_value);
8226     return 1;
8227 
8228   } catch(std::exception& e) {
8229     sq_throwerror(vm, e.what());
8230     return SQ_ERROR;
8231   } catch(...) {
8232     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
8233     return SQ_ERROR;
8234   }
8235 
8236 }
8237 
ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)8238 static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm)
8239 {
8240   SQUserPointer data;
8241   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8242     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
8243     return SQ_ERROR;
8244   }
8245   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8246 
8247   if (_this == nullptr) {
8248     return SQ_ERROR;
8249   }
8250 
8251 
8252   try {
8253     float return_value = _this->get_pos_y();
8254 
8255     sq_pushfloat(vm, return_value);
8256     return 1;
8257 
8258   } catch(std::exception& e) {
8259     sq_throwerror(vm, e.what());
8260     return SQ_ERROR;
8261   } catch(...) {
8262     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
8263     return SQ_ERROR;
8264   }
8265 
8266 }
8267 
ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)8268 static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm)
8269 {
8270   SQUserPointer data;
8271   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8272     sq_throwerror(vm, _SC("'set_velocity' called without instance"));
8273     return SQ_ERROR;
8274   }
8275   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8276 
8277   if (_this == nullptr) {
8278     return SQ_ERROR;
8279   }
8280 
8281   SQFloat arg0;
8282   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8283     sq_throwerror(vm, _SC("Argument 1 not a float"));
8284     return SQ_ERROR;
8285   }
8286   SQFloat arg1;
8287   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8288     sq_throwerror(vm, _SC("Argument 2 not a float"));
8289     return SQ_ERROR;
8290   }
8291 
8292   try {
8293     _this->set_velocity(static_cast<float> (arg0), static_cast<float> (arg1));
8294 
8295     return 0;
8296 
8297   } catch(std::exception& e) {
8298     sq_throwerror(vm, e.what());
8299     return SQ_ERROR;
8300   } catch(...) {
8301     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'"));
8302     return SQ_ERROR;
8303   }
8304 
8305 }
8306 
ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)8307 static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm)
8308 {
8309   SQUserPointer data;
8310   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8311     sq_throwerror(vm, _SC("'get_velocity_x' called without instance"));
8312     return SQ_ERROR;
8313   }
8314   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8315 
8316   if (_this == nullptr) {
8317     return SQ_ERROR;
8318   }
8319 
8320 
8321   try {
8322     float return_value = _this->get_velocity_x();
8323 
8324     sq_pushfloat(vm, return_value);
8325     return 1;
8326 
8327   } catch(std::exception& e) {
8328     sq_throwerror(vm, e.what());
8329     return SQ_ERROR;
8330   } catch(...) {
8331     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'"));
8332     return SQ_ERROR;
8333   }
8334 
8335 }
8336 
ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)8337 static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm)
8338 {
8339   SQUserPointer data;
8340   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8341     sq_throwerror(vm, _SC("'get_velocity_y' called without instance"));
8342     return SQ_ERROR;
8343   }
8344   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8345 
8346   if (_this == nullptr) {
8347     return SQ_ERROR;
8348   }
8349 
8350 
8351   try {
8352     float return_value = _this->get_velocity_y();
8353 
8354     sq_pushfloat(vm, return_value);
8355     return 1;
8356 
8357   } catch(std::exception& e) {
8358     sq_throwerror(vm, e.what());
8359     return SQ_ERROR;
8360   } catch(...) {
8361     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'"));
8362     return SQ_ERROR;
8363   }
8364 
8365 }
8366 
ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm)8367 static SQInteger ScriptedObject_enable_gravity_wrapper(HSQUIRRELVM vm)
8368 {
8369   SQUserPointer data;
8370   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8371     sq_throwerror(vm, _SC("'enable_gravity' called without instance"));
8372     return SQ_ERROR;
8373   }
8374   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8375 
8376   if (_this == nullptr) {
8377     return SQ_ERROR;
8378   }
8379 
8380   SQBool arg0;
8381   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
8382     sq_throwerror(vm, _SC("Argument 1 not a bool"));
8383     return SQ_ERROR;
8384   }
8385 
8386   try {
8387     _this->enable_gravity(arg0 == SQTrue);
8388 
8389     return 0;
8390 
8391   } catch(std::exception& e) {
8392     sq_throwerror(vm, e.what());
8393     return SQ_ERROR;
8394   } catch(...) {
8395     sq_throwerror(vm, _SC("Unexpected exception while executing function 'enable_gravity'"));
8396     return SQ_ERROR;
8397   }
8398 
8399 }
8400 
ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm)8401 static SQInteger ScriptedObject_gravity_enabled_wrapper(HSQUIRRELVM vm)
8402 {
8403   SQUserPointer data;
8404   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8405     sq_throwerror(vm, _SC("'gravity_enabled' called without instance"));
8406     return SQ_ERROR;
8407   }
8408   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8409 
8410   if (_this == nullptr) {
8411     return SQ_ERROR;
8412   }
8413 
8414 
8415   try {
8416     bool return_value = _this->gravity_enabled();
8417 
8418     sq_pushbool(vm, return_value);
8419     return 1;
8420 
8421   } catch(std::exception& e) {
8422     sq_throwerror(vm, e.what());
8423     return SQ_ERROR;
8424   } catch(...) {
8425     sq_throwerror(vm, _SC("Unexpected exception while executing function 'gravity_enabled'"));
8426     return SQ_ERROR;
8427   }
8428 
8429 }
8430 
ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)8431 static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm)
8432 {
8433   SQUserPointer data;
8434   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8435     sq_throwerror(vm, _SC("'set_visible' called without instance"));
8436     return SQ_ERROR;
8437   }
8438   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8439 
8440   if (_this == nullptr) {
8441     return SQ_ERROR;
8442   }
8443 
8444   SQBool arg0;
8445   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
8446     sq_throwerror(vm, _SC("Argument 1 not a bool"));
8447     return SQ_ERROR;
8448   }
8449 
8450   try {
8451     _this->set_visible(arg0 == SQTrue);
8452 
8453     return 0;
8454 
8455   } catch(std::exception& e) {
8456     sq_throwerror(vm, e.what());
8457     return SQ_ERROR;
8458   } catch(...) {
8459     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
8460     return SQ_ERROR;
8461   }
8462 
8463 }
8464 
ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)8465 static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm)
8466 {
8467   SQUserPointer data;
8468   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8469     sq_throwerror(vm, _SC("'is_visible' called without instance"));
8470     return SQ_ERROR;
8471   }
8472   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8473 
8474   if (_this == nullptr) {
8475     return SQ_ERROR;
8476   }
8477 
8478 
8479   try {
8480     bool return_value = _this->is_visible();
8481 
8482     sq_pushbool(vm, return_value);
8483     return 1;
8484 
8485   } catch(std::exception& e) {
8486     sq_throwerror(vm, e.what());
8487     return SQ_ERROR;
8488   } catch(...) {
8489     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'"));
8490     return SQ_ERROR;
8491   }
8492 
8493 }
8494 
ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)8495 static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm)
8496 {
8497   SQUserPointer data;
8498   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8499     sq_throwerror(vm, _SC("'set_solid' called without instance"));
8500     return SQ_ERROR;
8501   }
8502   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8503 
8504   if (_this == nullptr) {
8505     return SQ_ERROR;
8506   }
8507 
8508   SQBool arg0;
8509   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
8510     sq_throwerror(vm, _SC("Argument 1 not a bool"));
8511     return SQ_ERROR;
8512   }
8513 
8514   try {
8515     _this->set_solid(arg0 == SQTrue);
8516 
8517     return 0;
8518 
8519   } catch(std::exception& e) {
8520     sq_throwerror(vm, e.what());
8521     return SQ_ERROR;
8522   } catch(...) {
8523     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
8524     return SQ_ERROR;
8525   }
8526 
8527 }
8528 
ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)8529 static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm)
8530 {
8531   SQUserPointer data;
8532   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8533     sq_throwerror(vm, _SC("'is_solid' called without instance"));
8534     return SQ_ERROR;
8535   }
8536   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8537 
8538   if (_this == nullptr) {
8539     return SQ_ERROR;
8540   }
8541 
8542 
8543   try {
8544     bool return_value = _this->is_solid();
8545 
8546     sq_pushbool(vm, return_value);
8547     return 1;
8548 
8549   } catch(std::exception& e) {
8550     sq_throwerror(vm, e.what());
8551     return SQ_ERROR;
8552   } catch(...) {
8553     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'"));
8554     return SQ_ERROR;
8555   }
8556 
8557 }
8558 
ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)8559 static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm)
8560 {
8561   SQUserPointer data;
8562   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8563     sq_throwerror(vm, _SC("'get_name' called without instance"));
8564     return SQ_ERROR;
8565   }
8566   auto _this = reinterpret_cast<scripting::ScriptedObject*> (data);
8567 
8568   if (_this == nullptr) {
8569     return SQ_ERROR;
8570   }
8571 
8572 
8573   try {
8574     std::string return_value = _this->get_name();
8575 
8576     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
8577     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
8578     return 1;
8579 
8580   } catch(std::exception& e) {
8581     sq_throwerror(vm, e.what());
8582     return SQ_ERROR;
8583   } catch(...) {
8584     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'"));
8585     return SQ_ERROR;
8586   }
8587 
8588 }
8589 
Sector_release_hook(SQUserPointer ptr,SQInteger)8590 static SQInteger Sector_release_hook(SQUserPointer ptr, SQInteger )
8591 {
8592   auto _this = reinterpret_cast<scripting::Sector*> (ptr);
8593   delete _this;
8594   return 0;
8595 }
8596 
Sector_set_gravity_wrapper(HSQUIRRELVM vm)8597 static SQInteger Sector_set_gravity_wrapper(HSQUIRRELVM vm)
8598 {
8599   SQUserPointer data;
8600   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8601     sq_throwerror(vm, _SC("'set_gravity' called without instance"));
8602     return SQ_ERROR;
8603   }
8604   auto _this = reinterpret_cast<scripting::Sector*> (data);
8605 
8606   if (_this == nullptr) {
8607     return SQ_ERROR;
8608   }
8609 
8610   SQFloat arg0;
8611   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8612     sq_throwerror(vm, _SC("Argument 1 not a float"));
8613     return SQ_ERROR;
8614   }
8615 
8616   try {
8617     _this->set_gravity(static_cast<float> (arg0));
8618 
8619     return 0;
8620 
8621   } catch(std::exception& e) {
8622     sq_throwerror(vm, e.what());
8623     return SQ_ERROR;
8624   } catch(...) {
8625     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gravity'"));
8626     return SQ_ERROR;
8627   }
8628 
8629 }
8630 
Spotlight_release_hook(SQUserPointer ptr,SQInteger)8631 static SQInteger Spotlight_release_hook(SQUserPointer ptr, SQInteger )
8632 {
8633   auto _this = reinterpret_cast<scripting::Spotlight*> (ptr);
8634   delete _this;
8635   return 0;
8636 }
8637 
Spotlight_set_direction_wrapper(HSQUIRRELVM vm)8638 static SQInteger Spotlight_set_direction_wrapper(HSQUIRRELVM vm)
8639 {
8640   SQUserPointer data;
8641   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8642     sq_throwerror(vm, _SC("'set_direction' called without instance"));
8643     return SQ_ERROR;
8644   }
8645   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8646 
8647   if (_this == nullptr) {
8648     return SQ_ERROR;
8649   }
8650 
8651   const SQChar* arg0;
8652   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
8653     sq_throwerror(vm, _SC("Argument 1 not a string"));
8654     return SQ_ERROR;
8655   }
8656 
8657   try {
8658     _this->set_direction(arg0);
8659 
8660     return 0;
8661 
8662   } catch(std::exception& e) {
8663     sq_throwerror(vm, e.what());
8664     return SQ_ERROR;
8665   } catch(...) {
8666     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_direction'"));
8667     return SQ_ERROR;
8668   }
8669 
8670 }
8671 
Spotlight_set_angle_wrapper(HSQUIRRELVM vm)8672 static SQInteger Spotlight_set_angle_wrapper(HSQUIRRELVM vm)
8673 {
8674   SQUserPointer data;
8675   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8676     sq_throwerror(vm, _SC("'set_angle' called without instance"));
8677     return SQ_ERROR;
8678   }
8679   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8680 
8681   if (_this == nullptr) {
8682     return SQ_ERROR;
8683   }
8684 
8685   SQFloat arg0;
8686   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8687     sq_throwerror(vm, _SC("Argument 1 not a float"));
8688     return SQ_ERROR;
8689   }
8690 
8691   try {
8692     _this->set_angle(static_cast<float> (arg0));
8693 
8694     return 0;
8695 
8696   } catch(std::exception& e) {
8697     sq_throwerror(vm, e.what());
8698     return SQ_ERROR;
8699   } catch(...) {
8700     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_angle'"));
8701     return SQ_ERROR;
8702   }
8703 
8704 }
8705 
Spotlight_fade_angle_wrapper(HSQUIRRELVM vm)8706 static SQInteger Spotlight_fade_angle_wrapper(HSQUIRRELVM vm)
8707 {
8708   SQUserPointer data;
8709   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8710     sq_throwerror(vm, _SC("'fade_angle' called without instance"));
8711     return SQ_ERROR;
8712   }
8713   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8714 
8715   if (_this == nullptr) {
8716     return SQ_ERROR;
8717   }
8718 
8719   SQFloat arg0;
8720   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8721     sq_throwerror(vm, _SC("Argument 1 not a float"));
8722     return SQ_ERROR;
8723   }
8724   SQFloat arg1;
8725   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8726     sq_throwerror(vm, _SC("Argument 2 not a float"));
8727     return SQ_ERROR;
8728   }
8729 
8730   try {
8731     _this->fade_angle(static_cast<float> (arg0), static_cast<float> (arg1));
8732 
8733     return 0;
8734 
8735   } catch(std::exception& e) {
8736     sq_throwerror(vm, e.what());
8737     return SQ_ERROR;
8738   } catch(...) {
8739     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_angle'"));
8740     return SQ_ERROR;
8741   }
8742 
8743 }
8744 
Spotlight_ease_angle_wrapper(HSQUIRRELVM vm)8745 static SQInteger Spotlight_ease_angle_wrapper(HSQUIRRELVM vm)
8746 {
8747   SQUserPointer data;
8748   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8749     sq_throwerror(vm, _SC("'ease_angle' called without instance"));
8750     return SQ_ERROR;
8751   }
8752   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8753 
8754   if (_this == nullptr) {
8755     return SQ_ERROR;
8756   }
8757 
8758   SQFloat arg0;
8759   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8760     sq_throwerror(vm, _SC("Argument 1 not a float"));
8761     return SQ_ERROR;
8762   }
8763   SQFloat arg1;
8764   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8765     sq_throwerror(vm, _SC("Argument 2 not a float"));
8766     return SQ_ERROR;
8767   }
8768   const SQChar* arg2;
8769   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
8770     sq_throwerror(vm, _SC("Argument 3 not a string"));
8771     return SQ_ERROR;
8772   }
8773 
8774   try {
8775     _this->ease_angle(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
8776 
8777     return 0;
8778 
8779   } catch(std::exception& e) {
8780     sq_throwerror(vm, e.what());
8781     return SQ_ERROR;
8782   } catch(...) {
8783     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_angle'"));
8784     return SQ_ERROR;
8785   }
8786 
8787 }
8788 
Spotlight_set_speed_wrapper(HSQUIRRELVM vm)8789 static SQInteger Spotlight_set_speed_wrapper(HSQUIRRELVM vm)
8790 {
8791   SQUserPointer data;
8792   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8793     sq_throwerror(vm, _SC("'set_speed' called without instance"));
8794     return SQ_ERROR;
8795   }
8796   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8797 
8798   if (_this == nullptr) {
8799     return SQ_ERROR;
8800   }
8801 
8802   SQFloat arg0;
8803   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8804     sq_throwerror(vm, _SC("Argument 1 not a float"));
8805     return SQ_ERROR;
8806   }
8807 
8808   try {
8809     _this->set_speed(static_cast<float> (arg0));
8810 
8811     return 0;
8812 
8813   } catch(std::exception& e) {
8814     sq_throwerror(vm, e.what());
8815     return SQ_ERROR;
8816   } catch(...) {
8817     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_speed'"));
8818     return SQ_ERROR;
8819   }
8820 
8821 }
8822 
Spotlight_fade_speed_wrapper(HSQUIRRELVM vm)8823 static SQInteger Spotlight_fade_speed_wrapper(HSQUIRRELVM vm)
8824 {
8825   SQUserPointer data;
8826   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8827     sq_throwerror(vm, _SC("'fade_speed' called without instance"));
8828     return SQ_ERROR;
8829   }
8830   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8831 
8832   if (_this == nullptr) {
8833     return SQ_ERROR;
8834   }
8835 
8836   SQFloat arg0;
8837   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8838     sq_throwerror(vm, _SC("Argument 1 not a float"));
8839     return SQ_ERROR;
8840   }
8841   SQFloat arg1;
8842   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8843     sq_throwerror(vm, _SC("Argument 2 not a float"));
8844     return SQ_ERROR;
8845   }
8846 
8847   try {
8848     _this->fade_speed(static_cast<float> (arg0), static_cast<float> (arg1));
8849 
8850     return 0;
8851 
8852   } catch(std::exception& e) {
8853     sq_throwerror(vm, e.what());
8854     return SQ_ERROR;
8855   } catch(...) {
8856     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_speed'"));
8857     return SQ_ERROR;
8858   }
8859 
8860 }
8861 
Spotlight_ease_speed_wrapper(HSQUIRRELVM vm)8862 static SQInteger Spotlight_ease_speed_wrapper(HSQUIRRELVM vm)
8863 {
8864   SQUserPointer data;
8865   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8866     sq_throwerror(vm, _SC("'ease_speed' called without instance"));
8867     return SQ_ERROR;
8868   }
8869   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8870 
8871   if (_this == nullptr) {
8872     return SQ_ERROR;
8873   }
8874 
8875   SQFloat arg0;
8876   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8877     sq_throwerror(vm, _SC("Argument 1 not a float"));
8878     return SQ_ERROR;
8879   }
8880   SQFloat arg1;
8881   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8882     sq_throwerror(vm, _SC("Argument 2 not a float"));
8883     return SQ_ERROR;
8884   }
8885   const SQChar* arg2;
8886   if(SQ_FAILED(sq_getstring(vm, 4, &arg2))) {
8887     sq_throwerror(vm, _SC("Argument 3 not a string"));
8888     return SQ_ERROR;
8889   }
8890 
8891   try {
8892     _this->ease_speed(static_cast<float> (arg0), static_cast<float> (arg1), arg2);
8893 
8894     return 0;
8895 
8896   } catch(std::exception& e) {
8897     sq_throwerror(vm, e.what());
8898     return SQ_ERROR;
8899   } catch(...) {
8900     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_speed'"));
8901     return SQ_ERROR;
8902   }
8903 
8904 }
8905 
Spotlight_set_color_rgba_wrapper(HSQUIRRELVM vm)8906 static SQInteger Spotlight_set_color_rgba_wrapper(HSQUIRRELVM vm)
8907 {
8908   SQUserPointer data;
8909   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8910     sq_throwerror(vm, _SC("'set_color_rgba' called without instance"));
8911     return SQ_ERROR;
8912   }
8913   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8914 
8915   if (_this == nullptr) {
8916     return SQ_ERROR;
8917   }
8918 
8919   SQFloat arg0;
8920   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8921     sq_throwerror(vm, _SC("Argument 1 not a float"));
8922     return SQ_ERROR;
8923   }
8924   SQFloat arg1;
8925   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8926     sq_throwerror(vm, _SC("Argument 2 not a float"));
8927     return SQ_ERROR;
8928   }
8929   SQFloat arg2;
8930   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
8931     sq_throwerror(vm, _SC("Argument 3 not a float"));
8932     return SQ_ERROR;
8933   }
8934   SQFloat arg3;
8935   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
8936     sq_throwerror(vm, _SC("Argument 4 not a float"));
8937     return SQ_ERROR;
8938   }
8939 
8940   try {
8941     _this->set_color_rgba(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3));
8942 
8943     return 0;
8944 
8945   } catch(std::exception& e) {
8946     sq_throwerror(vm, e.what());
8947     return SQ_ERROR;
8948   } catch(...) {
8949     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_color_rgba'"));
8950     return SQ_ERROR;
8951   }
8952 
8953 }
8954 
Spotlight_fade_color_rgba_wrapper(HSQUIRRELVM vm)8955 static SQInteger Spotlight_fade_color_rgba_wrapper(HSQUIRRELVM vm)
8956 {
8957   SQUserPointer data;
8958   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
8959     sq_throwerror(vm, _SC("'fade_color_rgba' called without instance"));
8960     return SQ_ERROR;
8961   }
8962   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
8963 
8964   if (_this == nullptr) {
8965     return SQ_ERROR;
8966   }
8967 
8968   SQFloat arg0;
8969   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
8970     sq_throwerror(vm, _SC("Argument 1 not a float"));
8971     return SQ_ERROR;
8972   }
8973   SQFloat arg1;
8974   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
8975     sq_throwerror(vm, _SC("Argument 2 not a float"));
8976     return SQ_ERROR;
8977   }
8978   SQFloat arg2;
8979   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
8980     sq_throwerror(vm, _SC("Argument 3 not a float"));
8981     return SQ_ERROR;
8982   }
8983   SQFloat arg3;
8984   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
8985     sq_throwerror(vm, _SC("Argument 4 not a float"));
8986     return SQ_ERROR;
8987   }
8988   SQFloat arg4;
8989   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
8990     sq_throwerror(vm, _SC("Argument 5 not a float"));
8991     return SQ_ERROR;
8992   }
8993 
8994   try {
8995     _this->fade_color_rgba(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4));
8996 
8997     return 0;
8998 
8999   } catch(std::exception& e) {
9000     sq_throwerror(vm, e.what());
9001     return SQ_ERROR;
9002   } catch(...) {
9003     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_color_rgba'"));
9004     return SQ_ERROR;
9005   }
9006 
9007 }
9008 
Spotlight_ease_color_rgba_wrapper(HSQUIRRELVM vm)9009 static SQInteger Spotlight_ease_color_rgba_wrapper(HSQUIRRELVM vm)
9010 {
9011   SQUserPointer data;
9012   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9013     sq_throwerror(vm, _SC("'ease_color_rgba' called without instance"));
9014     return SQ_ERROR;
9015   }
9016   auto _this = reinterpret_cast<scripting::Spotlight*> (data);
9017 
9018   if (_this == nullptr) {
9019     return SQ_ERROR;
9020   }
9021 
9022   SQFloat arg0;
9023   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9024     sq_throwerror(vm, _SC("Argument 1 not a float"));
9025     return SQ_ERROR;
9026   }
9027   SQFloat arg1;
9028   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
9029     sq_throwerror(vm, _SC("Argument 2 not a float"));
9030     return SQ_ERROR;
9031   }
9032   SQFloat arg2;
9033   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
9034     sq_throwerror(vm, _SC("Argument 3 not a float"));
9035     return SQ_ERROR;
9036   }
9037   SQFloat arg3;
9038   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
9039     sq_throwerror(vm, _SC("Argument 4 not a float"));
9040     return SQ_ERROR;
9041   }
9042   SQFloat arg4;
9043   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
9044     sq_throwerror(vm, _SC("Argument 5 not a float"));
9045     return SQ_ERROR;
9046   }
9047   const SQChar* arg5;
9048   if(SQ_FAILED(sq_getstring(vm, 7, &arg5))) {
9049     sq_throwerror(vm, _SC("Argument 6 not a string"));
9050     return SQ_ERROR;
9051   }
9052 
9053   try {
9054     _this->ease_color_rgba(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4), arg5);
9055 
9056     return 0;
9057 
9058   } catch(std::exception& e) {
9059     sq_throwerror(vm, e.what());
9060     return SQ_ERROR;
9061   } catch(...) {
9062     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ease_color_rgba'"));
9063     return SQ_ERROR;
9064   }
9065 
9066 }
9067 
Text_release_hook(SQUserPointer ptr,SQInteger)9068 static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger )
9069 {
9070   auto _this = reinterpret_cast<scripting::Text*> (ptr);
9071   delete _this;
9072   return 0;
9073 }
9074 
Text_set_text_wrapper(HSQUIRRELVM vm)9075 static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm)
9076 {
9077   SQUserPointer data;
9078   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9079     sq_throwerror(vm, _SC("'set_text' called without instance"));
9080     return SQ_ERROR;
9081   }
9082   auto _this = reinterpret_cast<scripting::Text*> (data);
9083 
9084   if (_this == nullptr) {
9085     return SQ_ERROR;
9086   }
9087 
9088   const SQChar* arg0;
9089   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9090     sq_throwerror(vm, _SC("Argument 1 not a string"));
9091     return SQ_ERROR;
9092   }
9093 
9094   try {
9095     _this->set_text(arg0);
9096 
9097     return 0;
9098 
9099   } catch(std::exception& e) {
9100     sq_throwerror(vm, e.what());
9101     return SQ_ERROR;
9102   } catch(...) {
9103     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
9104     return SQ_ERROR;
9105   }
9106 
9107 }
9108 
Text_set_font_wrapper(HSQUIRRELVM vm)9109 static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm)
9110 {
9111   SQUserPointer data;
9112   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9113     sq_throwerror(vm, _SC("'set_font' called without instance"));
9114     return SQ_ERROR;
9115   }
9116   auto _this = reinterpret_cast<scripting::Text*> (data);
9117 
9118   if (_this == nullptr) {
9119     return SQ_ERROR;
9120   }
9121 
9122   const SQChar* arg0;
9123   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9124     sq_throwerror(vm, _SC("Argument 1 not a string"));
9125     return SQ_ERROR;
9126   }
9127 
9128   try {
9129     _this->set_font(arg0);
9130 
9131     return 0;
9132 
9133   } catch(std::exception& e) {
9134     sq_throwerror(vm, e.what());
9135     return SQ_ERROR;
9136   } catch(...) {
9137     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
9138     return SQ_ERROR;
9139   }
9140 
9141 }
9142 
Text_fade_in_wrapper(HSQUIRRELVM vm)9143 static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm)
9144 {
9145   SQUserPointer data;
9146   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9147     sq_throwerror(vm, _SC("'fade_in' called without instance"));
9148     return SQ_ERROR;
9149   }
9150   auto _this = reinterpret_cast<scripting::Text*> (data);
9151 
9152   if (_this == nullptr) {
9153     return SQ_ERROR;
9154   }
9155 
9156   SQFloat arg0;
9157   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9158     sq_throwerror(vm, _SC("Argument 1 not a float"));
9159     return SQ_ERROR;
9160   }
9161 
9162   try {
9163     _this->fade_in(static_cast<float> (arg0));
9164 
9165     return 0;
9166 
9167   } catch(std::exception& e) {
9168     sq_throwerror(vm, e.what());
9169     return SQ_ERROR;
9170   } catch(...) {
9171     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
9172     return SQ_ERROR;
9173   }
9174 
9175 }
9176 
Text_fade_out_wrapper(HSQUIRRELVM vm)9177 static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm)
9178 {
9179   SQUserPointer data;
9180   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9181     sq_throwerror(vm, _SC("'fade_out' called without instance"));
9182     return SQ_ERROR;
9183   }
9184   auto _this = reinterpret_cast<scripting::Text*> (data);
9185 
9186   if (_this == nullptr) {
9187     return SQ_ERROR;
9188   }
9189 
9190   SQFloat arg0;
9191   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9192     sq_throwerror(vm, _SC("Argument 1 not a float"));
9193     return SQ_ERROR;
9194   }
9195 
9196   try {
9197     _this->fade_out(static_cast<float> (arg0));
9198 
9199     return 0;
9200 
9201   } catch(std::exception& e) {
9202     sq_throwerror(vm, e.what());
9203     return SQ_ERROR;
9204   } catch(...) {
9205     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
9206     return SQ_ERROR;
9207   }
9208 
9209 }
9210 
Text_set_visible_wrapper(HSQUIRRELVM vm)9211 static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm)
9212 {
9213   SQUserPointer data;
9214   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9215     sq_throwerror(vm, _SC("'set_visible' called without instance"));
9216     return SQ_ERROR;
9217   }
9218   auto _this = reinterpret_cast<scripting::Text*> (data);
9219 
9220   if (_this == nullptr) {
9221     return SQ_ERROR;
9222   }
9223 
9224   SQBool arg0;
9225   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9226     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9227     return SQ_ERROR;
9228   }
9229 
9230   try {
9231     _this->set_visible(arg0 == SQTrue);
9232 
9233     return 0;
9234 
9235   } catch(std::exception& e) {
9236     sq_throwerror(vm, e.what());
9237     return SQ_ERROR;
9238   } catch(...) {
9239     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
9240     return SQ_ERROR;
9241   }
9242 
9243 }
9244 
Text_set_centered_wrapper(HSQUIRRELVM vm)9245 static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm)
9246 {
9247   SQUserPointer data;
9248   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9249     sq_throwerror(vm, _SC("'set_centered' called without instance"));
9250     return SQ_ERROR;
9251   }
9252   auto _this = reinterpret_cast<scripting::Text*> (data);
9253 
9254   if (_this == nullptr) {
9255     return SQ_ERROR;
9256   }
9257 
9258   SQBool arg0;
9259   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9260     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9261     return SQ_ERROR;
9262   }
9263 
9264   try {
9265     _this->set_centered(arg0 == SQTrue);
9266 
9267     return 0;
9268 
9269   } catch(std::exception& e) {
9270     sq_throwerror(vm, e.what());
9271     return SQ_ERROR;
9272   } catch(...) {
9273     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
9274     return SQ_ERROR;
9275   }
9276 
9277 }
9278 
Text_set_pos_wrapper(HSQUIRRELVM vm)9279 static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm)
9280 {
9281   SQUserPointer data;
9282   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9283     sq_throwerror(vm, _SC("'set_pos' called without instance"));
9284     return SQ_ERROR;
9285   }
9286   auto _this = reinterpret_cast<scripting::Text*> (data);
9287 
9288   if (_this == nullptr) {
9289     return SQ_ERROR;
9290   }
9291 
9292   SQFloat arg0;
9293   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9294     sq_throwerror(vm, _SC("Argument 1 not a float"));
9295     return SQ_ERROR;
9296   }
9297   SQFloat arg1;
9298   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
9299     sq_throwerror(vm, _SC("Argument 2 not a float"));
9300     return SQ_ERROR;
9301   }
9302 
9303   try {
9304     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
9305 
9306     return 0;
9307 
9308   } catch(std::exception& e) {
9309     sq_throwerror(vm, e.what());
9310     return SQ_ERROR;
9311   } catch(...) {
9312     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
9313     return SQ_ERROR;
9314   }
9315 
9316 }
9317 
Text_get_pos_x_wrapper(HSQUIRRELVM vm)9318 static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm)
9319 {
9320   SQUserPointer data;
9321   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9322     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
9323     return SQ_ERROR;
9324   }
9325   auto _this = reinterpret_cast<scripting::Text*> (data);
9326 
9327   if (_this == nullptr) {
9328     return SQ_ERROR;
9329   }
9330 
9331 
9332   try {
9333     float return_value = _this->get_pos_x();
9334 
9335     sq_pushfloat(vm, return_value);
9336     return 1;
9337 
9338   } catch(std::exception& e) {
9339     sq_throwerror(vm, e.what());
9340     return SQ_ERROR;
9341   } catch(...) {
9342     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
9343     return SQ_ERROR;
9344   }
9345 
9346 }
9347 
Text_get_pos_y_wrapper(HSQUIRRELVM vm)9348 static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm)
9349 {
9350   SQUserPointer data;
9351   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9352     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
9353     return SQ_ERROR;
9354   }
9355   auto _this = reinterpret_cast<scripting::Text*> (data);
9356 
9357   if (_this == nullptr) {
9358     return SQ_ERROR;
9359   }
9360 
9361 
9362   try {
9363     float return_value = _this->get_pos_y();
9364 
9365     sq_pushfloat(vm, return_value);
9366     return 1;
9367 
9368   } catch(std::exception& e) {
9369     sq_throwerror(vm, e.what());
9370     return SQ_ERROR;
9371   } catch(...) {
9372     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
9373     return SQ_ERROR;
9374   }
9375 
9376 }
9377 
Text_set_anchor_point_wrapper(HSQUIRRELVM vm)9378 static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm)
9379 {
9380   SQUserPointer data;
9381   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9382     sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
9383     return SQ_ERROR;
9384   }
9385   auto _this = reinterpret_cast<scripting::Text*> (data);
9386 
9387   if (_this == nullptr) {
9388     return SQ_ERROR;
9389   }
9390 
9391   SQInteger arg0;
9392   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
9393     sq_throwerror(vm, _SC("Argument 1 not an integer"));
9394     return SQ_ERROR;
9395   }
9396 
9397   try {
9398     _this->set_anchor_point(static_cast<int> (arg0));
9399 
9400     return 0;
9401 
9402   } catch(std::exception& e) {
9403     sq_throwerror(vm, e.what());
9404     return SQ_ERROR;
9405   } catch(...) {
9406     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
9407     return SQ_ERROR;
9408   }
9409 
9410 }
9411 
Text_get_anchor_point_wrapper(HSQUIRRELVM vm)9412 static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm)
9413 {
9414   SQUserPointer data;
9415   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9416     sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
9417     return SQ_ERROR;
9418   }
9419   auto _this = reinterpret_cast<scripting::Text*> (data);
9420 
9421   if (_this == nullptr) {
9422     return SQ_ERROR;
9423   }
9424 
9425 
9426   try {
9427     int return_value = _this->get_anchor_point();
9428 
9429     sq_pushinteger(vm, return_value);
9430     return 1;
9431 
9432   } catch(std::exception& e) {
9433     sq_throwerror(vm, e.what());
9434     return SQ_ERROR;
9435   } catch(...) {
9436     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
9437     return SQ_ERROR;
9438   }
9439 
9440 }
9441 
TextArray_release_hook(SQUserPointer ptr,SQInteger)9442 static SQInteger TextArray_release_hook(SQUserPointer ptr, SQInteger )
9443 {
9444   auto _this = reinterpret_cast<scripting::TextArray*> (ptr);
9445   delete _this;
9446   return 0;
9447 }
9448 
TextArray_clear_wrapper(HSQUIRRELVM vm)9449 static SQInteger TextArray_clear_wrapper(HSQUIRRELVM vm)
9450 {
9451   SQUserPointer data;
9452   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9453     sq_throwerror(vm, _SC("'clear' called without instance"));
9454     return SQ_ERROR;
9455   }
9456   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9457 
9458   if (_this == nullptr) {
9459     return SQ_ERROR;
9460   }
9461 
9462 
9463   try {
9464     _this->clear();
9465 
9466     return 0;
9467 
9468   } catch(std::exception& e) {
9469     sq_throwerror(vm, e.what());
9470     return SQ_ERROR;
9471   } catch(...) {
9472     sq_throwerror(vm, _SC("Unexpected exception while executing function 'clear'"));
9473     return SQ_ERROR;
9474   }
9475 
9476 }
9477 
TextArray_add_text_wrapper(HSQUIRRELVM vm)9478 static SQInteger TextArray_add_text_wrapper(HSQUIRRELVM vm)
9479 {
9480   SQUserPointer data;
9481   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9482     sq_throwerror(vm, _SC("'add_text' called without instance"));
9483     return SQ_ERROR;
9484   }
9485   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9486 
9487   if (_this == nullptr) {
9488     return SQ_ERROR;
9489   }
9490 
9491   const SQChar* arg0;
9492   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9493     sq_throwerror(vm, _SC("Argument 1 not a string"));
9494     return SQ_ERROR;
9495   }
9496 
9497   try {
9498     _this->add_text(arg0);
9499 
9500     return 0;
9501 
9502   } catch(std::exception& e) {
9503     sq_throwerror(vm, e.what());
9504     return SQ_ERROR;
9505   } catch(...) {
9506     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text'"));
9507     return SQ_ERROR;
9508   }
9509 
9510 }
9511 
TextArray_add_text_duration_wrapper(HSQUIRRELVM vm)9512 static SQInteger TextArray_add_text_duration_wrapper(HSQUIRRELVM vm)
9513 {
9514   SQUserPointer data;
9515   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9516     sq_throwerror(vm, _SC("'add_text_duration' called without instance"));
9517     return SQ_ERROR;
9518   }
9519   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9520 
9521   if (_this == nullptr) {
9522     return SQ_ERROR;
9523   }
9524 
9525   const SQChar* arg0;
9526   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9527     sq_throwerror(vm, _SC("Argument 1 not a string"));
9528     return SQ_ERROR;
9529   }
9530   SQFloat arg1;
9531   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
9532     sq_throwerror(vm, _SC("Argument 2 not a float"));
9533     return SQ_ERROR;
9534   }
9535 
9536   try {
9537     _this->add_text_duration(arg0, static_cast<float> (arg1));
9538 
9539     return 0;
9540 
9541   } catch(std::exception& e) {
9542     sq_throwerror(vm, e.what());
9543     return SQ_ERROR;
9544   } catch(...) {
9545     sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_text_duration'"));
9546     return SQ_ERROR;
9547   }
9548 
9549 }
9550 
TextArray_set_text_index_wrapper(HSQUIRRELVM vm)9551 static SQInteger TextArray_set_text_index_wrapper(HSQUIRRELVM vm)
9552 {
9553   SQUserPointer data;
9554   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9555     sq_throwerror(vm, _SC("'set_text_index' called without instance"));
9556     return SQ_ERROR;
9557   }
9558   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9559 
9560   if (_this == nullptr) {
9561     return SQ_ERROR;
9562   }
9563 
9564   SQInteger arg0;
9565   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
9566     sq_throwerror(vm, _SC("Argument 1 not an integer"));
9567     return SQ_ERROR;
9568   }
9569 
9570   try {
9571     _this->set_text_index(static_cast<int> (arg0));
9572 
9573     return 0;
9574 
9575   } catch(std::exception& e) {
9576     sq_throwerror(vm, e.what());
9577     return SQ_ERROR;
9578   } catch(...) {
9579     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text_index'"));
9580     return SQ_ERROR;
9581   }
9582 
9583 }
9584 
TextArray_set_keep_visible_wrapper(HSQUIRRELVM vm)9585 static SQInteger TextArray_set_keep_visible_wrapper(HSQUIRRELVM vm)
9586 {
9587   SQUserPointer data;
9588   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9589     sq_throwerror(vm, _SC("'set_keep_visible' called without instance"));
9590     return SQ_ERROR;
9591   }
9592   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9593 
9594   if (_this == nullptr) {
9595     return SQ_ERROR;
9596   }
9597 
9598   SQBool arg0;
9599   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9600     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9601     return SQ_ERROR;
9602   }
9603 
9604   try {
9605     _this->set_keep_visible(arg0 == SQTrue);
9606 
9607     return 0;
9608 
9609   } catch(std::exception& e) {
9610     sq_throwerror(vm, e.what());
9611     return SQ_ERROR;
9612   } catch(...) {
9613     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_keep_visible'"));
9614     return SQ_ERROR;
9615   }
9616 
9617 }
9618 
TextArray_set_fade_transition_wrapper(HSQUIRRELVM vm)9619 static SQInteger TextArray_set_fade_transition_wrapper(HSQUIRRELVM vm)
9620 {
9621   SQUserPointer data;
9622   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9623     sq_throwerror(vm, _SC("'set_fade_transition' called without instance"));
9624     return SQ_ERROR;
9625   }
9626   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9627 
9628   if (_this == nullptr) {
9629     return SQ_ERROR;
9630   }
9631 
9632   SQBool arg0;
9633   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9634     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9635     return SQ_ERROR;
9636   }
9637 
9638   try {
9639     _this->set_fade_transition(arg0 == SQTrue);
9640 
9641     return 0;
9642 
9643   } catch(std::exception& e) {
9644     sq_throwerror(vm, e.what());
9645     return SQ_ERROR;
9646   } catch(...) {
9647     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_transition'"));
9648     return SQ_ERROR;
9649   }
9650 
9651 }
9652 
TextArray_set_fade_time_wrapper(HSQUIRRELVM vm)9653 static SQInteger TextArray_set_fade_time_wrapper(HSQUIRRELVM vm)
9654 {
9655   SQUserPointer data;
9656   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9657     sq_throwerror(vm, _SC("'set_fade_time' called without instance"));
9658     return SQ_ERROR;
9659   }
9660   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9661 
9662   if (_this == nullptr) {
9663     return SQ_ERROR;
9664   }
9665 
9666   SQFloat arg0;
9667   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9668     sq_throwerror(vm, _SC("Argument 1 not a float"));
9669     return SQ_ERROR;
9670   }
9671 
9672   try {
9673     _this->set_fade_time(static_cast<float> (arg0));
9674 
9675     return 0;
9676 
9677   } catch(std::exception& e) {
9678     sq_throwerror(vm, e.what());
9679     return SQ_ERROR;
9680   } catch(...) {
9681     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_fade_time'"));
9682     return SQ_ERROR;
9683   }
9684 
9685 }
9686 
TextArray_set_done_wrapper(HSQUIRRELVM vm)9687 static SQInteger TextArray_set_done_wrapper(HSQUIRRELVM vm)
9688 {
9689   SQUserPointer data;
9690   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9691     sq_throwerror(vm, _SC("'set_done' called without instance"));
9692     return SQ_ERROR;
9693   }
9694   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9695 
9696   if (_this == nullptr) {
9697     return SQ_ERROR;
9698   }
9699 
9700   SQBool arg0;
9701   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9702     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9703     return SQ_ERROR;
9704   }
9705 
9706   try {
9707     _this->set_done(arg0 == SQTrue);
9708 
9709     return 0;
9710 
9711   } catch(std::exception& e) {
9712     sq_throwerror(vm, e.what());
9713     return SQ_ERROR;
9714   } catch(...) {
9715     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_done'"));
9716     return SQ_ERROR;
9717   }
9718 
9719 }
9720 
TextArray_set_auto_wrapper(HSQUIRRELVM vm)9721 static SQInteger TextArray_set_auto_wrapper(HSQUIRRELVM vm)
9722 {
9723   SQUserPointer data;
9724   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9725     sq_throwerror(vm, _SC("'set_auto' called without instance"));
9726     return SQ_ERROR;
9727   }
9728   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9729 
9730   if (_this == nullptr) {
9731     return SQ_ERROR;
9732   }
9733 
9734   SQBool arg0;
9735   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9736     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9737     return SQ_ERROR;
9738   }
9739 
9740   try {
9741     _this->set_auto(arg0 == SQTrue);
9742 
9743     return 0;
9744 
9745   } catch(std::exception& e) {
9746     sq_throwerror(vm, e.what());
9747     return SQ_ERROR;
9748   } catch(...) {
9749     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_auto'"));
9750     return SQ_ERROR;
9751   }
9752 
9753 }
9754 
TextArray_next_text_wrapper(HSQUIRRELVM vm)9755 static SQInteger TextArray_next_text_wrapper(HSQUIRRELVM vm)
9756 {
9757   SQUserPointer data;
9758   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9759     sq_throwerror(vm, _SC("'next_text' called without instance"));
9760     return SQ_ERROR;
9761   }
9762   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9763 
9764   if (_this == nullptr) {
9765     return SQ_ERROR;
9766   }
9767 
9768 
9769   try {
9770     _this->next_text();
9771 
9772     return 0;
9773 
9774   } catch(std::exception& e) {
9775     sq_throwerror(vm, e.what());
9776     return SQ_ERROR;
9777   } catch(...) {
9778     sq_throwerror(vm, _SC("Unexpected exception while executing function 'next_text'"));
9779     return SQ_ERROR;
9780   }
9781 
9782 }
9783 
TextArray_prev_text_wrapper(HSQUIRRELVM vm)9784 static SQInteger TextArray_prev_text_wrapper(HSQUIRRELVM vm)
9785 {
9786   SQUserPointer data;
9787   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9788     sq_throwerror(vm, _SC("'prev_text' called without instance"));
9789     return SQ_ERROR;
9790   }
9791   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9792 
9793   if (_this == nullptr) {
9794     return SQ_ERROR;
9795   }
9796 
9797 
9798   try {
9799     _this->prev_text();
9800 
9801     return 0;
9802 
9803   } catch(std::exception& e) {
9804     sq_throwerror(vm, e.what());
9805     return SQ_ERROR;
9806   } catch(...) {
9807     sq_throwerror(vm, _SC("Unexpected exception while executing function 'prev_text'"));
9808     return SQ_ERROR;
9809   }
9810 
9811 }
9812 
TextArray_set_text_wrapper(HSQUIRRELVM vm)9813 static SQInteger TextArray_set_text_wrapper(HSQUIRRELVM vm)
9814 {
9815   SQUserPointer data;
9816   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9817     sq_throwerror(vm, _SC("'set_text' called without instance"));
9818     return SQ_ERROR;
9819   }
9820   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9821 
9822   if (_this == nullptr) {
9823     return SQ_ERROR;
9824   }
9825 
9826   const SQChar* arg0;
9827   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9828     sq_throwerror(vm, _SC("Argument 1 not a string"));
9829     return SQ_ERROR;
9830   }
9831 
9832   try {
9833     _this->set_text(arg0);
9834 
9835     return 0;
9836 
9837   } catch(std::exception& e) {
9838     sq_throwerror(vm, e.what());
9839     return SQ_ERROR;
9840   } catch(...) {
9841     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'"));
9842     return SQ_ERROR;
9843   }
9844 
9845 }
9846 
TextArray_set_font_wrapper(HSQUIRRELVM vm)9847 static SQInteger TextArray_set_font_wrapper(HSQUIRRELVM vm)
9848 {
9849   SQUserPointer data;
9850   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9851     sq_throwerror(vm, _SC("'set_font' called without instance"));
9852     return SQ_ERROR;
9853   }
9854   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9855 
9856   if (_this == nullptr) {
9857     return SQ_ERROR;
9858   }
9859 
9860   const SQChar* arg0;
9861   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
9862     sq_throwerror(vm, _SC("Argument 1 not a string"));
9863     return SQ_ERROR;
9864   }
9865 
9866   try {
9867     _this->set_font(arg0);
9868 
9869     return 0;
9870 
9871   } catch(std::exception& e) {
9872     sq_throwerror(vm, e.what());
9873     return SQ_ERROR;
9874   } catch(...) {
9875     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'"));
9876     return SQ_ERROR;
9877   }
9878 
9879 }
9880 
TextArray_fade_in_wrapper(HSQUIRRELVM vm)9881 static SQInteger TextArray_fade_in_wrapper(HSQUIRRELVM vm)
9882 {
9883   SQUserPointer data;
9884   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9885     sq_throwerror(vm, _SC("'fade_in' called without instance"));
9886     return SQ_ERROR;
9887   }
9888   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9889 
9890   if (_this == nullptr) {
9891     return SQ_ERROR;
9892   }
9893 
9894   SQFloat arg0;
9895   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9896     sq_throwerror(vm, _SC("Argument 1 not a float"));
9897     return SQ_ERROR;
9898   }
9899 
9900   try {
9901     _this->fade_in(static_cast<float> (arg0));
9902 
9903     return 0;
9904 
9905   } catch(std::exception& e) {
9906     sq_throwerror(vm, e.what());
9907     return SQ_ERROR;
9908   } catch(...) {
9909     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'"));
9910     return SQ_ERROR;
9911   }
9912 
9913 }
9914 
TextArray_fade_out_wrapper(HSQUIRRELVM vm)9915 static SQInteger TextArray_fade_out_wrapper(HSQUIRRELVM vm)
9916 {
9917   SQUserPointer data;
9918   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9919     sq_throwerror(vm, _SC("'fade_out' called without instance"));
9920     return SQ_ERROR;
9921   }
9922   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9923 
9924   if (_this == nullptr) {
9925     return SQ_ERROR;
9926   }
9927 
9928   SQFloat arg0;
9929   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
9930     sq_throwerror(vm, _SC("Argument 1 not a float"));
9931     return SQ_ERROR;
9932   }
9933 
9934   try {
9935     _this->fade_out(static_cast<float> (arg0));
9936 
9937     return 0;
9938 
9939   } catch(std::exception& e) {
9940     sq_throwerror(vm, e.what());
9941     return SQ_ERROR;
9942   } catch(...) {
9943     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'"));
9944     return SQ_ERROR;
9945   }
9946 
9947 }
9948 
TextArray_set_visible_wrapper(HSQUIRRELVM vm)9949 static SQInteger TextArray_set_visible_wrapper(HSQUIRRELVM vm)
9950 {
9951   SQUserPointer data;
9952   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9953     sq_throwerror(vm, _SC("'set_visible' called without instance"));
9954     return SQ_ERROR;
9955   }
9956   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9957 
9958   if (_this == nullptr) {
9959     return SQ_ERROR;
9960   }
9961 
9962   SQBool arg0;
9963   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9964     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9965     return SQ_ERROR;
9966   }
9967 
9968   try {
9969     _this->set_visible(arg0 == SQTrue);
9970 
9971     return 0;
9972 
9973   } catch(std::exception& e) {
9974     sq_throwerror(vm, e.what());
9975     return SQ_ERROR;
9976   } catch(...) {
9977     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'"));
9978     return SQ_ERROR;
9979   }
9980 
9981 }
9982 
TextArray_set_centered_wrapper(HSQUIRRELVM vm)9983 static SQInteger TextArray_set_centered_wrapper(HSQUIRRELVM vm)
9984 {
9985   SQUserPointer data;
9986   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
9987     sq_throwerror(vm, _SC("'set_centered' called without instance"));
9988     return SQ_ERROR;
9989   }
9990   auto _this = reinterpret_cast<scripting::TextArray*> (data);
9991 
9992   if (_this == nullptr) {
9993     return SQ_ERROR;
9994   }
9995 
9996   SQBool arg0;
9997   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
9998     sq_throwerror(vm, _SC("Argument 1 not a bool"));
9999     return SQ_ERROR;
10000   }
10001 
10002   try {
10003     _this->set_centered(arg0 == SQTrue);
10004 
10005     return 0;
10006 
10007   } catch(std::exception& e) {
10008     sq_throwerror(vm, e.what());
10009     return SQ_ERROR;
10010   } catch(...) {
10011     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'"));
10012     return SQ_ERROR;
10013   }
10014 
10015 }
10016 
TextArray_set_pos_wrapper(HSQUIRRELVM vm)10017 static SQInteger TextArray_set_pos_wrapper(HSQUIRRELVM vm)
10018 {
10019   SQUserPointer data;
10020   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10021     sq_throwerror(vm, _SC("'set_pos' called without instance"));
10022     return SQ_ERROR;
10023   }
10024   auto _this = reinterpret_cast<scripting::TextArray*> (data);
10025 
10026   if (_this == nullptr) {
10027     return SQ_ERROR;
10028   }
10029 
10030   SQFloat arg0;
10031   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10032     sq_throwerror(vm, _SC("Argument 1 not a float"));
10033     return SQ_ERROR;
10034   }
10035   SQFloat arg1;
10036   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
10037     sq_throwerror(vm, _SC("Argument 2 not a float"));
10038     return SQ_ERROR;
10039   }
10040 
10041   try {
10042     _this->set_pos(static_cast<float> (arg0), static_cast<float> (arg1));
10043 
10044     return 0;
10045 
10046   } catch(std::exception& e) {
10047     sq_throwerror(vm, e.what());
10048     return SQ_ERROR;
10049   } catch(...) {
10050     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'"));
10051     return SQ_ERROR;
10052   }
10053 
10054 }
10055 
TextArray_get_pos_x_wrapper(HSQUIRRELVM vm)10056 static SQInteger TextArray_get_pos_x_wrapper(HSQUIRRELVM vm)
10057 {
10058   SQUserPointer data;
10059   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10060     sq_throwerror(vm, _SC("'get_pos_x' called without instance"));
10061     return SQ_ERROR;
10062   }
10063   auto _this = reinterpret_cast<scripting::TextArray*> (data);
10064 
10065   if (_this == nullptr) {
10066     return SQ_ERROR;
10067   }
10068 
10069 
10070   try {
10071     float return_value = _this->get_pos_x();
10072 
10073     sq_pushfloat(vm, return_value);
10074     return 1;
10075 
10076   } catch(std::exception& e) {
10077     sq_throwerror(vm, e.what());
10078     return SQ_ERROR;
10079   } catch(...) {
10080     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'"));
10081     return SQ_ERROR;
10082   }
10083 
10084 }
10085 
TextArray_get_pos_y_wrapper(HSQUIRRELVM vm)10086 static SQInteger TextArray_get_pos_y_wrapper(HSQUIRRELVM vm)
10087 {
10088   SQUserPointer data;
10089   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10090     sq_throwerror(vm, _SC("'get_pos_y' called without instance"));
10091     return SQ_ERROR;
10092   }
10093   auto _this = reinterpret_cast<scripting::TextArray*> (data);
10094 
10095   if (_this == nullptr) {
10096     return SQ_ERROR;
10097   }
10098 
10099 
10100   try {
10101     float return_value = _this->get_pos_y();
10102 
10103     sq_pushfloat(vm, return_value);
10104     return 1;
10105 
10106   } catch(std::exception& e) {
10107     sq_throwerror(vm, e.what());
10108     return SQ_ERROR;
10109   } catch(...) {
10110     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'"));
10111     return SQ_ERROR;
10112   }
10113 
10114 }
10115 
TextArray_set_anchor_point_wrapper(HSQUIRRELVM vm)10116 static SQInteger TextArray_set_anchor_point_wrapper(HSQUIRRELVM vm)
10117 {
10118   SQUserPointer data;
10119   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10120     sq_throwerror(vm, _SC("'set_anchor_point' called without instance"));
10121     return SQ_ERROR;
10122   }
10123   auto _this = reinterpret_cast<scripting::TextArray*> (data);
10124 
10125   if (_this == nullptr) {
10126     return SQ_ERROR;
10127   }
10128 
10129   SQInteger arg0;
10130   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
10131     sq_throwerror(vm, _SC("Argument 1 not an integer"));
10132     return SQ_ERROR;
10133   }
10134 
10135   try {
10136     _this->set_anchor_point(static_cast<int> (arg0));
10137 
10138     return 0;
10139 
10140   } catch(std::exception& e) {
10141     sq_throwerror(vm, e.what());
10142     return SQ_ERROR;
10143   } catch(...) {
10144     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'"));
10145     return SQ_ERROR;
10146   }
10147 
10148 }
10149 
TextArray_get_anchor_point_wrapper(HSQUIRRELVM vm)10150 static SQInteger TextArray_get_anchor_point_wrapper(HSQUIRRELVM vm)
10151 {
10152   SQUserPointer data;
10153   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10154     sq_throwerror(vm, _SC("'get_anchor_point' called without instance"));
10155     return SQ_ERROR;
10156   }
10157   auto _this = reinterpret_cast<scripting::TextArray*> (data);
10158 
10159   if (_this == nullptr) {
10160     return SQ_ERROR;
10161   }
10162 
10163 
10164   try {
10165     int return_value = _this->get_anchor_point();
10166 
10167     sq_pushinteger(vm, return_value);
10168     return 1;
10169 
10170   } catch(std::exception& e) {
10171     sq_throwerror(vm, e.what());
10172     return SQ_ERROR;
10173   } catch(...) {
10174     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'"));
10175     return SQ_ERROR;
10176   }
10177 
10178 }
10179 
Thunderstorm_release_hook(SQUserPointer ptr,SQInteger)10180 static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger )
10181 {
10182   auto _this = reinterpret_cast<scripting::Thunderstorm*> (ptr);
10183   delete _this;
10184   return 0;
10185 }
10186 
Thunderstorm_start_wrapper(HSQUIRRELVM vm)10187 static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm)
10188 {
10189   SQUserPointer data;
10190   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10191     sq_throwerror(vm, _SC("'start' called without instance"));
10192     return SQ_ERROR;
10193   }
10194   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10195 
10196   if (_this == nullptr) {
10197     return SQ_ERROR;
10198   }
10199 
10200 
10201   try {
10202     _this->start();
10203 
10204     return 0;
10205 
10206   } catch(std::exception& e) {
10207     sq_throwerror(vm, e.what());
10208     return SQ_ERROR;
10209   } catch(...) {
10210     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
10211     return SQ_ERROR;
10212   }
10213 
10214 }
10215 
Thunderstorm_stop_wrapper(HSQUIRRELVM vm)10216 static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm)
10217 {
10218   SQUserPointer data;
10219   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10220     sq_throwerror(vm, _SC("'stop' called without instance"));
10221     return SQ_ERROR;
10222   }
10223   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10224 
10225   if (_this == nullptr) {
10226     return SQ_ERROR;
10227   }
10228 
10229 
10230   try {
10231     _this->stop();
10232 
10233     return 0;
10234 
10235   } catch(std::exception& e) {
10236     sq_throwerror(vm, e.what());
10237     return SQ_ERROR;
10238   } catch(...) {
10239     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
10240     return SQ_ERROR;
10241   }
10242 
10243 }
10244 
Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)10245 static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm)
10246 {
10247   SQUserPointer data;
10248   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10249     sq_throwerror(vm, _SC("'thunder' called without instance"));
10250     return SQ_ERROR;
10251   }
10252   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10253 
10254   if (_this == nullptr) {
10255     return SQ_ERROR;
10256   }
10257 
10258 
10259   try {
10260     _this->thunder();
10261 
10262     return 0;
10263 
10264   } catch(std::exception& e) {
10265     sq_throwerror(vm, e.what());
10266     return SQ_ERROR;
10267   } catch(...) {
10268     sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'"));
10269     return SQ_ERROR;
10270   }
10271 
10272 }
10273 
Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)10274 static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm)
10275 {
10276   SQUserPointer data;
10277   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10278     sq_throwerror(vm, _SC("'lightning' called without instance"));
10279     return SQ_ERROR;
10280   }
10281   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10282 
10283   if (_this == nullptr) {
10284     return SQ_ERROR;
10285   }
10286 
10287 
10288   try {
10289     _this->lightning();
10290 
10291     return 0;
10292 
10293   } catch(std::exception& e) {
10294     sq_throwerror(vm, e.what());
10295     return SQ_ERROR;
10296   } catch(...) {
10297     sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'"));
10298     return SQ_ERROR;
10299   }
10300 
10301 }
10302 
Thunderstorm_flash_wrapper(HSQUIRRELVM vm)10303 static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm)
10304 {
10305   SQUserPointer data;
10306   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10307     sq_throwerror(vm, _SC("'flash' called without instance"));
10308     return SQ_ERROR;
10309   }
10310   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10311 
10312   if (_this == nullptr) {
10313     return SQ_ERROR;
10314   }
10315 
10316 
10317   try {
10318     _this->flash();
10319 
10320     return 0;
10321 
10322   } catch(std::exception& e) {
10323     sq_throwerror(vm, e.what());
10324     return SQ_ERROR;
10325   } catch(...) {
10326     sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'"));
10327     return SQ_ERROR;
10328   }
10329 
10330 }
10331 
Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)10332 static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm)
10333 {
10334   SQUserPointer data;
10335   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10336     sq_throwerror(vm, _SC("'electrify' called without instance"));
10337     return SQ_ERROR;
10338   }
10339   auto _this = reinterpret_cast<scripting::Thunderstorm*> (data);
10340 
10341   if (_this == nullptr) {
10342     return SQ_ERROR;
10343   }
10344 
10345 
10346   try {
10347     _this->electrify();
10348 
10349     return 0;
10350 
10351   } catch(std::exception& e) {
10352     sq_throwerror(vm, e.what());
10353     return SQ_ERROR;
10354   } catch(...) {
10355     sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'"));
10356     return SQ_ERROR;
10357   }
10358 
10359 }
10360 
TileMap_release_hook(SQUserPointer ptr,SQInteger)10361 static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger )
10362 {
10363   auto _this = reinterpret_cast<scripting::TileMap*> (ptr);
10364   delete _this;
10365   return 0;
10366 }
10367 
TileMap_goto_node_wrapper(HSQUIRRELVM vm)10368 static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm)
10369 {
10370   SQUserPointer data;
10371   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10372     sq_throwerror(vm, _SC("'goto_node' called without instance"));
10373     return SQ_ERROR;
10374   }
10375   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10376 
10377   if (_this == nullptr) {
10378     return SQ_ERROR;
10379   }
10380 
10381   SQInteger arg0;
10382   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
10383     sq_throwerror(vm, _SC("Argument 1 not an integer"));
10384     return SQ_ERROR;
10385   }
10386 
10387   try {
10388     _this->goto_node(static_cast<int> (arg0));
10389 
10390     return 0;
10391 
10392   } catch(std::exception& e) {
10393     sq_throwerror(vm, e.what());
10394     return SQ_ERROR;
10395   } catch(...) {
10396     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
10397     return SQ_ERROR;
10398   }
10399 
10400 }
10401 
TileMap_start_moving_wrapper(HSQUIRRELVM vm)10402 static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm)
10403 {
10404   SQUserPointer data;
10405   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10406     sq_throwerror(vm, _SC("'start_moving' called without instance"));
10407     return SQ_ERROR;
10408   }
10409   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10410 
10411   if (_this == nullptr) {
10412     return SQ_ERROR;
10413   }
10414 
10415 
10416   try {
10417     _this->start_moving();
10418 
10419     return 0;
10420 
10421   } catch(std::exception& e) {
10422     sq_throwerror(vm, e.what());
10423     return SQ_ERROR;
10424   } catch(...) {
10425     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
10426     return SQ_ERROR;
10427   }
10428 
10429 }
10430 
TileMap_stop_moving_wrapper(HSQUIRRELVM vm)10431 static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm)
10432 {
10433   SQUserPointer data;
10434   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10435     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
10436     return SQ_ERROR;
10437   }
10438   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10439 
10440   if (_this == nullptr) {
10441     return SQ_ERROR;
10442   }
10443 
10444 
10445   try {
10446     _this->stop_moving();
10447 
10448     return 0;
10449 
10450   } catch(std::exception& e) {
10451     sq_throwerror(vm, e.what());
10452     return SQ_ERROR;
10453   } catch(...) {
10454     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
10455     return SQ_ERROR;
10456   }
10457 
10458 }
10459 
TileMap_get_tile_id_wrapper(HSQUIRRELVM vm)10460 static SQInteger TileMap_get_tile_id_wrapper(HSQUIRRELVM vm)
10461 {
10462   SQUserPointer data;
10463   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10464     sq_throwerror(vm, _SC("'get_tile_id' called without instance"));
10465     return SQ_ERROR;
10466   }
10467   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10468 
10469   if (_this == nullptr) {
10470     return SQ_ERROR;
10471   }
10472 
10473   SQInteger arg0;
10474   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
10475     sq_throwerror(vm, _SC("Argument 1 not an integer"));
10476     return SQ_ERROR;
10477   }
10478   SQInteger arg1;
10479   if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
10480     sq_throwerror(vm, _SC("Argument 2 not an integer"));
10481     return SQ_ERROR;
10482   }
10483 
10484   try {
10485     int return_value = _this->get_tile_id(static_cast<int> (arg0), static_cast<int> (arg1));
10486 
10487     sq_pushinteger(vm, return_value);
10488     return 1;
10489 
10490   } catch(std::exception& e) {
10491     sq_throwerror(vm, e.what());
10492     return SQ_ERROR;
10493   } catch(...) {
10494     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id'"));
10495     return SQ_ERROR;
10496   }
10497 
10498 }
10499 
TileMap_get_tile_id_at_wrapper(HSQUIRRELVM vm)10500 static SQInteger TileMap_get_tile_id_at_wrapper(HSQUIRRELVM vm)
10501 {
10502   SQUserPointer data;
10503   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10504     sq_throwerror(vm, _SC("'get_tile_id_at' called without instance"));
10505     return SQ_ERROR;
10506   }
10507   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10508 
10509   if (_this == nullptr) {
10510     return SQ_ERROR;
10511   }
10512 
10513   SQFloat arg0;
10514   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10515     sq_throwerror(vm, _SC("Argument 1 not a float"));
10516     return SQ_ERROR;
10517   }
10518   SQFloat arg1;
10519   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
10520     sq_throwerror(vm, _SC("Argument 2 not a float"));
10521     return SQ_ERROR;
10522   }
10523 
10524   try {
10525     int return_value = _this->get_tile_id_at(static_cast<float> (arg0), static_cast<float> (arg1));
10526 
10527     sq_pushinteger(vm, return_value);
10528     return 1;
10529 
10530   } catch(std::exception& e) {
10531     sq_throwerror(vm, e.what());
10532     return SQ_ERROR;
10533   } catch(...) {
10534     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_tile_id_at'"));
10535     return SQ_ERROR;
10536   }
10537 
10538 }
10539 
TileMap_change_wrapper(HSQUIRRELVM vm)10540 static SQInteger TileMap_change_wrapper(HSQUIRRELVM vm)
10541 {
10542   SQUserPointer data;
10543   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10544     sq_throwerror(vm, _SC("'change' called without instance"));
10545     return SQ_ERROR;
10546   }
10547   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10548 
10549   if (_this == nullptr) {
10550     return SQ_ERROR;
10551   }
10552 
10553   SQInteger arg0;
10554   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
10555     sq_throwerror(vm, _SC("Argument 1 not an integer"));
10556     return SQ_ERROR;
10557   }
10558   SQInteger arg1;
10559   if(SQ_FAILED(sq_getinteger(vm, 3, &arg1))) {
10560     sq_throwerror(vm, _SC("Argument 2 not an integer"));
10561     return SQ_ERROR;
10562   }
10563   SQInteger arg2;
10564   if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
10565     sq_throwerror(vm, _SC("Argument 3 not an integer"));
10566     return SQ_ERROR;
10567   }
10568 
10569   try {
10570     _this->change(static_cast<int> (arg0), static_cast<int> (arg1), static_cast<int> (arg2));
10571 
10572     return 0;
10573 
10574   } catch(std::exception& e) {
10575     sq_throwerror(vm, e.what());
10576     return SQ_ERROR;
10577   } catch(...) {
10578     sq_throwerror(vm, _SC("Unexpected exception while executing function 'change'"));
10579     return SQ_ERROR;
10580   }
10581 
10582 }
10583 
TileMap_change_at_wrapper(HSQUIRRELVM vm)10584 static SQInteger TileMap_change_at_wrapper(HSQUIRRELVM vm)
10585 {
10586   SQUserPointer data;
10587   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10588     sq_throwerror(vm, _SC("'change_at' called without instance"));
10589     return SQ_ERROR;
10590   }
10591   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10592 
10593   if (_this == nullptr) {
10594     return SQ_ERROR;
10595   }
10596 
10597   SQFloat arg0;
10598   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10599     sq_throwerror(vm, _SC("Argument 1 not a float"));
10600     return SQ_ERROR;
10601   }
10602   SQFloat arg1;
10603   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
10604     sq_throwerror(vm, _SC("Argument 2 not a float"));
10605     return SQ_ERROR;
10606   }
10607   SQInteger arg2;
10608   if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
10609     sq_throwerror(vm, _SC("Argument 3 not an integer"));
10610     return SQ_ERROR;
10611   }
10612 
10613   try {
10614     _this->change_at(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<int> (arg2));
10615 
10616     return 0;
10617 
10618   } catch(std::exception& e) {
10619     sq_throwerror(vm, e.what());
10620     return SQ_ERROR;
10621   } catch(...) {
10622     sq_throwerror(vm, _SC("Unexpected exception while executing function 'change_at'"));
10623     return SQ_ERROR;
10624   }
10625 
10626 }
10627 
TileMap_fade_wrapper(HSQUIRRELVM vm)10628 static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm)
10629 {
10630   SQUserPointer data;
10631   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10632     sq_throwerror(vm, _SC("'fade' called without instance"));
10633     return SQ_ERROR;
10634   }
10635   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10636 
10637   if (_this == nullptr) {
10638     return SQ_ERROR;
10639   }
10640 
10641   SQFloat arg0;
10642   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10643     sq_throwerror(vm, _SC("Argument 1 not a float"));
10644     return SQ_ERROR;
10645   }
10646   SQFloat arg1;
10647   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
10648     sq_throwerror(vm, _SC("Argument 2 not a float"));
10649     return SQ_ERROR;
10650   }
10651 
10652   try {
10653     _this->fade(static_cast<float> (arg0), static_cast<float> (arg1));
10654 
10655     return 0;
10656 
10657   } catch(std::exception& e) {
10658     sq_throwerror(vm, e.what());
10659     return SQ_ERROR;
10660   } catch(...) {
10661     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade'"));
10662     return SQ_ERROR;
10663   }
10664 
10665 }
10666 
TileMap_tint_fade_wrapper(HSQUIRRELVM vm)10667 static SQInteger TileMap_tint_fade_wrapper(HSQUIRRELVM vm)
10668 {
10669   SQUserPointer data;
10670   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10671     sq_throwerror(vm, _SC("'tint_fade' called without instance"));
10672     return SQ_ERROR;
10673   }
10674   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10675 
10676   if (_this == nullptr) {
10677     return SQ_ERROR;
10678   }
10679 
10680   SQFloat arg0;
10681   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10682     sq_throwerror(vm, _SC("Argument 1 not a float"));
10683     return SQ_ERROR;
10684   }
10685   SQFloat arg1;
10686   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
10687     sq_throwerror(vm, _SC("Argument 2 not a float"));
10688     return SQ_ERROR;
10689   }
10690   SQFloat arg2;
10691   if(SQ_FAILED(sq_getfloat(vm, 4, &arg2))) {
10692     sq_throwerror(vm, _SC("Argument 3 not a float"));
10693     return SQ_ERROR;
10694   }
10695   SQFloat arg3;
10696   if(SQ_FAILED(sq_getfloat(vm, 5, &arg3))) {
10697     sq_throwerror(vm, _SC("Argument 4 not a float"));
10698     return SQ_ERROR;
10699   }
10700   SQFloat arg4;
10701   if(SQ_FAILED(sq_getfloat(vm, 6, &arg4))) {
10702     sq_throwerror(vm, _SC("Argument 5 not a float"));
10703     return SQ_ERROR;
10704   }
10705 
10706   try {
10707     _this->tint_fade(static_cast<float> (arg0), static_cast<float> (arg1), static_cast<float> (arg2), static_cast<float> (arg3), static_cast<float> (arg4));
10708 
10709     return 0;
10710 
10711   } catch(std::exception& e) {
10712     sq_throwerror(vm, e.what());
10713     return SQ_ERROR;
10714   } catch(...) {
10715     sq_throwerror(vm, _SC("Unexpected exception while executing function 'tint_fade'"));
10716     return SQ_ERROR;
10717   }
10718 
10719 }
10720 
TileMap_set_alpha_wrapper(HSQUIRRELVM vm)10721 static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm)
10722 {
10723   SQUserPointer data;
10724   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10725     sq_throwerror(vm, _SC("'set_alpha' called without instance"));
10726     return SQ_ERROR;
10727   }
10728   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10729 
10730   if (_this == nullptr) {
10731     return SQ_ERROR;
10732   }
10733 
10734   SQFloat arg0;
10735   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
10736     sq_throwerror(vm, _SC("Argument 1 not a float"));
10737     return SQ_ERROR;
10738   }
10739 
10740   try {
10741     _this->set_alpha(static_cast<float> (arg0));
10742 
10743     return 0;
10744 
10745   } catch(std::exception& e) {
10746     sq_throwerror(vm, e.what());
10747     return SQ_ERROR;
10748   } catch(...) {
10749     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_alpha'"));
10750     return SQ_ERROR;
10751   }
10752 
10753 }
10754 
TileMap_get_alpha_wrapper(HSQUIRRELVM vm)10755 static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm)
10756 {
10757   SQUserPointer data;
10758   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10759     sq_throwerror(vm, _SC("'get_alpha' called without instance"));
10760     return SQ_ERROR;
10761   }
10762   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10763 
10764   if (_this == nullptr) {
10765     return SQ_ERROR;
10766   }
10767 
10768 
10769   try {
10770     float return_value = _this->get_alpha();
10771 
10772     sq_pushfloat(vm, return_value);
10773     return 1;
10774 
10775   } catch(std::exception& e) {
10776     sq_throwerror(vm, e.what());
10777     return SQ_ERROR;
10778   } catch(...) {
10779     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_alpha'"));
10780     return SQ_ERROR;
10781   }
10782 
10783 }
10784 
TileMap_set_solid_wrapper(HSQUIRRELVM vm)10785 static SQInteger TileMap_set_solid_wrapper(HSQUIRRELVM vm)
10786 {
10787   SQUserPointer data;
10788   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10789     sq_throwerror(vm, _SC("'set_solid' called without instance"));
10790     return SQ_ERROR;
10791   }
10792   auto _this = reinterpret_cast<scripting::TileMap*> (data);
10793 
10794   if (_this == nullptr) {
10795     return SQ_ERROR;
10796   }
10797 
10798   SQBool arg0;
10799   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
10800     sq_throwerror(vm, _SC("Argument 1 not a bool"));
10801     return SQ_ERROR;
10802   }
10803 
10804   try {
10805     _this->set_solid(arg0 == SQTrue);
10806 
10807     return 0;
10808 
10809   } catch(std::exception& e) {
10810     sq_throwerror(vm, e.what());
10811     return SQ_ERROR;
10812   } catch(...) {
10813     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'"));
10814     return SQ_ERROR;
10815   }
10816 
10817 }
10818 
Torch_release_hook(SQUserPointer ptr,SQInteger)10819 static SQInteger Torch_release_hook(SQUserPointer ptr, SQInteger )
10820 {
10821   auto _this = reinterpret_cast<scripting::Torch*> (ptr);
10822   delete _this;
10823   return 0;
10824 }
10825 
Torch_get_burning_wrapper(HSQUIRRELVM vm)10826 static SQInteger Torch_get_burning_wrapper(HSQUIRRELVM vm)
10827 {
10828   SQUserPointer data;
10829   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10830     sq_throwerror(vm, _SC("'get_burning' called without instance"));
10831     return SQ_ERROR;
10832   }
10833   auto _this = reinterpret_cast<scripting::Torch*> (data);
10834 
10835   if (_this == nullptr) {
10836     return SQ_ERROR;
10837   }
10838 
10839 
10840   try {
10841     bool return_value = _this->get_burning();
10842 
10843     sq_pushbool(vm, return_value);
10844     return 1;
10845 
10846   } catch(std::exception& e) {
10847     sq_throwerror(vm, e.what());
10848     return SQ_ERROR;
10849   } catch(...) {
10850     sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'"));
10851     return SQ_ERROR;
10852   }
10853 
10854 }
10855 
Torch_set_burning_wrapper(HSQUIRRELVM vm)10856 static SQInteger Torch_set_burning_wrapper(HSQUIRRELVM vm)
10857 {
10858   SQUserPointer data;
10859   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10860     sq_throwerror(vm, _SC("'set_burning' called without instance"));
10861     return SQ_ERROR;
10862   }
10863   auto _this = reinterpret_cast<scripting::Torch*> (data);
10864 
10865   if (_this == nullptr) {
10866     return SQ_ERROR;
10867   }
10868 
10869   SQBool arg0;
10870   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
10871     sq_throwerror(vm, _SC("Argument 1 not a bool"));
10872     return SQ_ERROR;
10873   }
10874 
10875   try {
10876     _this->set_burning(arg0 == SQTrue);
10877 
10878     return 0;
10879 
10880   } catch(std::exception& e) {
10881     sq_throwerror(vm, e.what());
10882     return SQ_ERROR;
10883   } catch(...) {
10884     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'"));
10885     return SQ_ERROR;
10886   }
10887 
10888 }
10889 
WillOWisp_release_hook(SQUserPointer ptr,SQInteger)10890 static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger )
10891 {
10892   auto _this = reinterpret_cast<scripting::WillOWisp*> (ptr);
10893   delete _this;
10894   return 0;
10895 }
10896 
WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)10897 static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm)
10898 {
10899   SQUserPointer data;
10900   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10901     sq_throwerror(vm, _SC("'goto_node' called without instance"));
10902     return SQ_ERROR;
10903   }
10904   auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
10905 
10906   if (_this == nullptr) {
10907     return SQ_ERROR;
10908   }
10909 
10910   SQInteger arg0;
10911   if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) {
10912     sq_throwerror(vm, _SC("Argument 1 not an integer"));
10913     return SQ_ERROR;
10914   }
10915 
10916   try {
10917     _this->goto_node(static_cast<int> (arg0));
10918 
10919     return 0;
10920 
10921   } catch(std::exception& e) {
10922     sq_throwerror(vm, e.what());
10923     return SQ_ERROR;
10924   } catch(...) {
10925     sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'"));
10926     return SQ_ERROR;
10927   }
10928 
10929 }
10930 
WillOWisp_set_state_wrapper(HSQUIRRELVM vm)10931 static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm)
10932 {
10933   SQUserPointer data;
10934   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10935     sq_throwerror(vm, _SC("'set_state' called without instance"));
10936     return SQ_ERROR;
10937   }
10938   auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
10939 
10940   if (_this == nullptr) {
10941     return SQ_ERROR;
10942   }
10943 
10944   const SQChar* arg0;
10945   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
10946     sq_throwerror(vm, _SC("Argument 1 not a string"));
10947     return SQ_ERROR;
10948   }
10949 
10950   try {
10951     _this->set_state(arg0);
10952 
10953     return 0;
10954 
10955   } catch(std::exception& e) {
10956     sq_throwerror(vm, e.what());
10957     return SQ_ERROR;
10958   } catch(...) {
10959     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_state'"));
10960     return SQ_ERROR;
10961   }
10962 
10963 }
10964 
WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)10965 static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm)
10966 {
10967   SQUserPointer data;
10968   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10969     sq_throwerror(vm, _SC("'start_moving' called without instance"));
10970     return SQ_ERROR;
10971   }
10972   auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
10973 
10974   if (_this == nullptr) {
10975     return SQ_ERROR;
10976   }
10977 
10978 
10979   try {
10980     _this->start_moving();
10981 
10982     return 0;
10983 
10984   } catch(std::exception& e) {
10985     sq_throwerror(vm, e.what());
10986     return SQ_ERROR;
10987   } catch(...) {
10988     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'"));
10989     return SQ_ERROR;
10990   }
10991 
10992 }
10993 
WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)10994 static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm)
10995 {
10996   SQUserPointer data;
10997   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
10998     sq_throwerror(vm, _SC("'stop_moving' called without instance"));
10999     return SQ_ERROR;
11000   }
11001   auto _this = reinterpret_cast<scripting::WillOWisp*> (data);
11002 
11003   if (_this == nullptr) {
11004     return SQ_ERROR;
11005   }
11006 
11007 
11008   try {
11009     _this->stop_moving();
11010 
11011     return 0;
11012 
11013   } catch(std::exception& e) {
11014     sq_throwerror(vm, e.what());
11015     return SQ_ERROR;
11016   } catch(...) {
11017     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'"));
11018     return SQ_ERROR;
11019   }
11020 
11021 }
11022 
Wind_release_hook(SQUserPointer ptr,SQInteger)11023 static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger )
11024 {
11025   auto _this = reinterpret_cast<scripting::Wind*> (ptr);
11026   delete _this;
11027   return 0;
11028 }
11029 
Wind_start_wrapper(HSQUIRRELVM vm)11030 static SQInteger Wind_start_wrapper(HSQUIRRELVM vm)
11031 {
11032   SQUserPointer data;
11033   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
11034     sq_throwerror(vm, _SC("'start' called without instance"));
11035     return SQ_ERROR;
11036   }
11037   auto _this = reinterpret_cast<scripting::Wind*> (data);
11038 
11039   if (_this == nullptr) {
11040     return SQ_ERROR;
11041   }
11042 
11043 
11044   try {
11045     _this->start();
11046 
11047     return 0;
11048 
11049   } catch(std::exception& e) {
11050     sq_throwerror(vm, e.what());
11051     return SQ_ERROR;
11052   } catch(...) {
11053     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'"));
11054     return SQ_ERROR;
11055   }
11056 
11057 }
11058 
Wind_stop_wrapper(HSQUIRRELVM vm)11059 static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm)
11060 {
11061   SQUserPointer data;
11062   if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, nullptr)) || !data) {
11063     sq_throwerror(vm, _SC("'stop' called without instance"));
11064     return SQ_ERROR;
11065   }
11066   auto _this = reinterpret_cast<scripting::Wind*> (data);
11067 
11068   if (_this == nullptr) {
11069     return SQ_ERROR;
11070   }
11071 
11072 
11073   try {
11074     _this->stop();
11075 
11076     return 0;
11077 
11078   } catch(std::exception& e) {
11079     sq_throwerror(vm, e.what());
11080     return SQ_ERROR;
11081   } catch(...) {
11082     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'"));
11083     return SQ_ERROR;
11084   }
11085 
11086 }
11087 
WorldMap_release_hook(SQUserPointer ptr,SQInteger)11088 static SQInteger WorldMap_release_hook(SQUserPointer ptr, SQInteger )
11089 {
11090   auto _this = reinterpret_cast<scripting::WorldMap*> (ptr);
11091   delete _this;
11092   return 0;
11093 }
11094 
display_wrapper(HSQUIRRELVM vm)11095 static SQInteger display_wrapper(HSQUIRRELVM vm)
11096 {
11097   return scripting::display(vm);
11098 }
11099 
print_stacktrace_wrapper(HSQUIRRELVM vm)11100 static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm)
11101 {
11102   HSQUIRRELVM arg0 = vm;
11103 
11104   try {
11105     scripting::print_stacktrace(arg0);
11106 
11107     return 0;
11108 
11109   } catch(std::exception& e) {
11110     sq_throwerror(vm, e.what());
11111     return SQ_ERROR;
11112   } catch(...) {
11113     sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'"));
11114     return SQ_ERROR;
11115   }
11116 
11117 }
11118 
get_current_thread_wrapper(HSQUIRRELVM vm)11119 static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm)
11120 {
11121   return scripting::get_current_thread(vm);
11122 }
11123 
is_christmas_wrapper(HSQUIRRELVM vm)11124 static SQInteger is_christmas_wrapper(HSQUIRRELVM vm)
11125 {
11126 
11127   try {
11128     bool return_value = scripting::is_christmas();
11129 
11130     sq_pushbool(vm, return_value);
11131     return 1;
11132 
11133   } catch(std::exception& e) {
11134     sq_throwerror(vm, e.what());
11135     return SQ_ERROR;
11136   } catch(...) {
11137     sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_christmas'"));
11138     return SQ_ERROR;
11139   }
11140 
11141 }
11142 
display_text_file_wrapper(HSQUIRRELVM vm)11143 static SQInteger display_text_file_wrapper(HSQUIRRELVM vm)
11144 {
11145   const SQChar* arg0;
11146   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11147     sq_throwerror(vm, _SC("Argument 1 not a string"));
11148     return SQ_ERROR;
11149   }
11150 
11151   try {
11152     scripting::display_text_file(arg0);
11153 
11154     return 0;
11155 
11156   } catch(std::exception& e) {
11157     sq_throwerror(vm, e.what());
11158     return SQ_ERROR;
11159   } catch(...) {
11160     sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'"));
11161     return SQ_ERROR;
11162   }
11163 
11164 }
11165 
load_worldmap_wrapper(HSQUIRRELVM vm)11166 static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm)
11167 {
11168   const SQChar* arg0;
11169   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11170     sq_throwerror(vm, _SC("Argument 1 not a string"));
11171     return SQ_ERROR;
11172   }
11173 
11174   try {
11175     scripting::load_worldmap(arg0);
11176 
11177     return 0;
11178 
11179   } catch(std::exception& e) {
11180     sq_throwerror(vm, e.what());
11181     return SQ_ERROR;
11182   } catch(...) {
11183     sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'"));
11184     return SQ_ERROR;
11185   }
11186 
11187 }
11188 
set_next_worldmap_wrapper(HSQUIRRELVM vm)11189 static SQInteger set_next_worldmap_wrapper(HSQUIRRELVM vm)
11190 {
11191   const SQChar* arg0;
11192   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11193     sq_throwerror(vm, _SC("Argument 1 not a string"));
11194     return SQ_ERROR;
11195   }
11196   const SQChar* arg1;
11197   if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
11198     sq_throwerror(vm, _SC("Argument 2 not a string"));
11199     return SQ_ERROR;
11200   }
11201 
11202   try {
11203     scripting::set_next_worldmap(arg0, arg1);
11204 
11205     return 0;
11206 
11207   } catch(std::exception& e) {
11208     sq_throwerror(vm, e.what());
11209     return SQ_ERROR;
11210   } catch(...) {
11211     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_next_worldmap'"));
11212     return SQ_ERROR;
11213   }
11214 
11215 }
11216 
load_level_wrapper(HSQUIRRELVM vm)11217 static SQInteger load_level_wrapper(HSQUIRRELVM vm)
11218 {
11219   const SQChar* arg0;
11220   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11221     sq_throwerror(vm, _SC("Argument 1 not a string"));
11222     return SQ_ERROR;
11223   }
11224 
11225   try {
11226     scripting::load_level(arg0);
11227 
11228     return 0;
11229 
11230   } catch(std::exception& e) {
11231     sq_throwerror(vm, e.what());
11232     return SQ_ERROR;
11233   } catch(...) {
11234     sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'"));
11235     return SQ_ERROR;
11236   }
11237 
11238 }
11239 
start_cutscene_wrapper(HSQUIRRELVM vm)11240 static SQInteger start_cutscene_wrapper(HSQUIRRELVM vm)
11241 {
11242   (void) vm;
11243 
11244   try {
11245     scripting::start_cutscene();
11246 
11247     return 0;
11248 
11249   } catch(std::exception& e) {
11250     sq_throwerror(vm, e.what());
11251     return SQ_ERROR;
11252   } catch(...) {
11253     sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_cutscene'"));
11254     return SQ_ERROR;
11255   }
11256 
11257 }
11258 
end_cutscene_wrapper(HSQUIRRELVM vm)11259 static SQInteger end_cutscene_wrapper(HSQUIRRELVM vm)
11260 {
11261   (void) vm;
11262 
11263   try {
11264     scripting::end_cutscene();
11265 
11266     return 0;
11267 
11268   } catch(std::exception& e) {
11269     sq_throwerror(vm, e.what());
11270     return SQ_ERROR;
11271   } catch(...) {
11272     sq_throwerror(vm, _SC("Unexpected exception while executing function 'end_cutscene'"));
11273     return SQ_ERROR;
11274   }
11275 
11276 }
11277 
check_cutscene_wrapper(HSQUIRRELVM vm)11278 static SQInteger check_cutscene_wrapper(HSQUIRRELVM vm)
11279 {
11280 
11281   try {
11282     bool return_value = scripting::check_cutscene();
11283 
11284     sq_pushbool(vm, return_value);
11285     return 1;
11286 
11287   } catch(std::exception& e) {
11288     sq_throwerror(vm, e.what());
11289     return SQ_ERROR;
11290   } catch(...) {
11291     sq_throwerror(vm, _SC("Unexpected exception while executing function 'check_cutscene'"));
11292     return SQ_ERROR;
11293   }
11294 
11295 }
11296 
wait_wrapper(HSQUIRRELVM vm)11297 static SQInteger wait_wrapper(HSQUIRRELVM vm)
11298 {
11299   HSQUIRRELVM arg0 = vm;
11300   SQFloat arg1;
11301   if(SQ_FAILED(sq_getfloat(vm, 2, &arg1))) {
11302     sq_throwerror(vm, _SC("Argument 1 not a float"));
11303     return SQ_ERROR;
11304   }
11305 
11306   try {
11307     scripting::wait(arg0, static_cast<float> (arg1));
11308 
11309     return sq_suspendvm(vm);
11310 
11311   } catch(std::exception& e) {
11312     sq_throwerror(vm, e.what());
11313     return SQ_ERROR;
11314   } catch(...) {
11315     sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'"));
11316     return SQ_ERROR;
11317   }
11318 
11319 }
11320 
wait_for_screenswitch_wrapper(HSQUIRRELVM vm)11321 static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm)
11322 {
11323   HSQUIRRELVM arg0 = vm;
11324 
11325   try {
11326     scripting::wait_for_screenswitch(arg0);
11327 
11328     return sq_suspendvm(vm);
11329 
11330   } catch(std::exception& e) {
11331     sq_throwerror(vm, e.what());
11332     return SQ_ERROR;
11333   } catch(...) {
11334     sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'"));
11335     return SQ_ERROR;
11336   }
11337 
11338 }
11339 
exit_screen_wrapper(HSQUIRRELVM vm)11340 static SQInteger exit_screen_wrapper(HSQUIRRELVM vm)
11341 {
11342   (void) vm;
11343 
11344   try {
11345     scripting::exit_screen();
11346 
11347     return 0;
11348 
11349   } catch(std::exception& e) {
11350     sq_throwerror(vm, e.what());
11351     return SQ_ERROR;
11352   } catch(...) {
11353     sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'"));
11354     return SQ_ERROR;
11355   }
11356 
11357 }
11358 
translate_wrapper(HSQUIRRELVM vm)11359 static SQInteger translate_wrapper(HSQUIRRELVM vm)
11360 {
11361   const SQChar* arg0;
11362   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11363     sq_throwerror(vm, _SC("Argument 1 not a string"));
11364     return SQ_ERROR;
11365   }
11366 
11367   try {
11368     std::string return_value = scripting::translate(arg0);
11369 
11370     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
11371     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
11372     return 1;
11373 
11374   } catch(std::exception& e) {
11375     sq_throwerror(vm, e.what());
11376     return SQ_ERROR;
11377   } catch(...) {
11378     sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'"));
11379     return SQ_ERROR;
11380   }
11381 
11382 }
11383 
__wrapper(HSQUIRRELVM vm)11384 static SQInteger __wrapper(HSQUIRRELVM vm)
11385 {
11386   const SQChar* arg0;
11387   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11388     sq_throwerror(vm, _SC("Argument 1 not a string"));
11389     return SQ_ERROR;
11390   }
11391 
11392   try {
11393     std::string return_value = scripting::_(arg0);
11394 
11395     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
11396     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
11397     return 1;
11398 
11399   } catch(std::exception& e) {
11400     sq_throwerror(vm, e.what());
11401     return SQ_ERROR;
11402   } catch(...) {
11403     sq_throwerror(vm, _SC("Unexpected exception while executing function '_'"));
11404     return SQ_ERROR;
11405   }
11406 
11407 }
11408 
translate_plural_wrapper(HSQUIRRELVM vm)11409 static SQInteger translate_plural_wrapper(HSQUIRRELVM vm)
11410 {
11411   const SQChar* arg0;
11412   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11413     sq_throwerror(vm, _SC("Argument 1 not a string"));
11414     return SQ_ERROR;
11415   }
11416   const SQChar* arg1;
11417   if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
11418     sq_throwerror(vm, _SC("Argument 2 not a string"));
11419     return SQ_ERROR;
11420   }
11421   SQInteger arg2;
11422   if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
11423     sq_throwerror(vm, _SC("Argument 3 not an integer"));
11424     return SQ_ERROR;
11425   }
11426 
11427   try {
11428     std::string return_value = scripting::translate_plural(arg0, arg1, static_cast<int> (arg2));
11429 
11430     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
11431     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
11432     return 1;
11433 
11434   } catch(std::exception& e) {
11435     sq_throwerror(vm, e.what());
11436     return SQ_ERROR;
11437   } catch(...) {
11438     sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate_plural'"));
11439     return SQ_ERROR;
11440   }
11441 
11442 }
11443 
___wrapper(HSQUIRRELVM vm)11444 static SQInteger ___wrapper(HSQUIRRELVM vm)
11445 {
11446   const SQChar* arg0;
11447   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11448     sq_throwerror(vm, _SC("Argument 1 not a string"));
11449     return SQ_ERROR;
11450   }
11451   const SQChar* arg1;
11452   if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
11453     sq_throwerror(vm, _SC("Argument 2 not a string"));
11454     return SQ_ERROR;
11455   }
11456   SQInteger arg2;
11457   if(SQ_FAILED(sq_getinteger(vm, 4, &arg2))) {
11458     sq_throwerror(vm, _SC("Argument 3 not an integer"));
11459     return SQ_ERROR;
11460   }
11461 
11462   try {
11463     std::string return_value = scripting::__(arg0, arg1, static_cast<int> (arg2));
11464 
11465     assert(return_value.size() < static_cast<size_t>(std::numeric_limits<SQInteger>::max()));
11466     sq_pushstring(vm, return_value.c_str(), static_cast<SQInteger>(return_value.size()));
11467     return 1;
11468 
11469   } catch(std::exception& e) {
11470     sq_throwerror(vm, e.what());
11471     return SQ_ERROR;
11472   } catch(...) {
11473     sq_throwerror(vm, _SC("Unexpected exception while executing function '__'"));
11474     return SQ_ERROR;
11475   }
11476 
11477 }
11478 
import_wrapper(HSQUIRRELVM vm)11479 static SQInteger import_wrapper(HSQUIRRELVM vm)
11480 {
11481   HSQUIRRELVM arg0 = vm;
11482   const SQChar* arg1;
11483   if(SQ_FAILED(sq_getstring(vm, 2, &arg1))) {
11484     sq_throwerror(vm, _SC("Argument 1 not a string"));
11485     return SQ_ERROR;
11486   }
11487 
11488   try {
11489     scripting::import(arg0, arg1);
11490 
11491     return 0;
11492 
11493   } catch(std::exception& e) {
11494     sq_throwerror(vm, e.what());
11495     return SQ_ERROR;
11496   } catch(...) {
11497     sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'"));
11498     return SQ_ERROR;
11499   }
11500 
11501 }
11502 
save_state_wrapper(HSQUIRRELVM vm)11503 static SQInteger save_state_wrapper(HSQUIRRELVM vm)
11504 {
11505   (void) vm;
11506 
11507   try {
11508     scripting::save_state();
11509 
11510     return 0;
11511 
11512   } catch(std::exception& e) {
11513     sq_throwerror(vm, e.what());
11514     return SQ_ERROR;
11515   } catch(...) {
11516     sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'"));
11517     return SQ_ERROR;
11518   }
11519 
11520 }
11521 
load_state_wrapper(HSQUIRRELVM vm)11522 static SQInteger load_state_wrapper(HSQUIRRELVM vm)
11523 {
11524   (void) vm;
11525 
11526   try {
11527     scripting::load_state();
11528 
11529     return 0;
11530 
11531   } catch(std::exception& e) {
11532     sq_throwerror(vm, e.what());
11533     return SQ_ERROR;
11534   } catch(...) {
11535     sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_state'"));
11536     return SQ_ERROR;
11537   }
11538 
11539 }
11540 
debug_collrects_wrapper(HSQUIRRELVM vm)11541 static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm)
11542 {
11543   SQBool arg0;
11544   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
11545     sq_throwerror(vm, _SC("Argument 1 not a bool"));
11546     return SQ_ERROR;
11547   }
11548 
11549   try {
11550     scripting::debug_collrects(arg0 == SQTrue);
11551 
11552     return 0;
11553 
11554   } catch(std::exception& e) {
11555     sq_throwerror(vm, e.what());
11556     return SQ_ERROR;
11557   } catch(...) {
11558     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'"));
11559     return SQ_ERROR;
11560   }
11561 
11562 }
11563 
debug_show_fps_wrapper(HSQUIRRELVM vm)11564 static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm)
11565 {
11566   SQBool arg0;
11567   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
11568     sq_throwerror(vm, _SC("Argument 1 not a bool"));
11569     return SQ_ERROR;
11570   }
11571 
11572   try {
11573     scripting::debug_show_fps(arg0 == SQTrue);
11574 
11575     return 0;
11576 
11577   } catch(std::exception& e) {
11578     sq_throwerror(vm, e.what());
11579     return SQ_ERROR;
11580   } catch(...) {
11581     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'"));
11582     return SQ_ERROR;
11583   }
11584 
11585 }
11586 
debug_draw_solids_only_wrapper(HSQUIRRELVM vm)11587 static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm)
11588 {
11589   SQBool arg0;
11590   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
11591     sq_throwerror(vm, _SC("Argument 1 not a bool"));
11592     return SQ_ERROR;
11593   }
11594 
11595   try {
11596     scripting::debug_draw_solids_only(arg0 == SQTrue);
11597 
11598     return 0;
11599 
11600   } catch(std::exception& e) {
11601     sq_throwerror(vm, e.what());
11602     return SQ_ERROR;
11603   } catch(...) {
11604     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'"));
11605     return SQ_ERROR;
11606   }
11607 
11608 }
11609 
debug_draw_editor_images_wrapper(HSQUIRRELVM vm)11610 static SQInteger debug_draw_editor_images_wrapper(HSQUIRRELVM vm)
11611 {
11612   SQBool arg0;
11613   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
11614     sq_throwerror(vm, _SC("Argument 1 not a bool"));
11615     return SQ_ERROR;
11616   }
11617 
11618   try {
11619     scripting::debug_draw_editor_images(arg0 == SQTrue);
11620 
11621     return 0;
11622 
11623   } catch(std::exception& e) {
11624     sq_throwerror(vm, e.what());
11625     return SQ_ERROR;
11626   } catch(...) {
11627     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_editor_images'"));
11628     return SQ_ERROR;
11629   }
11630 
11631 }
11632 
debug_worldmap_ghost_wrapper(HSQUIRRELVM vm)11633 static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm)
11634 {
11635   SQBool arg0;
11636   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
11637     sq_throwerror(vm, _SC("Argument 1 not a bool"));
11638     return SQ_ERROR;
11639   }
11640 
11641   try {
11642     scripting::debug_worldmap_ghost(arg0 == SQTrue);
11643 
11644     return 0;
11645 
11646   } catch(std::exception& e) {
11647     sq_throwerror(vm, e.what());
11648     return SQ_ERROR;
11649   } catch(...) {
11650     sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_worldmap_ghost'"));
11651     return SQ_ERROR;
11652   }
11653 
11654 }
11655 
play_music_wrapper(HSQUIRRELVM vm)11656 static SQInteger play_music_wrapper(HSQUIRRELVM vm)
11657 {
11658   const SQChar* arg0;
11659   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11660     sq_throwerror(vm, _SC("Argument 1 not a string"));
11661     return SQ_ERROR;
11662   }
11663 
11664   try {
11665     scripting::play_music(arg0);
11666 
11667     return 0;
11668 
11669   } catch(std::exception& e) {
11670     sq_throwerror(vm, e.what());
11671     return SQ_ERROR;
11672   } catch(...) {
11673     sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'"));
11674     return SQ_ERROR;
11675   }
11676 
11677 }
11678 
stop_music_wrapper(HSQUIRRELVM vm)11679 static SQInteger stop_music_wrapper(HSQUIRRELVM vm)
11680 {
11681   SQFloat arg0;
11682   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
11683     sq_throwerror(vm, _SC("Argument 1 not a float"));
11684     return SQ_ERROR;
11685   }
11686 
11687   try {
11688     scripting::stop_music(static_cast<float> (arg0));
11689 
11690     return 0;
11691 
11692   } catch(std::exception& e) {
11693     sq_throwerror(vm, e.what());
11694     return SQ_ERROR;
11695   } catch(...) {
11696     sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_music'"));
11697     return SQ_ERROR;
11698   }
11699 
11700 }
11701 
fade_in_music_wrapper(HSQUIRRELVM vm)11702 static SQInteger fade_in_music_wrapper(HSQUIRRELVM vm)
11703 {
11704   const SQChar* arg0;
11705   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11706     sq_throwerror(vm, _SC("Argument 1 not a string"));
11707     return SQ_ERROR;
11708   }
11709   SQFloat arg1;
11710   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
11711     sq_throwerror(vm, _SC("Argument 2 not a float"));
11712     return SQ_ERROR;
11713   }
11714 
11715   try {
11716     scripting::fade_in_music(arg0, static_cast<float> (arg1));
11717 
11718     return 0;
11719 
11720   } catch(std::exception& e) {
11721     sq_throwerror(vm, e.what());
11722     return SQ_ERROR;
11723   } catch(...) {
11724     sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in_music'"));
11725     return SQ_ERROR;
11726   }
11727 
11728 }
11729 
resume_music_wrapper(HSQUIRRELVM vm)11730 static SQInteger resume_music_wrapper(HSQUIRRELVM vm)
11731 {
11732   SQFloat arg0;
11733   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
11734     sq_throwerror(vm, _SC("Argument 1 not a float"));
11735     return SQ_ERROR;
11736   }
11737 
11738   try {
11739     scripting::resume_music(static_cast<float> (arg0));
11740 
11741     return 0;
11742 
11743   } catch(std::exception& e) {
11744     sq_throwerror(vm, e.what());
11745     return SQ_ERROR;
11746   } catch(...) {
11747     sq_throwerror(vm, _SC("Unexpected exception while executing function 'resume_music'"));
11748     return SQ_ERROR;
11749   }
11750 
11751 }
11752 
play_sound_wrapper(HSQUIRRELVM vm)11753 static SQInteger play_sound_wrapper(HSQUIRRELVM vm)
11754 {
11755   const SQChar* arg0;
11756   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
11757     sq_throwerror(vm, _SC("Argument 1 not a string"));
11758     return SQ_ERROR;
11759   }
11760 
11761   try {
11762     scripting::play_sound(arg0);
11763 
11764     return 0;
11765 
11766   } catch(std::exception& e) {
11767     sq_throwerror(vm, e.what());
11768     return SQ_ERROR;
11769   } catch(...) {
11770     sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'"));
11771     return SQ_ERROR;
11772   }
11773 
11774 }
11775 
set_game_speed_wrapper(HSQUIRRELVM vm)11776 static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm)
11777 {
11778   SQFloat arg0;
11779   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
11780     sq_throwerror(vm, _SC("Argument 1 not a float"));
11781     return SQ_ERROR;
11782   }
11783 
11784   try {
11785     scripting::set_game_speed(static_cast<float> (arg0));
11786 
11787     return 0;
11788 
11789   } catch(std::exception& e) {
11790     sq_throwerror(vm, e.what());
11791     return SQ_ERROR;
11792   } catch(...) {
11793     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_game_speed'"));
11794     return SQ_ERROR;
11795   }
11796 
11797 }
11798 
grease_wrapper(HSQUIRRELVM vm)11799 static SQInteger grease_wrapper(HSQUIRRELVM vm)
11800 {
11801   (void) vm;
11802 
11803   try {
11804     scripting::grease();
11805 
11806     return 0;
11807 
11808   } catch(std::exception& e) {
11809     sq_throwerror(vm, e.what());
11810     return SQ_ERROR;
11811   } catch(...) {
11812     sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'"));
11813     return SQ_ERROR;
11814   }
11815 
11816 }
11817 
invincible_wrapper(HSQUIRRELVM vm)11818 static SQInteger invincible_wrapper(HSQUIRRELVM vm)
11819 {
11820   (void) vm;
11821 
11822   try {
11823     scripting::invincible();
11824 
11825     return 0;
11826 
11827   } catch(std::exception& e) {
11828     sq_throwerror(vm, e.what());
11829     return SQ_ERROR;
11830   } catch(...) {
11831     sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'"));
11832     return SQ_ERROR;
11833   }
11834 
11835 }
11836 
ghost_wrapper(HSQUIRRELVM vm)11837 static SQInteger ghost_wrapper(HSQUIRRELVM vm)
11838 {
11839   (void) vm;
11840 
11841   try {
11842     scripting::ghost();
11843 
11844     return 0;
11845 
11846   } catch(std::exception& e) {
11847     sq_throwerror(vm, e.what());
11848     return SQ_ERROR;
11849   } catch(...) {
11850     sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'"));
11851     return SQ_ERROR;
11852   }
11853 
11854 }
11855 
mortal_wrapper(HSQUIRRELVM vm)11856 static SQInteger mortal_wrapper(HSQUIRRELVM vm)
11857 {
11858   (void) vm;
11859 
11860   try {
11861     scripting::mortal();
11862 
11863     return 0;
11864 
11865   } catch(std::exception& e) {
11866     sq_throwerror(vm, e.what());
11867     return SQ_ERROR;
11868   } catch(...) {
11869     sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'"));
11870     return SQ_ERROR;
11871   }
11872 
11873 }
11874 
restart_wrapper(HSQUIRRELVM vm)11875 static SQInteger restart_wrapper(HSQUIRRELVM vm)
11876 {
11877   (void) vm;
11878 
11879   try {
11880     scripting::restart();
11881 
11882     return 0;
11883 
11884   } catch(std::exception& e) {
11885     sq_throwerror(vm, e.what());
11886     return SQ_ERROR;
11887   } catch(...) {
11888     sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'"));
11889     return SQ_ERROR;
11890   }
11891 
11892 }
11893 
whereami_wrapper(HSQUIRRELVM vm)11894 static SQInteger whereami_wrapper(HSQUIRRELVM vm)
11895 {
11896   (void) vm;
11897 
11898   try {
11899     scripting::whereami();
11900 
11901     return 0;
11902 
11903   } catch(std::exception& e) {
11904     sq_throwerror(vm, e.what());
11905     return SQ_ERROR;
11906   } catch(...) {
11907     sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'"));
11908     return SQ_ERROR;
11909   }
11910 
11911 }
11912 
gotoend_wrapper(HSQUIRRELVM vm)11913 static SQInteger gotoend_wrapper(HSQUIRRELVM vm)
11914 {
11915   (void) vm;
11916 
11917   try {
11918     scripting::gotoend();
11919 
11920     return 0;
11921 
11922   } catch(std::exception& e) {
11923     sq_throwerror(vm, e.what());
11924     return SQ_ERROR;
11925   } catch(...) {
11926     sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'"));
11927     return SQ_ERROR;
11928   }
11929 
11930 }
11931 
warp_wrapper(HSQUIRRELVM vm)11932 static SQInteger warp_wrapper(HSQUIRRELVM vm)
11933 {
11934   SQFloat arg0;
11935   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
11936     sq_throwerror(vm, _SC("Argument 1 not a float"));
11937     return SQ_ERROR;
11938   }
11939   SQFloat arg1;
11940   if(SQ_FAILED(sq_getfloat(vm, 3, &arg1))) {
11941     sq_throwerror(vm, _SC("Argument 2 not a float"));
11942     return SQ_ERROR;
11943   }
11944 
11945   try {
11946     scripting::warp(static_cast<float> (arg0), static_cast<float> (arg1));
11947 
11948     return 0;
11949 
11950   } catch(std::exception& e) {
11951     sq_throwerror(vm, e.what());
11952     return SQ_ERROR;
11953   } catch(...) {
11954     sq_throwerror(vm, _SC("Unexpected exception while executing function 'warp'"));
11955     return SQ_ERROR;
11956   }
11957 
11958 }
11959 
camera_wrapper(HSQUIRRELVM vm)11960 static SQInteger camera_wrapper(HSQUIRRELVM vm)
11961 {
11962   (void) vm;
11963 
11964   try {
11965     scripting::camera();
11966 
11967     return 0;
11968 
11969   } catch(std::exception& e) {
11970     sq_throwerror(vm, e.what());
11971     return SQ_ERROR;
11972   } catch(...) {
11973     sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'"));
11974     return SQ_ERROR;
11975   }
11976 
11977 }
11978 
set_gamma_wrapper(HSQUIRRELVM vm)11979 static SQInteger set_gamma_wrapper(HSQUIRRELVM vm)
11980 {
11981   SQFloat arg0;
11982   if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) {
11983     sq_throwerror(vm, _SC("Argument 1 not a float"));
11984     return SQ_ERROR;
11985   }
11986 
11987   try {
11988     scripting::set_gamma(static_cast<float> (arg0));
11989 
11990     return 0;
11991 
11992   } catch(std::exception& e) {
11993     sq_throwerror(vm, e.what());
11994     return SQ_ERROR;
11995   } catch(...) {
11996     sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_gamma'"));
11997     return SQ_ERROR;
11998   }
11999 
12000 }
12001 
quit_wrapper(HSQUIRRELVM vm)12002 static SQInteger quit_wrapper(HSQUIRRELVM vm)
12003 {
12004   (void) vm;
12005 
12006   try {
12007     scripting::quit();
12008 
12009     return 0;
12010 
12011   } catch(std::exception& e) {
12012     sq_throwerror(vm, e.what());
12013     return SQ_ERROR;
12014   } catch(...) {
12015     sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'"));
12016     return SQ_ERROR;
12017   }
12018 
12019 }
12020 
rand_wrapper(HSQUIRRELVM vm)12021 static SQInteger rand_wrapper(HSQUIRRELVM vm)
12022 {
12023 
12024   try {
12025     int return_value = scripting::rand();
12026 
12027     sq_pushinteger(vm, return_value);
12028     return 1;
12029 
12030   } catch(std::exception& e) {
12031     sq_throwerror(vm, e.what());
12032     return SQ_ERROR;
12033   } catch(...) {
12034     sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'"));
12035     return SQ_ERROR;
12036   }
12037 
12038 }
12039 
record_demo_wrapper(HSQUIRRELVM vm)12040 static SQInteger record_demo_wrapper(HSQUIRRELVM vm)
12041 {
12042   const SQChar* arg0;
12043   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
12044     sq_throwerror(vm, _SC("Argument 1 not a string"));
12045     return SQ_ERROR;
12046   }
12047 
12048   try {
12049     scripting::record_demo(arg0);
12050 
12051     return 0;
12052 
12053   } catch(std::exception& e) {
12054     sq_throwerror(vm, e.what());
12055     return SQ_ERROR;
12056   } catch(...) {
12057     sq_throwerror(vm, _SC("Unexpected exception while executing function 'record_demo'"));
12058     return SQ_ERROR;
12059   }
12060 
12061 }
12062 
play_demo_wrapper(HSQUIRRELVM vm)12063 static SQInteger play_demo_wrapper(HSQUIRRELVM vm)
12064 {
12065   const SQChar* arg0;
12066   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
12067     sq_throwerror(vm, _SC("Argument 1 not a string"));
12068     return SQ_ERROR;
12069   }
12070 
12071   try {
12072     scripting::play_demo(arg0);
12073 
12074     return 0;
12075 
12076   } catch(std::exception& e) {
12077     sq_throwerror(vm, e.what());
12078     return SQ_ERROR;
12079   } catch(...) {
12080     sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_demo'"));
12081     return SQ_ERROR;
12082   }
12083 
12084 }
12085 
Level_finish_wrapper(HSQUIRRELVM vm)12086 static SQInteger Level_finish_wrapper(HSQUIRRELVM vm)
12087 {
12088   SQBool arg0;
12089   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
12090     sq_throwerror(vm, _SC("Argument 1 not a bool"));
12091     return SQ_ERROR;
12092   }
12093 
12094   try {
12095     scripting::Level_finish(arg0 == SQTrue);
12096 
12097     return 0;
12098 
12099   } catch(std::exception& e) {
12100     sq_throwerror(vm, e.what());
12101     return SQ_ERROR;
12102   } catch(...) {
12103     sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_finish'"));
12104     return SQ_ERROR;
12105   }
12106 
12107 }
12108 
Level_spawn_wrapper(HSQUIRRELVM vm)12109 static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm)
12110 {
12111   const SQChar* arg0;
12112   if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) {
12113     sq_throwerror(vm, _SC("Argument 1 not a string"));
12114     return SQ_ERROR;
12115   }
12116   const SQChar* arg1;
12117   if(SQ_FAILED(sq_getstring(vm, 3, &arg1))) {
12118     sq_throwerror(vm, _SC("Argument 2 not a string"));
12119     return SQ_ERROR;
12120   }
12121 
12122   try {
12123     scripting::Level_spawn(arg0, arg1);
12124 
12125     return 0;
12126 
12127   } catch(std::exception& e) {
12128     sq_throwerror(vm, e.what());
12129     return SQ_ERROR;
12130   } catch(...) {
12131     sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_spawn'"));
12132     return SQ_ERROR;
12133   }
12134 
12135 }
12136 
Level_flip_vertically_wrapper(HSQUIRRELVM vm)12137 static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm)
12138 {
12139   (void) vm;
12140 
12141   try {
12142     scripting::Level_flip_vertically();
12143 
12144     return 0;
12145 
12146   } catch(std::exception& e) {
12147     sq_throwerror(vm, e.what());
12148     return SQ_ERROR;
12149   } catch(...) {
12150     sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_flip_vertically'"));
12151     return SQ_ERROR;
12152   }
12153 
12154 }
12155 
Level_toggle_pause_wrapper(HSQUIRRELVM vm)12156 static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm)
12157 {
12158   (void) vm;
12159 
12160   try {
12161     scripting::Level_toggle_pause();
12162 
12163     return 0;
12164 
12165   } catch(std::exception& e) {
12166     sq_throwerror(vm, e.what());
12167     return SQ_ERROR;
12168   } catch(...) {
12169     sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_toggle_pause'"));
12170     return SQ_ERROR;
12171   }
12172 
12173 }
12174 
Level_edit_wrapper(HSQUIRRELVM vm)12175 static SQInteger Level_edit_wrapper(HSQUIRRELVM vm)
12176 {
12177   SQBool arg0;
12178   if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) {
12179     sq_throwerror(vm, _SC("Argument 1 not a bool"));
12180     return SQ_ERROR;
12181   }
12182 
12183   try {
12184     scripting::Level_edit(arg0 == SQTrue);
12185 
12186     return 0;
12187 
12188   } catch(std::exception& e) {
12189     sq_throwerror(vm, e.what());
12190     return SQ_ERROR;
12191   } catch(...) {
12192     sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_edit'"));
12193     return SQ_ERROR;
12194   }
12195 
12196 }
12197 
12198 } // namespace wrapper
create_squirrel_instance(HSQUIRRELVM v,scripting::AmbientSound * object,bool setup_releasehook)12199 void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook)
12200 {
12201   using namespace wrapper;
12202 
12203   sq_pushroottable(v);
12204   sq_pushstring(v, "AmbientSound", -1);
12205   if(SQ_FAILED(sq_get(v, -2))) {
12206     std::ostringstream msg;
12207     msg << "Couldn't resolved squirrel type 'AmbientSound'";
12208     throw SquirrelError(v, msg.str());
12209   }
12210 
12211   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12212     std::ostringstream msg;
12213     msg << "Couldn't setup squirrel instance for object of type 'AmbientSound'";
12214     throw SquirrelError(v, msg.str());
12215   }
12216   sq_remove(v, -2); // remove object name
12217 
12218   if(setup_releasehook) {
12219     sq_setreleasehook(v, -1, AmbientSound_release_hook);
12220   }
12221 
12222   sq_remove(v, -2); // remove root table
12223 }
12224 
create_squirrel_instance(HSQUIRRELVM v,scripting::Background * object,bool setup_releasehook)12225 void create_squirrel_instance(HSQUIRRELVM v, scripting::Background* object, bool setup_releasehook)
12226 {
12227   using namespace wrapper;
12228 
12229   sq_pushroottable(v);
12230   sq_pushstring(v, "Background", -1);
12231   if(SQ_FAILED(sq_get(v, -2))) {
12232     std::ostringstream msg;
12233     msg << "Couldn't resolved squirrel type 'Background'";
12234     throw SquirrelError(v, msg.str());
12235   }
12236 
12237   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12238     std::ostringstream msg;
12239     msg << "Couldn't setup squirrel instance for object of type 'Background'";
12240     throw SquirrelError(v, msg.str());
12241   }
12242   sq_remove(v, -2); // remove object name
12243 
12244   if(setup_releasehook) {
12245     sq_setreleasehook(v, -1, Background_release_hook);
12246   }
12247 
12248   sq_remove(v, -2); // remove root table
12249 }
12250 
create_squirrel_instance(HSQUIRRELVM v,scripting::BadGuy * object,bool setup_releasehook)12251 void create_squirrel_instance(HSQUIRRELVM v, scripting::BadGuy* object, bool setup_releasehook)
12252 {
12253   using namespace wrapper;
12254 
12255   sq_pushroottable(v);
12256   sq_pushstring(v, "BadGuy", -1);
12257   if(SQ_FAILED(sq_get(v, -2))) {
12258     std::ostringstream msg;
12259     msg << "Couldn't resolved squirrel type 'BadGuy'";
12260     throw SquirrelError(v, msg.str());
12261   }
12262 
12263   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12264     std::ostringstream msg;
12265     msg << "Couldn't setup squirrel instance for object of type 'BadGuy'";
12266     throw SquirrelError(v, msg.str());
12267   }
12268   sq_remove(v, -2); // remove object name
12269 
12270   if(setup_releasehook) {
12271     sq_setreleasehook(v, -1, BadGuy_release_hook);
12272   }
12273 
12274   sq_remove(v, -2); // remove root table
12275 }
12276 
create_squirrel_instance(HSQUIRRELVM v,scripting::Camera * object,bool setup_releasehook)12277 void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook)
12278 {
12279   using namespace wrapper;
12280 
12281   sq_pushroottable(v);
12282   sq_pushstring(v, "Camera", -1);
12283   if(SQ_FAILED(sq_get(v, -2))) {
12284     std::ostringstream msg;
12285     msg << "Couldn't resolved squirrel type 'Camera'";
12286     throw SquirrelError(v, msg.str());
12287   }
12288 
12289   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12290     std::ostringstream msg;
12291     msg << "Couldn't setup squirrel instance for object of type 'Camera'";
12292     throw SquirrelError(v, msg.str());
12293   }
12294   sq_remove(v, -2); // remove object name
12295 
12296   if(setup_releasehook) {
12297     sq_setreleasehook(v, -1, Camera_release_hook);
12298   }
12299 
12300   sq_remove(v, -2); // remove root table
12301 }
12302 
create_squirrel_instance(HSQUIRRELVM v,scripting::Candle * object,bool setup_releasehook)12303 void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook)
12304 {
12305   using namespace wrapper;
12306 
12307   sq_pushroottable(v);
12308   sq_pushstring(v, "Candle", -1);
12309   if(SQ_FAILED(sq_get(v, -2))) {
12310     std::ostringstream msg;
12311     msg << "Couldn't resolved squirrel type 'Candle'";
12312     throw SquirrelError(v, msg.str());
12313   }
12314 
12315   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12316     std::ostringstream msg;
12317     msg << "Couldn't setup squirrel instance for object of type 'Candle'";
12318     throw SquirrelError(v, msg.str());
12319   }
12320   sq_remove(v, -2); // remove object name
12321 
12322   if(setup_releasehook) {
12323     sq_setreleasehook(v, -1, Candle_release_hook);
12324   }
12325 
12326   sq_remove(v, -2); // remove root table
12327 }
12328 
create_squirrel_instance(HSQUIRRELVM v,scripting::Clouds * object,bool setup_releasehook)12329 void create_squirrel_instance(HSQUIRRELVM v, scripting::Clouds* object, bool setup_releasehook)
12330 {
12331   using namespace wrapper;
12332 
12333   sq_pushroottable(v);
12334   sq_pushstring(v, "Clouds", -1);
12335   if(SQ_FAILED(sq_get(v, -2))) {
12336     std::ostringstream msg;
12337     msg << "Couldn't resolved squirrel type 'Clouds'";
12338     throw SquirrelError(v, msg.str());
12339   }
12340 
12341   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12342     std::ostringstream msg;
12343     msg << "Couldn't setup squirrel instance for object of type 'Clouds'";
12344     throw SquirrelError(v, msg.str());
12345   }
12346   sq_remove(v, -2); // remove object name
12347 
12348   if(setup_releasehook) {
12349     sq_setreleasehook(v, -1, Clouds_release_hook);
12350   }
12351 
12352   sq_remove(v, -2); // remove root table
12353 }
12354 
create_squirrel_instance(HSQUIRRELVM v,scripting::CustomParticles * object,bool setup_releasehook)12355 void create_squirrel_instance(HSQUIRRELVM v, scripting::CustomParticles* object, bool setup_releasehook)
12356 {
12357   using namespace wrapper;
12358 
12359   sq_pushroottable(v);
12360   sq_pushstring(v, "CustomParticles", -1);
12361   if(SQ_FAILED(sq_get(v, -2))) {
12362     std::ostringstream msg;
12363     msg << "Couldn't resolved squirrel type 'CustomParticles'";
12364     throw SquirrelError(v, msg.str());
12365   }
12366 
12367   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12368     std::ostringstream msg;
12369     msg << "Couldn't setup squirrel instance for object of type 'CustomParticles'";
12370     throw SquirrelError(v, msg.str());
12371   }
12372   sq_remove(v, -2); // remove object name
12373 
12374   if(setup_releasehook) {
12375     sq_setreleasehook(v, -1, CustomParticles_release_hook);
12376   }
12377 
12378   sq_remove(v, -2); // remove root table
12379 }
12380 
create_squirrel_instance(HSQUIRRELVM v,scripting::Decal * object,bool setup_releasehook)12381 void create_squirrel_instance(HSQUIRRELVM v, scripting::Decal* object, bool setup_releasehook)
12382 {
12383   using namespace wrapper;
12384 
12385   sq_pushroottable(v);
12386   sq_pushstring(v, "Decal", -1);
12387   if(SQ_FAILED(sq_get(v, -2))) {
12388     std::ostringstream msg;
12389     msg << "Couldn't resolved squirrel type 'Decal'";
12390     throw SquirrelError(v, msg.str());
12391   }
12392 
12393   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12394     std::ostringstream msg;
12395     msg << "Couldn't setup squirrel instance for object of type 'Decal'";
12396     throw SquirrelError(v, msg.str());
12397   }
12398   sq_remove(v, -2); // remove object name
12399 
12400   if(setup_releasehook) {
12401     sq_setreleasehook(v, -1, Decal_release_hook);
12402   }
12403 
12404   sq_remove(v, -2); // remove root table
12405 }
12406 
create_squirrel_instance(HSQUIRRELVM v,scripting::Dispenser * object,bool setup_releasehook)12407 void create_squirrel_instance(HSQUIRRELVM v, scripting::Dispenser* object, bool setup_releasehook)
12408 {
12409   using namespace wrapper;
12410 
12411   sq_pushroottable(v);
12412   sq_pushstring(v, "Dispenser", -1);
12413   if(SQ_FAILED(sq_get(v, -2))) {
12414     std::ostringstream msg;
12415     msg << "Couldn't resolved squirrel type 'Dispenser'";
12416     throw SquirrelError(v, msg.str());
12417   }
12418 
12419   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12420     std::ostringstream msg;
12421     msg << "Couldn't setup squirrel instance for object of type 'Dispenser'";
12422     throw SquirrelError(v, msg.str());
12423   }
12424   sq_remove(v, -2); // remove object name
12425 
12426   if(setup_releasehook) {
12427     sq_setreleasehook(v, -1, Dispenser_release_hook);
12428   }
12429 
12430   sq_remove(v, -2); // remove root table
12431 }
12432 
create_squirrel_instance(HSQUIRRELVM v,scripting::DisplayEffect * object,bool setup_releasehook)12433 void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook)
12434 {
12435   using namespace wrapper;
12436 
12437   sq_pushroottable(v);
12438   sq_pushstring(v, "DisplayEffect", -1);
12439   if(SQ_FAILED(sq_get(v, -2))) {
12440     std::ostringstream msg;
12441     msg << "Couldn't resolved squirrel type 'DisplayEffect'";
12442     throw SquirrelError(v, msg.str());
12443   }
12444 
12445   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12446     std::ostringstream msg;
12447     msg << "Couldn't setup squirrel instance for object of type 'DisplayEffect'";
12448     throw SquirrelError(v, msg.str());
12449   }
12450   sq_remove(v, -2); // remove object name
12451 
12452   if(setup_releasehook) {
12453     sq_setreleasehook(v, -1, DisplayEffect_release_hook);
12454   }
12455 
12456   sq_remove(v, -2); // remove root table
12457 }
12458 
create_squirrel_instance(HSQUIRRELVM v,scripting::FloatingImage * object,bool setup_releasehook)12459 void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook)
12460 {
12461   using namespace wrapper;
12462 
12463   sq_pushroottable(v);
12464   sq_pushstring(v, "FloatingImage", -1);
12465   if(SQ_FAILED(sq_get(v, -2))) {
12466     std::ostringstream msg;
12467     msg << "Couldn't resolved squirrel type 'FloatingImage'";
12468     throw SquirrelError(v, msg.str());
12469   }
12470 
12471   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12472     std::ostringstream msg;
12473     msg << "Couldn't setup squirrel instance for object of type 'FloatingImage'";
12474     throw SquirrelError(v, msg.str());
12475   }
12476   sq_remove(v, -2); // remove object name
12477 
12478   if(setup_releasehook) {
12479     sq_setreleasehook(v, -1, FloatingImage_release_hook);
12480   }
12481 
12482   sq_remove(v, -2); // remove root table
12483 }
12484 
create_squirrel_instance(HSQUIRRELVM v,scripting::GameObjectManager * object,bool setup_releasehook)12485 void create_squirrel_instance(HSQUIRRELVM v, scripting::GameObjectManager* object, bool setup_releasehook)
12486 {
12487   using namespace wrapper;
12488 
12489   sq_pushroottable(v);
12490   sq_pushstring(v, "GameObjectManager", -1);
12491   if(SQ_FAILED(sq_get(v, -2))) {
12492     std::ostringstream msg;
12493     msg << "Couldn't resolved squirrel type 'GameObjectManager'";
12494     throw SquirrelError(v, msg.str());
12495   }
12496 
12497   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12498     std::ostringstream msg;
12499     msg << "Couldn't setup squirrel instance for object of type 'GameObjectManager'";
12500     throw SquirrelError(v, msg.str());
12501   }
12502   sq_remove(v, -2); // remove object name
12503 
12504   if(setup_releasehook) {
12505     sq_setreleasehook(v, -1, GameObjectManager_release_hook);
12506   }
12507 
12508   sq_remove(v, -2); // remove root table
12509 }
12510 
create_squirrel_instance(HSQUIRRELVM v,scripting::Gradient * object,bool setup_releasehook)12511 void create_squirrel_instance(HSQUIRRELVM v, scripting::Gradient* object, bool setup_releasehook)
12512 {
12513   using namespace wrapper;
12514 
12515   sq_pushroottable(v);
12516   sq_pushstring(v, "Gradient", -1);
12517   if(SQ_FAILED(sq_get(v, -2))) {
12518     std::ostringstream msg;
12519     msg << "Couldn't resolved squirrel type 'Gradient'";
12520     throw SquirrelError(v, msg.str());
12521   }
12522 
12523   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12524     std::ostringstream msg;
12525     msg << "Couldn't setup squirrel instance for object of type 'Gradient'";
12526     throw SquirrelError(v, msg.str());
12527   }
12528   sq_remove(v, -2); // remove object name
12529 
12530   if(setup_releasehook) {
12531     sq_setreleasehook(v, -1, Gradient_release_hook);
12532   }
12533 
12534   sq_remove(v, -2); // remove root table
12535 }
12536 
create_squirrel_instance(HSQUIRRELVM v,scripting::LevelTime * object,bool setup_releasehook)12537 void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook)
12538 {
12539   using namespace wrapper;
12540 
12541   sq_pushroottable(v);
12542   sq_pushstring(v, "LevelTime", -1);
12543   if(SQ_FAILED(sq_get(v, -2))) {
12544     std::ostringstream msg;
12545     msg << "Couldn't resolved squirrel type 'LevelTime'";
12546     throw SquirrelError(v, msg.str());
12547   }
12548 
12549   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12550     std::ostringstream msg;
12551     msg << "Couldn't setup squirrel instance for object of type 'LevelTime'";
12552     throw SquirrelError(v, msg.str());
12553   }
12554   sq_remove(v, -2); // remove object name
12555 
12556   if(setup_releasehook) {
12557     sq_setreleasehook(v, -1, LevelTime_release_hook);
12558   }
12559 
12560   sq_remove(v, -2); // remove root table
12561 }
12562 
create_squirrel_instance(HSQUIRRELVM v,scripting::ParticleSystem * object,bool setup_releasehook)12563 void create_squirrel_instance(HSQUIRRELVM v, scripting::ParticleSystem* object, bool setup_releasehook)
12564 {
12565   using namespace wrapper;
12566 
12567   sq_pushroottable(v);
12568   sq_pushstring(v, "ParticleSystem", -1);
12569   if(SQ_FAILED(sq_get(v, -2))) {
12570     std::ostringstream msg;
12571     msg << "Couldn't resolved squirrel type 'ParticleSystem'";
12572     throw SquirrelError(v, msg.str());
12573   }
12574 
12575   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12576     std::ostringstream msg;
12577     msg << "Couldn't setup squirrel instance for object of type 'ParticleSystem'";
12578     throw SquirrelError(v, msg.str());
12579   }
12580   sq_remove(v, -2); // remove object name
12581 
12582   if(setup_releasehook) {
12583     sq_setreleasehook(v, -1, ParticleSystem_release_hook);
12584   }
12585 
12586   sq_remove(v, -2); // remove root table
12587 }
12588 
create_squirrel_instance(HSQUIRRELVM v,scripting::Platform * object,bool setup_releasehook)12589 void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook)
12590 {
12591   using namespace wrapper;
12592 
12593   sq_pushroottable(v);
12594   sq_pushstring(v, "Platform", -1);
12595   if(SQ_FAILED(sq_get(v, -2))) {
12596     std::ostringstream msg;
12597     msg << "Couldn't resolved squirrel type 'Platform'";
12598     throw SquirrelError(v, msg.str());
12599   }
12600 
12601   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12602     std::ostringstream msg;
12603     msg << "Couldn't setup squirrel instance for object of type 'Platform'";
12604     throw SquirrelError(v, msg.str());
12605   }
12606   sq_remove(v, -2); // remove object name
12607 
12608   if(setup_releasehook) {
12609     sq_setreleasehook(v, -1, Platform_release_hook);
12610   }
12611 
12612   sq_remove(v, -2); // remove root table
12613 }
12614 
create_squirrel_instance(HSQUIRRELVM v,scripting::Player * object,bool setup_releasehook)12615 void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook)
12616 {
12617   using namespace wrapper;
12618 
12619   sq_pushroottable(v);
12620   sq_pushstring(v, "Player", -1);
12621   if(SQ_FAILED(sq_get(v, -2))) {
12622     std::ostringstream msg;
12623     msg << "Couldn't resolved squirrel type 'Player'";
12624     throw SquirrelError(v, msg.str());
12625   }
12626 
12627   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12628     std::ostringstream msg;
12629     msg << "Couldn't setup squirrel instance for object of type 'Player'";
12630     throw SquirrelError(v, msg.str());
12631   }
12632   sq_remove(v, -2); // remove object name
12633 
12634   if(setup_releasehook) {
12635     sq_setreleasehook(v, -1, Player_release_hook);
12636   }
12637 
12638   sq_remove(v, -2); // remove root table
12639 }
12640 
create_squirrel_instance(HSQUIRRELVM v,scripting::Rain * object,bool setup_releasehook)12641 void create_squirrel_instance(HSQUIRRELVM v, scripting::Rain* object, bool setup_releasehook)
12642 {
12643   using namespace wrapper;
12644 
12645   sq_pushroottable(v);
12646   sq_pushstring(v, "Rain", -1);
12647   if(SQ_FAILED(sq_get(v, -2))) {
12648     std::ostringstream msg;
12649     msg << "Couldn't resolved squirrel type 'Rain'";
12650     throw SquirrelError(v, msg.str());
12651   }
12652 
12653   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12654     std::ostringstream msg;
12655     msg << "Couldn't setup squirrel instance for object of type 'Rain'";
12656     throw SquirrelError(v, msg.str());
12657   }
12658   sq_remove(v, -2); // remove object name
12659 
12660   if(setup_releasehook) {
12661     sq_setreleasehook(v, -1, Rain_release_hook);
12662   }
12663 
12664   sq_remove(v, -2); // remove root table
12665 }
12666 
create_squirrel_instance(HSQUIRRELVM v,scripting::Rock * object,bool setup_releasehook)12667 void create_squirrel_instance(HSQUIRRELVM v, scripting::Rock* object, bool setup_releasehook)
12668 {
12669   using namespace wrapper;
12670 
12671   sq_pushroottable(v);
12672   sq_pushstring(v, "Rock", -1);
12673   if(SQ_FAILED(sq_get(v, -2))) {
12674     std::ostringstream msg;
12675     msg << "Couldn't resolved squirrel type 'Rock'";
12676     throw SquirrelError(v, msg.str());
12677   }
12678 
12679   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12680     std::ostringstream msg;
12681     msg << "Couldn't setup squirrel instance for object of type 'Rock'";
12682     throw SquirrelError(v, msg.str());
12683   }
12684   sq_remove(v, -2); // remove object name
12685 
12686   if(setup_releasehook) {
12687     sq_setreleasehook(v, -1, Rock_release_hook);
12688   }
12689 
12690   sq_remove(v, -2); // remove root table
12691 }
12692 
create_squirrel_instance(HSQUIRRELVM v,scripting::ScriptedObject * object,bool setup_releasehook)12693 void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook)
12694 {
12695   using namespace wrapper;
12696 
12697   sq_pushroottable(v);
12698   sq_pushstring(v, "ScriptedObject", -1);
12699   if(SQ_FAILED(sq_get(v, -2))) {
12700     std::ostringstream msg;
12701     msg << "Couldn't resolved squirrel type 'ScriptedObject'";
12702     throw SquirrelError(v, msg.str());
12703   }
12704 
12705   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12706     std::ostringstream msg;
12707     msg << "Couldn't setup squirrel instance for object of type 'ScriptedObject'";
12708     throw SquirrelError(v, msg.str());
12709   }
12710   sq_remove(v, -2); // remove object name
12711 
12712   if(setup_releasehook) {
12713     sq_setreleasehook(v, -1, ScriptedObject_release_hook);
12714   }
12715 
12716   sq_remove(v, -2); // remove root table
12717 }
12718 
create_squirrel_instance(HSQUIRRELVM v,scripting::Sector * object,bool setup_releasehook)12719 void create_squirrel_instance(HSQUIRRELVM v, scripting::Sector* object, bool setup_releasehook)
12720 {
12721   using namespace wrapper;
12722 
12723   sq_pushroottable(v);
12724   sq_pushstring(v, "Sector", -1);
12725   if(SQ_FAILED(sq_get(v, -2))) {
12726     std::ostringstream msg;
12727     msg << "Couldn't resolved squirrel type 'Sector'";
12728     throw SquirrelError(v, msg.str());
12729   }
12730 
12731   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12732     std::ostringstream msg;
12733     msg << "Couldn't setup squirrel instance for object of type 'Sector'";
12734     throw SquirrelError(v, msg.str());
12735   }
12736   sq_remove(v, -2); // remove object name
12737 
12738   if(setup_releasehook) {
12739     sq_setreleasehook(v, -1, Sector_release_hook);
12740   }
12741 
12742   sq_remove(v, -2); // remove root table
12743 }
12744 
create_squirrel_instance(HSQUIRRELVM v,scripting::Spotlight * object,bool setup_releasehook)12745 void create_squirrel_instance(HSQUIRRELVM v, scripting::Spotlight* object, bool setup_releasehook)
12746 {
12747   using namespace wrapper;
12748 
12749   sq_pushroottable(v);
12750   sq_pushstring(v, "Spotlight", -1);
12751   if(SQ_FAILED(sq_get(v, -2))) {
12752     std::ostringstream msg;
12753     msg << "Couldn't resolved squirrel type 'Spotlight'";
12754     throw SquirrelError(v, msg.str());
12755   }
12756 
12757   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12758     std::ostringstream msg;
12759     msg << "Couldn't setup squirrel instance for object of type 'Spotlight'";
12760     throw SquirrelError(v, msg.str());
12761   }
12762   sq_remove(v, -2); // remove object name
12763 
12764   if(setup_releasehook) {
12765     sq_setreleasehook(v, -1, Spotlight_release_hook);
12766   }
12767 
12768   sq_remove(v, -2); // remove root table
12769 }
12770 
create_squirrel_instance(HSQUIRRELVM v,scripting::Text * object,bool setup_releasehook)12771 void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook)
12772 {
12773   using namespace wrapper;
12774 
12775   sq_pushroottable(v);
12776   sq_pushstring(v, "Text", -1);
12777   if(SQ_FAILED(sq_get(v, -2))) {
12778     std::ostringstream msg;
12779     msg << "Couldn't resolved squirrel type 'Text'";
12780     throw SquirrelError(v, msg.str());
12781   }
12782 
12783   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12784     std::ostringstream msg;
12785     msg << "Couldn't setup squirrel instance for object of type 'Text'";
12786     throw SquirrelError(v, msg.str());
12787   }
12788   sq_remove(v, -2); // remove object name
12789 
12790   if(setup_releasehook) {
12791     sq_setreleasehook(v, -1, Text_release_hook);
12792   }
12793 
12794   sq_remove(v, -2); // remove root table
12795 }
12796 
create_squirrel_instance(HSQUIRRELVM v,scripting::TextArray * object,bool setup_releasehook)12797 void create_squirrel_instance(HSQUIRRELVM v, scripting::TextArray* object, bool setup_releasehook)
12798 {
12799   using namespace wrapper;
12800 
12801   sq_pushroottable(v);
12802   sq_pushstring(v, "TextArray", -1);
12803   if(SQ_FAILED(sq_get(v, -2))) {
12804     std::ostringstream msg;
12805     msg << "Couldn't resolved squirrel type 'TextArray'";
12806     throw SquirrelError(v, msg.str());
12807   }
12808 
12809   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12810     std::ostringstream msg;
12811     msg << "Couldn't setup squirrel instance for object of type 'TextArray'";
12812     throw SquirrelError(v, msg.str());
12813   }
12814   sq_remove(v, -2); // remove object name
12815 
12816   if(setup_releasehook) {
12817     sq_setreleasehook(v, -1, TextArray_release_hook);
12818   }
12819 
12820   sq_remove(v, -2); // remove root table
12821 }
12822 
create_squirrel_instance(HSQUIRRELVM v,scripting::Thunderstorm * object,bool setup_releasehook)12823 void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook)
12824 {
12825   using namespace wrapper;
12826 
12827   sq_pushroottable(v);
12828   sq_pushstring(v, "Thunderstorm", -1);
12829   if(SQ_FAILED(sq_get(v, -2))) {
12830     std::ostringstream msg;
12831     msg << "Couldn't resolved squirrel type 'Thunderstorm'";
12832     throw SquirrelError(v, msg.str());
12833   }
12834 
12835   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12836     std::ostringstream msg;
12837     msg << "Couldn't setup squirrel instance for object of type 'Thunderstorm'";
12838     throw SquirrelError(v, msg.str());
12839   }
12840   sq_remove(v, -2); // remove object name
12841 
12842   if(setup_releasehook) {
12843     sq_setreleasehook(v, -1, Thunderstorm_release_hook);
12844   }
12845 
12846   sq_remove(v, -2); // remove root table
12847 }
12848 
create_squirrel_instance(HSQUIRRELVM v,scripting::TileMap * object,bool setup_releasehook)12849 void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook)
12850 {
12851   using namespace wrapper;
12852 
12853   sq_pushroottable(v);
12854   sq_pushstring(v, "TileMap", -1);
12855   if(SQ_FAILED(sq_get(v, -2))) {
12856     std::ostringstream msg;
12857     msg << "Couldn't resolved squirrel type 'TileMap'";
12858     throw SquirrelError(v, msg.str());
12859   }
12860 
12861   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12862     std::ostringstream msg;
12863     msg << "Couldn't setup squirrel instance for object of type 'TileMap'";
12864     throw SquirrelError(v, msg.str());
12865   }
12866   sq_remove(v, -2); // remove object name
12867 
12868   if(setup_releasehook) {
12869     sq_setreleasehook(v, -1, TileMap_release_hook);
12870   }
12871 
12872   sq_remove(v, -2); // remove root table
12873 }
12874 
create_squirrel_instance(HSQUIRRELVM v,scripting::Torch * object,bool setup_releasehook)12875 void create_squirrel_instance(HSQUIRRELVM v, scripting::Torch* object, bool setup_releasehook)
12876 {
12877   using namespace wrapper;
12878 
12879   sq_pushroottable(v);
12880   sq_pushstring(v, "Torch", -1);
12881   if(SQ_FAILED(sq_get(v, -2))) {
12882     std::ostringstream msg;
12883     msg << "Couldn't resolved squirrel type 'Torch'";
12884     throw SquirrelError(v, msg.str());
12885   }
12886 
12887   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12888     std::ostringstream msg;
12889     msg << "Couldn't setup squirrel instance for object of type 'Torch'";
12890     throw SquirrelError(v, msg.str());
12891   }
12892   sq_remove(v, -2); // remove object name
12893 
12894   if(setup_releasehook) {
12895     sq_setreleasehook(v, -1, Torch_release_hook);
12896   }
12897 
12898   sq_remove(v, -2); // remove root table
12899 }
12900 
create_squirrel_instance(HSQUIRRELVM v,scripting::WillOWisp * object,bool setup_releasehook)12901 void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook)
12902 {
12903   using namespace wrapper;
12904 
12905   sq_pushroottable(v);
12906   sq_pushstring(v, "WillOWisp", -1);
12907   if(SQ_FAILED(sq_get(v, -2))) {
12908     std::ostringstream msg;
12909     msg << "Couldn't resolved squirrel type 'WillOWisp'";
12910     throw SquirrelError(v, msg.str());
12911   }
12912 
12913   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12914     std::ostringstream msg;
12915     msg << "Couldn't setup squirrel instance for object of type 'WillOWisp'";
12916     throw SquirrelError(v, msg.str());
12917   }
12918   sq_remove(v, -2); // remove object name
12919 
12920   if(setup_releasehook) {
12921     sq_setreleasehook(v, -1, WillOWisp_release_hook);
12922   }
12923 
12924   sq_remove(v, -2); // remove root table
12925 }
12926 
create_squirrel_instance(HSQUIRRELVM v,scripting::Wind * object,bool setup_releasehook)12927 void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook)
12928 {
12929   using namespace wrapper;
12930 
12931   sq_pushroottable(v);
12932   sq_pushstring(v, "Wind", -1);
12933   if(SQ_FAILED(sq_get(v, -2))) {
12934     std::ostringstream msg;
12935     msg << "Couldn't resolved squirrel type 'Wind'";
12936     throw SquirrelError(v, msg.str());
12937   }
12938 
12939   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12940     std::ostringstream msg;
12941     msg << "Couldn't setup squirrel instance for object of type 'Wind'";
12942     throw SquirrelError(v, msg.str());
12943   }
12944   sq_remove(v, -2); // remove object name
12945 
12946   if(setup_releasehook) {
12947     sq_setreleasehook(v, -1, Wind_release_hook);
12948   }
12949 
12950   sq_remove(v, -2); // remove root table
12951 }
12952 
create_squirrel_instance(HSQUIRRELVM v,scripting::WorldMap * object,bool setup_releasehook)12953 void create_squirrel_instance(HSQUIRRELVM v, scripting::WorldMap* object, bool setup_releasehook)
12954 {
12955   using namespace wrapper;
12956 
12957   sq_pushroottable(v);
12958   sq_pushstring(v, "WorldMap", -1);
12959   if(SQ_FAILED(sq_get(v, -2))) {
12960     std::ostringstream msg;
12961     msg << "Couldn't resolved squirrel type 'WorldMap'";
12962     throw SquirrelError(v, msg.str());
12963   }
12964 
12965   if(SQ_FAILED(sq_createinstance(v, -1)) || SQ_FAILED(sq_setinstanceup(v, -1, object))) {
12966     std::ostringstream msg;
12967     msg << "Couldn't setup squirrel instance for object of type 'WorldMap'";
12968     throw SquirrelError(v, msg.str());
12969   }
12970   sq_remove(v, -2); // remove object name
12971 
12972   if(setup_releasehook) {
12973     sq_setreleasehook(v, -1, WorldMap_release_hook);
12974   }
12975 
12976   sq_remove(v, -2); // remove root table
12977 }
12978 
register_supertux_wrapper(HSQUIRRELVM v)12979 void register_supertux_wrapper(HSQUIRRELVM v)
12980 {
12981   using namespace wrapper;
12982 
12983   sq_pushstring(v, "ANCHOR_TOP", -1);
12984   sq_pushinteger(v, 16);
12985   if(SQ_FAILED(sq_createslot(v, -3))) {
12986     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP'");
12987   }
12988 
12989   sq_pushstring(v, "ANCHOR_BOTTOM", -1);
12990   sq_pushinteger(v, 32);
12991   if(SQ_FAILED(sq_createslot(v, -3))) {
12992     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM'");
12993   }
12994 
12995   sq_pushstring(v, "ANCHOR_LEFT", -1);
12996   sq_pushinteger(v, 1);
12997   if(SQ_FAILED(sq_createslot(v, -3))) {
12998     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_LEFT'");
12999   }
13000 
13001   sq_pushstring(v, "ANCHOR_RIGHT", -1);
13002   sq_pushinteger(v, 2);
13003   if(SQ_FAILED(sq_createslot(v, -3))) {
13004     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_RIGHT'");
13005   }
13006 
13007   sq_pushstring(v, "ANCHOR_MIDDLE", -1);
13008   sq_pushinteger(v, 0);
13009   if(SQ_FAILED(sq_createslot(v, -3))) {
13010     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_MIDDLE'");
13011   }
13012 
13013   sq_pushstring(v, "ANCHOR_TOP_LEFT", -1);
13014   sq_pushinteger(v, 17);
13015   if(SQ_FAILED(sq_createslot(v, -3))) {
13016     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_LEFT'");
13017   }
13018 
13019   sq_pushstring(v, "ANCHOR_TOP_RIGHT", -1);
13020   sq_pushinteger(v, 18);
13021   if(SQ_FAILED(sq_createslot(v, -3))) {
13022     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_TOP_RIGHT'");
13023   }
13024 
13025   sq_pushstring(v, "ANCHOR_BOTTOM_LEFT", -1);
13026   sq_pushinteger(v, 33);
13027   if(SQ_FAILED(sq_createslot(v, -3))) {
13028     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_LEFT'");
13029   }
13030 
13031   sq_pushstring(v, "ANCHOR_BOTTOM_RIGHT", -1);
13032   sq_pushinteger(v, 34);
13033   if(SQ_FAILED(sq_createslot(v, -3))) {
13034     throw SquirrelError(v, "Couldn't register constant 'ANCHOR_BOTTOM_RIGHT'");
13035   }
13036 
13037   sq_pushstring(v, "display", -1);
13038   sq_newclosure(v, &display_wrapper, 0);
13039   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t.");
13040   if(SQ_FAILED(sq_createslot(v, -3))) {
13041     throw SquirrelError(v, "Couldn't register function 'display'");
13042   }
13043 
13044   sq_pushstring(v, "print_stacktrace", -1);
13045   sq_newclosure(v, &print_stacktrace_wrapper, 0);
13046   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13047   if(SQ_FAILED(sq_createslot(v, -3))) {
13048     throw SquirrelError(v, "Couldn't register function 'print_stacktrace'");
13049   }
13050 
13051   sq_pushstring(v, "get_current_thread", -1);
13052   sq_newclosure(v, &get_current_thread_wrapper, 0);
13053   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "t");
13054   if(SQ_FAILED(sq_createslot(v, -3))) {
13055     throw SquirrelError(v, "Couldn't register function 'get_current_thread'");
13056   }
13057 
13058   sq_pushstring(v, "is_christmas", -1);
13059   sq_newclosure(v, &is_christmas_wrapper, 0);
13060   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13061   if(SQ_FAILED(sq_createslot(v, -3))) {
13062     throw SquirrelError(v, "Couldn't register function 'is_christmas'");
13063   }
13064 
13065   sq_pushstring(v, "display_text_file", -1);
13066   sq_newclosure(v, &display_text_file_wrapper, 0);
13067   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13068   if(SQ_FAILED(sq_createslot(v, -3))) {
13069     throw SquirrelError(v, "Couldn't register function 'display_text_file'");
13070   }
13071 
13072   sq_pushstring(v, "load_worldmap", -1);
13073   sq_newclosure(v, &load_worldmap_wrapper, 0);
13074   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13075   if(SQ_FAILED(sq_createslot(v, -3))) {
13076     throw SquirrelError(v, "Couldn't register function 'load_worldmap'");
13077   }
13078 
13079   sq_pushstring(v, "set_next_worldmap", -1);
13080   sq_newclosure(v, &set_next_worldmap_wrapper, 0);
13081   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
13082   if(SQ_FAILED(sq_createslot(v, -3))) {
13083     throw SquirrelError(v, "Couldn't register function 'set_next_worldmap'");
13084   }
13085 
13086   sq_pushstring(v, "load_level", -1);
13087   sq_newclosure(v, &load_level_wrapper, 0);
13088   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13089   if(SQ_FAILED(sq_createslot(v, -3))) {
13090     throw SquirrelError(v, "Couldn't register function 'load_level'");
13091   }
13092 
13093   sq_pushstring(v, "start_cutscene", -1);
13094   sq_newclosure(v, &start_cutscene_wrapper, 0);
13095   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13096   if(SQ_FAILED(sq_createslot(v, -3))) {
13097     throw SquirrelError(v, "Couldn't register function 'start_cutscene'");
13098   }
13099 
13100   sq_pushstring(v, "end_cutscene", -1);
13101   sq_newclosure(v, &end_cutscene_wrapper, 0);
13102   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13103   if(SQ_FAILED(sq_createslot(v, -3))) {
13104     throw SquirrelError(v, "Couldn't register function 'end_cutscene'");
13105   }
13106 
13107   sq_pushstring(v, "check_cutscene", -1);
13108   sq_newclosure(v, &check_cutscene_wrapper, 0);
13109   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13110   if(SQ_FAILED(sq_createslot(v, -3))) {
13111     throw SquirrelError(v, "Couldn't register function 'check_cutscene'");
13112   }
13113 
13114   sq_pushstring(v, "wait", -1);
13115   sq_newclosure(v, &wait_wrapper, 0);
13116   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13117   if(SQ_FAILED(sq_createslot(v, -3))) {
13118     throw SquirrelError(v, "Couldn't register function 'wait'");
13119   }
13120 
13121   sq_pushstring(v, "wait_for_screenswitch", -1);
13122   sq_newclosure(v, &wait_for_screenswitch_wrapper, 0);
13123   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13124   if(SQ_FAILED(sq_createslot(v, -3))) {
13125     throw SquirrelError(v, "Couldn't register function 'wait_for_screenswitch'");
13126   }
13127 
13128   sq_pushstring(v, "exit_screen", -1);
13129   sq_newclosure(v, &exit_screen_wrapper, 0);
13130   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13131   if(SQ_FAILED(sq_createslot(v, -3))) {
13132     throw SquirrelError(v, "Couldn't register function 'exit_screen'");
13133   }
13134 
13135   sq_pushstring(v, "translate", -1);
13136   sq_newclosure(v, &translate_wrapper, 0);
13137   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13138   if(SQ_FAILED(sq_createslot(v, -3))) {
13139     throw SquirrelError(v, "Couldn't register function 'translate'");
13140   }
13141 
13142   sq_pushstring(v, "_", -1);
13143   sq_newclosure(v, &__wrapper, 0);
13144   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13145   if(SQ_FAILED(sq_createslot(v, -3))) {
13146     throw SquirrelError(v, "Couldn't register function '_'");
13147   }
13148 
13149   sq_pushstring(v, "translate_plural", -1);
13150   sq_newclosure(v, &translate_plural_wrapper, 0);
13151   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tssi");
13152   if(SQ_FAILED(sq_createslot(v, -3))) {
13153     throw SquirrelError(v, "Couldn't register function 'translate_plural'");
13154   }
13155 
13156   sq_pushstring(v, "__", -1);
13157   sq_newclosure(v, &___wrapper, 0);
13158   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tssi");
13159   if(SQ_FAILED(sq_createslot(v, -3))) {
13160     throw SquirrelError(v, "Couldn't register function '__'");
13161   }
13162 
13163   sq_pushstring(v, "import", -1);
13164   sq_newclosure(v, &import_wrapper, 0);
13165   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13166   if(SQ_FAILED(sq_createslot(v, -3))) {
13167     throw SquirrelError(v, "Couldn't register function 'import'");
13168   }
13169 
13170   sq_pushstring(v, "save_state", -1);
13171   sq_newclosure(v, &save_state_wrapper, 0);
13172   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13173   if(SQ_FAILED(sq_createslot(v, -3))) {
13174     throw SquirrelError(v, "Couldn't register function 'save_state'");
13175   }
13176 
13177   sq_pushstring(v, "load_state", -1);
13178   sq_newclosure(v, &load_state_wrapper, 0);
13179   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13180   if(SQ_FAILED(sq_createslot(v, -3))) {
13181     throw SquirrelError(v, "Couldn't register function 'load_state'");
13182   }
13183 
13184   sq_pushstring(v, "debug_collrects", -1);
13185   sq_newclosure(v, &debug_collrects_wrapper, 0);
13186   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13187   if(SQ_FAILED(sq_createslot(v, -3))) {
13188     throw SquirrelError(v, "Couldn't register function 'debug_collrects'");
13189   }
13190 
13191   sq_pushstring(v, "debug_show_fps", -1);
13192   sq_newclosure(v, &debug_show_fps_wrapper, 0);
13193   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13194   if(SQ_FAILED(sq_createslot(v, -3))) {
13195     throw SquirrelError(v, "Couldn't register function 'debug_show_fps'");
13196   }
13197 
13198   sq_pushstring(v, "debug_draw_solids_only", -1);
13199   sq_newclosure(v, &debug_draw_solids_only_wrapper, 0);
13200   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13201   if(SQ_FAILED(sq_createslot(v, -3))) {
13202     throw SquirrelError(v, "Couldn't register function 'debug_draw_solids_only'");
13203   }
13204 
13205   sq_pushstring(v, "debug_draw_editor_images", -1);
13206   sq_newclosure(v, &debug_draw_editor_images_wrapper, 0);
13207   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13208   if(SQ_FAILED(sq_createslot(v, -3))) {
13209     throw SquirrelError(v, "Couldn't register function 'debug_draw_editor_images'");
13210   }
13211 
13212   sq_pushstring(v, "debug_worldmap_ghost", -1);
13213   sq_newclosure(v, &debug_worldmap_ghost_wrapper, 0);
13214   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13215   if(SQ_FAILED(sq_createslot(v, -3))) {
13216     throw SquirrelError(v, "Couldn't register function 'debug_worldmap_ghost'");
13217   }
13218 
13219   sq_pushstring(v, "play_music", -1);
13220   sq_newclosure(v, &play_music_wrapper, 0);
13221   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13222   if(SQ_FAILED(sq_createslot(v, -3))) {
13223     throw SquirrelError(v, "Couldn't register function 'play_music'");
13224   }
13225 
13226   sq_pushstring(v, "stop_music", -1);
13227   sq_newclosure(v, &stop_music_wrapper, 0);
13228   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13229   if(SQ_FAILED(sq_createslot(v, -3))) {
13230     throw SquirrelError(v, "Couldn't register function 'stop_music'");
13231   }
13232 
13233   sq_pushstring(v, "fade_in_music", -1);
13234   sq_newclosure(v, &fade_in_music_wrapper, 0);
13235   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsn");
13236   if(SQ_FAILED(sq_createslot(v, -3))) {
13237     throw SquirrelError(v, "Couldn't register function 'fade_in_music'");
13238   }
13239 
13240   sq_pushstring(v, "resume_music", -1);
13241   sq_newclosure(v, &resume_music_wrapper, 0);
13242   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13243   if(SQ_FAILED(sq_createslot(v, -3))) {
13244     throw SquirrelError(v, "Couldn't register function 'resume_music'");
13245   }
13246 
13247   sq_pushstring(v, "play_sound", -1);
13248   sq_newclosure(v, &play_sound_wrapper, 0);
13249   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13250   if(SQ_FAILED(sq_createslot(v, -3))) {
13251     throw SquirrelError(v, "Couldn't register function 'play_sound'");
13252   }
13253 
13254   sq_pushstring(v, "set_game_speed", -1);
13255   sq_newclosure(v, &set_game_speed_wrapper, 0);
13256   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13257   if(SQ_FAILED(sq_createslot(v, -3))) {
13258     throw SquirrelError(v, "Couldn't register function 'set_game_speed'");
13259   }
13260 
13261   sq_pushstring(v, "grease", -1);
13262   sq_newclosure(v, &grease_wrapper, 0);
13263   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13264   if(SQ_FAILED(sq_createslot(v, -3))) {
13265     throw SquirrelError(v, "Couldn't register function 'grease'");
13266   }
13267 
13268   sq_pushstring(v, "invincible", -1);
13269   sq_newclosure(v, &invincible_wrapper, 0);
13270   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13271   if(SQ_FAILED(sq_createslot(v, -3))) {
13272     throw SquirrelError(v, "Couldn't register function 'invincible'");
13273   }
13274 
13275   sq_pushstring(v, "ghost", -1);
13276   sq_newclosure(v, &ghost_wrapper, 0);
13277   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13278   if(SQ_FAILED(sq_createslot(v, -3))) {
13279     throw SquirrelError(v, "Couldn't register function 'ghost'");
13280   }
13281 
13282   sq_pushstring(v, "mortal", -1);
13283   sq_newclosure(v, &mortal_wrapper, 0);
13284   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13285   if(SQ_FAILED(sq_createslot(v, -3))) {
13286     throw SquirrelError(v, "Couldn't register function 'mortal'");
13287   }
13288 
13289   sq_pushstring(v, "restart", -1);
13290   sq_newclosure(v, &restart_wrapper, 0);
13291   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13292   if(SQ_FAILED(sq_createslot(v, -3))) {
13293     throw SquirrelError(v, "Couldn't register function 'restart'");
13294   }
13295 
13296   sq_pushstring(v, "whereami", -1);
13297   sq_newclosure(v, &whereami_wrapper, 0);
13298   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13299   if(SQ_FAILED(sq_createslot(v, -3))) {
13300     throw SquirrelError(v, "Couldn't register function 'whereami'");
13301   }
13302 
13303   sq_pushstring(v, "gotoend", -1);
13304   sq_newclosure(v, &gotoend_wrapper, 0);
13305   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13306   if(SQ_FAILED(sq_createslot(v, -3))) {
13307     throw SquirrelError(v, "Couldn't register function 'gotoend'");
13308   }
13309 
13310   sq_pushstring(v, "warp", -1);
13311   sq_newclosure(v, &warp_wrapper, 0);
13312   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13313   if(SQ_FAILED(sq_createslot(v, -3))) {
13314     throw SquirrelError(v, "Couldn't register function 'warp'");
13315   }
13316 
13317   sq_pushstring(v, "camera", -1);
13318   sq_newclosure(v, &camera_wrapper, 0);
13319   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13320   if(SQ_FAILED(sq_createslot(v, -3))) {
13321     throw SquirrelError(v, "Couldn't register function 'camera'");
13322   }
13323 
13324   sq_pushstring(v, "set_gamma", -1);
13325   sq_newclosure(v, &set_gamma_wrapper, 0);
13326   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13327   if(SQ_FAILED(sq_createslot(v, -3))) {
13328     throw SquirrelError(v, "Couldn't register function 'set_gamma'");
13329   }
13330 
13331   sq_pushstring(v, "quit", -1);
13332   sq_newclosure(v, &quit_wrapper, 0);
13333   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13334   if(SQ_FAILED(sq_createslot(v, -3))) {
13335     throw SquirrelError(v, "Couldn't register function 'quit'");
13336   }
13337 
13338   sq_pushstring(v, "rand", -1);
13339   sq_newclosure(v, &rand_wrapper, 0);
13340   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13341   if(SQ_FAILED(sq_createslot(v, -3))) {
13342     throw SquirrelError(v, "Couldn't register function 'rand'");
13343   }
13344 
13345   sq_pushstring(v, "record_demo", -1);
13346   sq_newclosure(v, &record_demo_wrapper, 0);
13347   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13348   if(SQ_FAILED(sq_createslot(v, -3))) {
13349     throw SquirrelError(v, "Couldn't register function 'record_demo'");
13350   }
13351 
13352   sq_pushstring(v, "play_demo", -1);
13353   sq_newclosure(v, &play_demo_wrapper, 0);
13354   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13355   if(SQ_FAILED(sq_createslot(v, -3))) {
13356     throw SquirrelError(v, "Couldn't register function 'play_demo'");
13357   }
13358 
13359   sq_pushstring(v, "Level_finish", -1);
13360   sq_newclosure(v, &Level_finish_wrapper, 0);
13361   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13362   if(SQ_FAILED(sq_createslot(v, -3))) {
13363     throw SquirrelError(v, "Couldn't register function 'Level_finish'");
13364   }
13365 
13366   sq_pushstring(v, "Level_spawn", -1);
13367   sq_newclosure(v, &Level_spawn_wrapper, 0);
13368   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tss");
13369   if(SQ_FAILED(sq_createslot(v, -3))) {
13370     throw SquirrelError(v, "Couldn't register function 'Level_spawn'");
13371   }
13372 
13373   sq_pushstring(v, "Level_flip_vertically", -1);
13374   sq_newclosure(v, &Level_flip_vertically_wrapper, 0);
13375   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13376   if(SQ_FAILED(sq_createslot(v, -3))) {
13377     throw SquirrelError(v, "Couldn't register function 'Level_flip_vertically'");
13378   }
13379 
13380   sq_pushstring(v, "Level_toggle_pause", -1);
13381   sq_newclosure(v, &Level_toggle_pause_wrapper, 0);
13382   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13383   if(SQ_FAILED(sq_createslot(v, -3))) {
13384     throw SquirrelError(v, "Couldn't register function 'Level_toggle_pause'");
13385   }
13386 
13387   sq_pushstring(v, "Level_edit", -1);
13388   sq_newclosure(v, &Level_edit_wrapper, 0);
13389   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13390   if(SQ_FAILED(sq_createslot(v, -3))) {
13391     throw SquirrelError(v, "Couldn't register function 'Level_edit'");
13392   }
13393 
13394   // Register class AmbientSound
13395   sq_pushstring(v, "AmbientSound", -1);
13396   if(sq_newclass(v, SQFalse) < 0) {
13397     std::ostringstream msg;
13398     msg << "Couldn't create new class 'AmbientSound'";
13399     throw SquirrelError(v, msg.str());
13400   }
13401   sq_pushstring(v, "set_pos", -1);
13402   sq_newclosure(v, &AmbientSound_set_pos_wrapper, 0);
13403   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13404   if(SQ_FAILED(sq_createslot(v, -3))) {
13405     throw SquirrelError(v, "Couldn't register function 'set_pos'");
13406   }
13407 
13408   sq_pushstring(v, "get_pos_x", -1);
13409   sq_newclosure(v, &AmbientSound_get_pos_x_wrapper, 0);
13410   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13411   if(SQ_FAILED(sq_createslot(v, -3))) {
13412     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
13413   }
13414 
13415   sq_pushstring(v, "get_pos_y", -1);
13416   sq_newclosure(v, &AmbientSound_get_pos_y_wrapper, 0);
13417   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13418   if(SQ_FAILED(sq_createslot(v, -3))) {
13419     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
13420   }
13421 
13422   if(SQ_FAILED(sq_createslot(v, -3))) {
13423     throw SquirrelError(v, "Couldn't register class 'AmbientSound'");
13424   }
13425 
13426   // Register class Background
13427   sq_pushstring(v, "Background", -1);
13428   if(sq_newclass(v, SQFalse) < 0) {
13429     std::ostringstream msg;
13430     msg << "Couldn't create new class 'Background'";
13431     throw SquirrelError(v, msg.str());
13432   }
13433   sq_pushstring(v, "set_image", -1);
13434   sq_newclosure(v, &Background_set_image_wrapper, 0);
13435   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13436   if(SQ_FAILED(sq_createslot(v, -3))) {
13437     throw SquirrelError(v, "Couldn't register function 'set_image'");
13438   }
13439 
13440   sq_pushstring(v, "set_images", -1);
13441   sq_newclosure(v, &Background_set_images_wrapper, 0);
13442   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsss");
13443   if(SQ_FAILED(sq_createslot(v, -3))) {
13444     throw SquirrelError(v, "Couldn't register function 'set_images'");
13445   }
13446 
13447   sq_pushstring(v, "set_speed", -1);
13448   sq_newclosure(v, &Background_set_speed_wrapper, 0);
13449   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13450   if(SQ_FAILED(sq_createslot(v, -3))) {
13451     throw SquirrelError(v, "Couldn't register function 'set_speed'");
13452   }
13453 
13454   sq_pushstring(v, "get_color_red", -1);
13455   sq_newclosure(v, &Background_get_color_red_wrapper, 0);
13456   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13457   if(SQ_FAILED(sq_createslot(v, -3))) {
13458     throw SquirrelError(v, "Couldn't register function 'get_color_red'");
13459   }
13460 
13461   sq_pushstring(v, "get_color_green", -1);
13462   sq_newclosure(v, &Background_get_color_green_wrapper, 0);
13463   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13464   if(SQ_FAILED(sq_createslot(v, -3))) {
13465     throw SquirrelError(v, "Couldn't register function 'get_color_green'");
13466   }
13467 
13468   sq_pushstring(v, "get_color_blue", -1);
13469   sq_newclosure(v, &Background_get_color_blue_wrapper, 0);
13470   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13471   if(SQ_FAILED(sq_createslot(v, -3))) {
13472     throw SquirrelError(v, "Couldn't register function 'get_color_blue'");
13473   }
13474 
13475   sq_pushstring(v, "get_color_alpha", -1);
13476   sq_newclosure(v, &Background_get_color_alpha_wrapper, 0);
13477   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13478   if(SQ_FAILED(sq_createslot(v, -3))) {
13479     throw SquirrelError(v, "Couldn't register function 'get_color_alpha'");
13480   }
13481 
13482   sq_pushstring(v, "set_color", -1);
13483   sq_newclosure(v, &Background_set_color_wrapper, 0);
13484   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
13485   if(SQ_FAILED(sq_createslot(v, -3))) {
13486     throw SquirrelError(v, "Couldn't register function 'set_color'");
13487   }
13488 
13489   sq_pushstring(v, "fade_color", -1);
13490   sq_newclosure(v, &Background_fade_color_wrapper, 0);
13491   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnn");
13492   if(SQ_FAILED(sq_createslot(v, -3))) {
13493     throw SquirrelError(v, "Couldn't register function 'fade_color'");
13494   }
13495 
13496   if(SQ_FAILED(sq_createslot(v, -3))) {
13497     throw SquirrelError(v, "Couldn't register class 'Background'");
13498   }
13499 
13500   // Register class BadGuy
13501   sq_pushstring(v, "BadGuy", -1);
13502   if(sq_newclass(v, SQFalse) < 0) {
13503     std::ostringstream msg;
13504     msg << "Couldn't create new class 'BadGuy'";
13505     throw SquirrelError(v, msg.str());
13506   }
13507   sq_pushstring(v, "kill", -1);
13508   sq_newclosure(v, &BadGuy_kill_wrapper, 0);
13509   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13510   if(SQ_FAILED(sq_createslot(v, -3))) {
13511     throw SquirrelError(v, "Couldn't register function 'kill'");
13512   }
13513 
13514   sq_pushstring(v, "ignite", -1);
13515   sq_newclosure(v, &BadGuy_ignite_wrapper, 0);
13516   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13517   if(SQ_FAILED(sq_createslot(v, -3))) {
13518     throw SquirrelError(v, "Couldn't register function 'ignite'");
13519   }
13520 
13521   sq_pushstring(v, "set_action", -1);
13522   sq_newclosure(v, &BadGuy_set_action_wrapper, 0);
13523   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsi");
13524   if(SQ_FAILED(sq_createslot(v, -3))) {
13525     throw SquirrelError(v, "Couldn't register function 'set_action'");
13526   }
13527 
13528   sq_pushstring(v, "set_sprite", -1);
13529   sq_newclosure(v, &BadGuy_set_sprite_wrapper, 0);
13530   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13531   if(SQ_FAILED(sq_createslot(v, -3))) {
13532     throw SquirrelError(v, "Couldn't register function 'set_sprite'");
13533   }
13534 
13535   if(SQ_FAILED(sq_createslot(v, -3))) {
13536     throw SquirrelError(v, "Couldn't register class 'BadGuy'");
13537   }
13538 
13539   // Register class Dispenser
13540   sq_pushstring(v, "Dispenser", -1);
13541   sq_pushstring(v, "BadGuy", -1);
13542   sq_get(v, -3);
13543   if(sq_newclass(v, SQTrue) < 0) {
13544     std::ostringstream msg;
13545     msg << "Couldn't create new class 'Dispenser'";
13546     throw SquirrelError(v, msg.str());
13547   }
13548   sq_pushstring(v, "activate", -1);
13549   sq_newclosure(v, &Dispenser_activate_wrapper, 0);
13550   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13551   if(SQ_FAILED(sq_createslot(v, -3))) {
13552     throw SquirrelError(v, "Couldn't register function 'activate'");
13553   }
13554 
13555   sq_pushstring(v, "deactivate", -1);
13556   sq_newclosure(v, &Dispenser_deactivate_wrapper, 0);
13557   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13558   if(SQ_FAILED(sq_createslot(v, -3))) {
13559     throw SquirrelError(v, "Couldn't register function 'deactivate'");
13560   }
13561 
13562   if(SQ_FAILED(sq_createslot(v, -3))) {
13563     throw SquirrelError(v, "Couldn't register class 'Dispenser'");
13564   }
13565 
13566   // Register class WillOWisp
13567   sq_pushstring(v, "WillOWisp", -1);
13568   sq_pushstring(v, "BadGuy", -1);
13569   sq_get(v, -3);
13570   if(sq_newclass(v, SQTrue) < 0) {
13571     std::ostringstream msg;
13572     msg << "Couldn't create new class 'WillOWisp'";
13573     throw SquirrelError(v, msg.str());
13574   }
13575   sq_pushstring(v, "goto_node", -1);
13576   sq_newclosure(v, &WillOWisp_goto_node_wrapper, 0);
13577   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
13578   if(SQ_FAILED(sq_createslot(v, -3))) {
13579     throw SquirrelError(v, "Couldn't register function 'goto_node'");
13580   }
13581 
13582   sq_pushstring(v, "set_state", -1);
13583   sq_newclosure(v, &WillOWisp_set_state_wrapper, 0);
13584   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13585   if(SQ_FAILED(sq_createslot(v, -3))) {
13586     throw SquirrelError(v, "Couldn't register function 'set_state'");
13587   }
13588 
13589   sq_pushstring(v, "start_moving", -1);
13590   sq_newclosure(v, &WillOWisp_start_moving_wrapper, 0);
13591   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13592   if(SQ_FAILED(sq_createslot(v, -3))) {
13593     throw SquirrelError(v, "Couldn't register function 'start_moving'");
13594   }
13595 
13596   sq_pushstring(v, "stop_moving", -1);
13597   sq_newclosure(v, &WillOWisp_stop_moving_wrapper, 0);
13598   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13599   if(SQ_FAILED(sq_createslot(v, -3))) {
13600     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
13601   }
13602 
13603   if(SQ_FAILED(sq_createslot(v, -3))) {
13604     throw SquirrelError(v, "Couldn't register class 'WillOWisp'");
13605   }
13606 
13607   // Register class Camera
13608   sq_pushstring(v, "Camera", -1);
13609   if(sq_newclass(v, SQFalse) < 0) {
13610     std::ostringstream msg;
13611     msg << "Couldn't create new class 'Camera'";
13612     throw SquirrelError(v, msg.str());
13613   }
13614   sq_pushstring(v, "reload_config", -1);
13615   sq_newclosure(v, &Camera_reload_config_wrapper, 0);
13616   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13617   if(SQ_FAILED(sq_createslot(v, -3))) {
13618     throw SquirrelError(v, "Couldn't register function 'reload_config'");
13619   }
13620 
13621   sq_pushstring(v, "shake", -1);
13622   sq_newclosure(v, &Camera_shake_wrapper, 0);
13623   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
13624   if(SQ_FAILED(sq_createslot(v, -3))) {
13625     throw SquirrelError(v, "Couldn't register function 'shake'");
13626   }
13627 
13628   sq_pushstring(v, "set_pos", -1);
13629   sq_newclosure(v, &Camera_set_pos_wrapper, 0);
13630   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13631   if(SQ_FAILED(sq_createslot(v, -3))) {
13632     throw SquirrelError(v, "Couldn't register function 'set_pos'");
13633   }
13634 
13635   sq_pushstring(v, "set_mode", -1);
13636   sq_newclosure(v, &Camera_set_mode_wrapper, 0);
13637   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13638   if(SQ_FAILED(sq_createslot(v, -3))) {
13639     throw SquirrelError(v, "Couldn't register function 'set_mode'");
13640   }
13641 
13642   sq_pushstring(v, "scroll_to", -1);
13643   sq_newclosure(v, &Camera_scroll_to_wrapper, 0);
13644   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
13645   if(SQ_FAILED(sq_createslot(v, -3))) {
13646     throw SquirrelError(v, "Couldn't register function 'scroll_to'");
13647   }
13648 
13649   sq_pushstring(v, "get_current_scale", -1);
13650   sq_newclosure(v, &Camera_get_current_scale_wrapper, 0);
13651   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13652   if(SQ_FAILED(sq_createslot(v, -3))) {
13653     throw SquirrelError(v, "Couldn't register function 'get_current_scale'");
13654   }
13655 
13656   sq_pushstring(v, "get_target_scale", -1);
13657   sq_newclosure(v, &Camera_get_target_scale_wrapper, 0);
13658   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13659   if(SQ_FAILED(sq_createslot(v, -3))) {
13660     throw SquirrelError(v, "Couldn't register function 'get_target_scale'");
13661   }
13662 
13663   sq_pushstring(v, "set_scale", -1);
13664   sq_newclosure(v, &Camera_set_scale_wrapper, 0);
13665   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13666   if(SQ_FAILED(sq_createslot(v, -3))) {
13667     throw SquirrelError(v, "Couldn't register function 'set_scale'");
13668   }
13669 
13670   sq_pushstring(v, "scale", -1);
13671   sq_newclosure(v, &Camera_scale_wrapper, 0);
13672   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13673   if(SQ_FAILED(sq_createslot(v, -3))) {
13674     throw SquirrelError(v, "Couldn't register function 'scale'");
13675   }
13676 
13677   sq_pushstring(v, "ease_scale", -1);
13678   sq_newclosure(v, &Camera_ease_scale_wrapper, 0);
13679   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
13680   if(SQ_FAILED(sq_createslot(v, -3))) {
13681     throw SquirrelError(v, "Couldn't register function 'ease_scale'");
13682   }
13683 
13684   if(SQ_FAILED(sq_createslot(v, -3))) {
13685     throw SquirrelError(v, "Couldn't register class 'Camera'");
13686   }
13687 
13688   // Register class Candle
13689   sq_pushstring(v, "Candle", -1);
13690   if(sq_newclass(v, SQFalse) < 0) {
13691     std::ostringstream msg;
13692     msg << "Couldn't create new class 'Candle'";
13693     throw SquirrelError(v, msg.str());
13694   }
13695   sq_pushstring(v, "get_burning", -1);
13696   sq_newclosure(v, &Candle_get_burning_wrapper, 0);
13697   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13698   if(SQ_FAILED(sq_createslot(v, -3))) {
13699     throw SquirrelError(v, "Couldn't register function 'get_burning'");
13700   }
13701 
13702   sq_pushstring(v, "set_burning", -1);
13703   sq_newclosure(v, &Candle_set_burning_wrapper, 0);
13704   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13705   if(SQ_FAILED(sq_createslot(v, -3))) {
13706     throw SquirrelError(v, "Couldn't register function 'set_burning'");
13707   }
13708 
13709   if(SQ_FAILED(sq_createslot(v, -3))) {
13710     throw SquirrelError(v, "Couldn't register class 'Candle'");
13711   }
13712 
13713   // Register class Clouds
13714   sq_pushstring(v, "Clouds", -1);
13715   if(sq_newclass(v, SQFalse) < 0) {
13716     std::ostringstream msg;
13717     msg << "Couldn't create new class 'Clouds'";
13718     throw SquirrelError(v, msg.str());
13719   }
13720   sq_pushstring(v, "set_enabled", -1);
13721   sq_newclosure(v, &Clouds_set_enabled_wrapper, 0);
13722   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13723   if(SQ_FAILED(sq_createslot(v, -3))) {
13724     throw SquirrelError(v, "Couldn't register function 'set_enabled'");
13725   }
13726 
13727   sq_pushstring(v, "get_enabled", -1);
13728   sq_newclosure(v, &Clouds_get_enabled_wrapper, 0);
13729   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13730   if(SQ_FAILED(sq_createslot(v, -3))) {
13731     throw SquirrelError(v, "Couldn't register function 'get_enabled'");
13732   }
13733 
13734   sq_pushstring(v, "fade_speed", -1);
13735   sq_newclosure(v, &Clouds_fade_speed_wrapper, 0);
13736   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13737   if(SQ_FAILED(sq_createslot(v, -3))) {
13738     throw SquirrelError(v, "Couldn't register function 'fade_speed'");
13739   }
13740 
13741   sq_pushstring(v, "fade_amount", -1);
13742   sq_newclosure(v, &Clouds_fade_amount_wrapper, 0);
13743   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tinn");
13744   if(SQ_FAILED(sq_createslot(v, -3))) {
13745     throw SquirrelError(v, "Couldn't register function 'fade_amount'");
13746   }
13747 
13748   sq_pushstring(v, "set_amount", -1);
13749   sq_newclosure(v, &Clouds_set_amount_wrapper, 0);
13750   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tin");
13751   if(SQ_FAILED(sq_createslot(v, -3))) {
13752     throw SquirrelError(v, "Couldn't register function 'set_amount'");
13753   }
13754 
13755   if(SQ_FAILED(sq_createslot(v, -3))) {
13756     throw SquirrelError(v, "Couldn't register class 'Clouds'");
13757   }
13758 
13759   // Register class CustomParticles
13760   sq_pushstring(v, "CustomParticles", -1);
13761   if(sq_newclass(v, SQFalse) < 0) {
13762     std::ostringstream msg;
13763     msg << "Couldn't create new class 'CustomParticles'";
13764     throw SquirrelError(v, msg.str());
13765   }
13766   sq_pushstring(v, "set_enabled", -1);
13767   sq_newclosure(v, &CustomParticles_set_enabled_wrapper, 0);
13768   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13769   if(SQ_FAILED(sq_createslot(v, -3))) {
13770     throw SquirrelError(v, "Couldn't register function 'set_enabled'");
13771   }
13772 
13773   sq_pushstring(v, "get_enabled", -1);
13774   sq_newclosure(v, &CustomParticles_get_enabled_wrapper, 0);
13775   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13776   if(SQ_FAILED(sq_createslot(v, -3))) {
13777     throw SquirrelError(v, "Couldn't register function 'get_enabled'");
13778   }
13779 
13780   sq_pushstring(v, "clear", -1);
13781   sq_newclosure(v, &CustomParticles_clear_wrapper, 0);
13782   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13783   if(SQ_FAILED(sq_createslot(v, -3))) {
13784     throw SquirrelError(v, "Couldn't register function 'clear'");
13785   }
13786 
13787   sq_pushstring(v, "spawn_particles", -1);
13788   sq_newclosure(v, &CustomParticles_spawn_particles_wrapper, 0);
13789   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tib");
13790   if(SQ_FAILED(sq_createslot(v, -3))) {
13791     throw SquirrelError(v, "Couldn't register function 'spawn_particles'");
13792   }
13793 
13794   sq_pushstring(v, "get_max_amount", -1);
13795   sq_newclosure(v, &CustomParticles_get_max_amount_wrapper, 0);
13796   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13797   if(SQ_FAILED(sq_createslot(v, -3))) {
13798     throw SquirrelError(v, "Couldn't register function 'get_max_amount'");
13799   }
13800 
13801   sq_pushstring(v, "set_max_amount", -1);
13802   sq_newclosure(v, &CustomParticles_set_max_amount_wrapper, 0);
13803   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
13804   if(SQ_FAILED(sq_createslot(v, -3))) {
13805     throw SquirrelError(v, "Couldn't register function 'set_max_amount'");
13806   }
13807 
13808   sq_pushstring(v, "get_birth_mode", -1);
13809   sq_newclosure(v, &CustomParticles_get_birth_mode_wrapper, 0);
13810   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13811   if(SQ_FAILED(sq_createslot(v, -3))) {
13812     throw SquirrelError(v, "Couldn't register function 'get_birth_mode'");
13813   }
13814 
13815   sq_pushstring(v, "set_birth_mode", -1);
13816   sq_newclosure(v, &CustomParticles_set_birth_mode_wrapper, 0);
13817   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13818   if(SQ_FAILED(sq_createslot(v, -3))) {
13819     throw SquirrelError(v, "Couldn't register function 'set_birth_mode'");
13820   }
13821 
13822   sq_pushstring(v, "get_death_mode", -1);
13823   sq_newclosure(v, &CustomParticles_get_death_mode_wrapper, 0);
13824   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13825   if(SQ_FAILED(sq_createslot(v, -3))) {
13826     throw SquirrelError(v, "Couldn't register function 'get_death_mode'");
13827   }
13828 
13829   sq_pushstring(v, "set_death_mode", -1);
13830   sq_newclosure(v, &CustomParticles_set_death_mode_wrapper, 0);
13831   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13832   if(SQ_FAILED(sq_createslot(v, -3))) {
13833     throw SquirrelError(v, "Couldn't register function 'set_death_mode'");
13834   }
13835 
13836   sq_pushstring(v, "get_rotation_mode", -1);
13837   sq_newclosure(v, &CustomParticles_get_rotation_mode_wrapper, 0);
13838   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13839   if(SQ_FAILED(sq_createslot(v, -3))) {
13840     throw SquirrelError(v, "Couldn't register function 'get_rotation_mode'");
13841   }
13842 
13843   sq_pushstring(v, "set_rotation_mode", -1);
13844   sq_newclosure(v, &CustomParticles_set_rotation_mode_wrapper, 0);
13845   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13846   if(SQ_FAILED(sq_createslot(v, -3))) {
13847     throw SquirrelError(v, "Couldn't register function 'set_rotation_mode'");
13848   }
13849 
13850   sq_pushstring(v, "get_collision_mode", -1);
13851   sq_newclosure(v, &CustomParticles_get_collision_mode_wrapper, 0);
13852   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13853   if(SQ_FAILED(sq_createslot(v, -3))) {
13854     throw SquirrelError(v, "Couldn't register function 'get_collision_mode'");
13855   }
13856 
13857   sq_pushstring(v, "set_collision_mode", -1);
13858   sq_newclosure(v, &CustomParticles_set_collision_mode_wrapper, 0);
13859   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13860   if(SQ_FAILED(sq_createslot(v, -3))) {
13861     throw SquirrelError(v, "Couldn't register function 'set_collision_mode'");
13862   }
13863 
13864   sq_pushstring(v, "get_offscreen_mode", -1);
13865   sq_newclosure(v, &CustomParticles_get_offscreen_mode_wrapper, 0);
13866   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13867   if(SQ_FAILED(sq_createslot(v, -3))) {
13868     throw SquirrelError(v, "Couldn't register function 'get_offscreen_mode'");
13869   }
13870 
13871   sq_pushstring(v, "set_offscreen_mode", -1);
13872   sq_newclosure(v, &CustomParticles_set_offscreen_mode_wrapper, 0);
13873   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
13874   if(SQ_FAILED(sq_createslot(v, -3))) {
13875     throw SquirrelError(v, "Couldn't register function 'set_offscreen_mode'");
13876   }
13877 
13878   sq_pushstring(v, "get_cover_screen", -1);
13879   sq_newclosure(v, &CustomParticles_get_cover_screen_wrapper, 0);
13880   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13881   if(SQ_FAILED(sq_createslot(v, -3))) {
13882     throw SquirrelError(v, "Couldn't register function 'get_cover_screen'");
13883   }
13884 
13885   sq_pushstring(v, "set_cover_screen", -1);
13886   sq_newclosure(v, &CustomParticles_set_cover_screen_wrapper, 0);
13887   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
13888   if(SQ_FAILED(sq_createslot(v, -3))) {
13889     throw SquirrelError(v, "Couldn't register function 'set_cover_screen'");
13890   }
13891 
13892   sq_pushstring(v, "get_delay", -1);
13893   sq_newclosure(v, &CustomParticles_get_delay_wrapper, 0);
13894   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13895   if(SQ_FAILED(sq_createslot(v, -3))) {
13896     throw SquirrelError(v, "Couldn't register function 'get_delay'");
13897   }
13898 
13899   sq_pushstring(v, "set_delay", -1);
13900   sq_newclosure(v, &CustomParticles_set_delay_wrapper, 0);
13901   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13902   if(SQ_FAILED(sq_createslot(v, -3))) {
13903     throw SquirrelError(v, "Couldn't register function 'set_delay'");
13904   }
13905 
13906   sq_pushstring(v, "fade_delay", -1);
13907   sq_newclosure(v, &CustomParticles_fade_delay_wrapper, 0);
13908   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13909   if(SQ_FAILED(sq_createslot(v, -3))) {
13910     throw SquirrelError(v, "Couldn't register function 'fade_delay'");
13911   }
13912 
13913   sq_pushstring(v, "ease_delay", -1);
13914   sq_newclosure(v, &CustomParticles_ease_delay_wrapper, 0);
13915   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
13916   if(SQ_FAILED(sq_createslot(v, -3))) {
13917     throw SquirrelError(v, "Couldn't register function 'ease_delay'");
13918   }
13919 
13920   sq_pushstring(v, "get_lifetime", -1);
13921   sq_newclosure(v, &CustomParticles_get_lifetime_wrapper, 0);
13922   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13923   if(SQ_FAILED(sq_createslot(v, -3))) {
13924     throw SquirrelError(v, "Couldn't register function 'get_lifetime'");
13925   }
13926 
13927   sq_pushstring(v, "set_lifetime", -1);
13928   sq_newclosure(v, &CustomParticles_set_lifetime_wrapper, 0);
13929   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13930   if(SQ_FAILED(sq_createslot(v, -3))) {
13931     throw SquirrelError(v, "Couldn't register function 'set_lifetime'");
13932   }
13933 
13934   sq_pushstring(v, "fade_lifetime", -1);
13935   sq_newclosure(v, &CustomParticles_fade_lifetime_wrapper, 0);
13936   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13937   if(SQ_FAILED(sq_createslot(v, -3))) {
13938     throw SquirrelError(v, "Couldn't register function 'fade_lifetime'");
13939   }
13940 
13941   sq_pushstring(v, "ease_lifetime", -1);
13942   sq_newclosure(v, &CustomParticles_ease_lifetime_wrapper, 0);
13943   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
13944   if(SQ_FAILED(sq_createslot(v, -3))) {
13945     throw SquirrelError(v, "Couldn't register function 'ease_lifetime'");
13946   }
13947 
13948   sq_pushstring(v, "get_lifetime_variation", -1);
13949   sq_newclosure(v, &CustomParticles_get_lifetime_variation_wrapper, 0);
13950   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13951   if(SQ_FAILED(sq_createslot(v, -3))) {
13952     throw SquirrelError(v, "Couldn't register function 'get_lifetime_variation'");
13953   }
13954 
13955   sq_pushstring(v, "set_lifetime_variation", -1);
13956   sq_newclosure(v, &CustomParticles_set_lifetime_variation_wrapper, 0);
13957   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13958   if(SQ_FAILED(sq_createslot(v, -3))) {
13959     throw SquirrelError(v, "Couldn't register function 'set_lifetime_variation'");
13960   }
13961 
13962   sq_pushstring(v, "fade_lifetime_variation", -1);
13963   sq_newclosure(v, &CustomParticles_fade_lifetime_variation_wrapper, 0);
13964   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13965   if(SQ_FAILED(sq_createslot(v, -3))) {
13966     throw SquirrelError(v, "Couldn't register function 'fade_lifetime_variation'");
13967   }
13968 
13969   sq_pushstring(v, "ease_lifetime_variation", -1);
13970   sq_newclosure(v, &CustomParticles_ease_lifetime_variation_wrapper, 0);
13971   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
13972   if(SQ_FAILED(sq_createslot(v, -3))) {
13973     throw SquirrelError(v, "Couldn't register function 'ease_lifetime_variation'");
13974   }
13975 
13976   sq_pushstring(v, "get_birth_time", -1);
13977   sq_newclosure(v, &CustomParticles_get_birth_time_wrapper, 0);
13978   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
13979   if(SQ_FAILED(sq_createslot(v, -3))) {
13980     throw SquirrelError(v, "Couldn't register function 'get_birth_time'");
13981   }
13982 
13983   sq_pushstring(v, "set_birth_time", -1);
13984   sq_newclosure(v, &CustomParticles_set_birth_time_wrapper, 0);
13985   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
13986   if(SQ_FAILED(sq_createslot(v, -3))) {
13987     throw SquirrelError(v, "Couldn't register function 'set_birth_time'");
13988   }
13989 
13990   sq_pushstring(v, "fade_birth_time", -1);
13991   sq_newclosure(v, &CustomParticles_fade_birth_time_wrapper, 0);
13992   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
13993   if(SQ_FAILED(sq_createslot(v, -3))) {
13994     throw SquirrelError(v, "Couldn't register function 'fade_birth_time'");
13995   }
13996 
13997   sq_pushstring(v, "ease_birth_time", -1);
13998   sq_newclosure(v, &CustomParticles_ease_birth_time_wrapper, 0);
13999   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14000   if(SQ_FAILED(sq_createslot(v, -3))) {
14001     throw SquirrelError(v, "Couldn't register function 'ease_birth_time'");
14002   }
14003 
14004   sq_pushstring(v, "get_birth_time_variation", -1);
14005   sq_newclosure(v, &CustomParticles_get_birth_time_variation_wrapper, 0);
14006   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14007   if(SQ_FAILED(sq_createslot(v, -3))) {
14008     throw SquirrelError(v, "Couldn't register function 'get_birth_time_variation'");
14009   }
14010 
14011   sq_pushstring(v, "set_birth_time_variation", -1);
14012   sq_newclosure(v, &CustomParticles_set_birth_time_variation_wrapper, 0);
14013   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14014   if(SQ_FAILED(sq_createslot(v, -3))) {
14015     throw SquirrelError(v, "Couldn't register function 'set_birth_time_variation'");
14016   }
14017 
14018   sq_pushstring(v, "fade_birth_time_variation", -1);
14019   sq_newclosure(v, &CustomParticles_fade_birth_time_variation_wrapper, 0);
14020   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14021   if(SQ_FAILED(sq_createslot(v, -3))) {
14022     throw SquirrelError(v, "Couldn't register function 'fade_birth_time_variation'");
14023   }
14024 
14025   sq_pushstring(v, "ease_birth_time_variation", -1);
14026   sq_newclosure(v, &CustomParticles_ease_birth_time_variation_wrapper, 0);
14027   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14028   if(SQ_FAILED(sq_createslot(v, -3))) {
14029     throw SquirrelError(v, "Couldn't register function 'ease_birth_time_variation'");
14030   }
14031 
14032   sq_pushstring(v, "get_death_time", -1);
14033   sq_newclosure(v, &CustomParticles_get_death_time_wrapper, 0);
14034   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14035   if(SQ_FAILED(sq_createslot(v, -3))) {
14036     throw SquirrelError(v, "Couldn't register function 'get_death_time'");
14037   }
14038 
14039   sq_pushstring(v, "set_death_time", -1);
14040   sq_newclosure(v, &CustomParticles_set_death_time_wrapper, 0);
14041   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14042   if(SQ_FAILED(sq_createslot(v, -3))) {
14043     throw SquirrelError(v, "Couldn't register function 'set_death_time'");
14044   }
14045 
14046   sq_pushstring(v, "fade_death_time", -1);
14047   sq_newclosure(v, &CustomParticles_fade_death_time_wrapper, 0);
14048   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14049   if(SQ_FAILED(sq_createslot(v, -3))) {
14050     throw SquirrelError(v, "Couldn't register function 'fade_death_time'");
14051   }
14052 
14053   sq_pushstring(v, "ease_death_time", -1);
14054   sq_newclosure(v, &CustomParticles_ease_death_time_wrapper, 0);
14055   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14056   if(SQ_FAILED(sq_createslot(v, -3))) {
14057     throw SquirrelError(v, "Couldn't register function 'ease_death_time'");
14058   }
14059 
14060   sq_pushstring(v, "get_death_time_variation", -1);
14061   sq_newclosure(v, &CustomParticles_get_death_time_variation_wrapper, 0);
14062   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14063   if(SQ_FAILED(sq_createslot(v, -3))) {
14064     throw SquirrelError(v, "Couldn't register function 'get_death_time_variation'");
14065   }
14066 
14067   sq_pushstring(v, "set_death_time_variation", -1);
14068   sq_newclosure(v, &CustomParticles_set_death_time_variation_wrapper, 0);
14069   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14070   if(SQ_FAILED(sq_createslot(v, -3))) {
14071     throw SquirrelError(v, "Couldn't register function 'set_death_time_variation'");
14072   }
14073 
14074   sq_pushstring(v, "fade_death_time_variation", -1);
14075   sq_newclosure(v, &CustomParticles_fade_death_time_variation_wrapper, 0);
14076   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14077   if(SQ_FAILED(sq_createslot(v, -3))) {
14078     throw SquirrelError(v, "Couldn't register function 'fade_death_time_variation'");
14079   }
14080 
14081   sq_pushstring(v, "ease_death_time_variation", -1);
14082   sq_newclosure(v, &CustomParticles_ease_death_time_variation_wrapper, 0);
14083   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14084   if(SQ_FAILED(sq_createslot(v, -3))) {
14085     throw SquirrelError(v, "Couldn't register function 'ease_death_time_variation'");
14086   }
14087 
14088   sq_pushstring(v, "get_speed_x", -1);
14089   sq_newclosure(v, &CustomParticles_get_speed_x_wrapper, 0);
14090   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14091   if(SQ_FAILED(sq_createslot(v, -3))) {
14092     throw SquirrelError(v, "Couldn't register function 'get_speed_x'");
14093   }
14094 
14095   sq_pushstring(v, "set_speed_x", -1);
14096   sq_newclosure(v, &CustomParticles_set_speed_x_wrapper, 0);
14097   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14098   if(SQ_FAILED(sq_createslot(v, -3))) {
14099     throw SquirrelError(v, "Couldn't register function 'set_speed_x'");
14100   }
14101 
14102   sq_pushstring(v, "fade_speed_x", -1);
14103   sq_newclosure(v, &CustomParticles_fade_speed_x_wrapper, 0);
14104   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14105   if(SQ_FAILED(sq_createslot(v, -3))) {
14106     throw SquirrelError(v, "Couldn't register function 'fade_speed_x'");
14107   }
14108 
14109   sq_pushstring(v, "ease_speed_x", -1);
14110   sq_newclosure(v, &CustomParticles_ease_speed_x_wrapper, 0);
14111   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14112   if(SQ_FAILED(sq_createslot(v, -3))) {
14113     throw SquirrelError(v, "Couldn't register function 'ease_speed_x'");
14114   }
14115 
14116   sq_pushstring(v, "get_speed_y", -1);
14117   sq_newclosure(v, &CustomParticles_get_speed_y_wrapper, 0);
14118   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14119   if(SQ_FAILED(sq_createslot(v, -3))) {
14120     throw SquirrelError(v, "Couldn't register function 'get_speed_y'");
14121   }
14122 
14123   sq_pushstring(v, "set_speed_y", -1);
14124   sq_newclosure(v, &CustomParticles_set_speed_y_wrapper, 0);
14125   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14126   if(SQ_FAILED(sq_createslot(v, -3))) {
14127     throw SquirrelError(v, "Couldn't register function 'set_speed_y'");
14128   }
14129 
14130   sq_pushstring(v, "fade_speed_y", -1);
14131   sq_newclosure(v, &CustomParticles_fade_speed_y_wrapper, 0);
14132   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14133   if(SQ_FAILED(sq_createslot(v, -3))) {
14134     throw SquirrelError(v, "Couldn't register function 'fade_speed_y'");
14135   }
14136 
14137   sq_pushstring(v, "ease_speed_y", -1);
14138   sq_newclosure(v, &CustomParticles_ease_speed_y_wrapper, 0);
14139   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14140   if(SQ_FAILED(sq_createslot(v, -3))) {
14141     throw SquirrelError(v, "Couldn't register function 'ease_speed_y'");
14142   }
14143 
14144   sq_pushstring(v, "get_speed_variation_x", -1);
14145   sq_newclosure(v, &CustomParticles_get_speed_variation_x_wrapper, 0);
14146   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14147   if(SQ_FAILED(sq_createslot(v, -3))) {
14148     throw SquirrelError(v, "Couldn't register function 'get_speed_variation_x'");
14149   }
14150 
14151   sq_pushstring(v, "set_speed_variation_x", -1);
14152   sq_newclosure(v, &CustomParticles_set_speed_variation_x_wrapper, 0);
14153   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14154   if(SQ_FAILED(sq_createslot(v, -3))) {
14155     throw SquirrelError(v, "Couldn't register function 'set_speed_variation_x'");
14156   }
14157 
14158   sq_pushstring(v, "fade_speed_variation_x", -1);
14159   sq_newclosure(v, &CustomParticles_fade_speed_variation_x_wrapper, 0);
14160   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14161   if(SQ_FAILED(sq_createslot(v, -3))) {
14162     throw SquirrelError(v, "Couldn't register function 'fade_speed_variation_x'");
14163   }
14164 
14165   sq_pushstring(v, "ease_speed_variation_x", -1);
14166   sq_newclosure(v, &CustomParticles_ease_speed_variation_x_wrapper, 0);
14167   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14168   if(SQ_FAILED(sq_createslot(v, -3))) {
14169     throw SquirrelError(v, "Couldn't register function 'ease_speed_variation_x'");
14170   }
14171 
14172   sq_pushstring(v, "get_speed_variation_y", -1);
14173   sq_newclosure(v, &CustomParticles_get_speed_variation_y_wrapper, 0);
14174   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14175   if(SQ_FAILED(sq_createslot(v, -3))) {
14176     throw SquirrelError(v, "Couldn't register function 'get_speed_variation_y'");
14177   }
14178 
14179   sq_pushstring(v, "set_speed_variation_y", -1);
14180   sq_newclosure(v, &CustomParticles_set_speed_variation_y_wrapper, 0);
14181   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14182   if(SQ_FAILED(sq_createslot(v, -3))) {
14183     throw SquirrelError(v, "Couldn't register function 'set_speed_variation_y'");
14184   }
14185 
14186   sq_pushstring(v, "fade_speed_variation_y", -1);
14187   sq_newclosure(v, &CustomParticles_fade_speed_variation_y_wrapper, 0);
14188   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14189   if(SQ_FAILED(sq_createslot(v, -3))) {
14190     throw SquirrelError(v, "Couldn't register function 'fade_speed_variation_y'");
14191   }
14192 
14193   sq_pushstring(v, "ease_speed_variation_y", -1);
14194   sq_newclosure(v, &CustomParticles_ease_speed_variation_y_wrapper, 0);
14195   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14196   if(SQ_FAILED(sq_createslot(v, -3))) {
14197     throw SquirrelError(v, "Couldn't register function 'ease_speed_variation_y'");
14198   }
14199 
14200   sq_pushstring(v, "get_acceleration_x", -1);
14201   sq_newclosure(v, &CustomParticles_get_acceleration_x_wrapper, 0);
14202   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14203   if(SQ_FAILED(sq_createslot(v, -3))) {
14204     throw SquirrelError(v, "Couldn't register function 'get_acceleration_x'");
14205   }
14206 
14207   sq_pushstring(v, "set_acceleration_x", -1);
14208   sq_newclosure(v, &CustomParticles_set_acceleration_x_wrapper, 0);
14209   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14210   if(SQ_FAILED(sq_createslot(v, -3))) {
14211     throw SquirrelError(v, "Couldn't register function 'set_acceleration_x'");
14212   }
14213 
14214   sq_pushstring(v, "fade_acceleration_x", -1);
14215   sq_newclosure(v, &CustomParticles_fade_acceleration_x_wrapper, 0);
14216   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14217   if(SQ_FAILED(sq_createslot(v, -3))) {
14218     throw SquirrelError(v, "Couldn't register function 'fade_acceleration_x'");
14219   }
14220 
14221   sq_pushstring(v, "ease_acceleration_x", -1);
14222   sq_newclosure(v, &CustomParticles_ease_acceleration_x_wrapper, 0);
14223   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14224   if(SQ_FAILED(sq_createslot(v, -3))) {
14225     throw SquirrelError(v, "Couldn't register function 'ease_acceleration_x'");
14226   }
14227 
14228   sq_pushstring(v, "get_acceleration_y", -1);
14229   sq_newclosure(v, &CustomParticles_get_acceleration_y_wrapper, 0);
14230   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14231   if(SQ_FAILED(sq_createslot(v, -3))) {
14232     throw SquirrelError(v, "Couldn't register function 'get_acceleration_y'");
14233   }
14234 
14235   sq_pushstring(v, "set_acceleration_y", -1);
14236   sq_newclosure(v, &CustomParticles_set_acceleration_y_wrapper, 0);
14237   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14238   if(SQ_FAILED(sq_createslot(v, -3))) {
14239     throw SquirrelError(v, "Couldn't register function 'set_acceleration_y'");
14240   }
14241 
14242   sq_pushstring(v, "fade_acceleration_y", -1);
14243   sq_newclosure(v, &CustomParticles_fade_acceleration_y_wrapper, 0);
14244   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14245   if(SQ_FAILED(sq_createslot(v, -3))) {
14246     throw SquirrelError(v, "Couldn't register function 'fade_acceleration_y'");
14247   }
14248 
14249   sq_pushstring(v, "ease_acceleration_y", -1);
14250   sq_newclosure(v, &CustomParticles_ease_acceleration_y_wrapper, 0);
14251   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14252   if(SQ_FAILED(sq_createslot(v, -3))) {
14253     throw SquirrelError(v, "Couldn't register function 'ease_acceleration_y'");
14254   }
14255 
14256   sq_pushstring(v, "get_friction_x", -1);
14257   sq_newclosure(v, &CustomParticles_get_friction_x_wrapper, 0);
14258   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14259   if(SQ_FAILED(sq_createslot(v, -3))) {
14260     throw SquirrelError(v, "Couldn't register function 'get_friction_x'");
14261   }
14262 
14263   sq_pushstring(v, "set_friction_x", -1);
14264   sq_newclosure(v, &CustomParticles_set_friction_x_wrapper, 0);
14265   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14266   if(SQ_FAILED(sq_createslot(v, -3))) {
14267     throw SquirrelError(v, "Couldn't register function 'set_friction_x'");
14268   }
14269 
14270   sq_pushstring(v, "fade_friction_x", -1);
14271   sq_newclosure(v, &CustomParticles_fade_friction_x_wrapper, 0);
14272   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14273   if(SQ_FAILED(sq_createslot(v, -3))) {
14274     throw SquirrelError(v, "Couldn't register function 'fade_friction_x'");
14275   }
14276 
14277   sq_pushstring(v, "ease_friction_x", -1);
14278   sq_newclosure(v, &CustomParticles_ease_friction_x_wrapper, 0);
14279   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14280   if(SQ_FAILED(sq_createslot(v, -3))) {
14281     throw SquirrelError(v, "Couldn't register function 'ease_friction_x'");
14282   }
14283 
14284   sq_pushstring(v, "get_friction_y", -1);
14285   sq_newclosure(v, &CustomParticles_get_friction_y_wrapper, 0);
14286   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14287   if(SQ_FAILED(sq_createslot(v, -3))) {
14288     throw SquirrelError(v, "Couldn't register function 'get_friction_y'");
14289   }
14290 
14291   sq_pushstring(v, "set_friction_y", -1);
14292   sq_newclosure(v, &CustomParticles_set_friction_y_wrapper, 0);
14293   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14294   if(SQ_FAILED(sq_createslot(v, -3))) {
14295     throw SquirrelError(v, "Couldn't register function 'set_friction_y'");
14296   }
14297 
14298   sq_pushstring(v, "fade_friction_y", -1);
14299   sq_newclosure(v, &CustomParticles_fade_friction_y_wrapper, 0);
14300   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14301   if(SQ_FAILED(sq_createslot(v, -3))) {
14302     throw SquirrelError(v, "Couldn't register function 'fade_friction_y'");
14303   }
14304 
14305   sq_pushstring(v, "ease_friction_y", -1);
14306   sq_newclosure(v, &CustomParticles_ease_friction_y_wrapper, 0);
14307   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14308   if(SQ_FAILED(sq_createslot(v, -3))) {
14309     throw SquirrelError(v, "Couldn't register function 'ease_friction_y'");
14310   }
14311 
14312   sq_pushstring(v, "get_feather_factor", -1);
14313   sq_newclosure(v, &CustomParticles_get_feather_factor_wrapper, 0);
14314   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14315   if(SQ_FAILED(sq_createslot(v, -3))) {
14316     throw SquirrelError(v, "Couldn't register function 'get_feather_factor'");
14317   }
14318 
14319   sq_pushstring(v, "set_feather_factor", -1);
14320   sq_newclosure(v, &CustomParticles_set_feather_factor_wrapper, 0);
14321   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14322   if(SQ_FAILED(sq_createslot(v, -3))) {
14323     throw SquirrelError(v, "Couldn't register function 'set_feather_factor'");
14324   }
14325 
14326   sq_pushstring(v, "fade_feather_factor", -1);
14327   sq_newclosure(v, &CustomParticles_fade_feather_factor_wrapper, 0);
14328   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14329   if(SQ_FAILED(sq_createslot(v, -3))) {
14330     throw SquirrelError(v, "Couldn't register function 'fade_feather_factor'");
14331   }
14332 
14333   sq_pushstring(v, "ease_feather_factor", -1);
14334   sq_newclosure(v, &CustomParticles_ease_feather_factor_wrapper, 0);
14335   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14336   if(SQ_FAILED(sq_createslot(v, -3))) {
14337     throw SquirrelError(v, "Couldn't register function 'ease_feather_factor'");
14338   }
14339 
14340   sq_pushstring(v, "get_rotation", -1);
14341   sq_newclosure(v, &CustomParticles_get_rotation_wrapper, 0);
14342   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14343   if(SQ_FAILED(sq_createslot(v, -3))) {
14344     throw SquirrelError(v, "Couldn't register function 'get_rotation'");
14345   }
14346 
14347   sq_pushstring(v, "set_rotation", -1);
14348   sq_newclosure(v, &CustomParticles_set_rotation_wrapper, 0);
14349   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14350   if(SQ_FAILED(sq_createslot(v, -3))) {
14351     throw SquirrelError(v, "Couldn't register function 'set_rotation'");
14352   }
14353 
14354   sq_pushstring(v, "fade_rotation", -1);
14355   sq_newclosure(v, &CustomParticles_fade_rotation_wrapper, 0);
14356   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14357   if(SQ_FAILED(sq_createslot(v, -3))) {
14358     throw SquirrelError(v, "Couldn't register function 'fade_rotation'");
14359   }
14360 
14361   sq_pushstring(v, "ease_rotation", -1);
14362   sq_newclosure(v, &CustomParticles_ease_rotation_wrapper, 0);
14363   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14364   if(SQ_FAILED(sq_createslot(v, -3))) {
14365     throw SquirrelError(v, "Couldn't register function 'ease_rotation'");
14366   }
14367 
14368   sq_pushstring(v, "get_rotation_variation", -1);
14369   sq_newclosure(v, &CustomParticles_get_rotation_variation_wrapper, 0);
14370   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14371   if(SQ_FAILED(sq_createslot(v, -3))) {
14372     throw SquirrelError(v, "Couldn't register function 'get_rotation_variation'");
14373   }
14374 
14375   sq_pushstring(v, "set_rotation_variation", -1);
14376   sq_newclosure(v, &CustomParticles_set_rotation_variation_wrapper, 0);
14377   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14378   if(SQ_FAILED(sq_createslot(v, -3))) {
14379     throw SquirrelError(v, "Couldn't register function 'set_rotation_variation'");
14380   }
14381 
14382   sq_pushstring(v, "fade_rotation_variation", -1);
14383   sq_newclosure(v, &CustomParticles_fade_rotation_variation_wrapper, 0);
14384   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14385   if(SQ_FAILED(sq_createslot(v, -3))) {
14386     throw SquirrelError(v, "Couldn't register function 'fade_rotation_variation'");
14387   }
14388 
14389   sq_pushstring(v, "ease_rotation_variation", -1);
14390   sq_newclosure(v, &CustomParticles_ease_rotation_variation_wrapper, 0);
14391   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14392   if(SQ_FAILED(sq_createslot(v, -3))) {
14393     throw SquirrelError(v, "Couldn't register function 'ease_rotation_variation'");
14394   }
14395 
14396   sq_pushstring(v, "get_rotation_speed", -1);
14397   sq_newclosure(v, &CustomParticles_get_rotation_speed_wrapper, 0);
14398   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14399   if(SQ_FAILED(sq_createslot(v, -3))) {
14400     throw SquirrelError(v, "Couldn't register function 'get_rotation_speed'");
14401   }
14402 
14403   sq_pushstring(v, "set_rotation_speed", -1);
14404   sq_newclosure(v, &CustomParticles_set_rotation_speed_wrapper, 0);
14405   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14406   if(SQ_FAILED(sq_createslot(v, -3))) {
14407     throw SquirrelError(v, "Couldn't register function 'set_rotation_speed'");
14408   }
14409 
14410   sq_pushstring(v, "fade_rotation_speed", -1);
14411   sq_newclosure(v, &CustomParticles_fade_rotation_speed_wrapper, 0);
14412   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14413   if(SQ_FAILED(sq_createslot(v, -3))) {
14414     throw SquirrelError(v, "Couldn't register function 'fade_rotation_speed'");
14415   }
14416 
14417   sq_pushstring(v, "ease_rotation_speed", -1);
14418   sq_newclosure(v, &CustomParticles_ease_rotation_speed_wrapper, 0);
14419   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14420   if(SQ_FAILED(sq_createslot(v, -3))) {
14421     throw SquirrelError(v, "Couldn't register function 'ease_rotation_speed'");
14422   }
14423 
14424   sq_pushstring(v, "get_rotation_speed_variation", -1);
14425   sq_newclosure(v, &CustomParticles_get_rotation_speed_variation_wrapper, 0);
14426   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14427   if(SQ_FAILED(sq_createslot(v, -3))) {
14428     throw SquirrelError(v, "Couldn't register function 'get_rotation_speed_variation'");
14429   }
14430 
14431   sq_pushstring(v, "set_rotation_speed_variation", -1);
14432   sq_newclosure(v, &CustomParticles_set_rotation_speed_variation_wrapper, 0);
14433   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14434   if(SQ_FAILED(sq_createslot(v, -3))) {
14435     throw SquirrelError(v, "Couldn't register function 'set_rotation_speed_variation'");
14436   }
14437 
14438   sq_pushstring(v, "fade_rotation_speed_variation", -1);
14439   sq_newclosure(v, &CustomParticles_fade_rotation_speed_variation_wrapper, 0);
14440   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14441   if(SQ_FAILED(sq_createslot(v, -3))) {
14442     throw SquirrelError(v, "Couldn't register function 'fade_rotation_speed_variation'");
14443   }
14444 
14445   sq_pushstring(v, "ease_rotation_speed_variation", -1);
14446   sq_newclosure(v, &CustomParticles_ease_rotation_speed_variation_wrapper, 0);
14447   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14448   if(SQ_FAILED(sq_createslot(v, -3))) {
14449     throw SquirrelError(v, "Couldn't register function 'ease_rotation_speed_variation'");
14450   }
14451 
14452   sq_pushstring(v, "get_rotation_acceleration", -1);
14453   sq_newclosure(v, &CustomParticles_get_rotation_acceleration_wrapper, 0);
14454   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14455   if(SQ_FAILED(sq_createslot(v, -3))) {
14456     throw SquirrelError(v, "Couldn't register function 'get_rotation_acceleration'");
14457   }
14458 
14459   sq_pushstring(v, "set_rotation_acceleration", -1);
14460   sq_newclosure(v, &CustomParticles_set_rotation_acceleration_wrapper, 0);
14461   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14462   if(SQ_FAILED(sq_createslot(v, -3))) {
14463     throw SquirrelError(v, "Couldn't register function 'set_rotation_acceleration'");
14464   }
14465 
14466   sq_pushstring(v, "fade_rotation_acceleration", -1);
14467   sq_newclosure(v, &CustomParticles_fade_rotation_acceleration_wrapper, 0);
14468   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14469   if(SQ_FAILED(sq_createslot(v, -3))) {
14470     throw SquirrelError(v, "Couldn't register function 'fade_rotation_acceleration'");
14471   }
14472 
14473   sq_pushstring(v, "ease_rotation_acceleration", -1);
14474   sq_newclosure(v, &CustomParticles_ease_rotation_acceleration_wrapper, 0);
14475   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14476   if(SQ_FAILED(sq_createslot(v, -3))) {
14477     throw SquirrelError(v, "Couldn't register function 'ease_rotation_acceleration'");
14478   }
14479 
14480   sq_pushstring(v, "get_rotation_decceleration", -1);
14481   sq_newclosure(v, &CustomParticles_get_rotation_decceleration_wrapper, 0);
14482   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14483   if(SQ_FAILED(sq_createslot(v, -3))) {
14484     throw SquirrelError(v, "Couldn't register function 'get_rotation_decceleration'");
14485   }
14486 
14487   sq_pushstring(v, "set_rotation_decceleration", -1);
14488   sq_newclosure(v, &CustomParticles_set_rotation_decceleration_wrapper, 0);
14489   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14490   if(SQ_FAILED(sq_createslot(v, -3))) {
14491     throw SquirrelError(v, "Couldn't register function 'set_rotation_decceleration'");
14492   }
14493 
14494   sq_pushstring(v, "fade_rotation_decceleration", -1);
14495   sq_newclosure(v, &CustomParticles_fade_rotation_decceleration_wrapper, 0);
14496   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14497   if(SQ_FAILED(sq_createslot(v, -3))) {
14498     throw SquirrelError(v, "Couldn't register function 'fade_rotation_decceleration'");
14499   }
14500 
14501   sq_pushstring(v, "ease_rotation_decceleration", -1);
14502   sq_newclosure(v, &CustomParticles_ease_rotation_decceleration_wrapper, 0);
14503   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
14504   if(SQ_FAILED(sq_createslot(v, -3))) {
14505     throw SquirrelError(v, "Couldn't register function 'ease_rotation_decceleration'");
14506   }
14507 
14508   if(SQ_FAILED(sq_createslot(v, -3))) {
14509     throw SquirrelError(v, "Couldn't register class 'CustomParticles'");
14510   }
14511 
14512   // Register class Decal
14513   sq_pushstring(v, "Decal", -1);
14514   if(sq_newclass(v, SQFalse) < 0) {
14515     std::ostringstream msg;
14516     msg << "Couldn't create new class 'Decal'";
14517     throw SquirrelError(v, msg.str());
14518   }
14519   sq_pushstring(v, "fade_sprite", -1);
14520   sq_newclosure(v, &Decal_fade_sprite_wrapper, 0);
14521   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsn");
14522   if(SQ_FAILED(sq_createslot(v, -3))) {
14523     throw SquirrelError(v, "Couldn't register function 'fade_sprite'");
14524   }
14525 
14526   sq_pushstring(v, "change_sprite", -1);
14527   sq_newclosure(v, &Decal_change_sprite_wrapper, 0);
14528   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14529   if(SQ_FAILED(sq_createslot(v, -3))) {
14530     throw SquirrelError(v, "Couldn't register function 'change_sprite'");
14531   }
14532 
14533   sq_pushstring(v, "fade_in", -1);
14534   sq_newclosure(v, &Decal_fade_in_wrapper, 0);
14535   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14536   if(SQ_FAILED(sq_createslot(v, -3))) {
14537     throw SquirrelError(v, "Couldn't register function 'fade_in'");
14538   }
14539 
14540   sq_pushstring(v, "fade_out", -1);
14541   sq_newclosure(v, &Decal_fade_out_wrapper, 0);
14542   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14543   if(SQ_FAILED(sq_createslot(v, -3))) {
14544     throw SquirrelError(v, "Couldn't register function 'fade_out'");
14545   }
14546 
14547   if(SQ_FAILED(sq_createslot(v, -3))) {
14548     throw SquirrelError(v, "Couldn't register class 'Decal'");
14549   }
14550 
14551   // Register class DisplayEffect
14552   sq_pushstring(v, "DisplayEffect", -1);
14553   if(sq_newclass(v, SQFalse) < 0) {
14554     std::ostringstream msg;
14555     msg << "Couldn't create new class 'DisplayEffect'";
14556     throw SquirrelError(v, msg.str());
14557   }
14558   sq_pushstring(v, "fade_out", -1);
14559   sq_newclosure(v, &DisplayEffect_fade_out_wrapper, 0);
14560   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14561   if(SQ_FAILED(sq_createslot(v, -3))) {
14562     throw SquirrelError(v, "Couldn't register function 'fade_out'");
14563   }
14564 
14565   sq_pushstring(v, "fade_in", -1);
14566   sq_newclosure(v, &DisplayEffect_fade_in_wrapper, 0);
14567   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14568   if(SQ_FAILED(sq_createslot(v, -3))) {
14569     throw SquirrelError(v, "Couldn't register function 'fade_in'");
14570   }
14571 
14572   sq_pushstring(v, "set_black", -1);
14573   sq_newclosure(v, &DisplayEffect_set_black_wrapper, 0);
14574   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
14575   if(SQ_FAILED(sq_createslot(v, -3))) {
14576     throw SquirrelError(v, "Couldn't register function 'set_black'");
14577   }
14578 
14579   sq_pushstring(v, "is_black", -1);
14580   sq_newclosure(v, &DisplayEffect_is_black_wrapper, 0);
14581   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14582   if(SQ_FAILED(sq_createslot(v, -3))) {
14583     throw SquirrelError(v, "Couldn't register function 'is_black'");
14584   }
14585 
14586   sq_pushstring(v, "sixteen_to_nine", -1);
14587   sq_newclosure(v, &DisplayEffect_sixteen_to_nine_wrapper, 0);
14588   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14589   if(SQ_FAILED(sq_createslot(v, -3))) {
14590     throw SquirrelError(v, "Couldn't register function 'sixteen_to_nine'");
14591   }
14592 
14593   sq_pushstring(v, "four_to_three", -1);
14594   sq_newclosure(v, &DisplayEffect_four_to_three_wrapper, 0);
14595   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14596   if(SQ_FAILED(sq_createslot(v, -3))) {
14597     throw SquirrelError(v, "Couldn't register function 'four_to_three'");
14598   }
14599 
14600   if(SQ_FAILED(sq_createslot(v, -3))) {
14601     throw SquirrelError(v, "Couldn't register class 'DisplayEffect'");
14602   }
14603 
14604   // Register class FloatingImage
14605   sq_pushstring(v, "FloatingImage", -1);
14606   if(sq_newclass(v, SQFalse) < 0) {
14607     std::ostringstream msg;
14608     msg << "Couldn't create new class 'FloatingImage'";
14609     throw SquirrelError(v, msg.str());
14610   }
14611   sq_pushstring(v, "constructor", -1);
14612   sq_newclosure(v, &FloatingImage_constructor_wrapper, 0);
14613   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14614   if(SQ_FAILED(sq_createslot(v, -3))) {
14615     throw SquirrelError(v, "Couldn't register function 'constructor'");
14616   }
14617 
14618   sq_pushstring(v, "set_layer", -1);
14619   sq_newclosure(v, &FloatingImage_set_layer_wrapper, 0);
14620   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
14621   if(SQ_FAILED(sq_createslot(v, -3))) {
14622     throw SquirrelError(v, "Couldn't register function 'set_layer'");
14623   }
14624 
14625   sq_pushstring(v, "get_layer", -1);
14626   sq_newclosure(v, &FloatingImage_get_layer_wrapper, 0);
14627   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14628   if(SQ_FAILED(sq_createslot(v, -3))) {
14629     throw SquirrelError(v, "Couldn't register function 'get_layer'");
14630   }
14631 
14632   sq_pushstring(v, "set_pos", -1);
14633   sq_newclosure(v, &FloatingImage_set_pos_wrapper, 0);
14634   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
14635   if(SQ_FAILED(sq_createslot(v, -3))) {
14636     throw SquirrelError(v, "Couldn't register function 'set_pos'");
14637   }
14638 
14639   sq_pushstring(v, "get_pos_x", -1);
14640   sq_newclosure(v, &FloatingImage_get_pos_x_wrapper, 0);
14641   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14642   if(SQ_FAILED(sq_createslot(v, -3))) {
14643     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
14644   }
14645 
14646   sq_pushstring(v, "get_pos_y", -1);
14647   sq_newclosure(v, &FloatingImage_get_pos_y_wrapper, 0);
14648   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14649   if(SQ_FAILED(sq_createslot(v, -3))) {
14650     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
14651   }
14652 
14653   sq_pushstring(v, "set_anchor_point", -1);
14654   sq_newclosure(v, &FloatingImage_set_anchor_point_wrapper, 0);
14655   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
14656   if(SQ_FAILED(sq_createslot(v, -3))) {
14657     throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
14658   }
14659 
14660   sq_pushstring(v, "get_anchor_point", -1);
14661   sq_newclosure(v, &FloatingImage_get_anchor_point_wrapper, 0);
14662   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14663   if(SQ_FAILED(sq_createslot(v, -3))) {
14664     throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
14665   }
14666 
14667   sq_pushstring(v, "set_visible", -1);
14668   sq_newclosure(v, &FloatingImage_set_visible_wrapper, 0);
14669   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
14670   if(SQ_FAILED(sq_createslot(v, -3))) {
14671     throw SquirrelError(v, "Couldn't register function 'set_visible'");
14672   }
14673 
14674   sq_pushstring(v, "get_visible", -1);
14675   sq_newclosure(v, &FloatingImage_get_visible_wrapper, 0);
14676   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14677   if(SQ_FAILED(sq_createslot(v, -3))) {
14678     throw SquirrelError(v, "Couldn't register function 'get_visible'");
14679   }
14680 
14681   sq_pushstring(v, "set_action", -1);
14682   sq_newclosure(v, &FloatingImage_set_action_wrapper, 0);
14683   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14684   if(SQ_FAILED(sq_createslot(v, -3))) {
14685     throw SquirrelError(v, "Couldn't register function 'set_action'");
14686   }
14687 
14688   sq_pushstring(v, "get_action", -1);
14689   sq_newclosure(v, &FloatingImage_get_action_wrapper, 0);
14690   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14691   if(SQ_FAILED(sq_createslot(v, -3))) {
14692     throw SquirrelError(v, "Couldn't register function 'get_action'");
14693   }
14694 
14695   sq_pushstring(v, "fade_in", -1);
14696   sq_newclosure(v, &FloatingImage_fade_in_wrapper, 0);
14697   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14698   if(SQ_FAILED(sq_createslot(v, -3))) {
14699     throw SquirrelError(v, "Couldn't register function 'fade_in'");
14700   }
14701 
14702   sq_pushstring(v, "fade_out", -1);
14703   sq_newclosure(v, &FloatingImage_fade_out_wrapper, 0);
14704   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14705   if(SQ_FAILED(sq_createslot(v, -3))) {
14706     throw SquirrelError(v, "Couldn't register function 'fade_out'");
14707   }
14708 
14709   if(SQ_FAILED(sq_createslot(v, -3))) {
14710     throw SquirrelError(v, "Couldn't register class 'FloatingImage'");
14711   }
14712 
14713   // Register class GameObjectManager
14714   sq_pushstring(v, "GameObjectManager", -1);
14715   if(sq_newclass(v, SQFalse) < 0) {
14716     std::ostringstream msg;
14717     msg << "Couldn't create new class 'GameObjectManager'";
14718     throw SquirrelError(v, msg.str());
14719   }
14720   sq_pushstring(v, "set_ambient_light", -1);
14721   sq_newclosure(v, &GameObjectManager_set_ambient_light_wrapper, 0);
14722   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
14723   if(SQ_FAILED(sq_createslot(v, -3))) {
14724     throw SquirrelError(v, "Couldn't register function 'set_ambient_light'");
14725   }
14726 
14727   sq_pushstring(v, "fade_to_ambient_light", -1);
14728   sq_newclosure(v, &GameObjectManager_fade_to_ambient_light_wrapper, 0);
14729   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
14730   if(SQ_FAILED(sq_createslot(v, -3))) {
14731     throw SquirrelError(v, "Couldn't register function 'fade_to_ambient_light'");
14732   }
14733 
14734   sq_pushstring(v, "get_ambient_red", -1);
14735   sq_newclosure(v, &GameObjectManager_get_ambient_red_wrapper, 0);
14736   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14737   if(SQ_FAILED(sq_createslot(v, -3))) {
14738     throw SquirrelError(v, "Couldn't register function 'get_ambient_red'");
14739   }
14740 
14741   sq_pushstring(v, "get_ambient_green", -1);
14742   sq_newclosure(v, &GameObjectManager_get_ambient_green_wrapper, 0);
14743   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14744   if(SQ_FAILED(sq_createslot(v, -3))) {
14745     throw SquirrelError(v, "Couldn't register function 'get_ambient_green'");
14746   }
14747 
14748   sq_pushstring(v, "get_ambient_blue", -1);
14749   sq_newclosure(v, &GameObjectManager_get_ambient_blue_wrapper, 0);
14750   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14751   if(SQ_FAILED(sq_createslot(v, -3))) {
14752     throw SquirrelError(v, "Couldn't register function 'get_ambient_blue'");
14753   }
14754 
14755   sq_pushstring(v, "set_music", -1);
14756   sq_newclosure(v, &GameObjectManager_set_music_wrapper, 0);
14757   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14758   if(SQ_FAILED(sq_createslot(v, -3))) {
14759     throw SquirrelError(v, "Couldn't register function 'set_music'");
14760   }
14761 
14762   if(SQ_FAILED(sq_createslot(v, -3))) {
14763     throw SquirrelError(v, "Couldn't register class 'GameObjectManager'");
14764   }
14765 
14766   // Register class Sector
14767   sq_pushstring(v, "Sector", -1);
14768   sq_pushstring(v, "GameObjectManager", -1);
14769   sq_get(v, -3);
14770   if(sq_newclass(v, SQTrue) < 0) {
14771     std::ostringstream msg;
14772     msg << "Couldn't create new class 'Sector'";
14773     throw SquirrelError(v, msg.str());
14774   }
14775   sq_pushstring(v, "set_gravity", -1);
14776   sq_newclosure(v, &Sector_set_gravity_wrapper, 0);
14777   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14778   if(SQ_FAILED(sq_createslot(v, -3))) {
14779     throw SquirrelError(v, "Couldn't register function 'set_gravity'");
14780   }
14781 
14782   if(SQ_FAILED(sq_createslot(v, -3))) {
14783     throw SquirrelError(v, "Couldn't register class 'Sector'");
14784   }
14785 
14786   // Register class WorldMap
14787   sq_pushstring(v, "WorldMap", -1);
14788   sq_pushstring(v, "GameObjectManager", -1);
14789   sq_get(v, -3);
14790   if(sq_newclass(v, SQTrue) < 0) {
14791     std::ostringstream msg;
14792     msg << "Couldn't create new class 'WorldMap'";
14793     throw SquirrelError(v, msg.str());
14794   }
14795   if(SQ_FAILED(sq_createslot(v, -3))) {
14796     throw SquirrelError(v, "Couldn't register class 'WorldMap'");
14797   }
14798 
14799   // Register class Gradient
14800   sq_pushstring(v, "Gradient", -1);
14801   if(sq_newclass(v, SQFalse) < 0) {
14802     std::ostringstream msg;
14803     msg << "Couldn't create new class 'Gradient'";
14804     throw SquirrelError(v, msg.str());
14805   }
14806   sq_pushstring(v, "set_direction", -1);
14807   sq_newclosure(v, &Gradient_set_direction_wrapper, 0);
14808   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14809   if(SQ_FAILED(sq_createslot(v, -3))) {
14810     throw SquirrelError(v, "Couldn't register function 'set_direction'");
14811   }
14812 
14813   sq_pushstring(v, "get_direction", -1);
14814   sq_newclosure(v, &Gradient_get_direction_wrapper, 0);
14815   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14816   if(SQ_FAILED(sq_createslot(v, -3))) {
14817     throw SquirrelError(v, "Couldn't register function 'get_direction'");
14818   }
14819 
14820   sq_pushstring(v, "set_color1", -1);
14821   sq_newclosure(v, &Gradient_set_color1_wrapper, 0);
14822   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
14823   if(SQ_FAILED(sq_createslot(v, -3))) {
14824     throw SquirrelError(v, "Couldn't register function 'set_color1'");
14825   }
14826 
14827   sq_pushstring(v, "set_color2", -1);
14828   sq_newclosure(v, &Gradient_set_color2_wrapper, 0);
14829   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnn");
14830   if(SQ_FAILED(sq_createslot(v, -3))) {
14831     throw SquirrelError(v, "Couldn't register function 'set_color2'");
14832   }
14833 
14834   sq_pushstring(v, "set_colors", -1);
14835   sq_newclosure(v, &Gradient_set_colors_wrapper, 0);
14836   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnnn");
14837   if(SQ_FAILED(sq_createslot(v, -3))) {
14838     throw SquirrelError(v, "Couldn't register function 'set_colors'");
14839   }
14840 
14841   sq_pushstring(v, "fade_color1", -1);
14842   sq_newclosure(v, &Gradient_fade_color1_wrapper, 0);
14843   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
14844   if(SQ_FAILED(sq_createslot(v, -3))) {
14845     throw SquirrelError(v, "Couldn't register function 'fade_color1'");
14846   }
14847 
14848   sq_pushstring(v, "fade_color2", -1);
14849   sq_newclosure(v, &Gradient_fade_color2_wrapper, 0);
14850   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
14851   if(SQ_FAILED(sq_createslot(v, -3))) {
14852     throw SquirrelError(v, "Couldn't register function 'fade_color2'");
14853   }
14854 
14855   sq_pushstring(v, "fade_colors", -1);
14856   sq_newclosure(v, &Gradient_fade_colors_wrapper, 0);
14857   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnnnn");
14858   if(SQ_FAILED(sq_createslot(v, -3))) {
14859     throw SquirrelError(v, "Couldn't register function 'fade_colors'");
14860   }
14861 
14862   sq_pushstring(v, "swap_colors", -1);
14863   sq_newclosure(v, &Gradient_swap_colors_wrapper, 0);
14864   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14865   if(SQ_FAILED(sq_createslot(v, -3))) {
14866     throw SquirrelError(v, "Couldn't register function 'swap_colors'");
14867   }
14868 
14869   if(SQ_FAILED(sq_createslot(v, -3))) {
14870     throw SquirrelError(v, "Couldn't register class 'Gradient'");
14871   }
14872 
14873   // Register class LevelTime
14874   sq_pushstring(v, "LevelTime", -1);
14875   if(sq_newclass(v, SQFalse) < 0) {
14876     std::ostringstream msg;
14877     msg << "Couldn't create new class 'LevelTime'";
14878     throw SquirrelError(v, msg.str());
14879   }
14880   sq_pushstring(v, "start", -1);
14881   sq_newclosure(v, &LevelTime_start_wrapper, 0);
14882   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14883   if(SQ_FAILED(sq_createslot(v, -3))) {
14884     throw SquirrelError(v, "Couldn't register function 'start'");
14885   }
14886 
14887   sq_pushstring(v, "stop", -1);
14888   sq_newclosure(v, &LevelTime_stop_wrapper, 0);
14889   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14890   if(SQ_FAILED(sq_createslot(v, -3))) {
14891     throw SquirrelError(v, "Couldn't register function 'stop'");
14892   }
14893 
14894   sq_pushstring(v, "get_time", -1);
14895   sq_newclosure(v, &LevelTime_get_time_wrapper, 0);
14896   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14897   if(SQ_FAILED(sq_createslot(v, -3))) {
14898     throw SquirrelError(v, "Couldn't register function 'get_time'");
14899   }
14900 
14901   sq_pushstring(v, "set_time", -1);
14902   sq_newclosure(v, &LevelTime_set_time_wrapper, 0);
14903   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
14904   if(SQ_FAILED(sq_createslot(v, -3))) {
14905     throw SquirrelError(v, "Couldn't register function 'set_time'");
14906   }
14907 
14908   if(SQ_FAILED(sq_createslot(v, -3))) {
14909     throw SquirrelError(v, "Couldn't register class 'LevelTime'");
14910   }
14911 
14912   // Register class ParticleSystem
14913   sq_pushstring(v, "ParticleSystem", -1);
14914   if(sq_newclass(v, SQFalse) < 0) {
14915     std::ostringstream msg;
14916     msg << "Couldn't create new class 'ParticleSystem'";
14917     throw SquirrelError(v, msg.str());
14918   }
14919   sq_pushstring(v, "set_enabled", -1);
14920   sq_newclosure(v, &ParticleSystem_set_enabled_wrapper, 0);
14921   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
14922   if(SQ_FAILED(sq_createslot(v, -3))) {
14923     throw SquirrelError(v, "Couldn't register function 'set_enabled'");
14924   }
14925 
14926   sq_pushstring(v, "get_enabled", -1);
14927   sq_newclosure(v, &ParticleSystem_get_enabled_wrapper, 0);
14928   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14929   if(SQ_FAILED(sq_createslot(v, -3))) {
14930     throw SquirrelError(v, "Couldn't register function 'get_enabled'");
14931   }
14932 
14933   if(SQ_FAILED(sq_createslot(v, -3))) {
14934     throw SquirrelError(v, "Couldn't register class 'ParticleSystem'");
14935   }
14936 
14937   // Register class Platform
14938   sq_pushstring(v, "Platform", -1);
14939   if(sq_newclass(v, SQFalse) < 0) {
14940     std::ostringstream msg;
14941     msg << "Couldn't create new class 'Platform'";
14942     throw SquirrelError(v, msg.str());
14943   }
14944   sq_pushstring(v, "goto_node", -1);
14945   sq_newclosure(v, &Platform_goto_node_wrapper, 0);
14946   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
14947   if(SQ_FAILED(sq_createslot(v, -3))) {
14948     throw SquirrelError(v, "Couldn't register function 'goto_node'");
14949   }
14950 
14951   sq_pushstring(v, "start_moving", -1);
14952   sq_newclosure(v, &Platform_start_moving_wrapper, 0);
14953   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14954   if(SQ_FAILED(sq_createslot(v, -3))) {
14955     throw SquirrelError(v, "Couldn't register function 'start_moving'");
14956   }
14957 
14958   sq_pushstring(v, "stop_moving", -1);
14959   sq_newclosure(v, &Platform_stop_moving_wrapper, 0);
14960   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
14961   if(SQ_FAILED(sq_createslot(v, -3))) {
14962     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
14963   }
14964 
14965   sq_pushstring(v, "set_action", -1);
14966   sq_newclosure(v, &Platform_set_action_wrapper, 0);
14967   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsi");
14968   if(SQ_FAILED(sq_createslot(v, -3))) {
14969     throw SquirrelError(v, "Couldn't register function 'set_action'");
14970   }
14971 
14972   if(SQ_FAILED(sq_createslot(v, -3))) {
14973     throw SquirrelError(v, "Couldn't register class 'Platform'");
14974   }
14975 
14976   // Register class Player
14977   sq_pushstring(v, "Player", -1);
14978   if(sq_newclass(v, SQFalse) < 0) {
14979     std::ostringstream msg;
14980     msg << "Couldn't create new class 'Player'";
14981     throw SquirrelError(v, msg.str());
14982   }
14983   sq_pushstring(v, "add_bonus", -1);
14984   sq_newclosure(v, &Player_add_bonus_wrapper, 0);
14985   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14986   if(SQ_FAILED(sq_createslot(v, -3))) {
14987     throw SquirrelError(v, "Couldn't register function 'add_bonus'");
14988   }
14989 
14990   sq_pushstring(v, "set_bonus", -1);
14991   sq_newclosure(v, &Player_set_bonus_wrapper, 0);
14992   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
14993   if(SQ_FAILED(sq_createslot(v, -3))) {
14994     throw SquirrelError(v, "Couldn't register function 'set_bonus'");
14995   }
14996 
14997   sq_pushstring(v, "add_coins", -1);
14998   sq_newclosure(v, &Player_add_coins_wrapper, 0);
14999   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
15000   if(SQ_FAILED(sq_createslot(v, -3))) {
15001     throw SquirrelError(v, "Couldn't register function 'add_coins'");
15002   }
15003 
15004   sq_pushstring(v, "get_coins", -1);
15005   sq_newclosure(v, &Player_get_coins_wrapper, 0);
15006   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15007   if(SQ_FAILED(sq_createslot(v, -3))) {
15008     throw SquirrelError(v, "Couldn't register function 'get_coins'");
15009   }
15010 
15011   sq_pushstring(v, "make_invincible", -1);
15012   sq_newclosure(v, &Player_make_invincible_wrapper, 0);
15013   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15014   if(SQ_FAILED(sq_createslot(v, -3))) {
15015     throw SquirrelError(v, "Couldn't register function 'make_invincible'");
15016   }
15017 
15018   sq_pushstring(v, "deactivate", -1);
15019   sq_newclosure(v, &Player_deactivate_wrapper, 0);
15020   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15021   if(SQ_FAILED(sq_createslot(v, -3))) {
15022     throw SquirrelError(v, "Couldn't register function 'deactivate'");
15023   }
15024 
15025   sq_pushstring(v, "activate", -1);
15026   sq_newclosure(v, &Player_activate_wrapper, 0);
15027   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15028   if(SQ_FAILED(sq_createslot(v, -3))) {
15029     throw SquirrelError(v, "Couldn't register function 'activate'");
15030   }
15031 
15032   sq_pushstring(v, "walk", -1);
15033   sq_newclosure(v, &Player_walk_wrapper, 0);
15034   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15035   if(SQ_FAILED(sq_createslot(v, -3))) {
15036     throw SquirrelError(v, "Couldn't register function 'walk'");
15037   }
15038 
15039   sq_pushstring(v, "set_dir", -1);
15040   sq_newclosure(v, &Player_set_dir_wrapper, 0);
15041   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15042   if(SQ_FAILED(sq_createslot(v, -3))) {
15043     throw SquirrelError(v, "Couldn't register function 'set_dir'");
15044   }
15045 
15046   sq_pushstring(v, "set_visible", -1);
15047   sq_newclosure(v, &Player_set_visible_wrapper, 0);
15048   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15049   if(SQ_FAILED(sq_createslot(v, -3))) {
15050     throw SquirrelError(v, "Couldn't register function 'set_visible'");
15051   }
15052 
15053   sq_pushstring(v, "get_visible", -1);
15054   sq_newclosure(v, &Player_get_visible_wrapper, 0);
15055   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15056   if(SQ_FAILED(sq_createslot(v, -3))) {
15057     throw SquirrelError(v, "Couldn't register function 'get_visible'");
15058   }
15059 
15060   sq_pushstring(v, "kill", -1);
15061   sq_newclosure(v, &Player_kill_wrapper, 0);
15062   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15063   if(SQ_FAILED(sq_createslot(v, -3))) {
15064     throw SquirrelError(v, "Couldn't register function 'kill'");
15065   }
15066 
15067   sq_pushstring(v, "set_ghost_mode", -1);
15068   sq_newclosure(v, &Player_set_ghost_mode_wrapper, 0);
15069   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15070   if(SQ_FAILED(sq_createslot(v, -3))) {
15071     throw SquirrelError(v, "Couldn't register function 'set_ghost_mode'");
15072   }
15073 
15074   sq_pushstring(v, "get_ghost_mode", -1);
15075   sq_newclosure(v, &Player_get_ghost_mode_wrapper, 0);
15076   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15077   if(SQ_FAILED(sq_createslot(v, -3))) {
15078     throw SquirrelError(v, "Couldn't register function 'get_ghost_mode'");
15079   }
15080 
15081   sq_pushstring(v, "kick", -1);
15082   sq_newclosure(v, &Player_kick_wrapper, 0);
15083   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15084   if(SQ_FAILED(sq_createslot(v, -3))) {
15085     throw SquirrelError(v, "Couldn't register function 'kick'");
15086   }
15087 
15088   sq_pushstring(v, "do_cheer", -1);
15089   sq_newclosure(v, &Player_do_cheer_wrapper, 0);
15090   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15091   if(SQ_FAILED(sq_createslot(v, -3))) {
15092     throw SquirrelError(v, "Couldn't register function 'do_cheer'");
15093   }
15094 
15095   sq_pushstring(v, "do_duck", -1);
15096   sq_newclosure(v, &Player_do_duck_wrapper, 0);
15097   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15098   if(SQ_FAILED(sq_createslot(v, -3))) {
15099     throw SquirrelError(v, "Couldn't register function 'do_duck'");
15100   }
15101 
15102   sq_pushstring(v, "do_standup", -1);
15103   sq_newclosure(v, &Player_do_standup_wrapper, 0);
15104   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15105   if(SQ_FAILED(sq_createslot(v, -3))) {
15106     throw SquirrelError(v, "Couldn't register function 'do_standup'");
15107   }
15108 
15109   sq_pushstring(v, "do_backflip", -1);
15110   sq_newclosure(v, &Player_do_backflip_wrapper, 0);
15111   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15112   if(SQ_FAILED(sq_createslot(v, -3))) {
15113     throw SquirrelError(v, "Couldn't register function 'do_backflip'");
15114   }
15115 
15116   sq_pushstring(v, "do_jump", -1);
15117   sq_newclosure(v, &Player_do_jump_wrapper, 0);
15118   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15119   if(SQ_FAILED(sq_createslot(v, -3))) {
15120     throw SquirrelError(v, "Couldn't register function 'do_jump'");
15121   }
15122 
15123   sq_pushstring(v, "trigger_sequence", -1);
15124   sq_newclosure(v, &Player_trigger_sequence_wrapper, 0);
15125   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15126   if(SQ_FAILED(sq_createslot(v, -3))) {
15127     throw SquirrelError(v, "Couldn't register function 'trigger_sequence'");
15128   }
15129 
15130   sq_pushstring(v, "use_scripting_controller", -1);
15131   sq_newclosure(v, &Player_use_scripting_controller_wrapper, 0);
15132   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15133   if(SQ_FAILED(sq_createslot(v, -3))) {
15134     throw SquirrelError(v, "Couldn't register function 'use_scripting_controller'");
15135   }
15136 
15137   sq_pushstring(v, "has_grabbed", -1);
15138   sq_newclosure(v, &Player_has_grabbed_wrapper, 0);
15139   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15140   if(SQ_FAILED(sq_createslot(v, -3))) {
15141     throw SquirrelError(v, "Couldn't register function 'has_grabbed'");
15142   }
15143 
15144   sq_pushstring(v, "do_scripting_controller", -1);
15145   sq_newclosure(v, &Player_do_scripting_controller_wrapper, 0);
15146   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsb");
15147   if(SQ_FAILED(sq_createslot(v, -3))) {
15148     throw SquirrelError(v, "Couldn't register function 'do_scripting_controller'");
15149   }
15150 
15151   sq_pushstring(v, "get_velocity_x", -1);
15152   sq_newclosure(v, &Player_get_velocity_x_wrapper, 0);
15153   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15154   if(SQ_FAILED(sq_createslot(v, -3))) {
15155     throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
15156   }
15157 
15158   sq_pushstring(v, "get_velocity_y", -1);
15159   sq_newclosure(v, &Player_get_velocity_y_wrapper, 0);
15160   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15161   if(SQ_FAILED(sq_createslot(v, -3))) {
15162     throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
15163   }
15164 
15165   sq_pushstring(v, "get_x", -1);
15166   sq_newclosure(v, &Player_get_x_wrapper, 0);
15167   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15168   if(SQ_FAILED(sq_createslot(v, -3))) {
15169     throw SquirrelError(v, "Couldn't register function 'get_x'");
15170   }
15171 
15172   sq_pushstring(v, "get_y", -1);
15173   sq_newclosure(v, &Player_get_y_wrapper, 0);
15174   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15175   if(SQ_FAILED(sq_createslot(v, -3))) {
15176     throw SquirrelError(v, "Couldn't register function 'get_y'");
15177   }
15178 
15179   sq_pushstring(v, "set_pos", -1);
15180   sq_newclosure(v, &Player_set_pos_wrapper, 0);
15181   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15182   if(SQ_FAILED(sq_createslot(v, -3))) {
15183     throw SquirrelError(v, "Couldn't register function 'set_pos'");
15184   }
15185 
15186   if(SQ_FAILED(sq_createslot(v, -3))) {
15187     throw SquirrelError(v, "Couldn't register class 'Player'");
15188   }
15189 
15190   // Register class Rain
15191   sq_pushstring(v, "Rain", -1);
15192   if(sq_newclass(v, SQFalse) < 0) {
15193     std::ostringstream msg;
15194     msg << "Couldn't create new class 'Rain'";
15195     throw SquirrelError(v, msg.str());
15196   }
15197   sq_pushstring(v, "set_enabled", -1);
15198   sq_newclosure(v, &Rain_set_enabled_wrapper, 0);
15199   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15200   if(SQ_FAILED(sq_createslot(v, -3))) {
15201     throw SquirrelError(v, "Couldn't register function 'set_enabled'");
15202   }
15203 
15204   sq_pushstring(v, "get_enabled", -1);
15205   sq_newclosure(v, &Rain_get_enabled_wrapper, 0);
15206   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15207   if(SQ_FAILED(sq_createslot(v, -3))) {
15208     throw SquirrelError(v, "Couldn't register function 'get_enabled'");
15209   }
15210 
15211   sq_pushstring(v, "fade_speed", -1);
15212   sq_newclosure(v, &Rain_fade_speed_wrapper, 0);
15213   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15214   if(SQ_FAILED(sq_createslot(v, -3))) {
15215     throw SquirrelError(v, "Couldn't register function 'fade_speed'");
15216   }
15217 
15218   sq_pushstring(v, "fade_amount", -1);
15219   sq_newclosure(v, &Rain_fade_amount_wrapper, 0);
15220   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15221   if(SQ_FAILED(sq_createslot(v, -3))) {
15222     throw SquirrelError(v, "Couldn't register function 'fade_amount'");
15223   }
15224 
15225   sq_pushstring(v, "fade_angle", -1);
15226   sq_newclosure(v, &Rain_fade_angle_wrapper, 0);
15227   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
15228   if(SQ_FAILED(sq_createslot(v, -3))) {
15229     throw SquirrelError(v, "Couldn't register function 'fade_angle'");
15230   }
15231 
15232   if(SQ_FAILED(sq_createslot(v, -3))) {
15233     throw SquirrelError(v, "Couldn't register class 'Rain'");
15234   }
15235 
15236   // Register class Rock
15237   sq_pushstring(v, "Rock", -1);
15238   if(sq_newclass(v, SQFalse) < 0) {
15239     std::ostringstream msg;
15240     msg << "Couldn't create new class 'Rock'";
15241     throw SquirrelError(v, msg.str());
15242   }
15243   if(SQ_FAILED(sq_createslot(v, -3))) {
15244     throw SquirrelError(v, "Couldn't register class 'Rock'");
15245   }
15246 
15247   // Register class ScriptedObject
15248   sq_pushstring(v, "ScriptedObject", -1);
15249   if(sq_newclass(v, SQFalse) < 0) {
15250     std::ostringstream msg;
15251     msg << "Couldn't create new class 'ScriptedObject'";
15252     throw SquirrelError(v, msg.str());
15253   }
15254   sq_pushstring(v, "set_action", -1);
15255   sq_newclosure(v, &ScriptedObject_set_action_wrapper, 0);
15256   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15257   if(SQ_FAILED(sq_createslot(v, -3))) {
15258     throw SquirrelError(v, "Couldn't register function 'set_action'");
15259   }
15260 
15261   sq_pushstring(v, "get_action", -1);
15262   sq_newclosure(v, &ScriptedObject_get_action_wrapper, 0);
15263   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15264   if(SQ_FAILED(sq_createslot(v, -3))) {
15265     throw SquirrelError(v, "Couldn't register function 'get_action'");
15266   }
15267 
15268   sq_pushstring(v, "move", -1);
15269   sq_newclosure(v, &ScriptedObject_move_wrapper, 0);
15270   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15271   if(SQ_FAILED(sq_createslot(v, -3))) {
15272     throw SquirrelError(v, "Couldn't register function 'move'");
15273   }
15274 
15275   sq_pushstring(v, "set_pos", -1);
15276   sq_newclosure(v, &ScriptedObject_set_pos_wrapper, 0);
15277   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15278   if(SQ_FAILED(sq_createslot(v, -3))) {
15279     throw SquirrelError(v, "Couldn't register function 'set_pos'");
15280   }
15281 
15282   sq_pushstring(v, "get_pos_x", -1);
15283   sq_newclosure(v, &ScriptedObject_get_pos_x_wrapper, 0);
15284   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15285   if(SQ_FAILED(sq_createslot(v, -3))) {
15286     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
15287   }
15288 
15289   sq_pushstring(v, "get_pos_y", -1);
15290   sq_newclosure(v, &ScriptedObject_get_pos_y_wrapper, 0);
15291   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15292   if(SQ_FAILED(sq_createslot(v, -3))) {
15293     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
15294   }
15295 
15296   sq_pushstring(v, "set_velocity", -1);
15297   sq_newclosure(v, &ScriptedObject_set_velocity_wrapper, 0);
15298   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15299   if(SQ_FAILED(sq_createslot(v, -3))) {
15300     throw SquirrelError(v, "Couldn't register function 'set_velocity'");
15301   }
15302 
15303   sq_pushstring(v, "get_velocity_x", -1);
15304   sq_newclosure(v, &ScriptedObject_get_velocity_x_wrapper, 0);
15305   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15306   if(SQ_FAILED(sq_createslot(v, -3))) {
15307     throw SquirrelError(v, "Couldn't register function 'get_velocity_x'");
15308   }
15309 
15310   sq_pushstring(v, "get_velocity_y", -1);
15311   sq_newclosure(v, &ScriptedObject_get_velocity_y_wrapper, 0);
15312   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15313   if(SQ_FAILED(sq_createslot(v, -3))) {
15314     throw SquirrelError(v, "Couldn't register function 'get_velocity_y'");
15315   }
15316 
15317   sq_pushstring(v, "enable_gravity", -1);
15318   sq_newclosure(v, &ScriptedObject_enable_gravity_wrapper, 0);
15319   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15320   if(SQ_FAILED(sq_createslot(v, -3))) {
15321     throw SquirrelError(v, "Couldn't register function 'enable_gravity'");
15322   }
15323 
15324   sq_pushstring(v, "gravity_enabled", -1);
15325   sq_newclosure(v, &ScriptedObject_gravity_enabled_wrapper, 0);
15326   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15327   if(SQ_FAILED(sq_createslot(v, -3))) {
15328     throw SquirrelError(v, "Couldn't register function 'gravity_enabled'");
15329   }
15330 
15331   sq_pushstring(v, "set_visible", -1);
15332   sq_newclosure(v, &ScriptedObject_set_visible_wrapper, 0);
15333   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15334   if(SQ_FAILED(sq_createslot(v, -3))) {
15335     throw SquirrelError(v, "Couldn't register function 'set_visible'");
15336   }
15337 
15338   sq_pushstring(v, "is_visible", -1);
15339   sq_newclosure(v, &ScriptedObject_is_visible_wrapper, 0);
15340   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15341   if(SQ_FAILED(sq_createslot(v, -3))) {
15342     throw SquirrelError(v, "Couldn't register function 'is_visible'");
15343   }
15344 
15345   sq_pushstring(v, "set_solid", -1);
15346   sq_newclosure(v, &ScriptedObject_set_solid_wrapper, 0);
15347   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15348   if(SQ_FAILED(sq_createslot(v, -3))) {
15349     throw SquirrelError(v, "Couldn't register function 'set_solid'");
15350   }
15351 
15352   sq_pushstring(v, "is_solid", -1);
15353   sq_newclosure(v, &ScriptedObject_is_solid_wrapper, 0);
15354   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15355   if(SQ_FAILED(sq_createslot(v, -3))) {
15356     throw SquirrelError(v, "Couldn't register function 'is_solid'");
15357   }
15358 
15359   sq_pushstring(v, "get_name", -1);
15360   sq_newclosure(v, &ScriptedObject_get_name_wrapper, 0);
15361   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15362   if(SQ_FAILED(sq_createslot(v, -3))) {
15363     throw SquirrelError(v, "Couldn't register function 'get_name'");
15364   }
15365 
15366   if(SQ_FAILED(sq_createslot(v, -3))) {
15367     throw SquirrelError(v, "Couldn't register class 'ScriptedObject'");
15368   }
15369 
15370   // Register class Spotlight
15371   sq_pushstring(v, "Spotlight", -1);
15372   if(sq_newclass(v, SQFalse) < 0) {
15373     std::ostringstream msg;
15374     msg << "Couldn't create new class 'Spotlight'";
15375     throw SquirrelError(v, msg.str());
15376   }
15377   sq_pushstring(v, "set_direction", -1);
15378   sq_newclosure(v, &Spotlight_set_direction_wrapper, 0);
15379   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15380   if(SQ_FAILED(sq_createslot(v, -3))) {
15381     throw SquirrelError(v, "Couldn't register function 'set_direction'");
15382   }
15383 
15384   sq_pushstring(v, "set_angle", -1);
15385   sq_newclosure(v, &Spotlight_set_angle_wrapper, 0);
15386   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15387   if(SQ_FAILED(sq_createslot(v, -3))) {
15388     throw SquirrelError(v, "Couldn't register function 'set_angle'");
15389   }
15390 
15391   sq_pushstring(v, "fade_angle", -1);
15392   sq_newclosure(v, &Spotlight_fade_angle_wrapper, 0);
15393   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15394   if(SQ_FAILED(sq_createslot(v, -3))) {
15395     throw SquirrelError(v, "Couldn't register function 'fade_angle'");
15396   }
15397 
15398   sq_pushstring(v, "ease_angle", -1);
15399   sq_newclosure(v, &Spotlight_ease_angle_wrapper, 0);
15400   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
15401   if(SQ_FAILED(sq_createslot(v, -3))) {
15402     throw SquirrelError(v, "Couldn't register function 'ease_angle'");
15403   }
15404 
15405   sq_pushstring(v, "set_speed", -1);
15406   sq_newclosure(v, &Spotlight_set_speed_wrapper, 0);
15407   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15408   if(SQ_FAILED(sq_createslot(v, -3))) {
15409     throw SquirrelError(v, "Couldn't register function 'set_speed'");
15410   }
15411 
15412   sq_pushstring(v, "fade_speed", -1);
15413   sq_newclosure(v, &Spotlight_fade_speed_wrapper, 0);
15414   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15415   if(SQ_FAILED(sq_createslot(v, -3))) {
15416     throw SquirrelError(v, "Couldn't register function 'fade_speed'");
15417   }
15418 
15419   sq_pushstring(v, "ease_speed", -1);
15420   sq_newclosure(v, &Spotlight_ease_speed_wrapper, 0);
15421   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnns");
15422   if(SQ_FAILED(sq_createslot(v, -3))) {
15423     throw SquirrelError(v, "Couldn't register function 'ease_speed'");
15424   }
15425 
15426   sq_pushstring(v, "set_color_rgba", -1);
15427   sq_newclosure(v, &Spotlight_set_color_rgba_wrapper, 0);
15428   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnn");
15429   if(SQ_FAILED(sq_createslot(v, -3))) {
15430     throw SquirrelError(v, "Couldn't register function 'set_color_rgba'");
15431   }
15432 
15433   sq_pushstring(v, "fade_color_rgba", -1);
15434   sq_newclosure(v, &Spotlight_fade_color_rgba_wrapper, 0);
15435   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnn");
15436   if(SQ_FAILED(sq_createslot(v, -3))) {
15437     throw SquirrelError(v, "Couldn't register function 'fade_color_rgba'");
15438   }
15439 
15440   sq_pushstring(v, "ease_color_rgba", -1);
15441   sq_newclosure(v, &Spotlight_ease_color_rgba_wrapper, 0);
15442   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnns");
15443   if(SQ_FAILED(sq_createslot(v, -3))) {
15444     throw SquirrelError(v, "Couldn't register function 'ease_color_rgba'");
15445   }
15446 
15447   if(SQ_FAILED(sq_createslot(v, -3))) {
15448     throw SquirrelError(v, "Couldn't register class 'Spotlight'");
15449   }
15450 
15451   // Register class Text
15452   sq_pushstring(v, "Text", -1);
15453   if(sq_newclass(v, SQFalse) < 0) {
15454     std::ostringstream msg;
15455     msg << "Couldn't create new class 'Text'";
15456     throw SquirrelError(v, msg.str());
15457   }
15458   sq_pushstring(v, "set_text", -1);
15459   sq_newclosure(v, &Text_set_text_wrapper, 0);
15460   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15461   if(SQ_FAILED(sq_createslot(v, -3))) {
15462     throw SquirrelError(v, "Couldn't register function 'set_text'");
15463   }
15464 
15465   sq_pushstring(v, "set_font", -1);
15466   sq_newclosure(v, &Text_set_font_wrapper, 0);
15467   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15468   if(SQ_FAILED(sq_createslot(v, -3))) {
15469     throw SquirrelError(v, "Couldn't register function 'set_font'");
15470   }
15471 
15472   sq_pushstring(v, "fade_in", -1);
15473   sq_newclosure(v, &Text_fade_in_wrapper, 0);
15474   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15475   if(SQ_FAILED(sq_createslot(v, -3))) {
15476     throw SquirrelError(v, "Couldn't register function 'fade_in'");
15477   }
15478 
15479   sq_pushstring(v, "fade_out", -1);
15480   sq_newclosure(v, &Text_fade_out_wrapper, 0);
15481   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15482   if(SQ_FAILED(sq_createslot(v, -3))) {
15483     throw SquirrelError(v, "Couldn't register function 'fade_out'");
15484   }
15485 
15486   sq_pushstring(v, "set_visible", -1);
15487   sq_newclosure(v, &Text_set_visible_wrapper, 0);
15488   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15489   if(SQ_FAILED(sq_createslot(v, -3))) {
15490     throw SquirrelError(v, "Couldn't register function 'set_visible'");
15491   }
15492 
15493   sq_pushstring(v, "set_centered", -1);
15494   sq_newclosure(v, &Text_set_centered_wrapper, 0);
15495   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15496   if(SQ_FAILED(sq_createslot(v, -3))) {
15497     throw SquirrelError(v, "Couldn't register function 'set_centered'");
15498   }
15499 
15500   sq_pushstring(v, "set_pos", -1);
15501   sq_newclosure(v, &Text_set_pos_wrapper, 0);
15502   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15503   if(SQ_FAILED(sq_createslot(v, -3))) {
15504     throw SquirrelError(v, "Couldn't register function 'set_pos'");
15505   }
15506 
15507   sq_pushstring(v, "get_pos_x", -1);
15508   sq_newclosure(v, &Text_get_pos_x_wrapper, 0);
15509   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15510   if(SQ_FAILED(sq_createslot(v, -3))) {
15511     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
15512   }
15513 
15514   sq_pushstring(v, "get_pos_y", -1);
15515   sq_newclosure(v, &Text_get_pos_y_wrapper, 0);
15516   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15517   if(SQ_FAILED(sq_createslot(v, -3))) {
15518     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
15519   }
15520 
15521   sq_pushstring(v, "set_anchor_point", -1);
15522   sq_newclosure(v, &Text_set_anchor_point_wrapper, 0);
15523   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
15524   if(SQ_FAILED(sq_createslot(v, -3))) {
15525     throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
15526   }
15527 
15528   sq_pushstring(v, "get_anchor_point", -1);
15529   sq_newclosure(v, &Text_get_anchor_point_wrapper, 0);
15530   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15531   if(SQ_FAILED(sq_createslot(v, -3))) {
15532     throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
15533   }
15534 
15535   if(SQ_FAILED(sq_createslot(v, -3))) {
15536     throw SquirrelError(v, "Couldn't register class 'Text'");
15537   }
15538 
15539   // Register class TextArray
15540   sq_pushstring(v, "TextArray", -1);
15541   if(sq_newclass(v, SQFalse) < 0) {
15542     std::ostringstream msg;
15543     msg << "Couldn't create new class 'TextArray'";
15544     throw SquirrelError(v, msg.str());
15545   }
15546   sq_pushstring(v, "clear", -1);
15547   sq_newclosure(v, &TextArray_clear_wrapper, 0);
15548   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15549   if(SQ_FAILED(sq_createslot(v, -3))) {
15550     throw SquirrelError(v, "Couldn't register function 'clear'");
15551   }
15552 
15553   sq_pushstring(v, "add_text", -1);
15554   sq_newclosure(v, &TextArray_add_text_wrapper, 0);
15555   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15556   if(SQ_FAILED(sq_createslot(v, -3))) {
15557     throw SquirrelError(v, "Couldn't register function 'add_text'");
15558   }
15559 
15560   sq_pushstring(v, "add_text_duration", -1);
15561   sq_newclosure(v, &TextArray_add_text_duration_wrapper, 0);
15562   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tsn");
15563   if(SQ_FAILED(sq_createslot(v, -3))) {
15564     throw SquirrelError(v, "Couldn't register function 'add_text_duration'");
15565   }
15566 
15567   sq_pushstring(v, "set_text_index", -1);
15568   sq_newclosure(v, &TextArray_set_text_index_wrapper, 0);
15569   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
15570   if(SQ_FAILED(sq_createslot(v, -3))) {
15571     throw SquirrelError(v, "Couldn't register function 'set_text_index'");
15572   }
15573 
15574   sq_pushstring(v, "set_keep_visible", -1);
15575   sq_newclosure(v, &TextArray_set_keep_visible_wrapper, 0);
15576   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15577   if(SQ_FAILED(sq_createslot(v, -3))) {
15578     throw SquirrelError(v, "Couldn't register function 'set_keep_visible'");
15579   }
15580 
15581   sq_pushstring(v, "set_fade_transition", -1);
15582   sq_newclosure(v, &TextArray_set_fade_transition_wrapper, 0);
15583   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15584   if(SQ_FAILED(sq_createslot(v, -3))) {
15585     throw SquirrelError(v, "Couldn't register function 'set_fade_transition'");
15586   }
15587 
15588   sq_pushstring(v, "set_fade_time", -1);
15589   sq_newclosure(v, &TextArray_set_fade_time_wrapper, 0);
15590   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15591   if(SQ_FAILED(sq_createslot(v, -3))) {
15592     throw SquirrelError(v, "Couldn't register function 'set_fade_time'");
15593   }
15594 
15595   sq_pushstring(v, "set_done", -1);
15596   sq_newclosure(v, &TextArray_set_done_wrapper, 0);
15597   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15598   if(SQ_FAILED(sq_createslot(v, -3))) {
15599     throw SquirrelError(v, "Couldn't register function 'set_done'");
15600   }
15601 
15602   sq_pushstring(v, "set_auto", -1);
15603   sq_newclosure(v, &TextArray_set_auto_wrapper, 0);
15604   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15605   if(SQ_FAILED(sq_createslot(v, -3))) {
15606     throw SquirrelError(v, "Couldn't register function 'set_auto'");
15607   }
15608 
15609   sq_pushstring(v, "next_text", -1);
15610   sq_newclosure(v, &TextArray_next_text_wrapper, 0);
15611   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15612   if(SQ_FAILED(sq_createslot(v, -3))) {
15613     throw SquirrelError(v, "Couldn't register function 'next_text'");
15614   }
15615 
15616   sq_pushstring(v, "prev_text", -1);
15617   sq_newclosure(v, &TextArray_prev_text_wrapper, 0);
15618   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15619   if(SQ_FAILED(sq_createslot(v, -3))) {
15620     throw SquirrelError(v, "Couldn't register function 'prev_text'");
15621   }
15622 
15623   sq_pushstring(v, "set_text", -1);
15624   sq_newclosure(v, &TextArray_set_text_wrapper, 0);
15625   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15626   if(SQ_FAILED(sq_createslot(v, -3))) {
15627     throw SquirrelError(v, "Couldn't register function 'set_text'");
15628   }
15629 
15630   sq_pushstring(v, "set_font", -1);
15631   sq_newclosure(v, &TextArray_set_font_wrapper, 0);
15632   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ts");
15633   if(SQ_FAILED(sq_createslot(v, -3))) {
15634     throw SquirrelError(v, "Couldn't register function 'set_font'");
15635   }
15636 
15637   sq_pushstring(v, "fade_in", -1);
15638   sq_newclosure(v, &TextArray_fade_in_wrapper, 0);
15639   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15640   if(SQ_FAILED(sq_createslot(v, -3))) {
15641     throw SquirrelError(v, "Couldn't register function 'fade_in'");
15642   }
15643 
15644   sq_pushstring(v, "fade_out", -1);
15645   sq_newclosure(v, &TextArray_fade_out_wrapper, 0);
15646   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15647   if(SQ_FAILED(sq_createslot(v, -3))) {
15648     throw SquirrelError(v, "Couldn't register function 'fade_out'");
15649   }
15650 
15651   sq_pushstring(v, "set_visible", -1);
15652   sq_newclosure(v, &TextArray_set_visible_wrapper, 0);
15653   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15654   if(SQ_FAILED(sq_createslot(v, -3))) {
15655     throw SquirrelError(v, "Couldn't register function 'set_visible'");
15656   }
15657 
15658   sq_pushstring(v, "set_centered", -1);
15659   sq_newclosure(v, &TextArray_set_centered_wrapper, 0);
15660   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15661   if(SQ_FAILED(sq_createslot(v, -3))) {
15662     throw SquirrelError(v, "Couldn't register function 'set_centered'");
15663   }
15664 
15665   sq_pushstring(v, "set_pos", -1);
15666   sq_newclosure(v, &TextArray_set_pos_wrapper, 0);
15667   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15668   if(SQ_FAILED(sq_createslot(v, -3))) {
15669     throw SquirrelError(v, "Couldn't register function 'set_pos'");
15670   }
15671 
15672   sq_pushstring(v, "get_pos_x", -1);
15673   sq_newclosure(v, &TextArray_get_pos_x_wrapper, 0);
15674   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15675   if(SQ_FAILED(sq_createslot(v, -3))) {
15676     throw SquirrelError(v, "Couldn't register function 'get_pos_x'");
15677   }
15678 
15679   sq_pushstring(v, "get_pos_y", -1);
15680   sq_newclosure(v, &TextArray_get_pos_y_wrapper, 0);
15681   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15682   if(SQ_FAILED(sq_createslot(v, -3))) {
15683     throw SquirrelError(v, "Couldn't register function 'get_pos_y'");
15684   }
15685 
15686   sq_pushstring(v, "set_anchor_point", -1);
15687   sq_newclosure(v, &TextArray_set_anchor_point_wrapper, 0);
15688   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
15689   if(SQ_FAILED(sq_createslot(v, -3))) {
15690     throw SquirrelError(v, "Couldn't register function 'set_anchor_point'");
15691   }
15692 
15693   sq_pushstring(v, "get_anchor_point", -1);
15694   sq_newclosure(v, &TextArray_get_anchor_point_wrapper, 0);
15695   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15696   if(SQ_FAILED(sq_createslot(v, -3))) {
15697     throw SquirrelError(v, "Couldn't register function 'get_anchor_point'");
15698   }
15699 
15700   if(SQ_FAILED(sq_createslot(v, -3))) {
15701     throw SquirrelError(v, "Couldn't register class 'TextArray'");
15702   }
15703 
15704   // Register class Thunderstorm
15705   sq_pushstring(v, "Thunderstorm", -1);
15706   if(sq_newclass(v, SQFalse) < 0) {
15707     std::ostringstream msg;
15708     msg << "Couldn't create new class 'Thunderstorm'";
15709     throw SquirrelError(v, msg.str());
15710   }
15711   sq_pushstring(v, "start", -1);
15712   sq_newclosure(v, &Thunderstorm_start_wrapper, 0);
15713   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15714   if(SQ_FAILED(sq_createslot(v, -3))) {
15715     throw SquirrelError(v, "Couldn't register function 'start'");
15716   }
15717 
15718   sq_pushstring(v, "stop", -1);
15719   sq_newclosure(v, &Thunderstorm_stop_wrapper, 0);
15720   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15721   if(SQ_FAILED(sq_createslot(v, -3))) {
15722     throw SquirrelError(v, "Couldn't register function 'stop'");
15723   }
15724 
15725   sq_pushstring(v, "thunder", -1);
15726   sq_newclosure(v, &Thunderstorm_thunder_wrapper, 0);
15727   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15728   if(SQ_FAILED(sq_createslot(v, -3))) {
15729     throw SquirrelError(v, "Couldn't register function 'thunder'");
15730   }
15731 
15732   sq_pushstring(v, "lightning", -1);
15733   sq_newclosure(v, &Thunderstorm_lightning_wrapper, 0);
15734   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15735   if(SQ_FAILED(sq_createslot(v, -3))) {
15736     throw SquirrelError(v, "Couldn't register function 'lightning'");
15737   }
15738 
15739   sq_pushstring(v, "flash", -1);
15740   sq_newclosure(v, &Thunderstorm_flash_wrapper, 0);
15741   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15742   if(SQ_FAILED(sq_createslot(v, -3))) {
15743     throw SquirrelError(v, "Couldn't register function 'flash'");
15744   }
15745 
15746   sq_pushstring(v, "electrify", -1);
15747   sq_newclosure(v, &Thunderstorm_electrify_wrapper, 0);
15748   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15749   if(SQ_FAILED(sq_createslot(v, -3))) {
15750     throw SquirrelError(v, "Couldn't register function 'electrify'");
15751   }
15752 
15753   if(SQ_FAILED(sq_createslot(v, -3))) {
15754     throw SquirrelError(v, "Couldn't register class 'Thunderstorm'");
15755   }
15756 
15757   // Register class TileMap
15758   sq_pushstring(v, "TileMap", -1);
15759   if(sq_newclass(v, SQFalse) < 0) {
15760     std::ostringstream msg;
15761     msg << "Couldn't create new class 'TileMap'";
15762     throw SquirrelError(v, msg.str());
15763   }
15764   sq_pushstring(v, "goto_node", -1);
15765   sq_newclosure(v, &TileMap_goto_node_wrapper, 0);
15766   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|ti");
15767   if(SQ_FAILED(sq_createslot(v, -3))) {
15768     throw SquirrelError(v, "Couldn't register function 'goto_node'");
15769   }
15770 
15771   sq_pushstring(v, "start_moving", -1);
15772   sq_newclosure(v, &TileMap_start_moving_wrapper, 0);
15773   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15774   if(SQ_FAILED(sq_createslot(v, -3))) {
15775     throw SquirrelError(v, "Couldn't register function 'start_moving'");
15776   }
15777 
15778   sq_pushstring(v, "stop_moving", -1);
15779   sq_newclosure(v, &TileMap_stop_moving_wrapper, 0);
15780   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15781   if(SQ_FAILED(sq_createslot(v, -3))) {
15782     throw SquirrelError(v, "Couldn't register function 'stop_moving'");
15783   }
15784 
15785   sq_pushstring(v, "get_tile_id", -1);
15786   sq_newclosure(v, &TileMap_get_tile_id_wrapper, 0);
15787   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tii");
15788   if(SQ_FAILED(sq_createslot(v, -3))) {
15789     throw SquirrelError(v, "Couldn't register function 'get_tile_id'");
15790   }
15791 
15792   sq_pushstring(v, "get_tile_id_at", -1);
15793   sq_newclosure(v, &TileMap_get_tile_id_at_wrapper, 0);
15794   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15795   if(SQ_FAILED(sq_createslot(v, -3))) {
15796     throw SquirrelError(v, "Couldn't register function 'get_tile_id_at'");
15797   }
15798 
15799   sq_pushstring(v, "change", -1);
15800   sq_newclosure(v, &TileMap_change_wrapper, 0);
15801   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tiii");
15802   if(SQ_FAILED(sq_createslot(v, -3))) {
15803     throw SquirrelError(v, "Couldn't register function 'change'");
15804   }
15805 
15806   sq_pushstring(v, "change_at", -1);
15807   sq_newclosure(v, &TileMap_change_at_wrapper, 0);
15808   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnni");
15809   if(SQ_FAILED(sq_createslot(v, -3))) {
15810     throw SquirrelError(v, "Couldn't register function 'change_at'");
15811   }
15812 
15813   sq_pushstring(v, "fade", -1);
15814   sq_newclosure(v, &TileMap_fade_wrapper, 0);
15815   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnn");
15816   if(SQ_FAILED(sq_createslot(v, -3))) {
15817     throw SquirrelError(v, "Couldn't register function 'fade'");
15818   }
15819 
15820   sq_pushstring(v, "tint_fade", -1);
15821   sq_newclosure(v, &TileMap_tint_fade_wrapper, 0);
15822   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tnnnnn");
15823   if(SQ_FAILED(sq_createslot(v, -3))) {
15824     throw SquirrelError(v, "Couldn't register function 'tint_fade'");
15825   }
15826 
15827   sq_pushstring(v, "set_alpha", -1);
15828   sq_newclosure(v, &TileMap_set_alpha_wrapper, 0);
15829   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tn");
15830   if(SQ_FAILED(sq_createslot(v, -3))) {
15831     throw SquirrelError(v, "Couldn't register function 'set_alpha'");
15832   }
15833 
15834   sq_pushstring(v, "get_alpha", -1);
15835   sq_newclosure(v, &TileMap_get_alpha_wrapper, 0);
15836   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15837   if(SQ_FAILED(sq_createslot(v, -3))) {
15838     throw SquirrelError(v, "Couldn't register function 'get_alpha'");
15839   }
15840 
15841   sq_pushstring(v, "set_solid", -1);
15842   sq_newclosure(v, &TileMap_set_solid_wrapper, 0);
15843   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15844   if(SQ_FAILED(sq_createslot(v, -3))) {
15845     throw SquirrelError(v, "Couldn't register function 'set_solid'");
15846   }
15847 
15848   if(SQ_FAILED(sq_createslot(v, -3))) {
15849     throw SquirrelError(v, "Couldn't register class 'TileMap'");
15850   }
15851 
15852   // Register class Torch
15853   sq_pushstring(v, "Torch", -1);
15854   if(sq_newclass(v, SQFalse) < 0) {
15855     std::ostringstream msg;
15856     msg << "Couldn't create new class 'Torch'";
15857     throw SquirrelError(v, msg.str());
15858   }
15859   sq_pushstring(v, "get_burning", -1);
15860   sq_newclosure(v, &Torch_get_burning_wrapper, 0);
15861   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15862   if(SQ_FAILED(sq_createslot(v, -3))) {
15863     throw SquirrelError(v, "Couldn't register function 'get_burning'");
15864   }
15865 
15866   sq_pushstring(v, "set_burning", -1);
15867   sq_newclosure(v, &Torch_set_burning_wrapper, 0);
15868   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|tb");
15869   if(SQ_FAILED(sq_createslot(v, -3))) {
15870     throw SquirrelError(v, "Couldn't register function 'set_burning'");
15871   }
15872 
15873   if(SQ_FAILED(sq_createslot(v, -3))) {
15874     throw SquirrelError(v, "Couldn't register class 'Torch'");
15875   }
15876 
15877   // Register class Wind
15878   sq_pushstring(v, "Wind", -1);
15879   if(sq_newclass(v, SQFalse) < 0) {
15880     std::ostringstream msg;
15881     msg << "Couldn't create new class 'Wind'";
15882     throw SquirrelError(v, msg.str());
15883   }
15884   sq_pushstring(v, "start", -1);
15885   sq_newclosure(v, &Wind_start_wrapper, 0);
15886   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15887   if(SQ_FAILED(sq_createslot(v, -3))) {
15888     throw SquirrelError(v, "Couldn't register function 'start'");
15889   }
15890 
15891   sq_pushstring(v, "stop", -1);
15892   sq_newclosure(v, &Wind_stop_wrapper, 0);
15893   sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "x|t");
15894   if(SQ_FAILED(sq_createslot(v, -3))) {
15895     throw SquirrelError(v, "Couldn't register function 'stop'");
15896   }
15897 
15898   if(SQ_FAILED(sq_createslot(v, -3))) {
15899     throw SquirrelError(v, "Couldn't register class 'Wind'");
15900   }
15901 
15902 }
15903 
15904 } // namespace scripting
15905 
15906 /* EOF */
15907