Lua: add S_FIRSTFREESLOT, MT_FIRSTFREESLOT, SPR_FIRSTFREESLOT

Helps Lua exporter
This commit is contained in:
James R 2023-11-28 21:57:16 -08:00
parent a578f9b37c
commit 872d3b96e9

View file

@ -431,6 +431,11 @@ static inline int lib_getenum(lua_State *L)
}
else if (fastncmp("S_",word,2)) {
p = word+2;
if (fastcmp(p, "FIRSTFREESLOT"))
{
lua_pushinteger(L, S_FIRSTFREESLOT);
return 1;
}
for (i = 0; i < NUMSTATEFREESLOTS; i++) {
if (!FREE_STATES[i])
break;
@ -448,6 +453,11 @@ static inline int lib_getenum(lua_State *L)
}
else if (fastncmp("MT_",word,3)) {
p = word+3;
if (fastcmp(p, "FIRSTFREESLOT"))
{
lua_pushinteger(L, MT_FIRSTFREESLOT);
return 1;
}
for (i = 0; i < NUMMOBJFREESLOTS; i++) {
if (!FREE_MOBJS[i])
break;
@ -465,6 +475,11 @@ static inline int lib_getenum(lua_State *L)
}
else if (fastncmp("SPR_",word,4)) {
p = word+4;
if (fastcmp(p, "FIRSTFREESLOT"))
{
lua_pushinteger(L, SPR_FIRSTFREESLOT);
return 1;
}
for (i = 0; i < NUMSPRITES; i++)
if (!sprnames[i][4] && fastncmp(p,sprnames[i],4)) {
lua_pushinteger(L, i);