Merge branch 'opulence' into 'public_next'

Add Opulence objects

See merge request KartKrew/Kart!442
This commit is contained in:
SteelT 2021-11-04 22:31:12 +00:00
commit 651d04f91b
7 changed files with 188 additions and 2 deletions

View file

@ -6982,6 +6982,15 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_LIZARDMAN",
"S_LIONMAN",
// Opulence
"S_OPULENCE_PALMTREE",
"S_OPULENCE_FERN",
"S_TUMBLEGEM_IDLE",
"S_TUMBLEGEM_ROLL",
"S_TUMBLECOIN_IDLE",
"S_TUMBLECOIN_FLIP",
"S_KARMAFIREWORK1",
"S_KARMAFIREWORK2",
"S_KARMAFIREWORK3",
@ -7780,6 +7789,13 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_LIZARDMAN",
"MT_LIONMAN",
// Opulence
"MT_OPULENCE_PALMTREE",
"MT_OPULENCE_FERN",
"MT_TUMBLEGEM",
"MT_TUMBLECOIN",
"MT_KARMAFIREWORK",
#ifdef SEENAMES

View file

@ -65,8 +65,8 @@ char sprnames[NUMSPRITES + 1][5] =
"FROG","CBRA","HOLE","BBRA","EGFG","SMKP","MTYM","THWP","SNOB","ICEB",
"CNDL","DOCH","DUCK","GTRE","CHES","CHIM","DRGN","LZMN","PGSS","ZTCH",
"MKMA","MKMP","RTCH","BOWL","BOWH","BRRL","BRRR","HRSE","TOAH","BFRT",
"OFRT","RFRT","PFRT","ASPK","HBST","HBSO","HBSF","WBLZ","WBLN","FWRK",
"XMS4","XMS5","VIEW"
"OFRT","RFRT","PFRT","ASPK","HBST","HBSO","HBSF","WBLZ","WBLN","OPUL",
"TGEM","TCOI","FWRK","XMS4","XMS5","VIEW"
};
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@ -3385,6 +3385,15 @@ state_t states[NUMSTATES] =
{SPR_WBLZ, 0, -1, {NULL}, 0, 0, S_NULL}, // S_LIZARDMAN
{SPR_WBLN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_LIONMAN
// Opulence
{SPR_OPUL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_OPULENCE_PALMTREE
{SPR_OPUL, 1, -1, {NULL}, 0, 0, S_NULL}, // S_OPULENCE_FERN
{SPR_TGEM, 1, -1, {NULL}, 0, 0, S_NULL}, // S_TUMBLEGEM_IDLE
{SPR_TGEM, FF_ANIMATE|0, -1, {NULL}, 7, 2, S_NULL}, // S_TUMBLEGEM_ROLL
{SPR_TCOI, 2, -1, {NULL}, 0, 0, S_NULL}, // S_TUMBLECOIN_IDLE
{SPR_TCOI, FF_ANIMATE|0, -1, {NULL}, 3, 1, S_NULL}, // S_TUMBLECOIN_FLIP
{SPR_FWRK, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK2}, // S_KARMAFIREWORK1
{SPR_FWRK, 1|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK3}, // S_KARMAFIREWORK2
{SPR_FWRK, 2|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK4}, // S_KARMAFIREWORK3
@ -20029,6 +20038,114 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_OPULENCE_PALMTREE
3795, // doomednum
S_OPULENCE_PALMTREE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
16<<FRACBITS, // radius
256<<FRACBITS, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_OPULENCE_FERN
3797, // doomednum
S_OPULENCE_FERN,// spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
16<<FRACBITS, // radius
192<<FRACBITS, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK, // flags
S_NULL // raisestate
},
{ // MT_TUMBLEGEM
3770, // doomednum
S_TUMBLEGEM_IDLE, // spawnstate
1000, // spawnhealth
S_TUMBLEGEM_ROLL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
8<<FRACBITS, // speed
16<<FRACBITS, // radius
16<<FRACBITS, // height
0, // display offset
100, // mass
0, // damage
sfx_gemhit, // activesound
MF_SPECIAL|MF_BOUNCE, // flags
S_NULL // raisestate
},
{ // MT_TUMBLECOIN
3771, // doomednum
S_TUMBLECOIN_IDLE, // spawnstate
1000, // spawnhealth
S_TUMBLECOIN_FLIP, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
8<<FRACBITS, // speed
16<<FRACBITS, // radius
16<<FRACBITS, // height
0, // display offset
100, // mass
0, // damage
sfx_gemhit, // activesound
MF_SPECIAL|MF_BOUNCE, // flags
S_NULL // raisestate
},
{ // MT_KARMAFIREWORK
-1, // doomednum
S_KARMAFIREWORK1, // spawnstate

View file

@ -774,6 +774,11 @@ typedef enum sprite
SPR_WBLZ,
SPR_WBLN,
// Opulence
SPR_OPUL,
SPR_TGEM,
SPR_TCOI,
SPR_FWRK,
// Xmas-specific sprites that don't fit aboxe
@ -4046,6 +4051,15 @@ typedef enum state
S_LIZARDMAN,
S_LIONMAN,
// Opulence
S_OPULENCE_PALMTREE,
S_OPULENCE_FERN,
S_TUMBLEGEM_IDLE,
S_TUMBLEGEM_ROLL,
S_TUMBLECOIN_IDLE,
S_TUMBLECOIN_FLIP,
S_KARMAFIREWORK1,
S_KARMAFIREWORK2,
S_KARMAFIREWORK3,
@ -4860,6 +4874,13 @@ typedef enum mobj_type
MT_LIZARDMAN,
MT_LIONMAN,
// Opulence
MT_OPULENCE_PALMTREE,
MT_OPULENCE_FERN,
MT_TUMBLEGEM,
MT_TUMBLECOIN,
MT_KARMAFIREWORK,
#ifdef SEENAMES

View file

@ -673,6 +673,23 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
case MT_BALLOON: // SRB2kart
P_SetObjectMomZ(toucher, 20<<FRACBITS, false);
break;
case MT_TUMBLEGEM:
case MT_TUMBLECOIN:
{
SINT8 flip = P_MobjFlip(special);
if ((toucher->momx || toucher->momy) && (flip * special->momz <= 0))
{
special->momx = toucher->momx;
special->momy = toucher->momy;
special->momz = flip * max(P_AproxDistance(toucher->momx, toucher->momy) / 4, FixedMul(special->info->speed, special->scale));
if (flip * toucher->momz > 0)
special->momz += toucher->momz / 8;
if ((statenum_t)(special->state-states) != special->info->seestate)
P_SetMobjState(special, special->info->seestate);
S_StartSound(special, special->info->activesound);
}
}
return;
// ***************************************** //
// Rings, coins, spheres, weapon panels, etc //

View file

@ -8851,6 +8851,16 @@ void P_MobjThinker(mobj_t *mobj)
}
}
break;
case MT_TUMBLEGEM:
case MT_TUMBLECOIN:
mobj->friction = 95*FRACUNIT/100;
if ((((statenum_t)(mobj->state-states)) == mobj->info->seestate)
&& abs(mobj->momx) < mobj->scale && abs(mobj->momy) < mobj->scale && P_IsObjectOnGround(mobj))
{
mobj->momx = mobj->momy = 0;
P_SetMobjState(mobj, mobj->info->spawnstate);
}
break;
case MT_KARMAFIREWORK:
if (mobj->momz == 0)
{
@ -9866,6 +9876,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
}
}
break;
case MT_TUMBLEGEM:
mobj->color = P_RandomKey(MAXSKINCOLORS - 1) + 1;
break;
default:
break;
}

View file

@ -815,6 +815,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"chain", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Mementos Reaper
{"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma
{"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream
{"gemhit", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Opulence gem/coin tumbling
{"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Banana sniping
{"join", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Player joined server
{"leave", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Player left server

View file

@ -890,6 +890,7 @@ typedef enum
sfx_chain,
sfx_mkuma,
sfx_toada,
sfx_gemhit,
sfx_bsnipe,
sfx_join,
sfx_leave,