~ubuntu-branches/ubuntu/saucy/enigma/saucy

« back to all changes in this revision

Viewing changes to src/lua-enigma.cc

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2010-05-26 02:27:26 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100526022726-7tnbf65s6btbibu2
Tags: 1.10~~pre-alpha+r2100-1
* New SVN checkout, shortly after upstream "pre-alpha" release
* Target unstable, to get more testing for enigma
* Remove spelling patches included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
** Lua binding: enigma
 
3
** Generated automatically by tolua++-1.0.93 on Wed Sep  9 01:10:11 2009.
 
4
*/
 
5
 
 
6
#ifndef __cplusplus
 
7
#include "stdlib.h"
 
8
#endif
 
9
#include "string.h"
 
10
 
 
11
#include "tolua++.h"
 
12
 
 
13
/* Exported function */
 
14
TOLUA_API int  tolua_enigma_open (lua_State* tolua_S);
 
15
 
 
16
#include "server.hh"
 
17
#include "world.hh"
 
18
#include "lev/PersistentIndex.hh"
 
19
using namespace enigma;
 
20
using ecl::Surface;
 
21
using ecl::Font;
 
22
using namespace server;
 
23
using namespace lev;
 
24
using namespace enigma;
 
25
#include "video.hh"
 
26
using namespace video;
 
27
using ecl::Screen;
 
28
#include "SoundEffectManager.hh"
 
29
using namespace sound;
 
30
 
 
31
/* function to register type */
 
32
static void tolua_reg_types (lua_State* tolua_S)
 
33
{
 
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");
 
41
}
 
42
 
 
43
/* function: GetImage */
 
44
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetImage00
 
45
static int tolua_enigma_enigma_GetImage00(lua_State* tolua_S)
 
46
{
 
47
#ifndef TOLUA_RELEASE
 
48
 tolua_Error tolua_err;
 
49
 if (
 
50
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
51
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
52
 )
 
53
  goto tolua_lerror;
 
54
 else
 
55
#endif
 
56
 {
 
57
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
58
  {
 
59
   Surface* tolua_ret = (Surface*)  GetImage(name);
 
60
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
 
61
  }
 
62
 }
 
63
 return 1;
 
64
#ifndef TOLUA_RELEASE
 
65
 tolua_lerror:
 
66
 tolua_error(tolua_S,"#ferror in function 'GetImage'.",&tolua_err);
 
67
 return 0;
 
68
#endif
 
69
}
 
70
#endif //#ifndef TOLUA_DISABLE
 
71
 
 
72
/* function: GetImage */
 
73
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetImage01
 
74
static int tolua_enigma_enigma_GetImage01(lua_State* tolua_S)
 
75
{
 
76
 tolua_Error tolua_err;
 
77
 if (
 
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)
 
81
 )
 
82
  goto tolua_lerror;
 
83
 else
 
84
 {
 
85
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
86
  const char* extension = ((const char*)  tolua_tostring(tolua_S,2,0));
 
87
  {
 
88
   Surface* tolua_ret = (Surface*)  GetImage(name,extension);
 
89
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
 
90
  }
 
91
 }
 
92
 return 1;
 
93
tolua_lerror:
 
94
 return tolua_enigma_enigma_GetImage00(tolua_S);
 
95
}
 
96
#endif //#ifndef TOLUA_DISABLE
 
97
 
 
98
/* function: LoadImage */
 
99
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_LoadImage00
 
100
static int tolua_enigma_enigma_LoadImage00(lua_State* tolua_S)
 
101
{
 
102
#ifndef TOLUA_RELEASE
 
103
 tolua_Error tolua_err;
 
104
 if (
 
105
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
106
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
107
 )
 
108
  goto tolua_lerror;
 
109
 else
 
110
#endif
 
111
 {
 
112
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
113
  {
 
114
   Surface* tolua_ret = (Surface*)  LoadImage(name);
 
115
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
 
116
  }
 
117
 }
 
118
 return 1;
 
119
#ifndef TOLUA_RELEASE
 
120
 tolua_lerror:
 
121
 tolua_error(tolua_S,"#ferror in function 'LoadImage'.",&tolua_err);
 
122
 return 0;
 
123
#endif
 
124
}
 
125
#endif //#ifndef TOLUA_DISABLE
 
126
 
 
127
/* function: RegisterImage */
 
128
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_RegisterImage00
 
129
static int tolua_enigma_enigma_RegisterImage00(lua_State* tolua_S)
 
130
{
 
131
#ifndef TOLUA_RELEASE
 
132
 tolua_Error tolua_err;
 
133
 if (
 
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)
 
137
 )
 
138
  goto tolua_lerror;
 
139
 else
 
140
#endif
 
141
 {
 
142
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
143
  Surface* s = ((Surface*)  tolua_tousertype(tolua_S,2,0));
 
144
  {
 
145
   Surface* tolua_ret = (Surface*)  RegisterImage(name,s);
 
146
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Surface");
 
147
  }
 
148
 }
 
149
 return 1;
 
150
#ifndef TOLUA_RELEASE
 
151
 tolua_lerror:
 
152
 tolua_error(tolua_S,"#ferror in function 'RegisterImage'.",&tolua_err);
 
153
 return 0;
 
154
#endif
 
155
}
 
156
#endif //#ifndef TOLUA_DISABLE
 
157
 
 
158
/* function: GetFont */
 
159
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_GetFont00
 
160
static int tolua_enigma_enigma_GetFont00(lua_State* tolua_S)
 
161
{
 
162
#ifndef TOLUA_RELEASE
 
163
 tolua_Error tolua_err;
 
164
 if (
 
165
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
166
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
167
 )
 
168
  goto tolua_lerror;
 
169
 else
 
170
#endif
 
171
 {
 
172
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
173
  {
 
174
   Font* tolua_ret = (Font*)  GetFont(name);
 
175
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Font");
 
176
  }
 
177
 }
 
178
 return 1;
 
179
#ifndef TOLUA_RELEASE
 
180
 tolua_lerror:
 
181
 tolua_error(tolua_S,"#ferror in function 'GetFont'.",&tolua_err);
 
182
 return 0;
 
183
#endif
 
184
}
 
185
#endif //#ifndef TOLUA_DISABLE
 
186
 
 
187
/* function: date */
 
188
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_date00
 
189
static int tolua_enigma_enigma_date00(lua_State* tolua_S)
 
190
{
 
191
#ifndef TOLUA_RELEASE
 
192
 tolua_Error tolua_err;
 
193
 if (
 
194
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
195
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
196
 )
 
197
  goto tolua_lerror;
 
198
 else
 
199
#endif
 
200
 {
 
201
  const char* format = ((const char*)  tolua_tostring(tolua_S,1,0));
 
202
  {
 
203
   const char* tolua_ret = (const char*)  date(format);
 
204
   tolua_pushstring(tolua_S,(const char*)tolua_ret);
 
205
  }
 
206
 }
 
207
 return 1;
 
208
#ifndef TOLUA_RELEASE
 
209
 tolua_lerror:
 
210
 tolua_error(tolua_S,"#ferror in function 'date'.",&tolua_err);
 
211
 return 0;
 
212
#endif
 
213
}
 
214
#endif //#ifndef TOLUA_DISABLE
 
215
 
 
216
/* get function: TwoPlayerGame */
 
217
#ifndef TOLUA_DISABLE_tolua_get_enigma_TwoPlayerGame
 
218
static int tolua_get_enigma_TwoPlayerGame(lua_State* tolua_S)
 
219
{
 
220
  tolua_pushnumber(tolua_S,(lua_Number)TwoPlayerGame);
 
221
 return 1;
 
222
}
 
223
#endif //#ifndef TOLUA_DISABLE
 
224
 
 
225
/* set function: TwoPlayerGame */
 
226
#ifndef TOLUA_DISABLE_tolua_set_enigma_TwoPlayerGame
 
227
static int tolua_set_enigma_TwoPlayerGame(lua_State* tolua_S)
 
228
{
 
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);
 
233
#endif
 
234
  TwoPlayerGame = ((int)  tolua_tonumber(tolua_S,2,0))
 
235
;
 
236
 return 0;
 
237
}
 
238
#endif //#ifndef TOLUA_DISABLE
 
239
 
 
240
/* get function: SingleComputerGame */
 
241
#ifndef TOLUA_DISABLE_tolua_get_enigma_SingleComputerGame
 
242
static int tolua_get_enigma_SingleComputerGame(lua_State* tolua_S)
 
243
{
 
244
  tolua_pushnumber(tolua_S,(lua_Number)SingleComputerGame);
 
245
 return 1;
 
246
}
 
247
#endif //#ifndef TOLUA_DISABLE
 
248
 
 
249
/* set function: SingleComputerGame */
 
250
#ifndef TOLUA_DISABLE_tolua_set_enigma_SingleComputerGame
 
251
static int tolua_set_enigma_SingleComputerGame(lua_State* tolua_S)
 
252
{
 
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);
 
257
#endif
 
258
  SingleComputerGame = ((int)  tolua_tonumber(tolua_S,2,0))
 
259
;
 
260
 return 0;
 
261
}
 
262
#endif //#ifndef TOLUA_DISABLE
 
263
 
 
264
/* get function: ConserveLevel */
 
265
#ifndef TOLUA_DISABLE_tolua_get_enigma_ConserveLevel
 
266
static int tolua_get_enigma_ConserveLevel(lua_State* tolua_S)
 
267
{
 
268
  tolua_pushnumber(tolua_S,(lua_Number)ConserveLevel);
 
269
 return 1;
 
270
}
 
271
#endif //#ifndef TOLUA_DISABLE
 
272
 
 
273
/* set function: ConserveLevel */
 
274
#ifndef TOLUA_DISABLE_tolua_set_enigma_ConserveLevel
 
275
static int tolua_set_enigma_ConserveLevel(lua_State* tolua_S)
 
276
{
 
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);
 
281
#endif
 
282
  ConserveLevel = ((int)  tolua_tonumber(tolua_S,2,0))
 
283
;
 
284
 return 0;
 
285
}
 
286
#endif //#ifndef TOLUA_DISABLE
 
287
 
 
288
/* get function: AllowTogglePlayer */
 
289
#ifndef TOLUA_DISABLE_tolua_get_enigma_AllowTogglePlayer
 
290
static int tolua_get_enigma_AllowTogglePlayer(lua_State* tolua_S)
 
291
{
 
292
  tolua_pushnumber(tolua_S,(lua_Number)AllowTogglePlayer);
 
293
 return 1;
 
294
}
 
295
#endif //#ifndef TOLUA_DISABLE
 
296
 
 
297
/* set function: AllowTogglePlayer */
 
298
#ifndef TOLUA_DISABLE_tolua_set_enigma_AllowTogglePlayer
 
299
static int tolua_set_enigma_AllowTogglePlayer(lua_State* tolua_S)
 
300
{
 
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);
 
305
#endif
 
306
  AllowTogglePlayer = ((int)  tolua_tonumber(tolua_S,2,0))
 
307
;
 
308
 return 0;
 
309
}
 
310
#endif //#ifndef TOLUA_DISABLE
 
311
 
 
312
/* get function: ShowMoves */
 
313
#ifndef TOLUA_DISABLE_tolua_get_enigma_ShowMoves
 
314
static int tolua_get_enigma_ShowMoves(lua_State* tolua_S)
 
315
{
 
316
  tolua_pushnumber(tolua_S,(lua_Number)ShowMoves);
 
317
 return 1;
 
318
}
 
319
#endif //#ifndef TOLUA_DISABLE
 
320
 
 
321
/* set function: ShowMoves */
 
322
#ifndef TOLUA_DISABLE_tolua_set_enigma_ShowMoves
 
323
static int tolua_set_enigma_ShowMoves(lua_State* tolua_S)
 
324
{
 
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);
 
329
#endif
 
330
  ShowMoves = ((int)  tolua_tonumber(tolua_S,2,0))
 
331
;
 
332
 return 0;
 
333
}
 
334
#endif //#ifndef TOLUA_DISABLE
 
335
 
 
336
/* get function: Brittleness */
 
337
#ifndef TOLUA_DISABLE_tolua_get_enigma_Brittleness
 
338
static int tolua_get_enigma_Brittleness(lua_State* tolua_S)
 
339
{
 
340
  tolua_pushnumber(tolua_S,(lua_Number)Brittleness);
 
341
 return 1;
 
342
}
 
343
#endif //#ifndef TOLUA_DISABLE
 
344
 
 
345
/* set function: Brittleness */
 
346
#ifndef TOLUA_DISABLE_tolua_set_enigma_Brittleness
 
347
static int tolua_set_enigma_Brittleness(lua_State* tolua_S)
 
348
{
 
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);
 
353
#endif
 
354
  Brittleness = ((double)  tolua_tonumber(tolua_S,2,0))
 
355
;
 
356
 return 0;
 
357
}
 
358
#endif //#ifndef TOLUA_DISABLE
 
359
 
 
360
/* get function: SlopeForce */
 
361
#ifndef TOLUA_DISABLE_tolua_get_enigma_SlopeForce
 
362
static int tolua_get_enigma_SlopeForce(lua_State* tolua_S)
 
363
{
 
364
  tolua_pushnumber(tolua_S,(lua_Number)SlopeForce);
 
365
 return 1;
 
366
}
 
367
#endif //#ifndef TOLUA_DISABLE
 
368
 
 
369
/* set function: SlopeForce */
 
370
#ifndef TOLUA_DISABLE_tolua_set_enigma_SlopeForce
 
371
static int tolua_set_enigma_SlopeForce(lua_State* tolua_S)
 
372
{
 
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);
 
377
#endif
 
378
  SlopeForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
379
;
 
380
 return 0;
 
381
}
 
382
#endif //#ifndef TOLUA_DISABLE
 
383
 
 
384
/* get function: FlatForce */
 
385
#ifndef TOLUA_DISABLE_tolua_get_enigma_FlatForce
 
386
static int tolua_get_enigma_FlatForce(lua_State* tolua_S)
 
387
{
 
388
  tolua_pushnumber(tolua_S,(lua_Number)FlatForce);
 
389
 return 1;
 
390
}
 
391
#endif //#ifndef TOLUA_DISABLE
 
392
 
 
393
/* set function: FlatForce */
 
394
#ifndef TOLUA_DISABLE_tolua_set_enigma_FlatForce
 
395
static int tolua_set_enigma_FlatForce(lua_State* tolua_S)
 
396
{
 
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);
 
401
#endif
 
402
  FlatForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
403
;
 
404
 return 0;
 
405
}
 
406
#endif //#ifndef TOLUA_DISABLE
 
407
 
 
408
/* get function: FrictionFactor */
 
409
#ifndef TOLUA_DISABLE_tolua_get_enigma_FrictionFactor
 
410
static int tolua_get_enigma_FrictionFactor(lua_State* tolua_S)
 
411
{
 
412
  tolua_pushnumber(tolua_S,(lua_Number)FrictionFactor);
 
413
 return 1;
 
414
}
 
415
#endif //#ifndef TOLUA_DISABLE
 
416
 
 
417
/* set function: FrictionFactor */
 
418
#ifndef TOLUA_DISABLE_tolua_set_enigma_FrictionFactor
 
419
static int tolua_set_enigma_FrictionFactor(lua_State* tolua_S)
 
420
{
 
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);
 
425
#endif
 
426
  FrictionFactor = ((double)  tolua_tonumber(tolua_S,2,0))
 
427
;
 
428
 return 0;
 
429
}
 
430
#endif //#ifndef TOLUA_DISABLE
 
431
 
 
432
/* get function: ElectricForce */
 
433
#ifndef TOLUA_DISABLE_tolua_get_enigma_ElectricForce
 
434
static int tolua_get_enigma_ElectricForce(lua_State* tolua_S)
 
435
{
 
436
  tolua_pushnumber(tolua_S,(lua_Number)ElectricForce);
 
437
 return 1;
 
438
}
 
439
#endif //#ifndef TOLUA_DISABLE
 
440
 
 
441
/* set function: ElectricForce */
 
442
#ifndef TOLUA_DISABLE_tolua_set_enigma_ElectricForce
 
443
static int tolua_set_enigma_ElectricForce(lua_State* tolua_S)
 
444
{
 
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);
 
449
#endif
 
450
  ElectricForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
451
;
 
452
 return 0;
 
453
}
 
454
#endif //#ifndef TOLUA_DISABLE
 
455
 
 
456
/* get function: BumperForce */
 
457
#ifndef TOLUA_DISABLE_tolua_get_enigma_BumperForce
 
458
static int tolua_get_enigma_BumperForce(lua_State* tolua_S)
 
459
{
 
460
  tolua_pushnumber(tolua_S,(lua_Number)BumperForce);
 
461
 return 1;
 
462
}
 
463
#endif //#ifndef TOLUA_DISABLE
 
464
 
 
465
/* set function: BumperForce */
 
466
#ifndef TOLUA_DISABLE_tolua_set_enigma_BumperForce
 
467
static int tolua_set_enigma_BumperForce(lua_State* tolua_S)
 
468
{
 
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);
 
473
#endif
 
474
  BumperForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
475
;
 
476
 return 0;
 
477
}
 
478
#endif //#ifndef TOLUA_DISABLE
 
479
 
 
480
/* get function: MagnetForce */
 
481
#ifndef TOLUA_DISABLE_tolua_get_enigma_MagnetForce
 
482
static int tolua_get_enigma_MagnetForce(lua_State* tolua_S)
 
483
{
 
484
  tolua_pushnumber(tolua_S,(lua_Number)MagnetForce);
 
485
 return 1;
 
486
}
 
487
#endif //#ifndef TOLUA_DISABLE
 
488
 
 
489
/* set function: MagnetForce */
 
490
#ifndef TOLUA_DISABLE_tolua_set_enigma_MagnetForce
 
491
static int tolua_set_enigma_MagnetForce(lua_State* tolua_S)
 
492
{
 
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);
 
497
#endif
 
498
  MagnetForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
499
;
 
500
 return 0;
 
501
}
 
502
#endif //#ifndef TOLUA_DISABLE
 
503
 
 
504
/* get function: MagnetRange */
 
505
#ifndef TOLUA_DISABLE_tolua_get_enigma_MagnetRange
 
506
static int tolua_get_enigma_MagnetRange(lua_State* tolua_S)
 
507
{
 
508
  tolua_pushnumber(tolua_S,(lua_Number)MagnetRange);
 
509
 return 1;
 
510
}
 
511
#endif //#ifndef TOLUA_DISABLE
 
512
 
 
513
/* set function: MagnetRange */
 
514
#ifndef TOLUA_DISABLE_tolua_set_enigma_MagnetRange
 
515
static int tolua_set_enigma_MagnetRange(lua_State* tolua_S)
 
516
{
 
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);
 
521
#endif
 
522
  MagnetRange = ((double)  tolua_tonumber(tolua_S,2,0))
 
523
;
 
524
 return 0;
 
525
}
 
526
#endif //#ifndef TOLUA_DISABLE
 
527
 
 
528
/* get function: WaterSinkSpeed */
 
529
#ifndef TOLUA_DISABLE_tolua_get_enigma_WaterSinkSpeed
 
530
static int tolua_get_enigma_WaterSinkSpeed(lua_State* tolua_S)
 
531
{
 
532
  tolua_pushnumber(tolua_S,(lua_Number)WaterSinkSpeed);
 
533
 return 1;
 
534
}
 
535
#endif //#ifndef TOLUA_DISABLE
 
536
 
 
537
/* set function: WaterSinkSpeed */
 
538
#ifndef TOLUA_DISABLE_tolua_set_enigma_WaterSinkSpeed
 
539
static int tolua_set_enigma_WaterSinkSpeed(lua_State* tolua_S)
 
540
{
 
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);
 
545
#endif
 
546
  WaterSinkSpeed = ((double)  tolua_tonumber(tolua_S,2,0))
 
547
;
 
548
 return 0;
 
549
}
 
550
#endif //#ifndef TOLUA_DISABLE
 
551
 
 
552
/* get function: SwampSinkSpeed */
 
553
#ifndef TOLUA_DISABLE_tolua_get_enigma_SwampSinkSpeed
 
554
static int tolua_get_enigma_SwampSinkSpeed(lua_State* tolua_S)
 
555
{
 
556
  tolua_pushnumber(tolua_S,(lua_Number)SwampSinkSpeed);
 
557
 return 1;
 
558
}
 
559
#endif //#ifndef TOLUA_DISABLE
 
560
 
 
561
/* set function: SwampSinkSpeed */
 
562
#ifndef TOLUA_DISABLE_tolua_set_enigma_SwampSinkSpeed
 
563
static int tolua_set_enigma_SwampSinkSpeed(lua_State* tolua_S)
 
564
{
 
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);
 
569
#endif
 
570
  SwampSinkSpeed = ((double)  tolua_tonumber(tolua_S,2,0))
 
571
;
 
572
 return 0;
 
573
}
 
574
#endif //#ifndef TOLUA_DISABLE
 
575
 
 
576
/* get function: WormholeForce */
 
577
#ifndef TOLUA_DISABLE_tolua_get_enigma_WormholeForce
 
578
static int tolua_get_enigma_WormholeForce(lua_State* tolua_S)
 
579
{
 
580
  tolua_pushnumber(tolua_S,(lua_Number)WormholeForce);
 
581
 return 1;
 
582
}
 
583
#endif //#ifndef TOLUA_DISABLE
 
584
 
 
585
/* set function: WormholeForce */
 
586
#ifndef TOLUA_DISABLE_tolua_set_enigma_WormholeForce
 
587
static int tolua_set_enigma_WormholeForce(lua_State* tolua_S)
 
588
{
 
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);
 
593
#endif
 
594
  WormholeForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
595
;
 
596
 return 0;
 
597
}
 
598
#endif //#ifndef TOLUA_DISABLE
 
599
 
 
600
/* get function: WormholeRange */
 
601
#ifndef TOLUA_DISABLE_tolua_get_enigma_WormholeRange
 
602
static int tolua_get_enigma_WormholeRange(lua_State* tolua_S)
 
603
{
 
604
  tolua_pushnumber(tolua_S,(lua_Number)WormholeRange);
 
605
 return 1;
 
606
}
 
607
#endif //#ifndef TOLUA_DISABLE
 
608
 
 
609
/* set function: WormholeRange */
 
610
#ifndef TOLUA_DISABLE_tolua_set_enigma_WormholeRange
 
611
static int tolua_set_enigma_WormholeRange(lua_State* tolua_S)
 
612
{
 
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);
 
617
#endif
 
618
  WormholeRange = ((double)  tolua_tonumber(tolua_S,2,0))
 
619
;
 
620
 return 0;
 
621
}
 
622
#endif //#ifndef TOLUA_DISABLE
 
623
 
 
624
/* get function: HoleForce */
 
625
#ifndef TOLUA_DISABLE_tolua_get_enigma_HoleForce
 
626
static int tolua_get_enigma_HoleForce(lua_State* tolua_S)
 
627
{
 
628
  tolua_pushnumber(tolua_S,(lua_Number)HoleForce);
 
629
 return 1;
 
630
}
 
631
#endif //#ifndef TOLUA_DISABLE
 
632
 
 
633
/* set function: HoleForce */
 
634
#ifndef TOLUA_DISABLE_tolua_set_enigma_HoleForce
 
635
static int tolua_set_enigma_HoleForce(lua_State* tolua_S)
 
636
{
 
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);
 
641
#endif
 
642
  HoleForce = ((double)  tolua_tonumber(tolua_S,2,0))
 
643
;
 
644
 return 0;
 
645
}
 
646
#endif //#ifndef TOLUA_DISABLE
 
647
 
 
648
/* get function: CreatingPreview */
 
649
#ifndef TOLUA_DISABLE_tolua_get_enigma_CreatingPreview
 
650
static int tolua_get_enigma_CreatingPreview(lua_State* tolua_S)
 
651
{
 
652
  tolua_pushboolean(tolua_S,(bool)CreatingPreview);
 
653
 return 1;
 
654
}
 
655
#endif //#ifndef TOLUA_DISABLE
 
656
 
 
657
/* set function: CreatingPreview */
 
658
#ifndef TOLUA_DISABLE_tolua_set_enigma_CreatingPreview
 
659
static int tolua_set_enigma_CreatingPreview(lua_State* tolua_S)
 
660
{
 
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);
 
665
#endif
 
666
  CreatingPreview = ((bool)  tolua_toboolean(tolua_S,2,0))
 
667
;
 
668
 return 0;
 
669
}
 
670
#endif //#ifndef TOLUA_DISABLE
 
671
 
 
672
/* function: AddLevelPack */
 
673
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_AddLevelPack00
 
674
static int tolua_enigma_enigma_AddLevelPack00(lua_State* tolua_S)
 
675
{
 
676
#ifndef TOLUA_RELEASE
 
677
 tolua_Error tolua_err;
 
678
 if (
 
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)
 
682
 )
 
683
  goto tolua_lerror;
 
684
 else
 
685
#endif
 
686
 {
 
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));
 
689
  {
 
690
   AddLevelPack(init_file,name);
 
691
  }
 
692
 }
 
693
 return 0;
 
694
#ifndef TOLUA_RELEASE
 
695
 tolua_lerror:
 
696
 tolua_error(tolua_S,"#ferror in function 'AddLevelPack'.",&tolua_err);
 
697
 return 0;
 
698
#endif
 
699
}
 
700
#endif //#ifndef TOLUA_DISABLE
 
701
 
 
702
/* function: AddZippedLevelPack */
 
703
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_AddZippedLevelPack00
 
704
static int tolua_enigma_enigma_AddZippedLevelPack00(lua_State* tolua_S)
 
705
{
 
706
#ifndef TOLUA_RELEASE
 
707
 tolua_Error tolua_err;
 
708
 if (
 
709
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
710
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
711
 )
 
712
  goto tolua_lerror;
 
713
 else
 
714
#endif
 
715
 {
 
716
  const char* zipfile = ((const char*)  tolua_tostring(tolua_S,1,0));
 
717
  {
 
718
   AddZippedLevelPack(zipfile);
 
719
  }
 
720
 }
 
721
 return 0;
 
722
#ifndef TOLUA_RELEASE
 
723
 tolua_lerror:
 
724
 tolua_error(tolua_S,"#ferror in function 'AddZippedLevelPack'.",&tolua_err);
 
725
 return 0;
 
726
#endif
 
727
}
 
728
#endif //#ifndef TOLUA_DISABLE
 
729
 
 
730
/* function: SetCompatibility */
 
731
#ifndef TOLUA_DISABLE_tolua_enigma_enigma_SetCompatibility00
 
732
static int tolua_enigma_enigma_SetCompatibility00(lua_State* tolua_S)
 
733
{
 
734
#ifndef TOLUA_RELEASE
 
735
 tolua_Error tolua_err;
 
736
 if (
 
737
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
738
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
739
 )
 
740
  goto tolua_lerror;
 
741
 else
 
742
#endif
 
743
 {
 
744
  const char* version = ((const char*)  tolua_tostring(tolua_S,1,0));
 
745
  {
 
746
   SetCompatibility(version);
 
747
  }
 
748
 }
 
749
 return 0;
 
750
#ifndef TOLUA_RELEASE
 
751
 tolua_lerror:
 
752
 tolua_error(tolua_S,"#ferror in function 'SetCompatibility'.",&tolua_err);
 
753
 return 0;
 
754
#endif
 
755
}
 
756
#endif //#ifndef TOLUA_DISABLE
 
757
 
 
758
/* function: MakeObject */
 
759
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeObject00
 
760
static int tolua_enigma_world_MakeObject00(lua_State* tolua_S)
 
761
{
 
762
#ifndef TOLUA_RELEASE
 
763
 tolua_Error tolua_err;
 
764
 if (
 
765
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
766
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
767
 )
 
768
  goto tolua_lerror;
 
769
 else
 
770
#endif
 
771
 {
 
772
  const char* kind = ((const char*)  tolua_tostring(tolua_S,1,0));
 
773
  {
 
774
   Object* tolua_ret = (Object*)  MakeObject(kind);
 
775
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Object");
 
776
  }
 
777
 }
 
778
 return 1;
 
779
#ifndef TOLUA_RELEASE
 
780
 tolua_lerror:
 
781
 tolua_error(tolua_S,"#ferror in function 'MakeObject'.",&tolua_err);
 
782
 return 0;
 
783
#endif
 
784
}
 
785
#endif //#ifndef TOLUA_DISABLE
 
786
 
 
787
/* function: MakeFloor */
 
788
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeFloor00
 
789
static int tolua_enigma_world_MakeFloor00(lua_State* tolua_S)
 
790
{
 
791
#ifndef TOLUA_RELEASE
 
792
 tolua_Error tolua_err;
 
793
 if (
 
794
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
795
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
796
 )
 
797
  goto tolua_lerror;
 
798
 else
 
799
#endif
 
800
 {
 
801
  const char* kind = ((const char*)  tolua_tostring(tolua_S,1,0));
 
802
  {
 
803
   Floor* tolua_ret = (Floor*)  MakeFloor(kind);
 
804
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Floor");
 
805
  }
 
806
 }
 
807
 return 1;
 
808
#ifndef TOLUA_RELEASE
 
809
 tolua_lerror:
 
810
 tolua_error(tolua_S,"#ferror in function 'MakeFloor'.",&tolua_err);
 
811
 return 0;
 
812
#endif
 
813
}
 
814
#endif //#ifndef TOLUA_DISABLE
 
815
 
 
816
/* function: MakeItem */
 
817
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeItem00
 
818
static int tolua_enigma_world_MakeItem00(lua_State* tolua_S)
 
819
{
 
820
#ifndef TOLUA_RELEASE
 
821
 tolua_Error tolua_err;
 
822
 if (
 
823
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
824
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
825
 )
 
826
  goto tolua_lerror;
 
827
 else
 
828
#endif
 
829
 {
 
830
  const char* kind = ((const char*)  tolua_tostring(tolua_S,1,0));
 
831
  {
 
832
   Item* tolua_ret = (Item*)  MakeItem(kind);
 
833
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Item");
 
834
  }
 
835
 }
 
836
 return 1;
 
837
#ifndef TOLUA_RELEASE
 
838
 tolua_lerror:
 
839
 tolua_error(tolua_S,"#ferror in function 'MakeItem'.",&tolua_err);
 
840
 return 0;
 
841
#endif
 
842
}
 
843
#endif //#ifndef TOLUA_DISABLE
 
844
 
 
845
/* function: MakeStone */
 
846
#ifndef TOLUA_DISABLE_tolua_enigma_world_MakeStone00
 
847
static int tolua_enigma_world_MakeStone00(lua_State* tolua_S)
 
848
{
 
849
#ifndef TOLUA_RELEASE
 
850
 tolua_Error tolua_err;
 
851
 if (
 
852
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
853
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
854
 )
 
855
  goto tolua_lerror;
 
856
 else
 
857
#endif
 
858
 {
 
859
  const char* kind = ((const char*)  tolua_tostring(tolua_S,1,0));
 
860
  {
 
861
   Stone* tolua_ret = (Stone*)  MakeStone(kind);
 
862
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Stone");
 
863
  }
 
864
 }
 
865
 return 1;
 
866
#ifndef TOLUA_RELEASE
 
867
 tolua_lerror:
 
868
 tolua_error(tolua_S,"#ferror in function 'MakeStone'.",&tolua_err);
 
869
 return 0;
 
870
#endif
 
871
}
 
872
#endif //#ifndef TOLUA_DISABLE
 
873
 
 
874
/* function: GetNamedObject */
 
875
#ifndef TOLUA_DISABLE_tolua_enigma_world_GetNamedObject00
 
876
static int tolua_enigma_world_GetNamedObject00(lua_State* tolua_S)
 
877
{
 
878
#ifndef TOLUA_RELEASE
 
879
 tolua_Error tolua_err;
 
880
 if (
 
881
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
 
882
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
883
 )
 
884
  goto tolua_lerror;
 
885
 else
 
886
#endif
 
887
 {
 
888
  const char* name = ((const char*)  tolua_tostring(tolua_S,1,0));
 
889
  {
 
890
   Object* tolua_ret = (Object*)  GetNamedObject(name);
 
891
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Object");
 
892
  }
 
893
 }
 
894
 return 1;
 
895
#ifndef TOLUA_RELEASE
 
896
 tolua_lerror:
 
897
 tolua_error(tolua_S,"#ferror in function 'GetNamedObject'.",&tolua_err);
 
898
 return 0;
 
899
#endif
 
900
}
 
901
#endif //#ifndef TOLUA_DISABLE
 
902
 
 
903
/* function: Resize */
 
904
#ifndef TOLUA_DISABLE_tolua_enigma_world_Resize00
 
905
static int tolua_enigma_world_Resize00(lua_State* tolua_S)
 
906
{
 
907
#ifndef TOLUA_RELEASE
 
908
 tolua_Error tolua_err;
 
909
 if (
 
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)
 
913
 )
 
914
  goto tolua_lerror;
 
915
 else
 
916
#endif
 
917
 {
 
918
  int w = ((int)  tolua_tonumber(tolua_S,1,0));
 
919
  int h = ((int)  tolua_tonumber(tolua_S,2,0));
 
920
  {
 
921
   Resize(w,h);
 
922
  }
 
923
 }
 
924
 return 0;
 
925
#ifndef TOLUA_RELEASE
 
926
 tolua_lerror:
 
927
 tolua_error(tolua_S,"#ferror in function 'Resize'.",&tolua_err);
 
928
 return 0;
 
929
#endif
 
930
}
 
931
#endif //#ifndef TOLUA_DISABLE
 
932
 
 
933
/* function: GetScreen */
 
934
#ifndef TOLUA_DISABLE_tolua_enigma_video_GetScreen00
 
935
static int tolua_enigma_video_GetScreen00(lua_State* tolua_S)
 
936
{
 
937
#ifndef TOLUA_RELEASE
 
938
 tolua_Error tolua_err;
 
939
 if (
 
940
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 
941
 )
 
942
  goto tolua_lerror;
 
943
 else
 
944
#endif
 
945
 {
 
946
  {
 
947
   Screen* tolua_ret = (Screen*)  GetScreen();
 
948
   tolua_pushusertype(tolua_S,(void*)tolua_ret,"Screen");
 
949
  }
 
950
 }
 
951
 return 1;
 
952
#ifndef TOLUA_RELEASE
 
953
 tolua_lerror:
 
954
 tolua_error(tolua_S,"#ferror in function 'GetScreen'.",&tolua_err);
 
955
 return 0;
 
956
#endif
 
957
}
 
958
#endif //#ifndef TOLUA_DISABLE
 
959
 
 
960
/* function: HideMouse */
 
961
#ifndef TOLUA_DISABLE_tolua_enigma_video_HideMouse00
 
962
static int tolua_enigma_video_HideMouse00(lua_State* tolua_S)
 
963
{
 
964
#ifndef TOLUA_RELEASE
 
965
 tolua_Error tolua_err;
 
966
 if (
 
967
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 
968
 )
 
969
  goto tolua_lerror;
 
970
 else
 
971
#endif
 
972
 {
 
973
  {
 
974
   HideMouse();
 
975
  }
 
976
 }
 
977
 return 0;
 
978
#ifndef TOLUA_RELEASE
 
979
 tolua_lerror:
 
980
 tolua_error(tolua_S,"#ferror in function 'HideMouse'.",&tolua_err);
 
981
 return 0;
 
982
#endif
 
983
}
 
984
#endif //#ifndef TOLUA_DISABLE
 
985
 
 
986
/* function: ShowMouse */
 
987
#ifndef TOLUA_DISABLE_tolua_enigma_video_ShowMouse00
 
988
static int tolua_enigma_video_ShowMouse00(lua_State* tolua_S)
 
989
{
 
990
#ifndef TOLUA_RELEASE
 
991
 tolua_Error tolua_err;
 
992
 if (
 
993
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 
994
 )
 
995
  goto tolua_lerror;
 
996
 else
 
997
#endif
 
998
 {
 
999
  {
 
1000
   ShowMouse();
 
1001
  }
 
1002
 }
 
1003
 return 0;
 
1004
#ifndef TOLUA_RELEASE
 
1005
 tolua_lerror:
 
1006
 tolua_error(tolua_S,"#ferror in function 'ShowMouse'.",&tolua_err);
 
1007
 return 0;
 
1008
#endif
 
1009
}
 
1010
#endif //#ifndef TOLUA_DISABLE
 
1011
 
 
1012
/* function: DefineSoundEffect */
 
1013
#ifndef TOLUA_DISABLE_tolua_enigma_sound_DefineSoundEffect00
 
1014
static int tolua_enigma_sound_DefineSoundEffect00(lua_State* tolua_S)
 
1015
{
 
1016
#ifndef TOLUA_RELEASE
 
1017
 tolua_Error tolua_err;
 
1018
 if (
 
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)
 
1033
 )
 
1034
  goto tolua_lerror;
 
1035
 else
 
1036
#endif
 
1037
 {
 
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));
 
1051
  {
 
1052
   DefineSoundEffect(table,name,filename,volume,loop,global,priority,damp_max,damp_inc,damp_mult,damp_min,damp_tick,silence_string);
 
1053
  }
 
1054
 }
 
1055
 return 0;
 
1056
#ifndef TOLUA_RELEASE
 
1057
 tolua_lerror:
 
1058
 tolua_error(tolua_S,"#ferror in function 'DefineSoundEffect'.",&tolua_err);
 
1059
 return 0;
 
1060
#endif
 
1061
}
 
1062
#endif //#ifndef TOLUA_DISABLE
 
1063
 
 
1064
/* function: SetActiveSoundSet */
 
1065
#ifndef TOLUA_DISABLE_tolua_enigma_sound_SetActiveSoundSet00
 
1066
static int tolua_enigma_sound_SetActiveSoundSet00(lua_State* tolua_S)
 
1067
{
 
1068
#ifndef TOLUA_RELEASE
 
1069
 tolua_Error tolua_err;
 
1070
 if (
 
1071
     !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 
1072
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 
1073
 )
 
1074
  goto tolua_lerror;
 
1075
 else
 
1076
#endif
 
1077
 {
 
1078
  string table = ((string)  tolua_tocppstring(tolua_S,1,0));
 
1079
  {
 
1080
   SetActiveSoundSet(table);
 
1081
  }
 
1082
 }
 
1083
 return 0;
 
1084
#ifndef TOLUA_RELEASE
 
1085
 tolua_lerror:
 
1086
 tolua_error(tolua_S,"#ferror in function 'SetActiveSoundSet'.",&tolua_err);
 
1087
 return 0;
 
1088
#endif
 
1089
}
 
1090
#endif //#ifndef TOLUA_DISABLE
 
1091
 
 
1092
/* Open function */
 
1093
TOLUA_API int tolua_enigma_open (lua_State* tolua_S)
 
1094
{
 
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);
 
1171
 return 1;
 
1172
}
 
1173
 
 
1174
 
 
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);
 
1178
};
 
1179
#endif
 
1180