Merge branch 'Saturn-Testing' into patchntexrefactor

This commit is contained in:
Alug committed 2025-04-16 22:31:54 +02:00
commit efde25469e
8 files changed
+118 -18

No files matched your search

+6
View File
@@ -1221,6 +1221,7 @@ boolean nametaggfx = false; // Nametag stuffs
boolean driftgaugegfx = false; // Driftgauge stuffs
boolean multiitem_icon = false; // Extra icons for Sneakers, Banana and Jawz
boolean joystickicon = false; // Extra icons for the joystick input display
boolean minidoticon = false; // Dot graphic for minimap player angle display
//
static void IdentifyVersion(void)
@@ -1433,6 +1434,11 @@ static void D_CheckSaturnExtraFiles(void)
joystickicon = true;
PUSHCONS(inputdisplay_cons_temp, last_inputdisplay_i, 3, "StickGFX");
}
if (W_LumpExists("MMAPDOT"))
{
minidoticon = true;
}
}
// now check for colour hud stuff
+1
View File
@@ -52,6 +52,7 @@ extern boolean nametaggfx; // Nametag stuffs
extern boolean driftgaugegfx; // Driftgauge stuffs
extern boolean multiitem_icon; // Extra icons for Sneakers, Banana and Jawz
extern boolean joystickicon; // Extra icons for the joystick input display
extern boolean minidoticon; // Dot icon for minimap player angle display
//
// autoload stuff
+2 -1
View File
@@ -149,8 +149,9 @@ extern consvar_t cv_pingstyle;
//extern consvar_t cv_smallpos;
extern consvar_t cv_showminimapnames;
extern consvar_t cv_minihead;
extern consvar_t cv_showminimapangle;
extern consvar_t cv_showlapemblem;
extern consvar_t cv_showlapemblem;
extern consvar_t cv_showviewpointtext;
extern consvar_t cv_showdownloadprompt;
+92 -6
View File
@@ -106,6 +106,7 @@ consvar_t cv_fancyroulette = {"animatedroulette", "Off", CV_SAVE, CV_OnOff, NULL
consvar_t cv_minihead = {"smallminimapplayers", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_showminimapnames = {"showminimapnames", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_showminimapangle = {"showminimapangle", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_highresportrait = {"highresportrait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // make char potraits use their high-res version instead
@@ -956,6 +957,8 @@ void K_RegisterClientKartStuff(void)
CV_RegisterVar(&cv_minihead);
CV_RegisterVar(&cv_showminimapnames);
CV_RegisterVar(&cv_showminimapangle);
CV_RegisterVar(&cv_showlapemblem);
CV_RegisterVar(&cv_stagetitle);
@@ -7618,6 +7621,8 @@ static patch_t *joybacking;
static patch_t *joyknob;
static patch_t *joyshadow;
static patch_t *kp_minimapdot;
void K_LoadKartHUDGraphics(void)
{
INT32 i, j;
@@ -7891,6 +7896,9 @@ void K_LoadKartHUDGraphics(void)
kp_wantedsplit = W_CachePatchName("4PWANTED", PU_HUDGFX);
kp_wantedreticle = W_CachePatchName("MMAPWANT", PU_HUDGFX);
if (minidoticon)
kp_minimapdot = W_CachePatchName("MMAPDOT", PU_HUDGFX);
// Kart Item Windows
kp_itembg[0] = W_CachePatchName("K_ITBG", PU_HUDGFX);
kp_itembg[1] = W_CachePatchName("K_ITBGD", PU_HUDGFX);
@@ -8368,17 +8376,20 @@ INT32 K_getMinimapTrans(void)
INT32 minimaptrans = cv_kartminimap.value;
if (!minimaptrans)
return 0;
return -1;
if (forceshowhud)
return (10-minimaptrans)<<FF_TRANSSHIFT;
if (timeinmap <= 105)
return 0;
return -1;
if (timeinmap <= 113)
minimaptrans = ((((INT32)timeinmap) - 105)*minimaptrans)/(113-105);
if (!minimaptrans)
return -1;
return (10-minimaptrans)<<FF_TRANSSHIFT;
}
@@ -10537,6 +10548,46 @@ static void K_drawKartPlayerCheck(void)
}
}
static void K_drawKartMinimapIcon(fixed_t objx, fixed_t objy, INT32 hudx, INT32 hudy, INT32 flags, patch_t *icon, UINT8 *colormap)
{
// amnum xpos & ypos are the icon's speed around the HUD.
// The number being divided by is for how fast it moves.
// The higher the number, the slower it moves.
// am xpos & ypos are the icon's starting position. Withouht
// it, they wouldn't 'spawn' on the top-right side of the HUD.
fixed_t amnumxpos, amnumypos;
INT32 amxpos, amypos;
fixed_t scale = FRACUNIT;
patch_t *AutomapPic;
AutomapPic = minimapinfo.minimap_pic;
if (AutomapPic == NULL)
{
return; // no pic, just get outta here
}
amnumxpos = (FixedMul(objx, minimapinfo.zoom) - minimapinfo.offs_x);
amnumypos = -(FixedMul(objy, minimapinfo.zoom) - minimapinfo.offs_y);
if (encoremode)
amnumxpos = -amnumxpos;
amxpos = amnumxpos + ((hudx + (AutomapPic->width-icon->width)/2)<<FRACBITS);
amypos = amnumypos + ((hudy + (AutomapPic->height-icon->height)/2)<<FRACBITS);
if (cv_minihead.value && !(icon == kp_minimapdot))
{
amxpos += (icon->width / 4)<<FRACBITS;
amypos += (icon->height / 4)<<FRACBITS;
scale /= 2;
}
V_DrawFixedPatch(amxpos, amypos, scale, flags, icon, colormap);
}
static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
{
// amnum xpos & ypos are the icon's speed around the HUD.
@@ -10624,8 +10675,6 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
}
}
#undef lerp
static void K_drawKartMinimap(void)
{
INT32 i = 0;
@@ -10651,7 +10700,7 @@ static void K_drawKartMinimap(void)
minimaptrans = K_getMinimapTrans();
// Exit early if it wouldn't draw anyway.
if (!minimaptrans)
if (minimaptrans == -1)
return;
drawinfo_t info;
@@ -10736,14 +10785,51 @@ static void K_drawKartMinimap(void)
splitflags &= ~V_HUDTRANSHALF;
splitflags |= V_HUDTRANS;
const SINT8 icondotradius = (cv_minihead.value && !cv_showminimapnames.value) ? 8 : 10;
for (i = 0; i < numlocalplayers; i++)
{
if (localplayers[i] == -1)
continue; // this doesn't interest us
K_drawKartMinimapHead(players[localplayers[i]].mo, x, y, splitflags);
mobj_t *mobj = players[localplayers[i]].mo;
K_drawKartMinimapHead(mobj, x, y, splitflags);
if (!cv_showminimapangle.value || !minidoticon)
continue;
// dont draw for no contestants
if (mobj->health <= 0 && players[localplayers[i]].pflags & PF_TIMEOVER)
continue;
UINT8 *colormap;
fixed_t interpx, interpy;
angle_t ang = R_InterpolateAngle(mobj->old_angle, mobj->angle);
if (mobj->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, mobj->color, GTC_CACHE);
else
colormap = R_GetLocalTranslationColormap(mobj->skin, mobj->localskin, mobj->color, GTC_CACHE, mobj->skinlocal);
interpx = lerp(mobj->old_x, mobj->x);
interpy = lerp(mobj->old_y, mobj->y);
K_drawKartMinimapIcon(
interpx,
interpy,
x + FixedMul(FCOS(ang), icondotradius),
y - FixedMul(FSIN(ang), icondotradius),
splitflags,
kp_minimapdot,
colormap
);
}
}
#undef lerp
static void K_drawKartStartCountdown(void)
{
INT32 pnum = 0, splitflags = K_calcSplitFlags(0); // 3
+2 -2
View File
@@ -615,7 +615,7 @@ static int libd_drawOnMinimap(lua_State *L)
INT32 mm_x, mm_y;
fixed_t patchw = 0, patchh = 0;
HUDONLY // only run this function in hud hooks
HUDONLY // only run this function in hud hooks
// Draw the HUD only when playing in a level.
// hu_stuff needs this, unlike st_stuff.
@@ -635,7 +635,7 @@ static int libd_drawOnMinimap(lua_State *L)
minimaptrans = K_getMinimapTrans();
// Exit early if it wouldn't draw anyway.
if (!minimaptrans)
if (minimaptrans == -1)
return 0;
x = luaL_checkinteger(L, 1);
+12 -6
View File
@@ -2033,7 +2033,7 @@ static const char* OP_PlayerCamOptionsTooltips[] =
"Height of the Camera",
"Speed of the Camera",
"Should looking back inherit the Players Momentum?\nEither inherit Player Momentum or double of it\nmay make looking back while boosting or going in high speed less jarring",
"Allows looking up/down by holding aim forward/backward while standing still.",
"Allows looking up/down by holding\naim forward/backward while standing still.",
"Speed of the Freecam/Spectator Camera",
"Toggle between Third or First Person camera",
};
@@ -2433,15 +2433,16 @@ static menuitem_t OP_SaturnHudMenu[] =
{IT_STRING | IT_CVAR, NULL, "Show Names on Minimap", &cv_showminimapnames, 135},
{IT_STRING | IT_CVAR, NULL, "Small Minimap Players", &cv_minihead, 140},
{IT_STRING | IT_CVAR, NULL, "Spin Minimap Icons", &cv_spinoutroll, 150},
{IT_STRING | IT_CVAR, NULL, "Player Angle Dot", &cv_showminimapangle, 160},
{IT_STRING | IT_CVAR, NULL, "Beta Intermissionscreen", &cv_betainterscreen, 160},
{IT_STRING | IT_CVAR, NULL, "Beta Intermissionscreen", &cv_betainterscreen, 170},
{IT_STRING | IT_CVAR, NULL, "Show Director Prompt", &cv_showdirectorhud, 170},
{IT_STRING | IT_CVAR, NULL, "Show Director Prompt", &cv_showdirectorhud, 180},
{IT_STRING | IT_SUBMENU, NULL, "Nametags...", &OP_NametagDef, 180},
{IT_STRING | IT_SUBMENU, NULL, "Driftgauge...", &OP_DriftGaugeDef, 185},
{IT_STRING | IT_SUBMENU, NULL, "Nametags...", &OP_NametagDef, 190},
{IT_STRING | IT_SUBMENU, NULL, "Driftgauge...", &OP_DriftGaugeDef, 195},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 195},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 205},
};
static const char* OP_SaturnHudTooltips[] =
@@ -2466,6 +2467,7 @@ static const char* OP_SaturnHudTooltips[] =
"Show player names on the minimap.",
"Minimize the player icons on the minimap.",
"Erratically rotate player icons during spinouts.",
"Show a dot showing the player facing angle.",
"Make the Intermission screen look like in beta versions of Kart!\nEither with background or just the rest.",
"Show the Director Toggle prompt when spectating.",
"Nametag Options.",
@@ -2495,6 +2497,7 @@ enum
sh_mapname,
sh_smallmap,
sh_iconspinout,
sh_minidot,
sh_betainter,
sh_directorhud,
sh_nametagmen,
@@ -4946,6 +4949,9 @@ void M_Init(void)
if (!nametaggfx)
OP_NametagMenu[nt_ntchar].status = IT_GRAYEDOUT;
if (!minidoticon)
OP_SaturnHudMenu[sh_minidot].status = IT_GRAYEDOUT;
#ifndef NONET
CV_RegisterVar(&cv_serversort);
#endif
+2 -2
View File
@@ -278,7 +278,7 @@ void R_SetViewContext(enum viewcontext_e _viewcontext)
}
return (R_LerpFixed(from, to, rendertimefrac));
}
}*/
angle_t R_InterpolateAngle(angle_t from, angle_t to)
{
@@ -288,7 +288,7 @@ angle_t R_InterpolateAngle(angle_t from, angle_t to)
}
return (R_LerpAngle(from, to, rendertimefrac));
}*/
}
void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
{
+1 -1
View File
@@ -134,7 +134,7 @@ void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff,
// Set the current view context (the viewvars pointed to by newview)
void R_SetViewContext(enum viewcontext_e _viewcontext);
fixed_t R_InterpolateFixed(fixed_t from, fixed_t to);
//fixed_t R_InterpolateFixed(fixed_t from, fixed_t to);
angle_t R_InterpolateAngle(angle_t from, angle_t to);
// Evaluate the interpolated mobj state for the given mobj