Add DECOSPACE_ constants

This commit is contained in:
jacob1 2024-03-13 21:22:12 -04:00
parent 3a3a8c1cc3
commit 596e6cece1
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995

View File

@ -1960,9 +1960,11 @@ void LuaSimulation::Open(lua_State *L)
};
lua_newtable(L);
luaL_register(L, NULL, reg);
#define LCONST(v) lua_pushinteger(L, int(v)); lua_setfield(L, -2, #v)
#define LCONSTF(v) lua_pushnumber(L, float(v)); lua_setfield(L, -2, #v)
#define LCONSTAS(k, v) lua_pushinteger(L, int(v)); lua_setfield(L, -2, k)
LCONST(CELL);
LCONST(XCELLS);
LCONST(YCELLS);
@ -1987,6 +1989,7 @@ void LuaSimulation::Open(lua_State *L)
LCONST(ISTP);
LCONSTF(CFDS);
LCONSTF(MAX_VELOCITY);
LCONST(TOOL_HEAT);
LCONST(TOOL_COOL);
LCONST(TOOL_VAC);
@ -1996,6 +1999,7 @@ void LuaSimulation::Open(lua_State *L)
LCONST(TOOL_MIX);
LCONST(TOOL_CYCL);
LCONSTAS("TOOL_WIND", sd.tools.size());
LCONST(DECO_DRAW);
LCONST(DECO_CLEAR);
LCONST(DECO_ADD);
@ -2003,32 +2007,45 @@ void LuaSimulation::Open(lua_State *L)
LCONST(DECO_MULTIPLY);
LCONST(DECO_DIVIDE);
LCONST(DECO_SMUDGE);
LCONST(FLAG_STAGNANT);
LCONST(FLAG_SKIPMOVE);
LCONST(FLAG_MOVABLE);
LCONST(FLAG_PHOTDECO);
LCONST(PMAPBITS);
LCONST(PMAPMASK);
LCONST(BRUSH_CIRCLE);
LCONST(BRUSH_SQUARE);
LCONST(BRUSH_TRIANGLE);
LCONST(NUM_DEFAULTBRUSHES);
LCONSTAS("NUM_BRUSHES", lsi->gameModel->BrushListSize());
LCONST(EDGE_VOID);
LCONST(EDGE_SOLID);
LCONST(EDGE_LOOP);
LCONST(NUM_EDGEMODES);
LCONST(AIR_ON);
LCONST(AIR_PRESSUREOFF);
LCONST(AIR_VELOCITYOFF);
LCONST(AIR_OFF);
LCONST(AIR_NOUPDATE);
LCONST(NUM_AIRMODES);
LCONST(GRAV_VERTICAL);
LCONST(GRAV_OFF);
LCONST(GRAV_RADIAL);
LCONST(GRAV_CUSTOM);
LCONST(NUM_GRAVMODES);
LCONST(DECOSPACE_SRGB);
LCONST(DECOSPACE_LINEAR);
LCONST(DECOSPACE_GAMMA22);
LCONST(DECOSPACE_GAMMA18);
LCONST(NUM_DECOSPACES);
{
lua_newtable(L);
for (int i = 0; i < UI_WALLCOUNT; i++)