1 /* 2 LUA_SAVED_OBJECTS.H 3 4 Copyright (C) 2010 by Gregory Smith 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 This license is contained in the file "COPYING", 17 which is included with this source code; it is available online at 18 http://www.gnu.org/licenses/gpl.html 19 20 Implements Lua map objects classes 21 */ 22 23 #ifndef __LUA_SAVED_OBJECTS_H 24 #define __LUA_SAVED_OBJECTS_H 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 "map.h" 37 #include "lua_templates.h" 38 39 extern char Lua_Goal_Name[]; // "goal" 40 typedef L_Class<Lua_Goal_Name> Lua_Goal; 41 42 extern char Lua_Goals_Name[]; // "Goals" 43 typedef L_Container<Lua_Goals_Name, Lua_Goal> Lua_Goals; 44 45 extern char Lua_ItemStart_Name[]; // "item_start" 46 typedef L_Class<Lua_ItemStart_Name> Lua_ItemStart; 47 48 extern char Lua_ItemStarts_Name[]; // "ItemStarts" 49 typedef L_Container<Lua_ItemStarts_Name, Lua_ItemStart> Lua_ItemStarts; 50 51 extern char Lua_MonsterStart_Name[]; // "monster_start" 52 typedef L_Class<Lua_MonsterStart_Name> Lua_MonsterStart; 53 54 extern char Lua_MonsterStarts_Name[]; // "MonsterStarts" 55 typedef L_Container<Lua_MonsterStarts_Name, Lua_MonsterStart> Lua_MonsterStarts; 56 57 extern char Lua_PlayerStart_Name[]; // "player_start" 58 typedef L_Class<Lua_PlayerStart_Name> Lua_PlayerStart; 59 60 extern char Lua_PlayerStarts_Name[]; // "PlayerStarts"; 61 typedef L_Container<Lua_PlayerStarts_Name, Lua_PlayerStart> Lua_PlayerStarts; 62 63 extern char Lua_SoundObject_Name[]; // "sound_object" 64 typedef L_Class<Lua_SoundObject_Name> Lua_SoundObject; 65 66 extern char Lua_SoundObjects_Name[]; // "SoundObjects" 67 typedef L_Container<Lua_SoundObjects_Name, Lua_SoundObject> Lua_SoundObjects; 68 69 int Lua_Saved_Objects_register(lua_State* L); 70 71 #endif 72 73 #endif 74