2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
2016-05-18 00:42:11 +00:00
|
|
|
// Copyright (C) 2012-2016 by John "JTE" Muniz.
|
2023-03-31 12:53:31 +00:00
|
|
|
// Copyright (C) 2012-2023 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file lua_libs.h
|
|
|
|
/// \brief libraries for Lua scripting
|
|
|
|
|
|
|
|
extern lua_State *gL;
|
|
|
|
|
2021-08-18 18:58:13 +00:00
|
|
|
extern boolean mousegrabbedbylua;
|
2023-10-27 15:34:29 +00:00
|
|
|
extern boolean ignoregameinputs;
|
2021-08-18 18:58:13 +00:00
|
|
|
|
2020-12-05 10:02:06 +00:00
|
|
|
#define MUTABLE_TAGS
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
#define LREG_VALID "VALID_USERDATA"
|
|
|
|
#define LREG_EXTVARS "LUA_VARS"
|
|
|
|
#define LREG_STATEACTION "STATE_ACTION"
|
|
|
|
#define LREG_ACTIONS "MOBJ_ACTION"
|
2020-10-03 14:31:04 +00:00
|
|
|
#define LREG_METATABLES "METATABLES"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
#define META_STATE "STATE_T*"
|
|
|
|
#define META_MOBJINFO "MOBJINFO_T*"
|
|
|
|
#define META_SFXINFO "SFXINFO_T*"
|
2020-02-15 08:18:41 +00:00
|
|
|
#define META_SKINCOLOR "SKINCOLOR_T*"
|
2020-05-24 17:36:20 +00:00
|
|
|
#define META_COLORRAMP "SKINCOLOR_T*RAMP"
|
2019-11-07 06:11:16 +00:00
|
|
|
#define META_SPRITEINFO "SPRITEINFO_T*"
|
2019-11-08 02:42:14 +00:00
|
|
|
#define META_PIVOTLIST "SPRITEFRAMEPIVOT_T[]"
|
|
|
|
#define META_FRAMEPIVOT "SPRITEFRAMEPIVOT_T*"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2020-12-05 10:02:06 +00:00
|
|
|
#define META_TAGLIST "TAGLIST"
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
#define META_MOBJ "MOBJ_T*"
|
|
|
|
#define META_MAPTHING "MAPTHING_T*"
|
|
|
|
|
|
|
|
#define META_PLAYER "PLAYER_T*"
|
|
|
|
#define META_TICCMD "TICCMD_T*"
|
|
|
|
#define META_SKIN "SKIN_T*"
|
|
|
|
#define META_POWERS "PLAYER_T*POWERS"
|
2014-08-04 03:49:33 +00:00
|
|
|
#define META_SOUNDSID "SKIN_T*SOUNDSID"
|
2020-11-08 04:53:46 +00:00
|
|
|
#define META_SKINSPRITES "SKIN_T*SPRITES"
|
|
|
|
#define META_SKINSPRITESLIST "SKIN_T*SPRITES[]"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
#define META_VERTEX "VERTEX_T*"
|
|
|
|
#define META_LINE "LINE_T*"
|
|
|
|
#define META_SIDE "SIDE_T*"
|
|
|
|
#define META_SUBSECTOR "SUBSECTOR_T*"
|
|
|
|
#define META_SECTOR "SECTOR_T*"
|
2014-08-04 03:49:33 +00:00
|
|
|
#define META_FFLOOR "FFLOOR_T*"
|
2016-11-24 21:11:44 +00:00
|
|
|
#ifdef HAVE_LUA_SEGS
|
2016-05-25 16:15:44 +00:00
|
|
|
#define META_SEG "SEG_T*"
|
2016-07-08 19:05:54 +00:00
|
|
|
#define META_NODE "NODE_T*"
|
2016-11-24 21:11:44 +00:00
|
|
|
#endif
|
2016-03-03 05:47:06 +00:00
|
|
|
#define META_SLOPE "PSLOPE_T*"
|
2018-10-20 18:00:37 +00:00
|
|
|
#define META_VECTOR2 "VECTOR2_T"
|
|
|
|
#define META_VECTOR3 "VECTOR3_T"
|
2014-08-04 03:49:33 +00:00
|
|
|
#define META_MAPHEADER "MAPHEADER_T*"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2020-09-08 17:08:08 +00:00
|
|
|
#define META_POLYOBJ "POLYOBJ_T*"
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
#define META_CVAR "CONSVAR_T*"
|
|
|
|
|
2015-06-17 20:00:10 +00:00
|
|
|
#define META_SECTORLINES "SECTOR_T*LINES"
|
2020-12-05 10:02:06 +00:00
|
|
|
#ifdef MUTABLE_TAGS
|
|
|
|
#define META_SECTORTAGLIST "sector_t.taglist"
|
|
|
|
#endif
|
2014-03-15 16:59:03 +00:00
|
|
|
#define META_SIDENUM "LINE_T*SIDENUM"
|
2020-01-02 11:23:14 +00:00
|
|
|
#define META_LINEARGS "LINE_T*ARGS"
|
2020-01-08 07:42:35 +00:00
|
|
|
#define META_LINESTRINGARGS "LINE_T*STRINGARGS"
|
2020-04-11 10:54:34 +00:00
|
|
|
#define META_THINGARGS "MAPTHING_T*ARGS"
|
|
|
|
#define META_THINGSTRINGARGS "MAPTHING_T*STRINGARGS"
|
2020-09-09 20:15:02 +00:00
|
|
|
#define META_POLYOBJVERTICES "POLYOBJ_T*VERTICES"
|
|
|
|
#define META_POLYOBJLINES "POLYOBJ_T*LINES"
|
2016-11-24 21:11:44 +00:00
|
|
|
#ifdef HAVE_LUA_SEGS
|
2016-07-08 19:05:54 +00:00
|
|
|
#define META_NODEBBOX "NODE_T*BBOX"
|
|
|
|
#define META_NODECHILDREN "NODE_T*CHILDREN"
|
2016-11-24 21:11:44 +00:00
|
|
|
#endif
|
2016-07-08 19:05:54 +00:00
|
|
|
|
|
|
|
#define META_BBOX "BOUNDING_BOX"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
#define META_HUDINFO "HUDINFO_T*"
|
|
|
|
#define META_PATCH "PATCH_T*"
|
|
|
|
#define META_COLORMAP "COLORMAP"
|
2023-08-04 03:36:11 +00:00
|
|
|
#define META_EXTRACOLORMAP "EXTRACOLORMAP_T*"
|
2014-08-04 03:49:33 +00:00
|
|
|
#define META_CAMERA "CAMERA_T*"
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2017-05-17 19:36:40 +00:00
|
|
|
#define META_ACTION "ACTIONF_T*"
|
|
|
|
|
2019-08-24 17:25:27 +00:00
|
|
|
#define META_LUABANKS "LUABANKS[]*"
|
|
|
|
|
2021-08-14 18:33:42 +00:00
|
|
|
#define META_KEYEVENT "KEYEVENT_T*"
|
2021-03-24 08:54:11 +00:00
|
|
|
#define META_MOUSE "MOUSE_T*"
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
boolean luaL_checkboolean(lua_State *L, int narg);
|
|
|
|
|
|
|
|
int LUA_EnumLib(lua_State *L);
|
|
|
|
int LUA_SOCLib(lua_State *L);
|
|
|
|
int LUA_BaseLib(lua_State *L);
|
|
|
|
int LUA_MathLib(lua_State *L);
|
|
|
|
int LUA_HookLib(lua_State *L);
|
|
|
|
int LUA_ConsoleLib(lua_State *L);
|
|
|
|
int LUA_InfoLib(lua_State *L);
|
|
|
|
int LUA_MobjLib(lua_State *L);
|
|
|
|
int LUA_PlayerLib(lua_State *L);
|
|
|
|
int LUA_SkinLib(lua_State *L);
|
|
|
|
int LUA_ThinkerLib(lua_State *L);
|
|
|
|
int LUA_MapLib(lua_State *L);
|
2020-12-04 08:30:08 +00:00
|
|
|
int LUA_TagLib(lua_State *L);
|
2020-09-08 17:08:08 +00:00
|
|
|
int LUA_PolyObjLib(lua_State *L);
|
2016-10-27 17:10:30 +00:00
|
|
|
int LUA_BlockmapLib(lua_State *L);
|
2014-03-15 16:59:03 +00:00
|
|
|
int LUA_HudLib(lua_State *L);
|
2023-08-04 03:31:51 +00:00
|
|
|
int LUA_ColorLib(lua_State *L);
|
2021-03-24 08:54:11 +00:00
|
|
|
int LUA_InputLib(lua_State *L);
|