mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 12:01:05 +00:00
Merge branch 'fffffop2' into 'next'
Fix backwards compat for SPR2 Super (resolves #1225) Closes #1225 See merge request STJr/SRB2!2410
This commit is contained in:
commit
c2b57e2654
3 changed files with 10 additions and 11 deletions
12
src/info.c
12
src/info.c
|
@ -761,12 +761,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_MLEL, 35, {NULL}, 0, 0, S_PLAY_WALK, 0}, // S_PLAY_MELEE_LANDING
|
||||
|
||||
// SF_SUPER
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_ANIMATE, 7, {NULL}, 0, 4, S_PLAY_SUPER_TRANS2, 0}, // S_PLAY_SUPER_TRANS1
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3, 0}, // S_PLAY_SUPER_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4, 0}, // S_PLAY_SUPER_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS5, 0}, // S_PLAY_SUPER_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS6, 0}, // S_PLAY_SUPER_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS|FF_SPR2SUPER|FF_FULLBRIGHT, 19, {A_FadeOverlay}, 0, 0, S_PLAY_FALL, 0}, // S_PLAY_SUPER_TRANS6
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER|FF_ANIMATE, 7, {NULL}, 0, 4, S_PLAY_SUPER_TRANS2, 0}, // S_PLAY_SUPER_TRANS1
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER, 3, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3, 0}, // S_PLAY_SUPER_TRANS2
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4, 0}, // S_PLAY_SUPER_TRANS3
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS5, 0}, // S_PLAY_SUPER_TRANS4
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_SUPER_TRANS6, 0}, // S_PLAY_SUPER_TRANS5
|
||||
{SPR_PLAY, SPR2_TRNS|SPR2F_SUPER|FF_FULLBRIGHT, 19, {A_FadeOverlay}, 0, 0, S_PLAY_FALL, 0}, // S_PLAY_SUPER_TRANS6
|
||||
|
||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY, 0}, //S_OBJPLACE_DUMMY
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#define FF_FRAMEMASK 0xff
|
||||
|
||||
/// \brief Frame flags - SPR2: Super sprite2
|
||||
#define FF_SPR2SUPER 0x80
|
||||
#define FF_SPR2SUPER SPR2F_SUPER //TODO: 2.3: remove this backwards compat hack
|
||||
/// \brief Frame flags - SPR2: A change of state at the end of Sprite2 animation
|
||||
#define FF_SPR2ENDSTATE 0x100
|
||||
/// \brief Frame flags - SPR2: 50% of starting in middle of Sprite2 animation
|
||||
|
|
|
@ -43,10 +43,9 @@ UINT16 P_GetStateSprite2(state_t *state)
|
|||
else
|
||||
{
|
||||
// Transform the state frame into an animation ID
|
||||
UINT32 stateframe = state->frame & FF_FRAMEMASK;
|
||||
UINT16 spr2 = stateframe & ~FF_SPR2SUPER;
|
||||
UINT16 spr2 = state->frame & FF_FRAMEMASK;
|
||||
|
||||
if (stateframe & FF_SPR2SUPER)
|
||||
if (state->frame & SPR2F_SUPER)
|
||||
spr2 |= SPR2F_SUPER;
|
||||
|
||||
return spr2;
|
||||
|
@ -70,7 +69,7 @@ boolean P_IsStateSprite2Super(state_t *state)
|
|||
if (state->sprite2 & SPR2F_SUPER)
|
||||
return true;
|
||||
}
|
||||
else if (state->frame & FF_SPR2SUPER)
|
||||
else if (state->frame & SPR2F_SUPER)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue