3
** Generated automatically by tolua++-1.0.93 on Wed Sep 9 01:10:11 2009.
13
/* Exported function */
14
TOLUA_API int tolua_enigma_open (lua_State* tolua_S);
18
#include "lev/PersistentIndex.hh"
19
using namespace enigma;
22
using namespace server;
24
using namespace enigma;
26
using namespace video;
28
#include "SoundEffectManager.hh"
29
using namespace sound;
31
/* function to register type */
32
static void tolua_reg_types (lua_State* tolua_S)
34
tolua_usertype(tolua_S,"Stone");
35
tolua_usertype(tolua_S,"Font");
36
tolua_usertype(tolua_S,"Object");
37
tolua_usertype(tolua_S,"Floor");
38
tolua_usertype(tolua_S,"Item");
39
tolua_usertype(tolua_S,"Screen");
40
tolua_usertype(tolua_S,"Surface");
43
/* function: GetImage */
44
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetImage00
45
static int tolua_enigma_enigma_GetImage00(lua_State* tolua_S)
48
tolua_Error tolua_err;
50
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
51
!tolua_isnoobj(tolua_S,2,&tolua_err)
57
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
59
Surface* tolua_ret = (Surface*) GetImage(name);
60
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
66
tolua_error(tolua_S,"#ferror in function 'GetImage'.",&tolua_err);
70
#endif //#ifndef TOLUA_DISABLE
72
/* function: GetImage */
73
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetImage01
74
static int tolua_enigma_enigma_GetImage01(lua_State* tolua_S)
76
tolua_Error tolua_err;
78
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
79
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
80
!tolua_isnoobj(tolua_S,3,&tolua_err)
85
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
86
const char* extension = ((const char*) tolua_tostring(tolua_S,2,0));
88
Surface* tolua_ret = (Surface*) GetImage(name,extension);
89
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
94
return tolua_enigma_enigma_GetImage00(tolua_S);
96
#endif //#ifndef TOLUA_DISABLE
98
/* function: LoadImage */
99
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_LoadImage00
100
static int tolua_enigma_enigma_LoadImage00(lua_State* tolua_S)
102
#ifndef TOLUA_RELEASE
103
tolua_Error tolua_err;
105
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
106
!tolua_isnoobj(tolua_S,2,&tolua_err)
112
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
114
Surface* tolua_ret = (Surface*) LoadImage(name);
115
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
119
#ifndef TOLUA_RELEASE
121
tolua_error(tolua_S,"#ferror in function 'LoadImage'.",&tolua_err);
125
#endif //#ifndef TOLUA_DISABLE
127
/* function: RegisterImage */
128
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_RegisterImage00
129
static int tolua_enigma_enigma_RegisterImage00(lua_State* tolua_S)
131
#ifndef TOLUA_RELEASE
132
tolua_Error tolua_err;
134
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
135
!tolua_isusertype(tolua_S,2,"Surface",0,&tolua_err) ||
136
!tolua_isnoobj(tolua_S,3,&tolua_err)
142
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
143
Surface* s = ((Surface*) tolua_tousertype(tolua_S,2,0));
145
Surface* tolua_ret = (Surface*) RegisterImage(name,s);
146
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
150
#ifndef TOLUA_RELEASE
152
tolua_error(tolua_S,"#ferror in function 'RegisterImage'.",&tolua_err);
156
#endif //#ifndef TOLUA_DISABLE
158
/* function: GetFont */
159
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetFont00
160
static int tolua_enigma_enigma_GetFont00(lua_State* tolua_S)
162
#ifndef TOLUA_RELEASE
163
tolua_Error tolua_err;
165
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
166
!tolua_isnoobj(tolua_S,2,&tolua_err)
172
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
174
Font* tolua_ret = (Font*) GetFont(name);
175
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Font");
179
#ifndef TOLUA_RELEASE
181
tolua_error(tolua_S,"#ferror in function 'GetFont'.",&tolua_err);
185
#endif //#ifndef TOLUA_DISABLE
188
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_date00
189
static int tolua_enigma_enigma_date00(lua_State* tolua_S)
191
#ifndef TOLUA_RELEASE
192
tolua_Error tolua_err;
194
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
195
!tolua_isnoobj(tolua_S,2,&tolua_err)
201
const char* format = ((const char*) tolua_tostring(tolua_S,1,0));
203
const char* tolua_ret = (const char*) date(format);
204
tolua_pushstring(tolua_S,(const char*)tolua_ret);
208
#ifndef TOLUA_RELEASE
210
tolua_error(tolua_S,"#ferror in function 'date'.",&tolua_err);
214
#endif //#ifndef TOLUA_DISABLE
216
/* get function: TwoPlayerGame */
217
#ifndef TOLUA_DISABLE_tolua_get_enigma_TwoPlayerGame
218
static int tolua_get_enigma_TwoPlayerGame(lua_State* tolua_S)
220
tolua_pushnumber(tolua_S,(lua_Number)TwoPlayerGame);
223
#endif //#ifndef TOLUA_DISABLE
225
/* set function: TwoPlayerGame */
226
#ifndef TOLUA_DISABLE_tolua_set_enigma_TwoPlayerGame
227
static int tolua_set_enigma_TwoPlayerGame(lua_State* tolua_S)
229
#ifndef TOLUA_RELEASE
230
tolua_Error tolua_err;
231
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
232
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
234
TwoPlayerGame = ((int) tolua_tonumber(tolua_S,2,0))
238
#endif //#ifndef TOLUA_DISABLE
240
/* get function: SingleComputerGame */
241
#ifndef TOLUA_DISABLE_tolua_get_enigma_SingleComputerGame
242
static int tolua_get_enigma_SingleComputerGame(lua_State* tolua_S)
244
tolua_pushnumber(tolua_S,(lua_Number)SingleComputerGame);
247
#endif //#ifndef TOLUA_DISABLE
249
/* set function: SingleComputerGame */
250
#ifndef TOLUA_DISABLE_tolua_set_enigma_SingleComputerGame
251
static int tolua_set_enigma_SingleComputerGame(lua_State* tolua_S)
253
#ifndef TOLUA_RELEASE
254
tolua_Error tolua_err;
255
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
256
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
258
SingleComputerGame = ((int) tolua_tonumber(tolua_S,2,0))
262
#endif //#ifndef TOLUA_DISABLE
264
/* get function: ConserveLevel */
265
#ifndef TOLUA_DISABLE_tolua_get_enigma_ConserveLevel
266
static int tolua_get_enigma_ConserveLevel(lua_State* tolua_S)
268
tolua_pushnumber(tolua_S,(lua_Number)ConserveLevel);
271
#endif //#ifndef TOLUA_DISABLE
273
/* set function: ConserveLevel */
274
#ifndef TOLUA_DISABLE_tolua_set_enigma_ConserveLevel
275
static int tolua_set_enigma_ConserveLevel(lua_State* tolua_S)
277
#ifndef TOLUA_RELEASE
278
tolua_Error tolua_err;
279
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
280
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
282
ConserveLevel = ((int) tolua_tonumber(tolua_S,2,0))
286
#endif //#ifndef TOLUA_DISABLE
288
/* get function: AllowTogglePlayer */
289
#ifndef TOLUA_DISABLE_tolua_get_enigma_AllowTogglePlayer
290
static int tolua_get_enigma_AllowTogglePlayer(lua_State* tolua_S)
292
tolua_pushnumber(tolua_S,(lua_Number)AllowTogglePlayer);
295
#endif //#ifndef TOLUA_DISABLE
297
/* set function: AllowTogglePlayer */
298
#ifndef TOLUA_DISABLE_tolua_set_enigma_AllowTogglePlayer
299
static int tolua_set_enigma_AllowTogglePlayer(lua_State* tolua_S)
301
#ifndef TOLUA_RELEASE
302
tolua_Error tolua_err;
303
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
304
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
306
AllowTogglePlayer = ((int) tolua_tonumber(tolua_S,2,0))
310
#endif //#ifndef TOLUA_DISABLE
312
/* get function: ShowMoves */
313
#ifndef TOLUA_DISABLE_tolua_get_enigma_ShowMoves
314
static int tolua_get_enigma_ShowMoves(lua_State* tolua_S)
316
tolua_pushnumber(tolua_S,(lua_Number)ShowMoves);
319
#endif //#ifndef TOLUA_DISABLE
321
/* set function: ShowMoves */
322
#ifndef TOLUA_DISABLE_tolua_set_enigma_ShowMoves
323
static int tolua_set_enigma_ShowMoves(lua_State* tolua_S)
325
#ifndef TOLUA_RELEASE
326
tolua_Error tolua_err;
327
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
328
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
330
ShowMoves = ((int) tolua_tonumber(tolua_S,2,0))
334
#endif //#ifndef TOLUA_DISABLE
336
/* get function: Brittleness */
337
#ifndef TOLUA_DISABLE_tolua_get_enigma_Brittleness
338
static int tolua_get_enigma_Brittleness(lua_State* tolua_S)
340
tolua_pushnumber(tolua_S,(lua_Number)Brittleness);
343
#endif //#ifndef TOLUA_DISABLE
345
/* set function: Brittleness */
346
#ifndef TOLUA_DISABLE_tolua_set_enigma_Brittleness
347
static int tolua_set_enigma_Brittleness(lua_State* tolua_S)
349
#ifndef TOLUA_RELEASE
350
tolua_Error tolua_err;
351
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
352
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
354
Brittleness = ((double) tolua_tonumber(tolua_S,2,0))
358
#endif //#ifndef TOLUA_DISABLE
360
/* get function: SlopeForce */
361
#ifndef TOLUA_DISABLE_tolua_get_enigma_SlopeForce
362
static int tolua_get_enigma_SlopeForce(lua_State* tolua_S)
364
tolua_pushnumber(tolua_S,(lua_Number)SlopeForce);
367
#endif //#ifndef TOLUA_DISABLE
369
/* set function: SlopeForce */
370
#ifndef TOLUA_DISABLE_tolua_set_enigma_SlopeForce
371
static int tolua_set_enigma_SlopeForce(lua_State* tolua_S)
373
#ifndef TOLUA_RELEASE
374
tolua_Error tolua_err;
375
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
376
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
378
SlopeForce = ((double) tolua_tonumber(tolua_S,2,0))
382
#endif //#ifndef TOLUA_DISABLE
384
/* get function: FlatForce */
385
#ifndef TOLUA_DISABLE_tolua_get_enigma_FlatForce
386
static int tolua_get_enigma_FlatForce(lua_State* tolua_S)
388
tolua_pushnumber(tolua_S,(lua_Number)FlatForce);
391
#endif //#ifndef TOLUA_DISABLE
393
/* set function: FlatForce */
394
#ifndef TOLUA_DISABLE_tolua_set_enigma_FlatForce
395
static int tolua_set_enigma_FlatForce(lua_State* tolua_S)
397
#ifndef TOLUA_RELEASE
398
tolua_Error tolua_err;
399
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
400
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
402
FlatForce = ((double) tolua_tonumber(tolua_S,2,0))
406
#endif //#ifndef TOLUA_DISABLE
408
/* get function: FrictionFactor */
409
#ifndef TOLUA_DISABLE_tolua_get_enigma_FrictionFactor
410
static int tolua_get_enigma_FrictionFactor(lua_State* tolua_S)
412
tolua_pushnumber(tolua_S,(lua_Number)FrictionFactor);
415
#endif //#ifndef TOLUA_DISABLE
417
/* set function: FrictionFactor */
418
#ifndef TOLUA_DISABLE_tolua_set_enigma_FrictionFactor
419
static int tolua_set_enigma_FrictionFactor(lua_State* tolua_S)
421
#ifndef TOLUA_RELEASE
422
tolua_Error tolua_err;
423
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
424
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
426
FrictionFactor = ((double) tolua_tonumber(tolua_S,2,0))
430
#endif //#ifndef TOLUA_DISABLE
432
/* get function: ElectricForce */
433
#ifndef TOLUA_DISABLE_tolua_get_enigma_ElectricForce
434
static int tolua_get_enigma_ElectricForce(lua_State* tolua_S)
436
tolua_pushnumber(tolua_S,(lua_Number)ElectricForce);
439
#endif //#ifndef TOLUA_DISABLE
441
/* set function: ElectricForce */
442
#ifndef TOLUA_DISABLE_tolua_set_enigma_ElectricForce
443
static int tolua_set_enigma_ElectricForce(lua_State* tolua_S)
445
#ifndef TOLUA_RELEASE
446
tolua_Error tolua_err;
447
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
448
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
450
ElectricForce = ((double) tolua_tonumber(tolua_S,2,0))
454
#endif //#ifndef TOLUA_DISABLE
456
/* get function: BumperForce */
457
#ifndef TOLUA_DISABLE_tolua_get_enigma_BumperForce
458
static int tolua_get_enigma_BumperForce(lua_State* tolua_S)
460
tolua_pushnumber(tolua_S,(lua_Number)BumperForce);
463
#endif //#ifndef TOLUA_DISABLE
465
/* set function: BumperForce */
466
#ifndef TOLUA_DISABLE_tolua_set_enigma_BumperForce
467
static int tolua_set_enigma_BumperForce(lua_State* tolua_S)
469
#ifndef TOLUA_RELEASE
470
tolua_Error tolua_err;
471
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
472
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
474
BumperForce = ((double) tolua_tonumber(tolua_S,2,0))
478
#endif //#ifndef TOLUA_DISABLE
480
/* get function: MagnetForce */
481
#ifndef TOLUA_DISABLE_tolua_get_enigma_MagnetForce
482
static int tolua_get_enigma_MagnetForce(lua_State* tolua_S)
484
tolua_pushnumber(tolua_S,(lua_Number)MagnetForce);
487
#endif //#ifndef TOLUA_DISABLE
489
/* set function: MagnetForce */
490
#ifndef TOLUA_DISABLE_tolua_set_enigma_MagnetForce
491
static int tolua_set_enigma_MagnetForce(lua_State* tolua_S)
493
#ifndef TOLUA_RELEASE
494
tolua_Error tolua_err;
495
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
496
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
498
MagnetForce = ((double) tolua_tonumber(tolua_S,2,0))
502
#endif //#ifndef TOLUA_DISABLE
504
/* get function: MagnetRange */
505
#ifndef TOLUA_DISABLE_tolua_get_enigma_MagnetRange
506
static int tolua_get_enigma_MagnetRange(lua_State* tolua_S)
508
tolua_pushnumber(tolua_S,(lua_Number)MagnetRange);
511
#endif //#ifndef TOLUA_DISABLE
513
/* set function: MagnetRange */
514
#ifndef TOLUA_DISABLE_tolua_set_enigma_MagnetRange
515
static int tolua_set_enigma_MagnetRange(lua_State* tolua_S)
517
#ifndef TOLUA_RELEASE
518
tolua_Error tolua_err;
519
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
520
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
522
MagnetRange = ((double) tolua_tonumber(tolua_S,2,0))
526
#endif //#ifndef TOLUA_DISABLE
528
/* get function: WaterSinkSpeed */
529
#ifndef TOLUA_DISABLE_tolua_get_enigma_WaterSinkSpeed
530
static int tolua_get_enigma_WaterSinkSpeed(lua_State* tolua_S)
532
tolua_pushnumber(tolua_S,(lua_Number)WaterSinkSpeed);
535
#endif //#ifndef TOLUA_DISABLE
537
/* set function: WaterSinkSpeed */
538
#ifndef TOLUA_DISABLE_tolua_set_enigma_WaterSinkSpeed
539
static int tolua_set_enigma_WaterSinkSpeed(lua_State* tolua_S)
541
#ifndef TOLUA_RELEASE
542
tolua_Error tolua_err;
543
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
544
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
546
WaterSinkSpeed = ((double) tolua_tonumber(tolua_S,2,0))
550
#endif //#ifndef TOLUA_DISABLE
552
/* get function: SwampSinkSpeed */
553
#ifndef TOLUA_DISABLE_tolua_get_enigma_SwampSinkSpeed
554
static int tolua_get_enigma_SwampSinkSpeed(lua_State* tolua_S)
556
tolua_pushnumber(tolua_S,(lua_Number)SwampSinkSpeed);
559
#endif //#ifndef TOLUA_DISABLE
561
/* set function: SwampSinkSpeed */
562
#ifndef TOLUA_DISABLE_tolua_set_enigma_SwampSinkSpeed
563
static int tolua_set_enigma_SwampSinkSpeed(lua_State* tolua_S)
565
#ifndef TOLUA_RELEASE
566
tolua_Error tolua_err;
567
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
568
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
570
SwampSinkSpeed = ((double) tolua_tonumber(tolua_S,2,0))
574
#endif //#ifndef TOLUA_DISABLE
576
/* get function: WormholeForce */
577
#ifndef TOLUA_DISABLE_tolua_get_enigma_WormholeForce
578
static int tolua_get_enigma_WormholeForce(lua_State* tolua_S)
580
tolua_pushnumber(tolua_S,(lua_Number)WormholeForce);
583
#endif //#ifndef TOLUA_DISABLE
585
/* set function: WormholeForce */
586
#ifndef TOLUA_DISABLE_tolua_set_enigma_WormholeForce
587
static int tolua_set_enigma_WormholeForce(lua_State* tolua_S)
589
#ifndef TOLUA_RELEASE
590
tolua_Error tolua_err;
591
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
592
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
594
WormholeForce = ((double) tolua_tonumber(tolua_S,2,0))
598
#endif //#ifndef TOLUA_DISABLE
600
/* get function: WormholeRange */
601
#ifndef TOLUA_DISABLE_tolua_get_enigma_WormholeRange
602
static int tolua_get_enigma_WormholeRange(lua_State* tolua_S)
604
tolua_pushnumber(tolua_S,(lua_Number)WormholeRange);
607
#endif //#ifndef TOLUA_DISABLE
609
/* set function: WormholeRange */
610
#ifndef TOLUA_DISABLE_tolua_set_enigma_WormholeRange
611
static int tolua_set_enigma_WormholeRange(lua_State* tolua_S)
613
#ifndef TOLUA_RELEASE
614
tolua_Error tolua_err;
615
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
616
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
618
WormholeRange = ((double) tolua_tonumber(tolua_S,2,0))
622
#endif //#ifndef TOLUA_DISABLE
624
/* get function: HoleForce */
625
#ifndef TOLUA_DISABLE_tolua_get_enigma_HoleForce
626
static int tolua_get_enigma_HoleForce(lua_State* tolua_S)
628
tolua_pushnumber(tolua_S,(lua_Number)HoleForce);
631
#endif //#ifndef TOLUA_DISABLE
633
/* set function: HoleForce */
634
#ifndef TOLUA_DISABLE_tolua_set_enigma_HoleForce
635
static int tolua_set_enigma_HoleForce(lua_State* tolua_S)
637
#ifndef TOLUA_RELEASE
638
tolua_Error tolua_err;
639
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
640
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
642
HoleForce = ((double) tolua_tonumber(tolua_S,2,0))
646
#endif //#ifndef TOLUA_DISABLE
648
/* get function: CreatingPreview */
649
#ifndef TOLUA_DISABLE_tolua_get_enigma_CreatingPreview
650
static int tolua_get_enigma_CreatingPreview(lua_State* tolua_S)
652
tolua_pushboolean(tolua_S,(bool)CreatingPreview);
655
#endif //#ifndef TOLUA_DISABLE
657
/* set function: CreatingPreview */
658
#ifndef TOLUA_DISABLE_tolua_set_enigma_CreatingPreview
659
static int tolua_set_enigma_CreatingPreview(lua_State* tolua_S)
661
#ifndef TOLUA_RELEASE
662
tolua_Error tolua_err;
663
if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
664
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
666
CreatingPreview = ((bool) tolua_toboolean(tolua_S,2,0))
670
#endif //#ifndef TOLUA_DISABLE
672
/* function: AddLevelPack */
673
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_AddLevelPack00
674
static int tolua_enigma_enigma_AddLevelPack00(lua_State* tolua_S)
676
#ifndef TOLUA_RELEASE
677
tolua_Error tolua_err;
679
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
680
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
681
!tolua_isnoobj(tolua_S,3,&tolua_err)
687
const char* init_file = ((const char*) tolua_tostring(tolua_S,1,0));
688
const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
690
AddLevelPack(init_file,name);
694
#ifndef TOLUA_RELEASE
696
tolua_error(tolua_S,"#ferror in function 'AddLevelPack'.",&tolua_err);
700
#endif //#ifndef TOLUA_DISABLE
702
/* function: AddZippedLevelPack */
703
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_AddZippedLevelPack00
704
static int tolua_enigma_enigma_AddZippedLevelPack00(lua_State* tolua_S)
706
#ifndef TOLUA_RELEASE
707
tolua_Error tolua_err;
709
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
710
!tolua_isnoobj(tolua_S,2,&tolua_err)
716
const char* zipfile = ((const char*) tolua_tostring(tolua_S,1,0));
718
AddZippedLevelPack(zipfile);
722
#ifndef TOLUA_RELEASE
724
tolua_error(tolua_S,"#ferror in function 'AddZippedLevelPack'.",&tolua_err);
728
#endif //#ifndef TOLUA_DISABLE
730
/* function: SetCompatibility */
731
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_SetCompatibility00
732
static int tolua_enigma_enigma_SetCompatibility00(lua_State* tolua_S)
734
#ifndef TOLUA_RELEASE
735
tolua_Error tolua_err;
737
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
738
!tolua_isnoobj(tolua_S,2,&tolua_err)
744
const char* version = ((const char*) tolua_tostring(tolua_S,1,0));
746
SetCompatibility(version);
750
#ifndef TOLUA_RELEASE
752
tolua_error(tolua_S,"#ferror in function 'SetCompatibility'.",&tolua_err);
756
#endif //#ifndef TOLUA_DISABLE
758
/* function: MakeObject */
759
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeObject00
760
static int tolua_enigma_world_MakeObject00(lua_State* tolua_S)
762
#ifndef TOLUA_RELEASE
763
tolua_Error tolua_err;
765
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
766
!tolua_isnoobj(tolua_S,2,&tolua_err)
772
const char* kind = ((const char*) tolua_tostring(tolua_S,1,0));
774
Object* tolua_ret = (Object*) MakeObject(kind);
775
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Object");
779
#ifndef TOLUA_RELEASE
781
tolua_error(tolua_S,"#ferror in function 'MakeObject'.",&tolua_err);
785
#endif //#ifndef TOLUA_DISABLE
787
/* function: MakeFloor */
788
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeFloor00
789
static int tolua_enigma_world_MakeFloor00(lua_State* tolua_S)
791
#ifndef TOLUA_RELEASE
792
tolua_Error tolua_err;
794
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
795
!tolua_isnoobj(tolua_S,2,&tolua_err)
801
const char* kind = ((const char*) tolua_tostring(tolua_S,1,0));
803
Floor* tolua_ret = (Floor*) MakeFloor(kind);
804
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Floor");
808
#ifndef TOLUA_RELEASE
810
tolua_error(tolua_S,"#ferror in function 'MakeFloor'.",&tolua_err);
814
#endif //#ifndef TOLUA_DISABLE
816
/* function: MakeItem */
817
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeItem00
818
static int tolua_enigma_world_MakeItem00(lua_State* tolua_S)
820
#ifndef TOLUA_RELEASE
821
tolua_Error tolua_err;
823
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
824
!tolua_isnoobj(tolua_S,2,&tolua_err)
830
const char* kind = ((const char*) tolua_tostring(tolua_S,1,0));
832
Item* tolua_ret = (Item*) MakeItem(kind);
833
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Item");
837
#ifndef TOLUA_RELEASE
839
tolua_error(tolua_S,"#ferror in function 'MakeItem'.",&tolua_err);
843
#endif //#ifndef TOLUA_DISABLE
845
/* function: MakeStone */
846
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeStone00
847
static int tolua_enigma_world_MakeStone00(lua_State* tolua_S)
849
#ifndef TOLUA_RELEASE
850
tolua_Error tolua_err;
852
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
853
!tolua_isnoobj(tolua_S,2,&tolua_err)
859
const char* kind = ((const char*) tolua_tostring(tolua_S,1,0));
861
Stone* tolua_ret = (Stone*) MakeStone(kind);
862
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Stone");
866
#ifndef TOLUA_RELEASE
868
tolua_error(tolua_S,"#ferror in function 'MakeStone'.",&tolua_err);
872
#endif //#ifndef TOLUA_DISABLE
874
/* function: GetNamedObject */
875
#ifndef TOLUA_DISABLE_tolua_enigma_world_GetNamedObject00
876
static int tolua_enigma_world_GetNamedObject00(lua_State* tolua_S)
878
#ifndef TOLUA_RELEASE
879
tolua_Error tolua_err;
881
!tolua_isstring(tolua_S,1,0,&tolua_err) ||
882
!tolua_isnoobj(tolua_S,2,&tolua_err)
888
const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
890
Object* tolua_ret = (Object*) GetNamedObject(name);
891
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Object");
895
#ifndef TOLUA_RELEASE
897
tolua_error(tolua_S,"#ferror in function 'GetNamedObject'.",&tolua_err);
901
#endif //#ifndef TOLUA_DISABLE
903
/* function: Resize */
904
#ifndef TOLUA_DISABLE_tolua_enigma_world_Resize00
905
static int tolua_enigma_world_Resize00(lua_State* tolua_S)
907
#ifndef TOLUA_RELEASE
908
tolua_Error tolua_err;
910
!tolua_isnumber(tolua_S,1,0,&tolua_err) ||
911
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
912
!tolua_isnoobj(tolua_S,3,&tolua_err)
918
int w = ((int) tolua_tonumber(tolua_S,1,0));
919
int h = ((int) tolua_tonumber(tolua_S,2,0));
925
#ifndef TOLUA_RELEASE
927
tolua_error(tolua_S,"#ferror in function 'Resize'.",&tolua_err);
931
#endif //#ifndef TOLUA_DISABLE
933
/* function: GetScreen */
934
#ifndef TOLUA_DISABLE_tolua_enigma_video_GetScreen00
935
static int tolua_enigma_video_GetScreen00(lua_State* tolua_S)
937
#ifndef TOLUA_RELEASE
938
tolua_Error tolua_err;
940
!tolua_isnoobj(tolua_S,1,&tolua_err)
947
Screen* tolua_ret = (Screen*) GetScreen();
948
tolua_pushusertype(tolua_S,(void*)tolua_ret,"Screen");
952
#ifndef TOLUA_RELEASE
954
tolua_error(tolua_S,"#ferror in function 'GetScreen'.",&tolua_err);
958
#endif //#ifndef TOLUA_DISABLE
960
/* function: HideMouse */
961
#ifndef TOLUA_DISABLE_tolua_enigma_video_HideMouse00
962
static int tolua_enigma_video_HideMouse00(lua_State* tolua_S)
964
#ifndef TOLUA_RELEASE
965
tolua_Error tolua_err;
967
!tolua_isnoobj(tolua_S,1,&tolua_err)
978
#ifndef TOLUA_RELEASE
980
tolua_error(tolua_S,"#ferror in function 'HideMouse'.",&tolua_err);
984
#endif //#ifndef TOLUA_DISABLE
986
/* function: ShowMouse */
987
#ifndef TOLUA_DISABLE_tolua_enigma_video_ShowMouse00
988
static int tolua_enigma_video_ShowMouse00(lua_State* tolua_S)
990
#ifndef TOLUA_RELEASE
991
tolua_Error tolua_err;
993
!tolua_isnoobj(tolua_S,1,&tolua_err)
1004
#ifndef TOLUA_RELEASE
1006
tolua_error(tolua_S,"#ferror in function 'ShowMouse'.",&tolua_err);
1010
#endif //#ifndef TOLUA_DISABLE
1012
/* function: DefineSoundEffect */
1013
#ifndef TOLUA_DISABLE_tolua_enigma_sound_DefineSoundEffect00
1014
static int tolua_enigma_sound_DefineSoundEffect00(lua_State* tolua_S)
1016
#ifndef TOLUA_RELEASE
1017
tolua_Error tolua_err;
1019
!tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
1020
!tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
1021
!tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
1022
!tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1023
!tolua_isboolean(tolua_S,5,0,&tolua_err) ||
1024
!tolua_isboolean(tolua_S,6,0,&tolua_err) ||
1025
!tolua_isnumber(tolua_S,7,0,&tolua_err) ||
1026
!tolua_isnumber(tolua_S,8,0,&tolua_err) ||
1027
!tolua_isnumber(tolua_S,9,0,&tolua_err) ||
1028
!tolua_isnumber(tolua_S,10,0,&tolua_err) ||
1029
!tolua_isnumber(tolua_S,11,0,&tolua_err) ||
1030
!tolua_isnumber(tolua_S,12,0,&tolua_err) ||
1031
!tolua_iscppstring(tolua_S,13,0,&tolua_err) ||
1032
!tolua_isnoobj(tolua_S,14,&tolua_err)
1038
string table = ((string) tolua_tocppstring(tolua_S,1,0));
1039
string name = ((string) tolua_tocppstring(tolua_S,2,0));
1040
string filename = ((string) tolua_tocppstring(tolua_S,3,0));
1041
double volume = ((double) tolua_tonumber(tolua_S,4,0));
1042
bool loop = ((bool) tolua_toboolean(tolua_S,5,0));
1043
bool global = ((bool) tolua_toboolean(tolua_S,6,0));
1044
int priority = ((int) tolua_tonumber(tolua_S,7,0));
1045
double damp_max = ((double) tolua_tonumber(tolua_S,8,0));
1046
double damp_inc = ((double) tolua_tonumber(tolua_S,9,0));
1047
double damp_mult = ((double) tolua_tonumber(tolua_S,10,0));
1048
double damp_min = ((double) tolua_tonumber(tolua_S,11,0));
1049
double damp_tick = ((double) tolua_tonumber(tolua_S,12,0));
1050
string silence_string = ((string) tolua_tocppstring(tolua_S,13,0));
1052
DefineSoundEffect(table,name,filename,volume,loop,global,priority,damp_max,damp_inc,damp_mult,damp_min,damp_tick,silence_string);
1056
#ifndef TOLUA_RELEASE
1058
tolua_error(tolua_S,"#ferror in function 'DefineSoundEffect'.",&tolua_err);
1062
#endif //#ifndef TOLUA_DISABLE
1064
/* function: SetActiveSoundSet */
1065
#ifndef TOLUA_DISABLE_tolua_enigma_sound_SetActiveSoundSet00
1066
static int tolua_enigma_sound_SetActiveSoundSet00(lua_State* tolua_S)
1068
#ifndef TOLUA_RELEASE
1069
tolua_Error tolua_err;
1071
!tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
1072
!tolua_isnoobj(tolua_S,2,&tolua_err)
1078
string table = ((string) tolua_tocppstring(tolua_S,1,0));
1080
SetActiveSoundSet(table);
1084
#ifndef TOLUA_RELEASE
1086
tolua_error(tolua_S,"#ferror in function 'SetActiveSoundSet'.",&tolua_err);
1090
#endif //#ifndef TOLUA_DISABLE
1093
TOLUA_API int tolua_enigma_open (lua_State* tolua_S)
1095
tolua_open(tolua_S);
1096
tolua_reg_types(tolua_S);
1097
tolua_module(tolua_S,NULL,0);
1098
tolua_beginmodule(tolua_S,NULL);
1099
tolua_module(tolua_S,"enigma",0);
1100
tolua_beginmodule(tolua_S,"enigma");
1101
tolua_constant(tolua_S,"NODIR",NODIR);
1102
tolua_constant(tolua_S,"NORTH",NORTH);
1103
tolua_constant(tolua_S,"EAST",EAST);
1104
tolua_constant(tolua_S,"SOUTH",SOUTH);
1105
tolua_constant(tolua_S,"WEST",WEST);
1106
tolua_function(tolua_S,"GetImage",tolua_enigma_enigma_GetImage00);
1107
tolua_function(tolua_S,"GetImage",tolua_enigma_enigma_GetImage01);
1108
tolua_function(tolua_S,"LoadImage",tolua_enigma_enigma_LoadImage00);
1109
tolua_function(tolua_S,"RegisterImage",tolua_enigma_enigma_RegisterImage00);
1110
tolua_function(tolua_S,"GetFont",tolua_enigma_enigma_GetFont00);
1111
tolua_function(tolua_S,"date",tolua_enigma_enigma_date00);
1112
tolua_endmodule(tolua_S);
1113
tolua_module(tolua_S,"enigma",1);
1114
tolua_beginmodule(tolua_S,"enigma");
1115
tolua_variable(tolua_S,"TwoPlayerGame",tolua_get_enigma_TwoPlayerGame,tolua_set_enigma_TwoPlayerGame);
1116
tolua_variable(tolua_S,"SingleComputerGame",tolua_get_enigma_SingleComputerGame,tolua_set_enigma_SingleComputerGame);
1117
tolua_variable(tolua_S,"ConserveLevel",tolua_get_enigma_ConserveLevel,tolua_set_enigma_ConserveLevel);
1118
tolua_variable(tolua_S,"AllowTogglePlayer",tolua_get_enigma_AllowTogglePlayer,tolua_set_enigma_AllowTogglePlayer);
1119
tolua_variable(tolua_S,"ShowMoves",tolua_get_enigma_ShowMoves,tolua_set_enigma_ShowMoves);
1120
tolua_variable(tolua_S,"Brittleness",tolua_get_enigma_Brittleness,tolua_set_enigma_Brittleness);
1121
tolua_variable(tolua_S,"SlopeForce",tolua_get_enigma_SlopeForce,tolua_set_enigma_SlopeForce);
1122
tolua_variable(tolua_S,"FlatForce",tolua_get_enigma_FlatForce,tolua_set_enigma_FlatForce);
1123
tolua_variable(tolua_S,"FrictionFactor",tolua_get_enigma_FrictionFactor,tolua_set_enigma_FrictionFactor);
1124
tolua_variable(tolua_S,"ElectricForce",tolua_get_enigma_ElectricForce,tolua_set_enigma_ElectricForce);
1125
tolua_variable(tolua_S,"BumperForce",tolua_get_enigma_BumperForce,tolua_set_enigma_BumperForce);
1126
tolua_variable(tolua_S,"MagnetForce",tolua_get_enigma_MagnetForce,tolua_set_enigma_MagnetForce);
1127
tolua_variable(tolua_S,"MagnetRange",tolua_get_enigma_MagnetRange,tolua_set_enigma_MagnetRange);
1128
tolua_variable(tolua_S,"WaterSinkSpeed",tolua_get_enigma_WaterSinkSpeed,tolua_set_enigma_WaterSinkSpeed);
1129
tolua_variable(tolua_S,"SwampSinkSpeed",tolua_get_enigma_SwampSinkSpeed,tolua_set_enigma_SwampSinkSpeed);
1130
tolua_variable(tolua_S,"WormholeForce",tolua_get_enigma_WormholeForce,tolua_set_enigma_WormholeForce);
1131
tolua_variable(tolua_S,"WormholeRange",tolua_get_enigma_WormholeRange,tolua_set_enigma_WormholeRange);
1132
tolua_variable(tolua_S,"HoleForce",tolua_get_enigma_HoleForce,tolua_set_enigma_HoleForce);
1133
tolua_variable(tolua_S,"CreatingPreview",tolua_get_enigma_CreatingPreview,tolua_set_enigma_CreatingPreview);
1134
tolua_function(tolua_S,"AddLevelPack",tolua_enigma_enigma_AddLevelPack00);
1135
tolua_function(tolua_S,"AddZippedLevelPack",tolua_enigma_enigma_AddZippedLevelPack00);
1136
tolua_function(tolua_S,"SetCompatibility",tolua_enigma_enigma_SetCompatibility00);
1137
tolua_endmodule(tolua_S);
1138
tolua_module(tolua_S,"world",0);
1139
tolua_beginmodule(tolua_S,"world");
1140
tolua_cclass(tolua_S,"Object","Object","",NULL);
1141
tolua_beginmodule(tolua_S,"Object");
1142
tolua_endmodule(tolua_S);
1143
tolua_cclass(tolua_S,"Floor","Floor","Object",NULL);
1144
tolua_beginmodule(tolua_S,"Floor");
1145
tolua_endmodule(tolua_S);
1146
tolua_cclass(tolua_S,"Item","Item","Object",NULL);
1147
tolua_beginmodule(tolua_S,"Item");
1148
tolua_endmodule(tolua_S);
1149
tolua_cclass(tolua_S,"Stone","Stone","Object",NULL);
1150
tolua_beginmodule(tolua_S,"Stone");
1151
tolua_endmodule(tolua_S);
1152
tolua_function(tolua_S,"MakeObject",tolua_enigma_world_MakeObject00);
1153
tolua_function(tolua_S,"MakeFloor",tolua_enigma_world_MakeFloor00);
1154
tolua_function(tolua_S,"MakeItem",tolua_enigma_world_MakeItem00);
1155
tolua_function(tolua_S,"MakeStone",tolua_enigma_world_MakeStone00);
1156
tolua_function(tolua_S,"GetNamedObject",tolua_enigma_world_GetNamedObject00);
1157
tolua_function(tolua_S,"Resize",tolua_enigma_world_Resize00);
1158
tolua_endmodule(tolua_S);
1159
tolua_module(tolua_S,"video",0);
1160
tolua_beginmodule(tolua_S,"video");
1161
tolua_function(tolua_S,"GetScreen",tolua_enigma_video_GetScreen00);
1162
tolua_function(tolua_S,"HideMouse",tolua_enigma_video_HideMouse00);
1163
tolua_function(tolua_S,"ShowMouse",tolua_enigma_video_ShowMouse00);
1164
tolua_endmodule(tolua_S);
1165
tolua_module(tolua_S,"sound",0);
1166
tolua_beginmodule(tolua_S,"sound");
1167
tolua_function(tolua_S,"DefineSoundEffect",tolua_enigma_sound_DefineSoundEffect00);
1168
tolua_function(tolua_S,"SetActiveSoundSet",tolua_enigma_sound_SetActiveSoundSet00);
1169
tolua_endmodule(tolua_S);
1170
tolua_endmodule(tolua_S);
1175
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
1176
TOLUA_API int luaopen_enigma (lua_State* tolua_S) {
1177
return tolua_enigma_open(tolua_S);