mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-18 14:02:51 +00:00
Lua: add S_FIRSTFREESLOT, MT_FIRSTFREESLOT, SPR_FIRSTFREESLOT
Helps Lua exporter
This commit is contained in:
parent
a578f9b37c
commit
872d3b96e9
1 changed files with 15 additions and 0 deletions
|
|
@ -431,6 +431,11 @@ static inline int lib_getenum(lua_State *L)
|
||||||
}
|
}
|
||||||
else if (fastncmp("S_",word,2)) {
|
else if (fastncmp("S_",word,2)) {
|
||||||
p = word+2;
|
p = word+2;
|
||||||
|
if (fastcmp(p, "FIRSTFREESLOT"))
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, S_FIRSTFREESLOT);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
for (i = 0; i < NUMSTATEFREESLOTS; i++) {
|
for (i = 0; i < NUMSTATEFREESLOTS; i++) {
|
||||||
if (!FREE_STATES[i])
|
if (!FREE_STATES[i])
|
||||||
break;
|
break;
|
||||||
|
|
@ -448,6 +453,11 @@ static inline int lib_getenum(lua_State *L)
|
||||||
}
|
}
|
||||||
else if (fastncmp("MT_",word,3)) {
|
else if (fastncmp("MT_",word,3)) {
|
||||||
p = word+3;
|
p = word+3;
|
||||||
|
if (fastcmp(p, "FIRSTFREESLOT"))
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, MT_FIRSTFREESLOT);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
for (i = 0; i < NUMMOBJFREESLOTS; i++) {
|
for (i = 0; i < NUMMOBJFREESLOTS; i++) {
|
||||||
if (!FREE_MOBJS[i])
|
if (!FREE_MOBJS[i])
|
||||||
break;
|
break;
|
||||||
|
|
@ -465,6 +475,11 @@ static inline int lib_getenum(lua_State *L)
|
||||||
}
|
}
|
||||||
else if (fastncmp("SPR_",word,4)) {
|
else if (fastncmp("SPR_",word,4)) {
|
||||||
p = word+4;
|
p = word+4;
|
||||||
|
if (fastcmp(p, "FIRSTFREESLOT"))
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, SPR_FIRSTFREESLOT);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
for (i = 0; i < NUMSPRITES; i++)
|
for (i = 0; i < NUMSPRITES; i++)
|
||||||
if (!sprnames[i][4] && fastncmp(p,sprnames[i],4)) {
|
if (!sprnames[i][4] && fastncmp(p,sprnames[i],4)) {
|
||||||
lua_pushinteger(L, i);
|
lua_pushinteger(L, i);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue