mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'gexunleashed' into 'next'
Fix forcecharacter regressions & crash (resolves #1262) Closes #1262 See merge request STJr/SRB2!2464
This commit is contained in:
commit
7e3a06cbe8
1 changed files with 8 additions and 8 deletions
16
src/m_menu.c
16
src/m_menu.c
|
@ -263,7 +263,7 @@ static void M_ConfirmTeamScramble(INT32 choice);
|
||||||
static void M_ConfirmTeamChange(INT32 choice);
|
static void M_ConfirmTeamChange(INT32 choice);
|
||||||
static void M_SecretsMenu(INT32 choice);
|
static void M_SecretsMenu(INT32 choice);
|
||||||
static void M_SetupChoosePlayer(INT32 choice);
|
static void M_SetupChoosePlayer(INT32 choice);
|
||||||
static UINT16 M_SetupChoosePlayerDirect(INT32 choice);
|
static INT32 M_SetupChoosePlayerDirect(INT32 choice);
|
||||||
static void M_QuitSRB2(INT32 choice);
|
static void M_QuitSRB2(INT32 choice);
|
||||||
menu_t SP_MainDef, OP_MainDef;
|
menu_t SP_MainDef, OP_MainDef;
|
||||||
menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
|
menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
|
||||||
|
@ -3674,7 +3674,7 @@ void M_StartControlPanel(void)
|
||||||
{
|
{
|
||||||
// Devmode unlocks Pandora's Box in the pause menu
|
// Devmode unlocks Pandora's Box in the pause menu
|
||||||
boolean pandora = ((M_SecretUnlocked(SECRET_PANDORA, serverGamedata) || cv_debug || devparm) && !marathonmode);
|
boolean pandora = ((M_SecretUnlocked(SECRET_PANDORA, serverGamedata) || cv_debug || devparm) && !marathonmode);
|
||||||
|
|
||||||
if (gamestate != GS_LEVEL || ultimatemode) // intermission, so gray out stuff.
|
if (gamestate != GS_LEVEL || ultimatemode) // intermission, so gray out stuff.
|
||||||
{
|
{
|
||||||
SPauseMenu[spause_pandora].status = (pandora) ? (IT_GRAYEDOUT) : (IT_DISABLED);
|
SPauseMenu[spause_pandora].status = (pandora) ? (IT_GRAYEDOUT) : (IT_DISABLED);
|
||||||
|
@ -4156,7 +4156,7 @@ static void M_DrawStaticBox(fixed_t x, fixed_t y, INT32 flags, fixed_t w, fixed_
|
||||||
temp = (gametic % temp) * h*2*FRACUNIT; // Which frame to draw
|
temp = (gametic % temp) * h*2*FRACUNIT; // Which frame to draw
|
||||||
|
|
||||||
V_DrawCroppedPatch(x*FRACUNIT, y*FRACUNIT, (w*FRACUNIT) / 160, (h*FRACUNIT) / 100, flags, patch, NULL, 0, temp, w*2*FRACUNIT, h*2*FRACUNIT);
|
V_DrawCroppedPatch(x*FRACUNIT, y*FRACUNIT, (w*FRACUNIT) / 160, (h*FRACUNIT) / 100, flags, patch, NULL, 0, temp, w*2*FRACUNIT, h*2*FRACUNIT);
|
||||||
|
|
||||||
W_UnlockCachedPatch(patch);
|
W_UnlockCachedPatch(patch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9072,7 +9072,7 @@ static void M_CacheCharacterSelectEntry(INT32 i, INT32 skinnum)
|
||||||
description[i].namepic = W_CachePatchName(description[i].nametag, PU_PATCH);
|
description[i].namepic = W_CachePatchName(description[i].nametag, PU_PATCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT16 M_SetupChoosePlayerDirect(INT32 choice)
|
static INT32 M_SetupChoosePlayerDirect(INT32 choice)
|
||||||
{
|
{
|
||||||
INT32 skinnum, botskinnum;
|
INT32 skinnum, botskinnum;
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
|
@ -9161,7 +9161,7 @@ static UINT16 M_SetupChoosePlayerDirect(INT32 choice)
|
||||||
|
|
||||||
static void M_SetupChoosePlayer(INT32 choice)
|
static void M_SetupChoosePlayer(INT32 choice)
|
||||||
{
|
{
|
||||||
UINT16 skinset = M_SetupChoosePlayerDirect(choice);
|
INT32 skinset = M_SetupChoosePlayerDirect(choice);
|
||||||
if (skinset != MAXCHARACTERSLOTS)
|
if (skinset != MAXCHARACTERSLOTS)
|
||||||
{
|
{
|
||||||
M_ChoosePlayer(skinset);
|
M_ChoosePlayer(skinset);
|
||||||
|
@ -10186,7 +10186,7 @@ void M_DrawNightsAttackMenu(void)
|
||||||
skinnumber = 0; //Default to Sonic
|
skinnumber = 0; //Default to Sonic
|
||||||
else
|
else
|
||||||
skinnumber = (cv_chooseskin.value-1);
|
skinnumber = (cv_chooseskin.value-1);
|
||||||
|
|
||||||
spritedef_t *sprdef = &skins[skinnumber]->sprites[SPR2_NFLY]; //Make our patch the selected character's NFLY sprite
|
spritedef_t *sprdef = &skins[skinnumber]->sprites[SPR2_NFLY]; //Make our patch the selected character's NFLY sprite
|
||||||
spritetimer = FixedInt(ntsatkdrawtimer/2) % skins[skinnumber]->sprites[SPR2_NFLY].numframes; //Make the sprite timer cycle though all the frames at 2 tics per frame
|
spritetimer = FixedInt(ntsatkdrawtimer/2) % skins[skinnumber]->sprites[SPR2_NFLY].numframes; //Make the sprite timer cycle though all the frames at 2 tics per frame
|
||||||
spriteframe_t *sprframe = &sprdef->spriteframes[spritetimer]; //Our animation frame is equal to the number on the timer
|
spriteframe_t *sprframe = &sprdef->spriteframes[spritetimer]; //Our animation frame is equal to the number on the timer
|
||||||
|
@ -10199,11 +10199,11 @@ void M_DrawNightsAttackMenu(void)
|
||||||
color = skins[skinnumber]->supercolor+4;
|
color = skins[skinnumber]->supercolor+4;
|
||||||
else //If you don't go super in NiGHTS or at all, use prefcolor
|
else //If you don't go super in NiGHTS or at all, use prefcolor
|
||||||
color = skins[skinnumber]->prefcolor;
|
color = skins[skinnumber]->prefcolor;
|
||||||
|
|
||||||
angle_t fa = (FixedAngle(((FixedInt(ntsatkdrawtimer * 4)) % 360)<<FRACBITS)>>ANGLETOFINESHIFT) & FINEMASK;
|
angle_t fa = (FixedAngle(((FixedInt(ntsatkdrawtimer * 4)) % 360)<<FRACBITS)>>ANGLETOFINESHIFT) & FINEMASK;
|
||||||
|
|
||||||
V_DrawFixedPatch(270<<FRACBITS, (186<<FRACBITS) - 8*FINESINE(fa),
|
V_DrawFixedPatch(270<<FRACBITS, (186<<FRACBITS) - 8*FINESINE(fa),
|
||||||
FixedDiv(skins[skinnumber]->highresscale, skins[skinnumber]->shieldscale),
|
FixedDiv(skins[skinnumber]->highresscale, skins[skinnumber]->shieldscale),
|
||||||
(sprframe->flip & 1<<6) ? V_FLIP : 0,
|
(sprframe->flip & 1<<6) ? V_FLIP : 0,
|
||||||
natksprite,
|
natksprite,
|
||||||
R_GetTranslationColormap(TC_BLINK, color, GTC_CACHE));
|
R_GetTranslationColormap(TC_BLINK, color, GTC_CACHE));
|
||||||
|
|
Loading…
Reference in a new issue