mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'master' of https://git.magicalgirl.moe/KartKrew/Kart.git into chars_cleanup
This commit is contained in:
commit
f36d58dd09
7 changed files with 68 additions and 59 deletions
|
@ -1328,6 +1328,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
||||
buff = md2->model->glCommandBuffer;
|
||||
curr = &md2->model->frames[frame];
|
||||
#if 0
|
||||
if (cv_grmd2.value == 1 && tics <= durs)
|
||||
{
|
||||
// frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation
|
||||
|
@ -1348,6 +1349,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//Hurdler: it seems there is still a small problem with mobj angle
|
||||
p.x = FIXED_TO_FLOAT(spr->mobj->x);
|
||||
|
|
|
@ -108,8 +108,8 @@ static patch_t *crosshair[HU_CROSSHAIRS]; // 3 precached crosshair graphics
|
|||
// protos.
|
||||
// -------
|
||||
static void HU_DrawRankings(void);
|
||||
static void HU_DrawCoopOverlay(void);
|
||||
static void HU_DrawNetplayCoopOverlay(void);
|
||||
//static void HU_DrawCoopOverlay(void);
|
||||
//static void HU_DrawNetplayCoopOverlay(void);
|
||||
|
||||
//======================================================================
|
||||
// KEYBOARD LAYOUTS FOR ENTERING TEXT
|
||||
|
@ -2019,26 +2019,27 @@ UINT32 hu_demolap;
|
|||
|
||||
static void HU_DrawDemoInfo(void)
|
||||
{
|
||||
V_DrawString(4, 188-16, V_YELLOWMAP, va(M_GetText("%s's replay"), player_names[0]));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Replay:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, player_names[0]);
|
||||
if (modeattacking)
|
||||
{
|
||||
V_DrawString(4, 188-8, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:");
|
||||
V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-24, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:");
|
||||
if (hu_demotime != UINT32_MAX)
|
||||
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, va("%i:%02i.%02i",
|
||||
V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-24, V_MONOSPACE, va("%i'%02i\"%02i",
|
||||
G_TicsToMinutes(hu_demotime,true),
|
||||
G_TicsToSeconds(hu_demotime),
|
||||
G_TicsToCentiseconds(hu_demotime)));
|
||||
else
|
||||
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, "--:--.--");
|
||||
V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-24, V_MONOSPACE, "--'--\"--");
|
||||
|
||||
V_DrawString(4, 188, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:");
|
||||
V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-16, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:");
|
||||
if (hu_demolap != UINT32_MAX)
|
||||
V_DrawRightAlignedString(120, 188, V_MONOSPACE, va("%i:%02i.%02i",
|
||||
V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-16, V_MONOSPACE, va("%i'%02i\"%02i",
|
||||
G_TicsToMinutes(hu_demolap,true),
|
||||
G_TicsToSeconds(hu_demolap),
|
||||
G_TicsToCentiseconds(hu_demolap)));
|
||||
else
|
||||
V_DrawRightAlignedString(120, 188, V_MONOSPACE, "--:--.--");
|
||||
V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-16, V_MONOSPACE, "--'--\"--");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2111,11 +2112,11 @@ void HU_Drawer(void)
|
|||
if (LUA_HudEnabled(hud_rankings))
|
||||
#endif
|
||||
HU_DrawRankings();
|
||||
if (gametype == GT_COOP)
|
||||
HU_DrawNetplayCoopOverlay();
|
||||
//if (gametype == GT_COOP)
|
||||
//HU_DrawNetplayCoopOverlay();
|
||||
}
|
||||
else
|
||||
HU_DrawCoopOverlay();
|
||||
//else
|
||||
//HU_DrawCoopOverlay();
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_ScoresHUD();
|
||||
#endif
|
||||
|
@ -2273,11 +2274,12 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
|||
{
|
||||
INT32 i, rightoffset = 240;
|
||||
const UINT8 *colormap;
|
||||
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
|
||||
|
||||
//this function is designed for 9 or less score lines only
|
||||
//I_Assert(scorelines <= 9); -- not today bitch, kart fixed it up
|
||||
|
||||
V_DrawFill(1, 26, 318, 1, 0); // Draw a horizontal line because it looks nice!
|
||||
V_DrawFill(1-duptweak, 26, dupadjust-2, 1, 0); // Draw a horizontal line because it looks nice!
|
||||
if (scorelines > 8)
|
||||
{
|
||||
V_DrawFill(160, 26, 1, 147, 0); // Draw a vertical line to separate the two sides.
|
||||
|
@ -2559,16 +2561,17 @@ void HU_DrawEmeralds(INT32 x, INT32 y, INT32 pemeralds)
|
|||
//
|
||||
static inline void HU_DrawSpectatorTicker(void)
|
||||
{
|
||||
int i;
|
||||
int length = 0, height = 174;
|
||||
int totallength = 0, templength = 0;
|
||||
INT32 i;
|
||||
INT32 length = 0, height = 174;
|
||||
INT32 totallength = 0, templength = -8;
|
||||
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].spectator)
|
||||
totallength += (signed)strlen(player_names[i]) * 8 + 16;
|
||||
|
||||
length -= (leveltime % (totallength + BASEVIDWIDTH));
|
||||
length += BASEVIDWIDTH;
|
||||
length -= (leveltime % (totallength + dupadjust+8));
|
||||
length += dupadjust;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].spectator)
|
||||
|
@ -2576,15 +2579,18 @@ static inline void HU_DrawSpectatorTicker(void)
|
|||
char *pos;
|
||||
char initial[MAXPLAYERNAME+1];
|
||||
char current[MAXPLAYERNAME+1];
|
||||
INT32 len;
|
||||
|
||||
len = ((signed)strlen(player_names[i]) * 8 + 16);
|
||||
|
||||
strcpy(initial, player_names[i]);
|
||||
pos = initial;
|
||||
|
||||
if (length >= -((signed)strlen(player_names[i]) * 8 + 16) && length <= BASEVIDWIDTH)
|
||||
if (length >= -len)
|
||||
{
|
||||
if (length < 0)
|
||||
if (length < -8)
|
||||
{
|
||||
UINT8 eatenchars = (UINT8)(abs(length) / 8 + 1);
|
||||
UINT8 eatenchars = (UINT8)(abs(length) / 8);
|
||||
|
||||
if (eatenchars <= strlen(initial))
|
||||
{
|
||||
|
@ -2592,7 +2598,7 @@ static inline void HU_DrawSpectatorTicker(void)
|
|||
// then compensate the drawing position.
|
||||
pos += eatenchars;
|
||||
strcpy(current, pos);
|
||||
templength = length % 8 + 8;
|
||||
templength = ((length + 8) % 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2606,10 +2612,11 @@ static inline void HU_DrawSpectatorTicker(void)
|
|||
templength = length;
|
||||
}
|
||||
|
||||
V_DrawString(templength, height + 8, V_TRANSLUCENT|V_ALLOWLOWERCASE, current);
|
||||
V_DrawString(templength - duptweak, height, V_TRANSLUCENT|V_ALLOWLOWERCASE, current);
|
||||
}
|
||||
|
||||
length += (signed)strlen(player_names[i]) * 8 + 16;
|
||||
if ((length += len) >= dupadjust+8)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2624,6 +2631,8 @@ static void HU_DrawRankings(void)
|
|||
boolean completed[MAXPLAYERS];
|
||||
UINT32 whiteplayer = MAXPLAYERS;
|
||||
|
||||
V_DrawFadeScreen(0xFF00, 16); // A little more readable, and prevents cheating the fades under other circumstances.
|
||||
|
||||
if (cons_menuhighlight.value)
|
||||
hilicol = cons_menuhighlight.value;
|
||||
else if (modeattacking)
|
||||
|
@ -2633,9 +2642,9 @@ static void HU_DrawRankings(void)
|
|||
|
||||
// draw the current gametype in the lower right
|
||||
if (modeattacking)
|
||||
V_DrawString(4, 188, hilicol, "Record Attack");
|
||||
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Record Attack");
|
||||
else
|
||||
V_DrawString(4, 188, hilicol, gametype_cons_t[gametype].strvalue);
|
||||
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, gametype_cons_t[gametype].strvalue);
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
|
@ -2730,9 +2739,6 @@ static void HU_DrawRankings(void)
|
|||
numplayersingame++;
|
||||
}
|
||||
|
||||
if (netgame && numplayersingame <= 1)
|
||||
K_drawKartFreePlay(leveltime);
|
||||
|
||||
for (j = 0; j < numplayersingame; j++)
|
||||
{
|
||||
UINT8 lowestposition = MAXPLAYERS;
|
||||
|
@ -2784,7 +2790,7 @@ static void HU_DrawRankings(void)
|
|||
HU_DrawSpectatorTicker();
|
||||
}
|
||||
|
||||
static void HU_DrawCoopOverlay(void)
|
||||
/*static void HU_DrawCoopOverlay(void)
|
||||
{
|
||||
if (token
|
||||
#ifdef HAVE_BLUA
|
||||
|
@ -2840,7 +2846,7 @@ static void HU_DrawNetplayCoopOverlay(void)
|
|||
if (emeralds & (1 << i))
|
||||
V_DrawScaledPatch(20 + (i * 20), 6, 0, emeraldpics[i]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// Interface to CECHO settings for the outside world, avoiding the
|
||||
|
|
11
src/k_kart.c
11
src/k_kart.c
|
@ -3340,8 +3340,6 @@ void K_DropItems(player_t *player)
|
|||
drop->destscale = (3*drop->destscale)/2;;
|
||||
|
||||
drop->angle = player->mo->angle + ANGLE_90;
|
||||
drop->momx = player->mo->momx>>1;
|
||||
drop->momy = player->mo->momy>>1;
|
||||
P_Thrust(drop,
|
||||
FixedAngle(P_RandomFixed()*180) + player->mo->angle + ANGLE_90,
|
||||
8*(mapheaderinfo[gamemap-1]->mobj_scale));
|
||||
|
@ -7528,15 +7526,6 @@ void K_drawKartHUD(void)
|
|||
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
||||
K_drawKartFirstPerson();
|
||||
|
||||
// Draw a white fade on level opening
|
||||
if (leveltime < 15 && stplyr == &players[displayplayer])
|
||||
{
|
||||
if (leveltime <= 5)
|
||||
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts
|
||||
else
|
||||
V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there
|
||||
}
|
||||
|
||||
if (splitscreen == 2) // Player 4 in 3P is the minimap :p
|
||||
K_drawKartMinimap();
|
||||
|
||||
|
|
23
src/m_menu.c
23
src/m_menu.c
|
@ -1242,7 +1242,8 @@ static menuitem_t OP_VideoOptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 90},
|
||||
|
||||
#ifdef HWRENDER
|
||||
{IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 105},
|
||||
{IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1272,18 +1273,19 @@ static menuitem_t OP_VideoModeMenu[] =
|
|||
#ifdef HWRENDER
|
||||
static menuitem_t OP_OpenGLOptionsMenu[] =
|
||||
{
|
||||
{IT_STRING|IT_CVAR, NULL, "Field of View", &cv_grfov, 10},
|
||||
{IT_STRING|IT_CVAR, NULL, "Quality", &cv_scr_depth, 20},
|
||||
{IT_STRING|IT_CVAR, NULL, "Texture Filter", &cv_grfiltermode, 30},
|
||||
{IT_STRING|IT_CVAR, NULL, "Anisotropic", &cv_granisotropicmode,40},
|
||||
#ifdef _WINDOWS
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Fog...", &OP_OpenGLFogDef, 10},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Gamma...", &OP_OpenGLColorDef, 20},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Field of View", &cv_grfov, 35},
|
||||
{IT_STRING|IT_CVAR, NULL, "Quality", &cv_scr_depth, 45},
|
||||
{IT_STRING|IT_CVAR, NULL, "Texture Filter", &cv_grfiltermode, 55},
|
||||
{IT_STRING|IT_CVAR, NULL, "Anisotropic", &cv_granisotropicmode, 65},
|
||||
/*#ifdef _WINDOWS
|
||||
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 50},
|
||||
#endif
|
||||
#ifdef ALAM_LIGHTING
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 70},
|
||||
#endif
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Fog...", &OP_OpenGLFogDef, 80},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Gamma...", &OP_OpenGLColorDef, 90},
|
||||
#endif*/
|
||||
};
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
|
@ -7811,6 +7813,8 @@ static void M_ConnectIP(INT32 choice)
|
|||
return;
|
||||
}
|
||||
|
||||
M_ClearMenus(true);
|
||||
|
||||
COM_BufAddText(va("connect \"%s\"\n", setupm_ip));
|
||||
|
||||
// A little "please wait" message.
|
||||
|
@ -7842,7 +7846,6 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
|
||||
case KEY_ENTER:
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
M_ClearMenus(true);
|
||||
M_ConnectIP(1);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1896,13 +1896,13 @@ static void ST_overlayDrawer(void)
|
|||
|
||||
if(!P_IsLocalPlayer(stplyr))
|
||||
{
|
||||
char name[MAXPLAYERNAME+1];
|
||||
/*char name[MAXPLAYERNAME+1];
|
||||
// shorten the name if its more than twelve characters.
|
||||
strlcpy(name, player_names[stplyr-players], 13);
|
||||
strlcpy(name, player_names[stplyr-players], 13);*/
|
||||
|
||||
// Show name of player being displayed
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Viewpoint:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, name);
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, player_names[stplyr-players]);
|
||||
}
|
||||
|
||||
// This is where we draw all the fun cheese if you have the chasecam off!
|
||||
|
@ -2058,4 +2058,13 @@ void ST_Drawer(void)
|
|||
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
|
||||
ST_MayonakaStatic();
|
||||
}
|
||||
|
||||
// Draw a white fade on level opening
|
||||
if (leveltime < 15)
|
||||
{
|
||||
if (leveltime <= 5)
|
||||
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts
|
||||
else
|
||||
V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,9 +78,9 @@ consvar_t cv_grcoronas = {"gr_coronas", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL,
|
|||
consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}};
|
||||
//static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}};
|
||||
// console variables in development
|
||||
consvar_t cv_grmd2 = {"gr_md2", "Off", CV_SAVE, CV_MD2, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grmd2 = {"gr_md2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
const UINT8 gammatable[5][256] =
|
||||
|
|
|
@ -348,7 +348,7 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawPatchFill(bgtile);
|
||||
|
||||
if (usebuffer) // Fade everything out
|
||||
V_DrawFadeScreen(0xFF00, 20);
|
||||
V_DrawFadeScreen(0xFF00, 22);
|
||||
|
||||
if (!splitscreen)
|
||||
whiteplayer = demoplayback ? displayplayer : consoleplayer;
|
||||
|
|
Loading…
Reference in a new issue