1 #ifndef __LUA_OBJECTS_H
2 #define __LUA_OBJECTS_H
3 
4 /*
5 LUA_OBJECTS.H
6 
7 	Copyright (C) 2008 by Gregory Smith
8 
9 	This program is free software; you can redistribute it and/or modify
10 	it under the terms of the GNU General Public License as published by
11 	the Free Software Foundation; either version 3 of the License, or
12 	(at your option) any later version.
13 
14 	This program is distributed in the hope that it will be useful,
15 	but WITHOUT ANY WARRANTY; without even the implied warranty of
16 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 	GNU General Public License for more details.
18 
19 	This license is contained in the file "COPYING",
20 	which is included with this source code; it is available online at
21 	http://www.gnu.org/licenses/gpl.html
22 
23 	Implements Lua map objects classes
24 */
25 
26 #include "cseries.h"
27 
28 #ifdef HAVE_LUA
29 extern "C"
30 {
31 #include "lua.h"
32 #include "lauxlib.h"
33 #include "lualib.h"
34 }
35 
36 #include "items.h"
37 #include "map.h"
38 #include "lua_templates.h"
39 
40 extern char Lua_Effect_Name[]; // "effect"
41 typedef L_Class<Lua_Effect_Name> Lua_Effect;
42 
43 extern char Lua_Effects_Name[]; // "Effects"
44 typedef L_Container<Lua_Effects_Name, Lua_Effect> Lua_Effects;
45 
46 extern char Lua_EffectType_Name[]; // "effect_type"
47 typedef L_Enum<Lua_EffectType_Name> Lua_EffectType;
48 
49 extern char Lua_EffectTypes_Name[]; // "EffectTypes"
50 typedef L_EnumContainer<Lua_EffectTypes_Name, Lua_EffectType> Lua_EffectTypes;
51 
52 extern char Lua_Item_Name[]; // "item"
53 typedef L_Class<Lua_Item_Name> Lua_Item;
54 
55 extern char Lua_Items_Name[]; // "Items"
56 typedef L_Container<Lua_Items_Name, Lua_Item> Lua_Items;
57 
58 extern char Lua_ItemType_Name[]; // "item_type"
59 typedef L_Enum<Lua_ItemType_Name> Lua_ItemType;
60 
61 extern char Lua_ItemTypes_Name[]; // "ItemTypes"
62 typedef L_EnumContainer<Lua_ItemTypes_Name, Lua_ItemType> Lua_ItemTypes;
63 
64 extern char Lua_Scenery_Name[]; // "scenery"
65 typedef L_Class<Lua_Scenery_Name> Lua_Scenery;
66 
67 extern char Lua_Sceneries_Name[]; // "Scenery"
68 typedef L_Container<Lua_Sceneries_Name, Lua_Scenery> Lua_Sceneries;
69 
70 extern char Lua_Sound_Name[]; // "sound"
71 typedef L_LazyEnum<Lua_Sound_Name> Lua_Sound;
72 
73 extern char Lua_Sounds_Name[]; // "Sounds"
74 typedef L_EnumContainer<Lua_Sounds_Name, Lua_Sound> Lua_Sounds;
75 
76 int Lua_Objects_register(lua_State *L);
77 
78 #endif
79 
80 #endif
81