mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Fix bitflags enum sectoractionflags_t for C++
This commit is contained in:
parent
5e3c9e5c92
commit
ef1c653e85
2 changed files with 40 additions and 42 deletions
|
|
@ -1065,7 +1065,7 @@ static void P_LoadSectors(UINT8 *data)
|
||||||
ss->action = 0;
|
ss->action = 0;
|
||||||
memset(ss->args, 0, NUM_SCRIPT_ARGS*sizeof(*ss->args));
|
memset(ss->args, 0, NUM_SCRIPT_ARGS*sizeof(*ss->args));
|
||||||
memset(ss->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*ss->stringargs));
|
memset(ss->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*ss->stringargs));
|
||||||
ss->activation = static_cast<sectoractionflags_t>(0);
|
ss->activation = 0;
|
||||||
|
|
||||||
P_InitializeSector(ss);
|
P_InitializeSector(ss);
|
||||||
}
|
}
|
||||||
|
|
@ -1842,27 +1842,27 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
||||||
sectors[i].args[argnum] = atol(val);
|
sectors[i].args[argnum] = atol(val);
|
||||||
}
|
}
|
||||||
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
|
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_REPEATSPECIAL));
|
sectors[i].activation |= ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_REPEATSPECIAL);
|
||||||
else if (fastcmp(param, "continuousspecial") && fastcmp("true", val))
|
else if (fastcmp(param, "continuousspecial") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_CONTINUOUSSPECIAL));
|
sectors[i].activation |= ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_CONTINUOUSSPECIAL);
|
||||||
else if (fastcmp(param, "playerenter") && fastcmp("true", val))
|
else if (fastcmp(param, "playerenter") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTER);
|
sectors[i].activation |= SECSPAC_ENTER;
|
||||||
else if (fastcmp(param, "playerfloor") && fastcmp("true", val))
|
else if (fastcmp(param, "playerfloor") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOOR);
|
sectors[i].activation |= SECSPAC_FLOOR;
|
||||||
else if (fastcmp(param, "playerceiling") && fastcmp("true", val))
|
else if (fastcmp(param, "playerceiling") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILING);
|
sectors[i].activation |= SECSPAC_CEILING;
|
||||||
else if (fastcmp(param, "monsterenter") && fastcmp("true", val))
|
else if (fastcmp(param, "monsterenter") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTERMONSTER);
|
sectors[i].activation |= SECSPAC_ENTERMONSTER;
|
||||||
else if (fastcmp(param, "monsterfloor") && fastcmp("true", val))
|
else if (fastcmp(param, "monsterfloor") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOORMONSTER);
|
sectors[i].activation |= SECSPAC_FLOORMONSTER;
|
||||||
else if (fastcmp(param, "monsterceiling") && fastcmp("true", val))
|
else if (fastcmp(param, "monsterceiling") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILINGMONSTER);
|
sectors[i].activation |= SECSPAC_CEILINGMONSTER;
|
||||||
else if (fastcmp(param, "missileenter") && fastcmp("true", val))
|
else if (fastcmp(param, "missileenter") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTERMISSILE);
|
sectors[i].activation |= SECSPAC_ENTERMISSILE;
|
||||||
else if (fastcmp(param, "missilefloor") && fastcmp("true", val))
|
else if (fastcmp(param, "missilefloor") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOORMISSILE);
|
sectors[i].activation |= SECSPAC_FLOORMISSILE;
|
||||||
else if (fastcmp(param, "missileceiling") && fastcmp("true", val))
|
else if (fastcmp(param, "missileceiling") && fastcmp("true", val))
|
||||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILINGMISSILE);
|
sectors[i].activation |= SECSPAC_CEILINGMISSILE;
|
||||||
else
|
else
|
||||||
ParseUserProperty(§ors[i].user, param, val);
|
ParseUserProperty(§ors[i].user, param, val);
|
||||||
}
|
}
|
||||||
|
|
@ -3215,7 +3215,7 @@ static void P_LoadTextmap(void)
|
||||||
sc->action = 0;
|
sc->action = 0;
|
||||||
memset(sc->args, 0, NUM_SCRIPT_ARGS*sizeof(*sc->args));
|
memset(sc->args, 0, NUM_SCRIPT_ARGS*sizeof(*sc->args));
|
||||||
memset(sc->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*sc->stringargs));
|
memset(sc->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*sc->stringargs));
|
||||||
sc->activation = static_cast<sectoractionflags_t>(0);
|
sc->activation = 0;
|
||||||
|
|
||||||
K_UserPropertiesClear(&sc->user);
|
K_UserPropertiesClear(&sc->user);
|
||||||
|
|
||||||
|
|
|
||||||
56
src/r_defs.h
56
src/r_defs.h
|
|
@ -383,47 +383,45 @@ typedef int sectorspecialflags_t;
|
||||||
#define SSF_ZOOMTUBESTART (1<<15)
|
#define SSF_ZOOMTUBESTART (1<<15)
|
||||||
#define SSF_ZOOMTUBEEND (1<<16)
|
#define SSF_ZOOMTUBEEND (1<<16)
|
||||||
|
|
||||||
typedef enum
|
typedef int sectoractionflags_t;
|
||||||
{
|
// Mask to get trigger type.
|
||||||
// Mask to get trigger type.
|
#define SECSPAC_TRIGGERMASK (0x0000000F)
|
||||||
SECSPAC_TRIGGERMASK = 0x0000000F,
|
|
||||||
|
|
||||||
// Special action is activated once.
|
// Special action is activated once.
|
||||||
SECSPAC_ONCESPECIAL = 0x00000000,
|
#define SECSPAC_ONCESPECIAL (0x00000000)
|
||||||
|
|
||||||
// Special action is repeatable.
|
// Special action is repeatable.
|
||||||
SECSPAC_REPEATSPECIAL = 0x00000001,
|
#define SECSPAC_REPEATSPECIAL (0x00000001)
|
||||||
|
|
||||||
// Special action is activated continously.
|
// Special action is activated continously.
|
||||||
SECSPAC_CONTINUOUSSPECIAL = 0x00000002,
|
#define SECSPAC_CONTINUOUSSPECIAL (0x00000002)
|
||||||
|
|
||||||
// When a player enters this sector.
|
// When a player enters this sector.
|
||||||
SECSPAC_ENTER = 0x00000010,
|
#define SECSPAC_ENTER (0x00000010)
|
||||||
|
|
||||||
// When a player touches the floor of this sector.
|
// When a player touches the floor of this sector.
|
||||||
SECSPAC_FLOOR = 0x00000020,
|
#define SECSPAC_FLOOR (0x00000020)
|
||||||
|
|
||||||
// When a player touches the ceiling of this sector.
|
// When a player touches the ceiling of this sector.
|
||||||
SECSPAC_CEILING = 0x00000040,
|
#define SECSPAC_CEILING (0x00000040)
|
||||||
|
|
||||||
// When an enemy enters this sector.
|
// When an enemy enters this sector.
|
||||||
SECSPAC_ENTERMONSTER = 0x00000080,
|
#define SECSPAC_ENTERMONSTER (0x00000080)
|
||||||
|
|
||||||
// When an enemy touches the floor of this sector.
|
// When an enemy touches the floor of this sector.
|
||||||
SECSPAC_FLOORMONSTER = 0x00000100,
|
#define SECSPAC_FLOORMONSTER (0x00000100)
|
||||||
|
|
||||||
// When an enemy touches the ceiling of this sector.
|
// When an enemy touches the ceiling of this sector.
|
||||||
SECSPAC_CEILINGMONSTER = 0x00000200,
|
#define SECSPAC_CEILINGMONSTER (0x00000200)
|
||||||
|
|
||||||
// When a projectile enters this sector.
|
// When a projectile enters this sector.
|
||||||
SECSPAC_ENTERMISSILE = 0x00000400,
|
#define SECSPAC_ENTERMISSILE (0x00000400)
|
||||||
|
|
||||||
// When a projectile touches the floor of this sector.
|
// When a projectile touches the floor of this sector.
|
||||||
SECSPAC_FLOORMISSILE = 0x00000800,
|
#define SECSPAC_FLOORMISSILE (0x00000800)
|
||||||
|
|
||||||
// When a projectile touches the ceiling of this sector.
|
// When a projectile touches the ceiling of this sector.
|
||||||
SECSPAC_CEILINGMISSILE = 0x00001000,
|
#define SECSPAC_CEILINGMISSILE (0x00001000)
|
||||||
} sectoractionflags_t;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue