Port v1 objects pt 4.5: extra stuff

This commit is contained in:
NepDisk 2025-04-09 16:39:25 -04:00
parent f0a6a112ac
commit a580bc9433
12 changed files with 21 additions and 31 deletions

View file

@ -479,6 +479,13 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
CacheAndPushConstant(L, word, i);
return 1;
}
if (lua_compatmode)
for (i = 0; MOBJ_ALIASES[i].n; i++)
if (fastcmp(p, MOBJ_ALIASES[i].n)) {
CacheAndPushConstant(L, word, MOBJ_ALIASES[i].v);
return 1;
}
return luaL_error(L, "mobjtype '%s' does not exist.\n", word);
}
else if (fastncmp("SPR_",word,4)) {

View file

@ -128,6 +128,16 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
#undef _
};
struct int_const_s const MOBJ_ALIASES[] = {
{"BIRD", MT_FLICKY_01},
{"BUNNY" , MT_FLICKY_02},
{"MOUSE" , MT_FLICKY_12},
{"CHICKEN" , MT_FLICKY_03},
{"REDBIRD", MT_FLICKY_10},
{"COW", MT_FLICKY_11},
{ NULL, 0 }
};
const char *const MOBJFLAG_LIST[] = {
"SPECIAL",
"SOLID",
@ -944,13 +954,13 @@ struct int_const_s const INT_CONST[] = {
{"PRECIP_NONE",PRECIP_NONE},
{"PRECIP_RAIN",PRECIP_RAIN},
{"PRECIP_SNOW",PRECIP_SNOW},
{"PRECIP_BLIZZARD",PRECIP_BLIZZARD},
{"PRECIP_STORM",PRECIP_STORM},
{"PRECIP_STORM_NORAIN",PRECIP_STORM_NORAIN},
{"PRECIP_STORM_NOSTRIKES",PRECIP_STORM_NOSTRIKES},
// Carrying
{"CR_NONE",CR_NONE},
{"CR_SLIDING",CR_SLIDING},
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
// Character flags (skinflags_t)

View file

@ -74,6 +74,7 @@ extern actionpointer_t actionpointers[]; // Array mapping action names to action
extern const char *const STATE_LIST[];
extern struct int_const_s const STATE_ALIASES[];
extern const char *const MOBJTYPE_LIST[];
extern struct int_const_s const MOBJ_ALIASES[];
extern const char *const MOBJFLAG_LIST[];
extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
extern const char *const MOBJEFLAG_LIST[];

View file

@ -76,7 +76,6 @@ typedef enum
PRECIP_RAIN,
PRECIP_SNOW,
PRECIP_BLIZZARD,
PRECIP_STORM,
PRECIP_STORM_NORAIN,
PRECIP_STORM_NOSTRIKES,

View file

@ -107,7 +107,6 @@ precipprops_t precipprops[MAXPRECIP] =
{"NONE", MT_NULL, 0}, // PRECIP_NONE
{"RAIN", MT_RAIN, 0}, // PRECIP_RAIN
{"SNOW", MT_SNOWFLAKE, 0}, // PRECIP_SNOW
{"BLIZZARD", MT_BLIZZARDSNOW, 0}, // PRECIP_BLIZZARD
{"STORM", MT_RAIN, PRECIPFX_THUNDER|PRECIPFX_LIGHTNING}, // PRECIP_STORM
{"STORM_NORAIN", MT_NULL, PRECIPFX_THUNDER|PRECIPFX_LIGHTNING}, // PRECIP_STORM_NORAIN
{"STORM_NOSTRIKES", MT_RAIN, PRECIPFX_THUNDER} // PRECIP_STORM_NOSTRIKES

View file

@ -426,7 +426,6 @@ _(SEED)
// Environmental Effects
_(RAIN) // Rain
_(SNOWFLAKE) // Snowflake
_(BLIZZARDSNOW) // Blizzard Snowball
_(SPLISH) // Water splish!
_(LAVASPLISH) // Lava splish!
_(SMOKE)
@ -569,14 +568,6 @@ _(ROCKCRUMBLE14)
_(ROCKCRUMBLE15)
_(ROCKCRUMBLE16)
// Level debris
_(GFZDEBRIS)
_(BRICKDEBRIS)
_(WOODDEBRIS)
_(REDBRICKDEBRIS) // for CEZ3
_(BLUEBRICKDEBRIS) // for CEZ3
_(YELLOWBRICKDEBRIS) // for CEZ3
// SRB1 Badniks
_(SRB1_CRAWLA)
_(SRB1_BAT)

View file

@ -292,7 +292,6 @@ _(BSTR) // Red Booster
// Environmental Effects
_(RAIN) // Rain
_(SNO1) // Snowflake
_(SNO2) // Blizzard Snowball
_(SPLH) // Water Splish
_(LSPL) // Lava Splish
_(SPLA) // Water Splash

View file

@ -2026,11 +2026,6 @@ _(SNOW1)
_(SNOW2)
_(SNOW3)
// Blizzard Snowball
_(BLIZZARDSNOW1)
_(BLIZZARDSNOW2)
_(BLIZZARDSNOW3)
// Water Splish
_(SPLISH1)
_(SPLISH2)
@ -2527,14 +2522,6 @@ _(ROCKCRUMBLEN)
_(ROCKCRUMBLEO)
_(ROCKCRUMBLEP)
// Level debris
_(GFZDEBRIS)
_(BRICKDEBRIS)
_(WOODDEBRIS)
_(REDBRICKDEBRIS) // for CEZ3
_(BLUEBRICKDEBRIS) // for CEZ3
_(YELLOWBRICKDEBRIS) // for CEZ3
// SRB1 Badniks
_(SRB1_CRAWLA1)
_(SRB1_CRAWLA2)

View file

@ -1030,7 +1030,6 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
case MT_SUPERSPARK:
case MT_RAIN:
case MT_SNOWFLAKE:
case MT_BLIZZARDSNOW:
case MT_SPLISH:
case MT_LAVASPLISH:
case MT_SMOKE:

View file

@ -577,7 +577,7 @@ struct BasicFF_t
#define DMG_SPECTATOR 0x83
#define DMG_TIMEOVER 0x84
// Masks
//free 0x10 // Flag - setting this flag allows objects to damage you if you're already in spinout. The effect is reversed on objects with MF_MISSILE (setting it prevents them from comboing in spinout)
//free 0x10
#define DMG_STEAL 0x20 // Flag - can steal bumpers, will only deal damage to players, and will not deal damage outside Battle Mode.
#define DMG_CANTHURTSELF 0x40 // Flag - cannot hurt your self or your team
#define DMG_DEATHMASK DMG_INSTAKILL // if bit 7 is set, this is a death type instead of a damage type

View file

@ -5655,8 +5655,6 @@ static void P_MobjSceneryThink(mobj_t *mobj)
case MT_ROCKCRUMBLE14:
case MT_ROCKCRUMBLE15:
case MT_ROCKCRUMBLE16:
case MT_WOODDEBRIS:
case MT_BRICKDEBRIS:
if (mobj->z <= P_FloorzAtPos(mobj->x, mobj->y, mobj->z, mobj->height)
&& mobj->state != &states[mobj->info->deathstate])
{

View file

@ -173,7 +173,7 @@ typedef enum
typedef enum
{
MF2_AXIS = 1, // It's a NiGHTS axis! (For faster checking)
MF2_SHADOW = 1<<3, // DO NOT USE: for lua compatibility only
MF2_SHADOW = 1<<1, // DO NOT USE: for lua compatibility only
MF2_DONTRESPAWN = 1<<2, // Don't respawn this object!
MF2_DONTDRAW = 1<<3, // DO NOT USE: for lua compatibility only
MF2_AUTOMATIC = 1<<4, // Thrown ring has automatic properties