Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into bustables_misc

# Conflicts:
#	src/p_user.c
This commit is contained in:
toaster 2019-07-30 18:14:52 +01:00
commit 2ae07bdf3b
14 changed files with 209 additions and 47 deletions

View File

@ -5699,7 +5699,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_CEZFLOWER",
"S_CEZPOLE",
"S_CEZBANNER",
"S_CEZBANNER1",
"S_CEZBANNER2",
"S_PINETREE",
"S_CEZBUSH1",
"S_CEZBUSH2",
@ -5708,7 +5709,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_FLAMEHOLDER",
"S_FIRETORCH",
"S_WAVINGFLAG",
"S_WAVINGFLAGSEG",
"S_WAVINGFLAGSEG1",
"S_WAVINGFLAGSEG2",
"S_CRAWLASTATUE",
"S_FACESTABBERSTATUE",
"S_SUSPICIOUSFACESTABBERSTATUE_WAIT",
@ -7514,8 +7516,10 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_SMALLFIREBAR", // Small Firebar
"MT_BIGFIREBAR", // Big Firebar
"MT_CEZFLOWER", // Flower
"MT_CEZPOLE", // Pole
"MT_CEZBANNER", // Banner
"MT_CEZPOLE1", // Pole (with red banner)
"MT_CEZPOLE2", // Pole (with blue banner)
"MT_CEZBANNER1", // Banner (red)
"MT_CEZBANNER2", // Banner (blue)
"MT_PINETREE", // Pine Tree
"MT_CEZBUSH1", // Bush 1
"MT_CEZBUSH2", // Bush 2
@ -7523,8 +7527,10 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_CANDLEPRICKET", // Candle pricket
"MT_FLAMEHOLDER", // Flame holder
"MT_FIRETORCH", // Fire torch
"MT_WAVINGFLAG", // Waving flag
"MT_WAVINGFLAGSEG", // Waving flag segment
"MT_WAVINGFLAG1", // Waving flag (red)
"MT_WAVINGFLAG2", // Waving flag (blue)
"MT_WAVINGFLAGSEG1", // Waving flag segment (red)
"MT_WAVINGFLAGSEG2", // Waving flag segment (blue)
"MT_CRAWLASTATUE", // Crawla statue
"MT_FACESTABBERSTATUE", // Facestabber statue
"MT_SUSPICIOUSFACESTABBERSTATUE", // :eggthinking:

View File

@ -2322,9 +2322,10 @@ state_t states[NUMSTATES] =
{SPR_BFBR, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_BIGFIREBAR1}, // S_BIGFIREBAR16
{SPR_FWR4, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CEZFLOWER
{SPR_BANR, 1, -1, {NULL}, 0, 0, S_NULL}, // S_CEZPOLE
{SPR_BANR, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CEZPOLE
{SPR_BANR, FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_CEZBANNER
{SPR_BANR, FF_PAPERSPRITE|1, -1, {NULL}, 0, 0, S_NULL}, // S_CEZBANNER1
{SPR_BANR, FF_PAPERSPRITE|2, -1, {NULL}, 0, 0, S_NULL}, // S_CEZBANNER2
{SPR_PINE, 0, -1, {NULL}, 0, 0, S_NULL}, // S_PINETREE
{SPR_CEZB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CEZBUSH1
@ -2338,7 +2339,8 @@ state_t states[NUMSTATES] =
{SPR_CTRC, FF_FULLBRIGHT|FF_ANIMATE, 8*3, {A_FlameParticle}, 3, 3, S_FIRETORCH}, // S_FIRETORCH
{SPR_CFLG, 0, -1, {NULL}, 0, 0, S_NULL}, // S_WAVINGFLAG
{SPR_CFLG, FF_PAPERSPRITE|1, -1, {NULL}, 0, 0, S_NULL}, // S_WAVINGFLAGSEG
{SPR_CFLG, FF_PAPERSPRITE|1, -1, {NULL}, 0, 0, S_NULL}, // S_WAVINGFLAGSEG1
{SPR_CFLG, FF_PAPERSPRITE|2, -1, {NULL}, 0, 0, S_NULL}, // S_WAVINGFLAGSEG2
{SPR_CSTA, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CRAWLASTATUE
@ -11018,7 +11020,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_CEZPOLE
{ // MT_CEZPOLE1
1117, // doomednum
S_CEZPOLE, // spawnstate
1000, // spawnhealth
@ -11045,9 +11047,63 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_CEZBANNER
{ // MT_CEZPOLE2
1118, // doomednum
S_CEZPOLE, // 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
40*FRACUNIT, // radius
224*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_CEZBANNER1
-1, // doomednum
S_CEZBANNER, // spawnstate
S_CEZBANNER1, // 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
40*FRACUNIT, // radius
224*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_CEZBANNER2
-1, // doomednum
S_CEZBANNER2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
@ -11261,8 +11317,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_WAVINGFLAG
1118, // doomednum
{ // MT_WAVINGFLAG1
1128, // doomednum
S_WAVINGFLAG, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
@ -11278,8 +11334,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
4*FRACUNIT, // radius
104*FRACUNIT, // height
8*FRACUNIT, // radius
208*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
@ -11288,9 +11344,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_WAVINGFLAGSEG
-1, // doomednum
S_WAVINGFLAGSEG, // spawnstate
{ // MT_WAVINGFLAG2
1129, // doomednum
S_WAVINGFLAG, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
@ -11305,7 +11361,61 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
4*FRACUNIT, // radius
8*FRACUNIT, // radius
208*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_WAVINGFLAGSEG1
-1, // doomednum
S_WAVINGFLAGSEG1, // 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
8*FRACUNIT, // radius
1, // height -- this is not a typo
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_WAVINGFLAGSEG2
-1, // doomednum
S_WAVINGFLAGSEG2, // 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
8*FRACUNIT, // radius
1, // height -- this is not a typo
0, // display offset
100, // mass

View File

@ -2458,7 +2458,8 @@ typedef enum state
S_CEZFLOWER,
S_CEZPOLE,
S_CEZBANNER,
S_CEZBANNER1,
S_CEZBANNER2,
S_PINETREE,
S_CEZBUSH1,
S_CEZBUSH2,
@ -2467,7 +2468,8 @@ typedef enum state
S_FLAMEHOLDER,
S_FIRETORCH,
S_WAVINGFLAG,
S_WAVINGFLAGSEG,
S_WAVINGFLAGSEG1,
S_WAVINGFLAGSEG2,
S_CRAWLASTATUE,
S_FACESTABBERSTATUE,
S_SUSPICIOUSFACESTABBERSTATUE_WAIT,
@ -4295,8 +4297,10 @@ typedef enum mobj_type
MT_SMALLFIREBAR, // Small Firebar
MT_BIGFIREBAR, // Big Firebar
MT_CEZFLOWER, // Flower
MT_CEZPOLE, // Pole
MT_CEZBANNER, // Banner
MT_CEZPOLE1, // Pole (with red banner)
MT_CEZPOLE2, // Pole (with blue banner)
MT_CEZBANNER1, // Banner (red)
MT_CEZBANNER2, // Banner (blue)
MT_PINETREE, // Pine Tree
MT_CEZBUSH1, // Bush 1
MT_CEZBUSH2, // Bush 2
@ -4304,8 +4308,10 @@ typedef enum mobj_type
MT_CANDLEPRICKET, // Candle pricket
MT_FLAMEHOLDER, // Flame holder
MT_FIRETORCH, // Fire torch
MT_WAVINGFLAG, // Waving flag
MT_WAVINGFLAGSEG, // Waving flag segment
MT_WAVINGFLAG1, // Waving flag (red)
MT_WAVINGFLAG2, // Waving flag (blue)
MT_WAVINGFLAGSEG1, // Waving flag segment (red)
MT_WAVINGFLAGSEG2, // Waving flag segment (blue)
MT_CRAWLASTATUE, // Crawla statue
MT_FACESTABBERSTATUE, // Facestabber statue
MT_SUSPICIOUSFACESTABBERSTATUE, // :eggthinking:

View File

@ -2288,23 +2288,26 @@ static boolean MIT_SetCurBackground(UINT32 menutype, INT32 level, INT32 *retval,
(void)retval;
(void)fromoldest;
if (!menutype) // if there's nothing in this level, do nothing
return false;
if (menupres[menutype].bgcolor >= 0)
{
curbgcolor = menupres[menutype].bgcolor;
return true;
}
else if (menupres[menutype].bgname[0] && (!menupres[menutype].bghide || !titlemapinaction))
else if (menupres[menutype].bghide && titlemapinaction) // hide the background
{
curbghide = true;
return true;
}
else if (menupres[menutype].bgname[0])
{
strncpy(curbgname, menupres[menutype].bgname, 8);
curbgxspeed = menupres[menutype].titlescrollxspeed != INT32_MAX ? menupres[menutype].titlescrollxspeed : titlescrollxspeed;
curbgyspeed = menupres[menutype].titlescrollyspeed != INT32_MAX ? menupres[menutype].titlescrollyspeed : titlescrollyspeed;
return true;
}
else if (menupres[menutype].bghide && titlemapinaction) // hide the background
{
curbghide = true;
return true;
}
else if (!level)
{
if (M_GetYoungestChildMenu() == MN_SP_PLAYER || !defaultname || !defaultname[0])
@ -2328,6 +2331,9 @@ static boolean MIT_ChangeMusic(UINT32 menutype, INT32 level, INT32 *retval, void
(void)retval;
(void)fromoldest;
if (!menutype) // if there's nothing in this level, do nothing
return false;
if (menupres[menutype].musname[0])
{
S_ChangeMusic(menupres[menutype].musname, menupres[menutype].mustrack, menupres[menutype].muslooping);
@ -2352,6 +2358,9 @@ static boolean MIT_SetCurFadeValue(UINT32 menutype, INT32 level, INT32 *retval,
(void)retval;
(void)fromoldest;
if (!menutype) // if there's nothing in this level, do nothing
return false;
if (menupres[menutype].fadestrength >= 0)
{
curfadevalue = (menupres[menutype].fadestrength % 32);
@ -2368,6 +2377,9 @@ static boolean MIT_SetCurHideTitlePics(UINT32 menutype, INT32 level, INT32 *retv
(void)retval;
(void)fromoldest;
if (!menutype) // if there's nothing in this level, do nothing
return false;
if (menupres[menutype].hidetitlepics >= 0)
{
curhidepics = menupres[menutype].hidetitlepics;
@ -2469,7 +2481,7 @@ static void M_HandleMenuPresState(menu_t *newMenu)
curbgcolor = -1;
curbgxspeed = titlescrollxspeed;
curbgyspeed = titlescrollyspeed;
curbghide = true;
curbghide = (gamestate != GS_TIMEATTACK); // show in time attack, hide in other menus
// don't do the below during the in-game menus
if (gamestate != GS_TITLESCREEN && gamestate != GS_TIMEATTACK)
@ -8234,6 +8246,7 @@ static void M_TimeAttack(INT32 choice)
M_PatchSkinNameTable();
G_SetGamestate(GS_TIMEATTACK); // do this before M_SetupNextMenu so that menu meta state knows that we're switching
titlemapinaction = TITLEMAP_OFF; // Nope don't give us HOMs please
M_SetupNextMenu(&SP_TimeAttackDef);
if (!M_CanShowLevelInList(cv_nextmap.value-1, -1) && levelselect.rows[0].maplist[0])
CV_SetValue(&cv_nextmap, levelselect.rows[0].maplist[0]);
@ -8415,6 +8428,7 @@ static void M_NightsAttack(INT32 choice)
G_SetGamestate(GS_TIMEATTACK); // do this before M_SetupNextMenu so that menu meta state knows that we're switching
M_SetupNextMenu(&SP_NightsAttackDef);
titlemapinaction = TITLEMAP_OFF; // Nope don't give us HOMs please
if (!M_CanShowLevelInList(cv_nextmap.value-1, -1) && levelselect.rows[0].maplist[0])
CV_SetValue(&cv_nextmap, levelselect.rows[0].maplist[0]);
else

View File

@ -4674,7 +4674,7 @@ static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz)
}
dz /= 9;
while ((base = base->tracer)) // there are 10 per spoke, remember that
{
dx = (originx + P_ReturnThrustX(mobj, angle, (9*132)<<FRACBITS) - mobj->x)/9;
@ -8072,7 +8072,8 @@ void P_MobjThinker(mobj_t *mobj)
mobj->tracer->z += mobj->height;
}
break;
case MT_WAVINGFLAG:
case MT_WAVINGFLAG1:
case MT_WAVINGFLAG2:
{
fixed_t base = (leveltime<<(FRACBITS+1));
mobj_t *seg = mobj->tracer, *prev = mobj;
@ -9675,15 +9676,14 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_BIGMINE:
mobj->extravalue1 = FixedHypot(mobj->x, mobj->y)>>FRACBITS;
break;
case MT_WAVINGFLAG:
case MT_WAVINGFLAG1:
case MT_WAVINGFLAG2:
{
mobj_t *prev = mobj, *cur;
UINT8 i;
mobj->destscale <<= 2;
P_SetScale(mobj, mobj->destscale);
for (i = 0; i <= 16; i++) // probably should be < but staying authentic to the Lua version
{
cur = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_WAVINGFLAGSEG);
cur = P_SpawnMobjFromMobj(mobj, 0, 0, 0, ((mobj->type == MT_WAVINGFLAG1) ? MT_WAVINGFLAGSEG1 : MT_WAVINGFLAGSEG2));;
P_SetTarget(&prev->tracer, cur);
cur->extravalue1 = i;
prev = cur;
@ -11754,13 +11754,14 @@ ML_EFFECT5 : Don't stop thinking when too far away
P_SpawnMobjFromMobj(mobj, -1*FRACUNIT, 0, 0, MT_THZTREEBRANCH)->angle = mobjangle + ANGLE_270;
}
break;
case MT_CEZPOLE:
case MT_CEZPOLE1:
case MT_CEZPOLE2:
{ // Spawn the banner
angle_t mobjangle = FixedAngle(mthing->angle<<FRACBITS);
P_SpawnMobjFromMobj(mobj,
P_ReturnThrustX(mobj, mobjangle, 4<<FRACBITS),
P_ReturnThrustY(mobj, mobjangle, 4<<FRACBITS),
0, MT_CEZBANNER)->angle = mobjangle + ANGLE_90;
0, ((mobj->type == MT_CEZPOLE1) ? MT_CEZBANNER1 : MT_CEZBANNER2))->angle = mobjangle + ANGLE_90;
}
break;
case MT_HHZTREE_TOP:

View File

@ -3408,7 +3408,7 @@ static void P_NetUnArchiveThinkers(void)
{
for (;;)
{
thinker_t* th;
thinker_t* th = NULL;
tclass = READUINT8(save_p);
if (tclass == tc_end)

View File

@ -2056,7 +2056,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
fixed_t mu = FixedMul(player->maxdash, player->mo->scale);
fixed_t mu2 = FixedHypot(player->mo->momx, player->mo->momy);
fixed_t ev;
mobj_t *missile;
mobj_t *missile = NULL;
if (mu2 < mu)
mu2 = mu;
ev = (50*FRACUNIT - (mu/25))/50;
@ -2076,7 +2076,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
i++;
throwang += ANG30;
}
if (mobjinfo[type].seesound)
if (mobjinfo[type].seesound && missile)
S_StartSound(missile, missile->info->seesound);
}
}

View File

@ -2446,9 +2446,11 @@ static void R_DrawMaskedList (drawnode_t* head)
void R_DrawMasked(maskcount_t* masks, UINT8 nummasks)
{
drawnode_t heads[nummasks]; /**< Drawnode lists; as many as number of views/portals. */
drawnode_t *heads; /**< Drawnode lists; as many as number of views/portals. */
SINT8 i;
heads = calloc(nummasks, sizeof(drawnode_t));
for (i = 0; i < nummasks; i++)
{
heads[i].next = heads[i].prev = &heads[i];
@ -2474,6 +2476,8 @@ void R_DrawMasked(maskcount_t* masks, UINT8 nummasks)
R_DrawMaskedList(&heads[nummasks - 1]);
R_ClearDrawNodes(&heads[nummasks - 1]);
}
free(heads);
}
// ==========================================================================

View File

@ -1988,8 +1988,10 @@ void GameMIDIMusic_OnChange(void)
}
}
#ifdef HAVE_OPENMPT
void ModFilter_OnChange(void)
{
if (openmpt_mhandle)
openmpt_module_set_render_param(openmpt_mhandle, OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH, cv_modfilter.value);
}
}
#endif

View File

@ -277,6 +277,7 @@
<ClInclude Include="..\r_local.h" />
<ClInclude Include="..\r_main.h" />
<ClInclude Include="..\r_plane.h" />
<ClInclude Include="..\r_portal.h" />
<ClInclude Include="..\r_segs.h" />
<ClInclude Include="..\r_sky.h" />
<ClInclude Include="..\r_splats.h" />
@ -430,6 +431,7 @@
</ClCompile>
<ClCompile Include="..\r_main.c" />
<ClCompile Include="..\r_plane.c" />
<ClCompile Include="..\r_portal.c" />
<ClCompile Include="..\r_segs.c" />
<ClCompile Include="..\r_sky.c" />
<ClCompile Include="..\r_splats.c" />

View File

@ -453,6 +453,9 @@
<ClInclude Include="..\hardware\hw_clip.h">
<Filter>Hw_Hardware</Filter>
</ClInclude>
<ClInclude Include="..\r_portal.h">
<Filter>R_Rend</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\tmap.nas">
@ -894,6 +897,10 @@
<ClCompile Include="..\hardware\hw_clip.c">
<Filter>Hw_Hardware</Filter>
</ClCompile>
<ClCompile Include="..\apng.c" />
<ClCompile Include="..\r_portal.c">
<Filter>R_Rend</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Image Include="Srb2SDL.ico">

View File

@ -117,7 +117,7 @@ static int result;
static void var_cleanup(void)
{
loop_point = song_length = 0.0f;
song_length = loop_point = 0.0f;
music_bytes = fading_source = fading_target =\
fading_timer = fading_duration = 0;

View File

@ -293,6 +293,7 @@
</ClCompile>
<ClCompile Include="..\r_main.c" />
<ClCompile Include="..\r_plane.c" />
<ClCompile Include="..\r_portal.c" />
<ClCompile Include="..\r_segs.c" />
<ClCompile Include="..\r_sky.c" />
<ClCompile Include="..\r_splats.c" />
@ -443,6 +444,7 @@
<ClInclude Include="..\r_local.h" />
<ClInclude Include="..\r_main.h" />
<ClInclude Include="..\r_plane.h" />
<ClInclude Include="..\r_portal.h" />
<ClInclude Include="..\r_segs.h" />
<ClInclude Include="..\r_sky.h" />
<ClInclude Include="..\r_splats.h" />

View File

@ -456,6 +456,10 @@
<ClCompile Include="..\hardware\hw_clip.c">
<Filter>Hw_Hardware</Filter>
</ClCompile>
<ClCompile Include="..\apng.c" />
<ClCompile Include="..\r_portal.c">
<Filter>R_Rend</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="afxres.h">
@ -857,6 +861,10 @@
<ClInclude Include="..\hardware\hw_clip.h">
<Filter>Hw_Hardware</Filter>
</ClInclude>
<ClInclude Include="..\apng.h" />
<ClInclude Include="..\r_portal.h">
<Filter>R_Rend</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Srb2win.ico">