mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'nights_emblems' into 'master'
NiGHTS Paraloop-special emblems Implemented the two NiGHTS Emblem types in the TUDD via var modifications to ET_GLOBAL! * GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem * GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem * Combined means that you essentially have to loop it twice. Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM). Check out root/!LatestSRB2Files/srb2win_branch_nightsemblems.exe with the latest patch.dta, along with root/toaster/nightstest.soc for a sample in GFZS. See merge request !94
This commit is contained in:
commit
102d30fe8d
7 changed files with 68 additions and 54 deletions
|
|
@ -2227,12 +2227,12 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
||||||
emblemlocations[num-1].type = ET_TIME;
|
emblemlocations[num-1].type = ET_TIME;
|
||||||
else if (fastcmp(word2, "RINGS"))
|
else if (fastcmp(word2, "RINGS"))
|
||||||
emblemlocations[num-1].type = ET_RINGS;
|
emblemlocations[num-1].type = ET_RINGS;
|
||||||
|
else if (fastcmp(word2, "MAP"))
|
||||||
|
emblemlocations[num-1].type = ET_MAP;
|
||||||
else if (fastcmp(word2, "NGRADE"))
|
else if (fastcmp(word2, "NGRADE"))
|
||||||
emblemlocations[num-1].type = ET_NGRADE;
|
emblemlocations[num-1].type = ET_NGRADE;
|
||||||
else if (fastcmp(word2, "NTIME"))
|
else if (fastcmp(word2, "NTIME"))
|
||||||
emblemlocations[num-1].type = ET_NTIME;
|
emblemlocations[num-1].type = ET_NTIME;
|
||||||
else if (fastcmp(word2, "MAP"))
|
|
||||||
emblemlocations[num-1].type = ET_MAP;
|
|
||||||
else
|
else
|
||||||
emblemlocations[num-1].type = (UINT8)value;
|
emblemlocations[num-1].type = (UINT8)value;
|
||||||
}
|
}
|
||||||
|
|
@ -5936,16 +5936,11 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_NIGHTSWING_XMAS",
|
"S_NIGHTSWING_XMAS",
|
||||||
|
|
||||||
// NiGHTS Paraloop Powerups
|
// NiGHTS Paraloop Powerups
|
||||||
"S_NIGHTSPOWERUP1",
|
"S_NIGHTSSUPERLOOP",
|
||||||
"S_NIGHTSPOWERUP2",
|
"S_NIGHTSDRILLREFILL",
|
||||||
"S_NIGHTSPOWERUP3",
|
"S_NIGHTSHELPER",
|
||||||
"S_NIGHTSPOWERUP4",
|
"S_NIGHTSEXTRATIME",
|
||||||
"S_NIGHTSPOWERUP5",
|
"S_NIGHTSLINKFREEZE",
|
||||||
"S_NIGHTSPOWERUP6",
|
|
||||||
"S_NIGHTSPOWERUP7",
|
|
||||||
"S_NIGHTSPOWERUP8",
|
|
||||||
"S_NIGHTSPOWERUP9",
|
|
||||||
"S_NIGHTSPOWERUP10",
|
|
||||||
"S_EGGCAPSULE",
|
"S_EGGCAPSULE",
|
||||||
|
|
||||||
// Orbiting Chaos Emeralds
|
// Orbiting Chaos Emeralds
|
||||||
|
|
@ -7181,6 +7176,10 @@ struct {
|
||||||
{"SF_NOINTERRUPT",SF_NOINTERRUPT},
|
{"SF_NOINTERRUPT",SF_NOINTERRUPT},
|
||||||
{"SF_X2AWAYSOUND",SF_X2AWAYSOUND},
|
{"SF_X2AWAYSOUND",SF_X2AWAYSOUND},
|
||||||
|
|
||||||
|
// Global emblem var flags
|
||||||
|
{"GE_NIGHTSPULL",GE_NIGHTSPULL},
|
||||||
|
{"GE_NIGHTSITEM",GE_NIGHTSITEM},
|
||||||
|
|
||||||
// Map emblem var flags
|
// Map emblem var flags
|
||||||
{"ME_ALLEMERALDS",ME_ALLEMERALDS},
|
{"ME_ALLEMERALDS",ME_ALLEMERALDS},
|
||||||
{"ME_ULTIMATE",ME_ULTIMATE},
|
{"ME_ULTIMATE",ME_ULTIMATE},
|
||||||
|
|
|
||||||
35
src/info.c
35
src/info.c
|
|
@ -2896,16 +2896,11 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_NWNG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSWING_XMAS
|
{SPR_NWNG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSWING_XMAS
|
||||||
|
|
||||||
// NiGHTS Paraloop Powerups
|
// NiGHTS Paraloop Powerups
|
||||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP1
|
{SPR_NPRU, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSSUPERLOOP
|
||||||
{SPR_NPRU, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP2
|
{SPR_NPRU, 1, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSDRILLREFILL
|
||||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP3
|
{SPR_NPRU, 2, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSHELPER
|
||||||
{SPR_NPRU, 1, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP4
|
{SPR_NPRU, 3, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSEXTRATIME
|
||||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP5
|
{SPR_NPRU, 4, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSLINKFREEZE
|
||||||
{SPR_NPRU, 2, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP6
|
|
||||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP7
|
|
||||||
{SPR_NPRU, 3, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP8
|
|
||||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP9
|
|
||||||
{SPR_NPRU, 4, -1, {NULL}, 0, 0, S_NULL}, // S_NIGHTSPOWERUP10
|
|
||||||
|
|
||||||
{SPR_CAPS, 0, -1, {NULL}, 0, 0, S_NULL}, // S_EGGCAPSULE
|
{SPR_CAPS, 0, -1, {NULL}, 0, 0, S_NULL}, // S_EGGCAPSULE
|
||||||
|
|
||||||
|
|
@ -14296,9 +14291,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
||||||
{ // MT_NIGHTSSUPERLOOP
|
{ // MT_NIGHTSSUPERLOOP
|
||||||
1707, // doomednum
|
1707, // doomednum
|
||||||
S_NIGHTSPOWERUP1, // spawnstate
|
S_NIGHTSSUPERLOOP, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NIGHTSPOWERUP2, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
@ -14323,9 +14318,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
||||||
{ // MT_NIGHTSDRILLREFILL
|
{ // MT_NIGHTSDRILLREFILL
|
||||||
1708, // doomednum
|
1708, // doomednum
|
||||||
S_NIGHTSPOWERUP3, // spawnstate
|
S_NIGHTSDRILLREFILL, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NIGHTSPOWERUP4, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
@ -14350,9 +14345,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
||||||
{ // MT_NIGHTSHELPER
|
{ // MT_NIGHTSHELPER
|
||||||
1709, // doomednum
|
1709, // doomednum
|
||||||
S_NIGHTSPOWERUP5, // spawnstate
|
S_NIGHTSHELPER, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NIGHTSPOWERUP6, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
@ -14377,9 +14372,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
||||||
{ // MT_NIGHTSEXTRATIME
|
{ // MT_NIGHTSEXTRATIME
|
||||||
1711, // doomednum
|
1711, // doomednum
|
||||||
S_NIGHTSPOWERUP7, // spawnstate
|
S_NIGHTSEXTRATIME, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NIGHTSPOWERUP8, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
@ -14404,9 +14399,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
|
|
||||||
{ // MT_NIGHTSLINKFREEZE
|
{ // MT_NIGHTSLINKFREEZE
|
||||||
1712, // doomednum
|
1712, // doomednum
|
||||||
S_NIGHTSPOWERUP9, // spawnstate
|
S_NIGHTSLINKFREEZE, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NIGHTSPOWERUP10, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
|
||||||
15
src/info.h
15
src/info.h
|
|
@ -3041,16 +3041,11 @@ typedef enum state
|
||||||
S_NIGHTSWING_XMAS,
|
S_NIGHTSWING_XMAS,
|
||||||
|
|
||||||
// NiGHTS Paraloop Powerups
|
// NiGHTS Paraloop Powerups
|
||||||
S_NIGHTSPOWERUP1,
|
S_NIGHTSSUPERLOOP,
|
||||||
S_NIGHTSPOWERUP2,
|
S_NIGHTSDRILLREFILL,
|
||||||
S_NIGHTSPOWERUP3,
|
S_NIGHTSHELPER,
|
||||||
S_NIGHTSPOWERUP4,
|
S_NIGHTSEXTRATIME,
|
||||||
S_NIGHTSPOWERUP5,
|
S_NIGHTSLINKFREEZE,
|
||||||
S_NIGHTSPOWERUP6,
|
|
||||||
S_NIGHTSPOWERUP7,
|
|
||||||
S_NIGHTSPOWERUP8,
|
|
||||||
S_NIGHTSPOWERUP9,
|
|
||||||
S_NIGHTSPOWERUP10,
|
|
||||||
S_EGGCAPSULE,
|
S_EGGCAPSULE,
|
||||||
|
|
||||||
// Orbiting Chaos Emeralds
|
// Orbiting Chaos Emeralds
|
||||||
|
|
|
||||||
20
src/m_cond.h
20
src/m_cond.h
|
|
@ -66,14 +66,18 @@ typedef struct
|
||||||
} conditionset_t;
|
} conditionset_t;
|
||||||
|
|
||||||
// Emblem information
|
// Emblem information
|
||||||
#define ET_GLOBAL 0 // Global map emblem, var == color
|
#define ET_GLOBAL 0 // Emblem with a position in space
|
||||||
#define ET_SKIN 1 // Skin specific emblem, var == skin
|
#define ET_SKIN 1 // Skin specific emblem with a position in space, var == skin
|
||||||
#define ET_SCORE 2
|
#define ET_MAP 2 // Beat the map
|
||||||
#define ET_TIME 3
|
#define ET_SCORE 3 // Get the score
|
||||||
#define ET_RINGS 4
|
#define ET_TIME 4 // Get the time
|
||||||
#define ET_NGRADE 5
|
#define ET_RINGS 5 // Get the rings
|
||||||
#define ET_NTIME 6
|
#define ET_NGRADE 6 // Get the grade
|
||||||
#define ET_MAP 7
|
#define ET_NTIME 7 // Get the time (NiGHTS mode)
|
||||||
|
|
||||||
|
// Global emblem flags
|
||||||
|
#define GE_NIGHTSPULL 1 // sun off the nights track - loop it
|
||||||
|
#define GE_NIGHTSITEM 2 // moon on the nights track - find it
|
||||||
|
|
||||||
// Map emblem flags
|
// Map emblem flags
|
||||||
#define ME_ALLEMERALDS 1
|
#define ME_ALLEMERALDS 1
|
||||||
|
|
|
||||||
|
|
@ -878,7 +878,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
if (!(mo2->flags & MF_SPECIAL) && mo2->health)
|
if (!(mo2->flags & MF_SPECIAL) && mo2->health)
|
||||||
{
|
{
|
||||||
P_SetMobjState(mo2, mo2->info->seestate);
|
mo2->flags2 &= ~MF2_DONTDRAW;
|
||||||
mo2->flags |= MF_SPECIAL;
|
mo2->flags |= MF_SPECIAL;
|
||||||
mo2->flags &= ~MF_NIGHTSITEM;
|
mo2->flags &= ~MF_NIGHTSITEM;
|
||||||
S_StartSound(toucher, sfx_hidden);
|
S_StartSound(toucher, sfx_hidden);
|
||||||
|
|
@ -887,7 +887,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
|
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
|
||||||
|| mo2->type == MT_BLUEBALL))
|
|| mo2->type == MT_BLUEBALL
|
||||||
|
|| ((mo2->type == MT_EMBLEM) && (mo2->reactiontime & GE_NIGHTSPULL))))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Yay! The thing's in reach! Pull it in!
|
// Yay! The thing's in reach! Pull it in!
|
||||||
|
|
|
||||||
|
|
@ -7812,6 +7812,10 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||||
P_NightsItemChase(mobj);
|
P_NightsItemChase(mobj);
|
||||||
break;
|
break;
|
||||||
|
case MT_EMBLEM:
|
||||||
|
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||||
|
P_NightsItemChase(mobj);
|
||||||
|
break;
|
||||||
case MT_SHELL:
|
case MT_SHELL:
|
||||||
if (mobj->threshold && mobj->threshold != TICRATE)
|
if (mobj->threshold && mobj->threshold != TICRATE)
|
||||||
mobj->threshold--;
|
mobj->threshold--;
|
||||||
|
|
@ -10233,7 +10237,6 @@ ML_NOCLIMB : Direction not controllable
|
||||||
// Spawn already displayed
|
// Spawn already displayed
|
||||||
mobj->flags |= MF_SPECIAL;
|
mobj->flags |= MF_SPECIAL;
|
||||||
mobj->flags &= ~MF_NIGHTSITEM;
|
mobj->flags &= ~MF_NIGHTSITEM;
|
||||||
P_SetMobjState(mobj, mobj->info->seestate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj->flags & MF_PUSHABLE)
|
if (mobj->flags & MF_PUSHABLE)
|
||||||
|
|
@ -10286,6 +10289,10 @@ ML_NOCLIMB : Direction not controllable
|
||||||
mobj->flags2 |= MF2_OBJECTFLIP;
|
mobj->flags2 |= MF2_OBJECTFLIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Final set of not being able to draw nightsitems.
|
||||||
|
if (mobj->flags & MF_NIGHTSITEM)
|
||||||
|
mobj->flags2 |= MF2_DONTDRAW;
|
||||||
|
|
||||||
mthing->mobj = mobj;
|
mthing->mobj = mobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1118,7 +1118,20 @@ static inline void P_SpawnEmblems(void)
|
||||||
P_SetThingPosition(emblemmobj);
|
P_SetThingPosition(emblemmobj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
emblemmobj->frame &= ~FF_TRANSMASK;
|
emblemmobj->frame &= ~FF_TRANSMASK;
|
||||||
|
|
||||||
|
if (emblemlocations[i].type == ET_GLOBAL)
|
||||||
|
{
|
||||||
|
emblemmobj->reactiontime = emblemlocations[i].var;
|
||||||
|
if (emblemlocations[i].var & GE_NIGHTSITEM)
|
||||||
|
{
|
||||||
|
emblemmobj->flags |= MF_NIGHTSITEM;
|
||||||
|
emblemmobj->flags &= ~MF_SPECIAL;
|
||||||
|
emblemmobj->flags2 |= MF2_DONTDRAW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue