mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 15:11:55 +00:00
Fix build errors & fix F_DrawContinueCharacter somehow becoming unused
This commit is contained in:
parent
9fb4b4cfbb
commit
7f51bb3001
2 changed files with 14 additions and 25 deletions
|
@ -3564,7 +3564,7 @@ void F_StartContinue(void)
|
|||
S_StopSounds();
|
||||
|
||||
contPlayers[0] = &players[consoleplayer];
|
||||
contskins[0] = &skins[players[consoleplayer].skin];
|
||||
contskins[0] = skins[players[consoleplayer].skin];
|
||||
|
||||
cont_spr2[0][0] = P_GetSkinSprite2(contskins[0], SPR2_CNT1, NULL);
|
||||
cont_spr2[0][2] = contskins[0]->contangle & 7;
|
||||
|
@ -3583,7 +3583,7 @@ void F_StartContinue(void)
|
|||
secondplaya = 1;
|
||||
|
||||
contPlayers[1] = &players[secondplaya];
|
||||
contskins[1] = &skins[players[secondplaya].skin];
|
||||
contskins[1] = skins[players[secondplaya].skin];
|
||||
|
||||
cont_spr2[1][0] = P_GetSkinSprite2(contskins[1], SPR2_CNT4, NULL);
|
||||
cont_spr2[1][2] = (contskins[1]->contangle >> 3) & 7;
|
||||
|
@ -3645,7 +3645,7 @@ static void F_DrawContinueCharacter(INT32 dx, INT32 dy, UINT8 n)
|
|||
(
|
||||
HUD_HOOK(continue), luahuddrawlist_continue[n], contPlayers[n],
|
||||
dx, dy, contskins[n]->highresscale,
|
||||
(INT32)(contskins[n] - skins), cont_spr2[n][0], cont_spr2[n][1], cont_spr2[n][2] + 1, contColors[n], // add 1 to rotation to convert internal angle numbers (0-7) to WAD editor angle numbers (1-8)
|
||||
(INT32)(&contskins[n] - skins), cont_spr2[n][0], cont_spr2[n][1], cont_spr2[n][2] + 1, contColors[n], // add 1 to rotation to convert internal angle numbers (0-7) to WAD editor angle numbers (1-8)
|
||||
imcontinuing ? continuetime : timetonext, imcontinuing
|
||||
);
|
||||
}
|
||||
|
@ -3667,8 +3667,6 @@ static void F_DrawContinueCharacter(INT32 dx, INT32 dy, UINT8 n)
|
|||
//
|
||||
void F_ContinueDrawer(void)
|
||||
{
|
||||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
patch_t *patch;
|
||||
INT32 i, x = (BASEVIDWIDTH>>1), ncontinues = players[consoleplayer].continues;
|
||||
char numbuf[9] = "CONTNUM*";
|
||||
|
@ -3713,7 +3711,7 @@ void F_ContinueDrawer(void)
|
|||
else if (ncontinues > 10)
|
||||
{
|
||||
if (!(continuetime & 1) || continuetime > 17)
|
||||
V_DrawContinueIcon(x, 68, 0, (INT32)(contskins[0] - skins), contColors[0]);
|
||||
V_DrawContinueIcon(x, 68, 0, (INT32)(&contskins[0] - skins), contColors[0]);
|
||||
V_DrawScaledPatch(x+12, 66, 0, stlivex);
|
||||
V_DrawRightAlignedString(x+38, 64, 0,
|
||||
va("%d",(imcontinuing ? ncontinues-1 : ncontinues)));
|
||||
|
@ -3727,7 +3725,7 @@ void F_ContinueDrawer(void)
|
|||
{
|
||||
if (i == (ncontinues/2) && ((continuetime & 1) || continuetime > 17))
|
||||
continue;
|
||||
V_DrawContinueIcon(x - (i*30), 68, 0, (INT32)(contskins[0] - skins), contColors[0]);
|
||||
V_DrawContinueIcon(x - (i*30), 68, 0, (INT32)(&contskins[0] - skins), contColors[0]);
|
||||
}
|
||||
x = BASEVIDWIDTH>>1;
|
||||
}
|
||||
|
@ -3767,21 +3765,12 @@ void F_ContinueDrawer(void)
|
|||
else if (lift[0] > TICRATE+5)
|
||||
lift[0] = TICRATE+5;
|
||||
|
||||
#define drawchar(dx, dy, n) {\
|
||||
sprdef = &contskins[n]->sprites[cont_spr2[n][0]];\
|
||||
sprframe = &sprdef->spriteframes[cont_spr2[n][1]];\
|
||||
patch = W_CachePatchNum(sprframe->lumppat[cont_spr2[n][2]], PU_PATCH_LOWPRIORITY);\
|
||||
V_DrawFixedPatch((dx), (dy), contskins[n]->highresscale, (sprframe->flip & (1<<cont_spr2[n][2])) ? V_FLIP : 0, patch, contcolormaps[n]);\
|
||||
}
|
||||
|
||||
if (offsy < 0)
|
||||
drawchar((BASEVIDWIDTH<<(FRACBITS-1))-offsx, ((140-lift[0])<<FRACBITS)-offsy, 0);
|
||||
F_DrawContinueCharacter((BASEVIDWIDTH<<(FRACBITS-1))-offsx, ((140-lift[0])<<FRACBITS)-offsy, 0);
|
||||
if (contskins[1])
|
||||
drawchar((BASEVIDWIDTH<<(FRACBITS-1))+offsx, ((140-lift[1])<<FRACBITS)+offsy, 1);
|
||||
F_DrawContinueCharacter((BASEVIDWIDTH<<(FRACBITS-1))+offsx, ((140-lift[1])<<FRACBITS)+offsy, 1);
|
||||
if (offsy >= 0)
|
||||
drawchar((BASEVIDWIDTH<<(FRACBITS-1))-offsx, ((140-lift[0])<<FRACBITS)-offsy, 0);
|
||||
|
||||
#undef drawchar
|
||||
F_DrawContinueCharacter((BASEVIDWIDTH<<(FRACBITS-1))-offsx, ((140-lift[0])<<FRACBITS)-offsy, 0);
|
||||
|
||||
if (timetonext > (11*TICRATE))
|
||||
V_DrawFadeScreen(31, timetonext-(11*TICRATE));
|
||||
|
|
12
src/m_menu.c
12
src/m_menu.c
|
@ -12214,7 +12214,7 @@ static menucolor_t *M_GridIndexToMenuColor(UINT16 index)
|
|||
}
|
||||
}
|
||||
|
||||
static void M_SetPlayerSetupFollowItem()
|
||||
static void M_SetPlayerSetupFollowItem(void)
|
||||
{
|
||||
const mobjtype_t followitem = skins[setupm_fakeskin]->followitem;
|
||||
|
||||
|
@ -12223,7 +12223,7 @@ static void M_SetPlayerSetupFollowItem()
|
|||
case MT_TAILSOVERLAY:
|
||||
{
|
||||
const state_t *state = &states[S_TAILSOVERLAY_MINUS30DEGREES];
|
||||
const UINT8 sprite2 = P_GetSkinSprite2(&skins[setupm_fakeskin], state->frame & FF_FRAMEMASK, NULL);
|
||||
const UINT8 sprite2 = P_GetSkinSprite2(skins[setupm_fakeskin], state->frame & FF_FRAMEMASK, NULL);
|
||||
|
||||
if (state->sprite != SPR_PLAY)
|
||||
break;
|
||||
|
@ -12663,7 +12663,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
setupm_fakeskin = numskins-1;
|
||||
}
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUsable(-1, setupm_fakeskin)));
|
||||
multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
multi_spr2 = P_GetSkinSprite2(skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
M_SetPlayerSetupFollowItem();
|
||||
}
|
||||
else if (itemOn == 2) // player color
|
||||
|
@ -12704,7 +12704,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
setupm_fakeskin = 0;
|
||||
}
|
||||
while ((prev_setupm_fakeskin != setupm_fakeskin) && !(R_SkinUsable(-1, setupm_fakeskin)));
|
||||
multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
multi_spr2 = P_GetSkinSprite2(skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
M_SetPlayerSetupFollowItem();
|
||||
}
|
||||
else if (itemOn == 2) // player color
|
||||
|
@ -12855,7 +12855,7 @@ static void M_SetupMultiPlayer(INT32 choice)
|
|||
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER|IT_STRING);
|
||||
|
||||
multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
multi_spr2 = P_GetSkinSprite2(skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
M_SetPlayerSetupFollowItem();
|
||||
|
||||
// allocate and/or clear Lua player setup draw list
|
||||
|
@ -12900,7 +12900,7 @@ static void M_SetupMultiPlayer2(INT32 choice)
|
|||
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER|IT_STRING);
|
||||
|
||||
multi_spr2 = P_GetSkinSprite2(&skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
multi_spr2 = P_GetSkinSprite2(skins[setupm_fakeskin], SPR2_WALK, NULL);
|
||||
M_SetPlayerSetupFollowItem();
|
||||
|
||||
// allocate and/or clear Lua player setup draw list
|
||||
|
|
Loading…
Reference in a new issue