mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-12 01:32:16 +00:00
Merge remote-tracking branch 'origin/master' into adventure-air-booster-hardcode
This commit is contained in:
commit
2f19582941
61 changed files with 864 additions and 301 deletions
|
|
@ -430,6 +430,7 @@ consvar_t cv_scr_depth = Player("scr_depth", "16 bits").values({{8, "8 bits"}, {
|
|||
//added : 03-02-98: default screen mode, as loaded/saved in config
|
||||
consvar_t cv_scr_width = Player("scr_width", "640").values(CV_Unsigned);
|
||||
consvar_t cv_scr_height = Player("scr_height", "400").values(CV_Unsigned);
|
||||
consvar_t cv_scr_effect = Player("scr_effect", "Sharp Bilinear").values({{0, "Nearest"}, {1, "Sharp Bilinear"}, {2, "SalCRT"}}).save();
|
||||
|
||||
consvar_t cv_scr_scale = Player("scr_scale", "1.0").floating_point();
|
||||
consvar_t cv_scr_x = Player("scr_x", "0.0").floating_point();
|
||||
|
|
@ -531,7 +532,7 @@ consvar_t cv_masterserver_token = Server("masterserver_token", "");
|
|||
void MasterClient_Ticker(void);
|
||||
consvar_t cv_masterserver_update_rate = Server("masterserver_update_rate", "15").min_max(2, 60).onchange_noinit(MasterClient_Ticker);
|
||||
|
||||
consvar_t cv_maxping = Server("maxdelay", "20").values(CV_Unsigned);
|
||||
consvar_t cv_maxping = Server("maxdelay", "20").min_max(0, 30);
|
||||
consvar_t cv_menujam = Server("menujam", "menu").values({{0, "menu"}, {1, "menu2"}, {2, "menu3"}});
|
||||
consvar_t cv_menujam_update = Server("menujam_update", "Off").on_off();
|
||||
consvar_t cv_netdemosyncquality = Server("netdemo_syncquality", "1").min_max(1, 35);
|
||||
|
|
@ -540,7 +541,7 @@ consvar_t cv_netdemosize = Server("netdemo_size", "6").values(CV_Natural);
|
|||
void NetTimeout_OnChange(void);
|
||||
consvar_t cv_nettimeout = Server("nettimeout", "210").min_max(TICRATE/7, 60*TICRATE).onchange(NetTimeout_OnChange);
|
||||
|
||||
consvar_t cv_pause = NetVar("pausepermission", "Server").values({{0, "Server"}, {1, "All"}});
|
||||
consvar_t cv_pause = NetVar("pausepermission", "Server Admins").values({{0, "Server Admins"}, {1, "Everyone"}});
|
||||
consvar_t cv_pingmeasurement = Server("pingmeasurement", "Frames").values({{0, "Frames"}, {1, "Milliseconds"}});
|
||||
consvar_t cv_playbackspeed = Server("playbackspeed", "1").min_max(1, 10).dont_save();
|
||||
|
||||
|
|
@ -1326,7 +1327,7 @@ consvar_t cv_chattime = Player("chattime", "8").min_max(5, 999);
|
|||
consvar_t cv_chatwidth = Player("chatwidth", "150").min_max(64, 150);
|
||||
|
||||
// old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.)
|
||||
consvar_t cv_consolechat = Player("chatmode", "Window").values({{0, "Window"}, {1, "Console"}, {2, "Window (Hidden)"}});
|
||||
consvar_t cv_consolechat = Player("chatmode", "Yes").values({{0, "Yes"}, {2, "No"}});
|
||||
|
||||
consvar_t cv_gamestochat = Player("gamestochat", "0").values(CV_Unsigned);
|
||||
|
||||
|
|
@ -1347,7 +1348,7 @@ consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange
|
|||
|
||||
extern CV_PossibleValue_t glanisotropicmode_cons_t[];
|
||||
void CV_glanisotropic_OnChange(void);
|
||||
consvar_t cv_glanisotropicmode = OpenGL("gr_anisotropicmode", "1").values(glanisotropicmode_cons_t).onchange(CV_glanisotropic_OnChange).dont_save();
|
||||
consvar_t cv_glanisotropicmode = OpenGL("gr_anisotropicmode", "1").values(glanisotropicmode_cons_t).onchange(CV_glanisotropic_OnChange);
|
||||
|
||||
consvar_t cv_glbatching = OpenGL("gr_batching", "On").on_off().dont_save();
|
||||
|
||||
|
|
@ -1367,7 +1368,7 @@ consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange
|
|||
consvar_t cv_glmodellighting = OpenGL("gr_modellighting", "Off").on_off();
|
||||
#endif
|
||||
|
||||
consvar_t cv_glmodels = OpenGL("gr_models", "Off").on_off();
|
||||
consvar_t cv_glmodels = OpenGL("gr_models", "On").on_off();
|
||||
consvar_t cv_glshearing = OpenGL("gr_shearing", "Off").values({{0, "Off"}, {1, "On"}, {2, "Third-person"}});
|
||||
consvar_t cv_glskydome = OpenGL("gr_skydome", "On").on_off();
|
||||
consvar_t cv_glsolvetjoin = OpenGL("gr_solvetjoin", "On").on_off().dont_save();
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
// Draw bottom box
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press \xAB or \xAD to abort");
|
||||
|
||||
for (i = 0; i < 16; ++i)
|
||||
V_DrawFill((BASEVIDWIDTH/2-128) + (i * 16), BASEVIDHEIGHT-24, 16, 8, palstart + ((animtime - i) & 15));
|
||||
|
|
@ -752,7 +752,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
INT32 checkednum = 0;
|
||||
INT32 i;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press \xAB or \xAD to abort");
|
||||
|
||||
//ima just count files here
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
|
|
@ -774,7 +774,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
INT32 loadcompletednum = 0;
|
||||
INT32 i;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press \xAB or \xAD to abort");
|
||||
|
||||
//ima just count files here
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
|
|
@ -801,7 +801,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
// Draw the bottom box.
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-58-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-58-14, V_YELLOWMAP, "Press (B) to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-58-14, V_YELLOWMAP, "Press \xAB or \xAD to abort");
|
||||
|
||||
Net_GetNetStat();
|
||||
dldlength = (INT32)((file->currentsize/(double)file->totalsize) * 256);
|
||||
|
|
@ -867,7 +867,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
//Draw bottom box
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press \xAB or \xAD to abort");
|
||||
|
||||
for (i = 0; i < 16; ++i)
|
||||
V_DrawFill((BASEVIDWIDTH/2-128) + (i * 16), BASEVIDHEIGHT-24, 16, 8, palstart + ((animtime - i) & 15));
|
||||
|
|
@ -5943,7 +5943,7 @@ static void SV_Maketic(void)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
packetloss[i][maketic%PACKETMEASUREWINDOW] = false;
|
||||
|
||||
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -272,9 +272,19 @@ void D_ProcessEvents(boolean callresponders)
|
|||
boolean eaten;
|
||||
|
||||
G_ResetAllDeviceResponding();
|
||||
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
||||
|
||||
// Save these in local variables because eventtail !=
|
||||
// eventhead was evaluating true when they were equal,
|
||||
// but only when using the Y button to restart a Time
|
||||
// Attack??
|
||||
INT32 tail = eventtail;
|
||||
INT32 head = eventhead;
|
||||
|
||||
eventtail = eventhead;
|
||||
|
||||
for (; tail != head; tail = (tail+1) & (MAXEVENTS-1))
|
||||
{
|
||||
ev = &events[eventtail];
|
||||
ev = &events[tail];
|
||||
|
||||
HandleGamepadDeviceEvents(ev);
|
||||
|
||||
|
|
@ -687,7 +697,7 @@ static bool D_Display(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (Playing())
|
||||
if (Playing() || demo.playback)
|
||||
{
|
||||
HU_Drawer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3472,6 +3472,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_RANDOMITEM",
|
||||
"MT_SPHEREBOX",
|
||||
"MT_FLOATINGITEM",
|
||||
"MT_GOTPOWERUP",
|
||||
"MT_ITEMCAPSULE",
|
||||
"MT_ITEMCAPSULE_PART",
|
||||
"MT_MONITOR",
|
||||
|
|
|
|||
|
|
@ -811,6 +811,12 @@ extern struct darkness_t
|
|||
fixed_t value[MAXSPLITSCREENPLAYERS];
|
||||
} g_darkness;
|
||||
|
||||
extern struct musicfade_t
|
||||
{
|
||||
tic_t start, end, fade;
|
||||
boolean ticked;
|
||||
} g_musicfade;
|
||||
|
||||
#define DEFAULT_GRAVITY (4*FRACUNIT/5)
|
||||
extern fixed_t gravity;
|
||||
extern fixed_t mapobjectscale;
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ tic_t racecountdown, exitcountdown, musiccountdown; // for racing
|
|||
exitcondition_t g_exit;
|
||||
|
||||
darkness_t g_darkness;
|
||||
musicfade_t g_musicfade;
|
||||
|
||||
fixed_t gravity;
|
||||
fixed_t mapobjectscale;
|
||||
|
|
@ -2879,7 +2880,7 @@ mapthing_t *G_FindMapStart(INT32 playernum)
|
|||
|
||||
// -- DM/Tag/CTF-spectator/etc --
|
||||
// Order: DM->CTF->Race
|
||||
else if (gametyperules & GTR_BATTLESTARTS)
|
||||
else if ((gametyperules & GTR_BATTLESTARTS) && !battleprisons)
|
||||
spawnpoint = G_FindBattleStartOrFallback(playernum);
|
||||
|
||||
// -- Other game modes --
|
||||
|
|
|
|||
|
|
@ -1958,43 +1958,6 @@ static void HU_DrawTitlecardCEcho(size_t num)
|
|||
UINT32 hu_demotime;
|
||||
UINT32 hu_demolap;
|
||||
|
||||
static void HU_DrawDemoInfo(void)
|
||||
{
|
||||
if (!multiplayer)/* netreplay */
|
||||
{
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Replay:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, 0, player_names[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawRightAlignedThinString(BASEVIDWIDTH-2, BASEVIDHEIGHT-10, 0, demo.titlename);
|
||||
}
|
||||
|
||||
if (modeattacking & ATTACKING_TIME)
|
||||
{
|
||||
V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-24, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:");
|
||||
if (hu_demotime != UINT32_MAX)
|
||||
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_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-24, V_MONOSPACE, "--'--\"--");
|
||||
}
|
||||
|
||||
if (modeattacking & ATTACKING_LAP)
|
||||
{
|
||||
V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-16, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:");
|
||||
if (hu_demolap != UINT32_MAX)
|
||||
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_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-16, V_MONOSPACE, "--'--\"--");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Song credits
|
||||
|
|
@ -2068,11 +2031,6 @@ void HU_Drawer(void)
|
|||
}
|
||||
LUA_HUD_DrawList(luahuddrawlist_scores);
|
||||
}
|
||||
|
||||
if (demo.playback)
|
||||
{
|
||||
HU_DrawDemoInfo();
|
||||
}
|
||||
}
|
||||
|
||||
if (cv_vhseffect.value && (paused || (demo.playback && cv_playbackspeed.value > 1)))
|
||||
|
|
@ -2253,8 +2211,6 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole
|
|||
boolean drawlocal = (offline && cv_mindelay.value && lag <= (tic_t)cv_mindelay.value);
|
||||
fixed_t x2, y2;
|
||||
|
||||
y = y - 10*FRACUNIT; // Making space for connection quality, sorry.
|
||||
|
||||
if (!server && lag <= (tic_t)cv_mindelay.value)
|
||||
{
|
||||
lag = cv_mindelay.value;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
// DR. ROBOTNIK'S RING RACERS
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2023-2024 by Kart Krew.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
|
|
@ -81,7 +90,7 @@ void K_drawKartPowerUps(void)
|
|||
{
|
||||
auto make_drawer = [](int x, int y, Draw::Font font) -> Draw
|
||||
{
|
||||
return Draw(x, y).font(font).align(Draw::Align::kRight);
|
||||
return Draw(x, y).font(font).align(Draw::Align::kRight).flags(V_SLIDEIN);
|
||||
};
|
||||
|
||||
const int viewnum = R_GetViewNumber();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,36 @@ static const PipelineDesc kUnshadedPipelineDescription = {
|
|||
FaceWinding::kCounterClockwise,
|
||||
{0.f, 0.f, 0.f, 1.f}};
|
||||
|
||||
BlitRectPass::BlitRectPass() = default;
|
||||
/// @brief Pipeline used for sharp bilinear special blit.
|
||||
static const PipelineDesc kSharpBilinearPipelineDescription = {
|
||||
PipelineProgram::kSharpBilinear,
|
||||
{{{sizeof(BlitVertex)}}, {{VertexAttributeName::kPosition, 0, 0}, {VertexAttributeName::kTexCoord0, 0, 12}}},
|
||||
{{{UniformName::kProjection}, {{UniformName::kModelView, UniformName::kTexCoord0Transform, UniformName::kSampler0Size}}}},
|
||||
{{// RGB/A texture
|
||||
SamplerName::kSampler0}},
|
||||
std::nullopt,
|
||||
{std::nullopt, {true, true, true, true}},
|
||||
PrimitiveType::kTriangles,
|
||||
CullMode::kNone,
|
||||
FaceWinding::kCounterClockwise,
|
||||
{0.f, 0.f, 0.f, 1.f}};
|
||||
|
||||
/// @brief Pipeline used for CRT special blit
|
||||
static const PipelineDesc kCrtPipelineDescription = {
|
||||
PipelineProgram::kCrt,
|
||||
{{{sizeof(BlitVertex)}}, {{VertexAttributeName::kPosition, 0, 0}, {VertexAttributeName::kTexCoord0, 0, 12}}},
|
||||
{{{UniformName::kProjection}, {{UniformName::kModelView, UniformName::kTexCoord0Transform, UniformName::kSampler0Size}}}},
|
||||
{{// RGB/A texture
|
||||
SamplerName::kSampler0, SamplerName::kSampler1}},
|
||||
std::nullopt,
|
||||
{std::nullopt, {true, true, true, true}},
|
||||
PrimitiveType::kTriangles,
|
||||
CullMode::kNone,
|
||||
FaceWinding::kCounterClockwise,
|
||||
{0.f, 0.f, 0.f, 1.f}};
|
||||
|
||||
BlitRectPass::BlitRectPass() : BlitRectPass(BlitRectPass::BlitMode::kNearest) {}
|
||||
BlitRectPass::BlitRectPass(BlitRectPass::BlitMode blit_mode) : blit_mode_(blit_mode) {}
|
||||
BlitRectPass::~BlitRectPass() = default;
|
||||
|
||||
void BlitRectPass::draw(Rhi& rhi, Handle<GraphicsContext> ctx)
|
||||
|
|
@ -65,7 +94,21 @@ void BlitRectPass::prepass(Rhi& rhi)
|
|||
{
|
||||
if (!pipeline_)
|
||||
{
|
||||
pipeline_ = rhi.create_pipeline(kUnshadedPipelineDescription);
|
||||
switch (blit_mode_)
|
||||
{
|
||||
case BlitRectPass::BlitMode::kNearest:
|
||||
pipeline_ = rhi.create_pipeline(kUnshadedPipelineDescription);
|
||||
break;
|
||||
case BlitRectPass::BlitMode::kSharpBilinear:
|
||||
pipeline_ = rhi.create_pipeline(kSharpBilinearPipelineDescription);
|
||||
break;
|
||||
case BlitRectPass::BlitMode::kCrt:
|
||||
pipeline_ = rhi.create_pipeline(kCrtPipelineDescription);
|
||||
break;
|
||||
default:
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!quad_vbo_)
|
||||
|
|
@ -79,6 +122,20 @@ void BlitRectPass::prepass(Rhi& rhi)
|
|||
quad_ibo_ = rhi.create_buffer({sizeof(kIndices), BufferType::kIndexBuffer, BufferUsage::kImmutable});
|
||||
quad_ibo_needs_upload_ = true;
|
||||
}
|
||||
|
||||
if (blit_mode_ == BlitRectPass::BlitMode::kCrt && !dot_pattern_)
|
||||
{
|
||||
dot_pattern_ = rhi.create_texture({
|
||||
rhi::TextureFormat::kRGBA,
|
||||
12,
|
||||
4,
|
||||
rhi::TextureWrapMode::kRepeat,
|
||||
rhi::TextureWrapMode::kRepeat,
|
||||
rhi::TextureFilterMode::kLinear,
|
||||
rhi::TextureFilterMode::kLinear
|
||||
});
|
||||
dot_pattern_needs_upload_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void BlitRectPass::transfer(Rhi& rhi, Handle<GraphicsContext> ctx)
|
||||
|
|
@ -95,6 +152,67 @@ void BlitRectPass::transfer(Rhi& rhi, Handle<GraphicsContext> ctx)
|
|||
quad_ibo_needs_upload_ = false;
|
||||
}
|
||||
|
||||
if (dot_pattern_needs_upload_ && dot_pattern_)
|
||||
{
|
||||
// Listen. I'm a *very* particular kind of lazy.
|
||||
// If I'm being honest, I just don't want to have to embed a .png in the pk3s and deal with that.
|
||||
static const uint8_t kDotPattern[] = {
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
255, 0, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 255, 0, 255,
|
||||
0, 0, 0, 255,
|
||||
0, 0, 255, 255,
|
||||
0, 0, 0, 255,
|
||||
};
|
||||
rhi.update_texture(ctx, dot_pattern_, {0, 0, 12, 4}, PixelFormat::kRGBA8, tcb::as_bytes(tcb::span(kDotPattern)));
|
||||
dot_pattern_needs_upload_ = false;
|
||||
}
|
||||
|
||||
float aspect = 1.0;
|
||||
float output_aspect = 1.0;
|
||||
if (output_correct_aspect_)
|
||||
|
|
@ -104,6 +222,8 @@ void BlitRectPass::transfer(Rhi& rhi, Handle<GraphicsContext> ctx)
|
|||
}
|
||||
bool taller = aspect > output_aspect;
|
||||
|
||||
rhi::TextureDetails texture_details = rhi.get_texture_details(texture_);
|
||||
|
||||
std::array<rhi::UniformVariant, 1> g1_uniforms = {{
|
||||
// Projection
|
||||
glm::scale(
|
||||
|
|
@ -112,26 +232,81 @@ void BlitRectPass::transfer(Rhi& rhi, Handle<GraphicsContext> ctx)
|
|||
)
|
||||
}};
|
||||
|
||||
std::array<rhi::UniformVariant, 2> g2_uniforms = {
|
||||
// ModelView
|
||||
glm::scale(
|
||||
glm::identity<glm::mat4>(),
|
||||
glm::vec3(taller ? 2.f : 2.f * aspect, taller ? 2.f * (1.f / aspect) : 2.f, 1.f)
|
||||
),
|
||||
// Texcoord0 Transform
|
||||
glm::mat3(
|
||||
glm::vec3(1.f, 0.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? -1.f : 1.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? 1.f : 0.f, 1.f)
|
||||
)
|
||||
};
|
||||
|
||||
uniform_sets_[0] = rhi.create_uniform_set(ctx, {g1_uniforms});
|
||||
uniform_sets_[1] = rhi.create_uniform_set(ctx, {g2_uniforms});
|
||||
|
||||
std::array<rhi::VertexAttributeBufferBinding, 1> vbs = {{{0, quad_vbo_}}};
|
||||
std::array<rhi::TextureBinding, 1> tbs = {{{rhi::SamplerName::kSampler0, texture_}}};
|
||||
binding_set_ = rhi.create_binding_set(ctx, pipeline_, {vbs, tbs});
|
||||
switch (blit_mode_)
|
||||
{
|
||||
case BlitRectPass::BlitMode::kCrt:
|
||||
{
|
||||
std::array<rhi::UniformVariant, 3> g2_uniforms = {
|
||||
// ModelView
|
||||
glm::scale(
|
||||
glm::identity<glm::mat4>(),
|
||||
glm::vec3(taller ? 2.f : 2.f * aspect, taller ? 2.f * (1.f / aspect) : 2.f, 1.f)
|
||||
),
|
||||
// Texcoord0 Transform
|
||||
glm::mat3(
|
||||
glm::vec3(1.f, 0.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? -1.f : 1.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? 1.f : 0.f, 1.f)
|
||||
),
|
||||
// Sampler 0 Size
|
||||
glm::vec2(texture_details.width, texture_details.height)
|
||||
};
|
||||
uniform_sets_[1] = rhi.create_uniform_set(ctx, {g2_uniforms});
|
||||
|
||||
std::array<rhi::VertexAttributeBufferBinding, 1> vbs = {{{0, quad_vbo_}}};
|
||||
std::array<rhi::TextureBinding, 2> tbs = {{{rhi::SamplerName::kSampler0, texture_}, {rhi::SamplerName::kSampler1, dot_pattern_}}};
|
||||
binding_set_ = rhi.create_binding_set(ctx, pipeline_, {vbs, tbs});
|
||||
break;
|
||||
}
|
||||
case BlitRectPass::BlitMode::kSharpBilinear:
|
||||
{
|
||||
std::array<rhi::UniformVariant, 3> g2_uniforms = {
|
||||
// ModelView
|
||||
glm::scale(
|
||||
glm::identity<glm::mat4>(),
|
||||
glm::vec3(taller ? 2.f : 2.f * aspect, taller ? 2.f * (1.f / aspect) : 2.f, 1.f)
|
||||
),
|
||||
// Texcoord0 Transform
|
||||
glm::mat3(
|
||||
glm::vec3(1.f, 0.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? -1.f : 1.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? 1.f : 0.f, 1.f)
|
||||
),
|
||||
// Sampler0 size
|
||||
glm::vec2(texture_details.width, texture_details.height)
|
||||
};
|
||||
uniform_sets_[1] = rhi.create_uniform_set(ctx, {g2_uniforms});
|
||||
|
||||
std::array<rhi::VertexAttributeBufferBinding, 1> vbs = {{{0, quad_vbo_}}};
|
||||
std::array<rhi::TextureBinding, 1> tbs = {{{rhi::SamplerName::kSampler0, texture_}}};
|
||||
binding_set_ = rhi.create_binding_set(ctx, pipeline_, {vbs, tbs});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
std::array<rhi::UniformVariant, 2> g2_uniforms = {
|
||||
// ModelView
|
||||
glm::scale(
|
||||
glm::identity<glm::mat4>(),
|
||||
glm::vec3(taller ? 2.f : 2.f * aspect, taller ? 2.f * (1.f / aspect) : 2.f, 1.f)
|
||||
),
|
||||
// Texcoord0 Transform
|
||||
glm::mat3(
|
||||
glm::vec3(1.f, 0.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? -1.f : 1.f, 0.f),
|
||||
glm::vec3(0.f, output_flip_ ? 1.f : 0.f, 1.f)
|
||||
)
|
||||
};
|
||||
uniform_sets_[1] = rhi.create_uniform_set(ctx, {g2_uniforms});
|
||||
|
||||
std::array<rhi::VertexAttributeBufferBinding, 1> vbs = {{{0, quad_vbo_}}};
|
||||
std::array<rhi::TextureBinding, 1> tbs = {{{rhi::SamplerName::kSampler0, texture_}}};
|
||||
binding_set_ = rhi.create_binding_set(ctx, pipeline_, {vbs, tbs});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BlitRectPass::graphics(Rhi& rhi, Handle<GraphicsContext> ctx)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,15 @@ namespace srb2::hwr2
|
|||
/// @brief A render pass which blits a rect using a source texture or textures.
|
||||
class BlitRectPass
|
||||
{
|
||||
public:
|
||||
enum class BlitMode
|
||||
{
|
||||
kNearest,
|
||||
kSharpBilinear,
|
||||
kCrt,
|
||||
};
|
||||
|
||||
private:
|
||||
rhi::Handle<rhi::Pipeline> pipeline_;
|
||||
rhi::Handle<rhi::Texture> texture_;
|
||||
uint32_t texture_width_ = 0;
|
||||
|
|
@ -33,15 +42,20 @@ class BlitRectPass
|
|||
rhi::Handle<rhi::Buffer> quad_ibo_;
|
||||
std::array<rhi::Handle<rhi::UniformSet>, 2> uniform_sets_;
|
||||
rhi::Handle<rhi::BindingSet> binding_set_;
|
||||
BlitMode blit_mode_;
|
||||
rhi::Handle<rhi::Texture> dot_pattern_;
|
||||
|
||||
bool quad_vbo_needs_upload_ = false;
|
||||
bool quad_ibo_needs_upload_ = false;
|
||||
bool dot_pattern_needs_upload_ = false;
|
||||
|
||||
void prepass(rhi::Rhi& rhi);
|
||||
void transfer(rhi::Rhi& rhi, rhi::Handle<rhi::GraphicsContext> ctx);
|
||||
void graphics(rhi::Rhi& rhi, rhi::Handle<rhi::GraphicsContext> ctx);
|
||||
|
||||
public:
|
||||
|
||||
explicit BlitRectPass(BlitMode blit_mode);
|
||||
BlitRectPass();
|
||||
~BlitRectPass();
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ struct HardwareState
|
|||
std::unique_ptr<BlitPostimgScreens> blit_postimg_screens;
|
||||
std::unique_ptr<PostprocessWipePass> wipe;
|
||||
std::unique_ptr<BlitRectPass> blit_rect;
|
||||
std::unique_ptr<BlitRectPass> sharp_bilinear_blit_rect;
|
||||
std::unique_ptr<BlitRectPass> crt_blit_rect;
|
||||
std::unique_ptr<ScreenshotPass> screen_capture;
|
||||
std::unique_ptr<UpscaleBackbuffer> backbuffer;
|
||||
WipeFrames wipe_frames;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ static void reset_hardware_state(Rhi* rhi)
|
|||
g_hw_state.software_screen_renderer = std::make_unique<SoftwareScreenRenderer>();
|
||||
g_hw_state.blit_postimg_screens = std::make_unique<BlitPostimgScreens>(g_hw_state.palette_manager.get());
|
||||
g_hw_state.wipe = std::make_unique<PostprocessWipePass>();
|
||||
g_hw_state.blit_rect = std::make_unique<BlitRectPass>();
|
||||
g_hw_state.blit_rect = std::make_unique<BlitRectPass>(BlitRectPass::BlitMode::kNearest);
|
||||
g_hw_state.sharp_bilinear_blit_rect = std::make_unique<BlitRectPass>(BlitRectPass::BlitMode::kSharpBilinear);
|
||||
g_hw_state.crt_blit_rect = std::make_unique<BlitRectPass>(BlitRectPass::BlitMode::kCrt);
|
||||
g_hw_state.screen_capture = std::make_unique<ScreenshotPass>();
|
||||
g_hw_state.backbuffer = std::make_unique<UpscaleBackbuffer>();
|
||||
g_hw_state.wipe_frames = {};
|
||||
|
|
@ -294,13 +296,34 @@ void I_FinishUpdate(void)
|
|||
float y = (vid.realheight - h) * (0.5f + (FixedToFloat(cv_scr_y.value) * 0.5f));
|
||||
|
||||
g_hw_state.blit_rect->set_output(x, y, w, h, true, true);
|
||||
g_hw_state.sharp_bilinear_blit_rect->set_output(x, y, w, h, true, true);
|
||||
g_hw_state.crt_blit_rect->set_output(x, y, w, h, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_hw_state.blit_rect->set_output(0, 0, vid.realwidth, vid.realheight, true, true);
|
||||
g_hw_state.sharp_bilinear_blit_rect->set_output(0, 0, vid.realwidth, vid.realheight, true, true);
|
||||
g_hw_state.crt_blit_rect->set_output(0, 0, vid.realwidth, vid.realheight, true, true);
|
||||
}
|
||||
g_hw_state.blit_rect->set_texture(g_hw_state.backbuffer->color(), static_cast<uint32_t>(vid.width), static_cast<uint32_t>(vid.height));
|
||||
g_hw_state.blit_rect->draw(*rhi, ctx);
|
||||
g_hw_state.sharp_bilinear_blit_rect->set_texture(g_hw_state.backbuffer->color(), static_cast<uint32_t>(vid.width), static_cast<uint32_t>(vid.height));
|
||||
g_hw_state.crt_blit_rect->set_texture(g_hw_state.backbuffer->color(), static_cast<uint32_t>(vid.width), static_cast<uint32_t>(vid.height));
|
||||
|
||||
switch (cv_scr_effect.value)
|
||||
{
|
||||
case 1:
|
||||
rhi->update_texture_settings(ctx, g_hw_state.backbuffer->color(), TextureWrapMode::kClamp, TextureWrapMode::kClamp, TextureFilterMode::kLinear, TextureFilterMode::kLinear);
|
||||
g_hw_state.sharp_bilinear_blit_rect->draw(*rhi, ctx);
|
||||
break;
|
||||
case 2:
|
||||
rhi->update_texture_settings(ctx, g_hw_state.backbuffer->color(), TextureWrapMode::kClamp, TextureWrapMode::kClamp, TextureFilterMode::kLinear, TextureFilterMode::kLinear);
|
||||
g_hw_state.crt_blit_rect->draw(*rhi, ctx);
|
||||
break;
|
||||
default:
|
||||
rhi->update_texture_settings(ctx, g_hw_state.backbuffer->color(), TextureWrapMode::kClamp, TextureWrapMode::kClamp, TextureFilterMode::kNearest, TextureFilterMode::kNearest);
|
||||
g_hw_state.blit_rect->draw(*rhi, ctx);
|
||||
break;
|
||||
}
|
||||
rhi->end_render_pass(ctx);
|
||||
|
||||
rhi->end_graphics(ctx);
|
||||
|
|
|
|||
27
src/info.c
27
src/info.c
|
|
@ -13212,6 +13212,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_GOTPOWERUP
|
||||
-1, // doomednum
|
||||
S_ITEMICON, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // 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_itpick, // deathsound
|
||||
0, // speed
|
||||
48*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOSQUISH|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_ITEMCAPSULE
|
||||
2010, // doomednum
|
||||
S_ITEMCAPSULE, // spawnstate
|
||||
|
|
|
|||
|
|
@ -4499,6 +4499,7 @@ typedef enum mobj_type
|
|||
MT_RANDOMITEM,
|
||||
MT_SPHEREBOX,
|
||||
MT_FLOATINGITEM,
|
||||
MT_GOTPOWERUP,
|
||||
MT_ITEMCAPSULE,
|
||||
MT_ITEMCAPSULE_PART,
|
||||
MT_MONITOR,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ void K_CheckBumpers(void)
|
|||
{
|
||||
// If every other player is eliminated, the
|
||||
// last player standing wins by default.
|
||||
K_EndBattleRound(kingofthehill != -1 ? &players[kingofthehill] : NULL);
|
||||
if (numingame > 1)
|
||||
K_EndBattleRound(kingofthehill != -1 ? &players[kingofthehill] : NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -653,12 +654,12 @@ static void K_SpawnOvertimeLaser(fixed_t x, fixed_t y, fixed_t scale)
|
|||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
zpos = cam->z + player->mo->height;
|
||||
zpos = min(zpos + heightPadding, cam->ceilingz);
|
||||
zpos = min(zpos + heightPadding, cam->centerceilingz);
|
||||
}
|
||||
else
|
||||
{
|
||||
zpos = cam->z;
|
||||
zpos = max(zpos - heightPadding, cam->floorz);
|
||||
zpos = max(zpos - heightPadding, cam->centerfloorz);
|
||||
}
|
||||
|
||||
flip = P_MobjFlip(player->mo);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ extern "C" {
|
|||
#define BATTLE_SPAWN_INTERVAL (4*TICRATE)
|
||||
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
||||
#define BATTLE_POWERUP_TIME (30*TICRATE)
|
||||
#define BATTLE_POWERUP_DROPPED_TIME (15*TICRATE)
|
||||
#define BATTLE_UFO_TIME (20*TICRATE)
|
||||
|
||||
extern struct battleovertime
|
||||
|
|
|
|||
|
|
@ -6005,13 +6005,41 @@ void K_drawKartHUD(void)
|
|||
bool ta = modeattacking && !demo.playback;
|
||||
INT32 flags = V_HUDTRANS|V_SLIDEIN|V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||
K_drawKartTimestamp(stplyr->realtime, TIME_X, TIME_Y + (ta ? 2 : 0), flags, 0);
|
||||
if (ta)
|
||||
if (modeattacking)
|
||||
{
|
||||
using srb2::Draw;
|
||||
Draw(BASEVIDWIDTH - 19, 2)
|
||||
.flags(flags | V_YELLOWMAP)
|
||||
.align(Draw::Align::kRight)
|
||||
.text("\xBE Restart");
|
||||
if (ta)
|
||||
{
|
||||
using srb2::Draw;
|
||||
Draw(BASEVIDWIDTH - 19, 2)
|
||||
.flags(flags | V_YELLOWMAP)
|
||||
.align(Draw::Align::kRight)
|
||||
.text("\xBE Restart");
|
||||
}
|
||||
else
|
||||
{
|
||||
using srb2::Draw;
|
||||
Draw row = Draw(BASEVIDWIDTH - 20, TIME_Y + 18).flags(flags).align(Draw::Align::kRight);
|
||||
auto insert = [&](const char *label, UINT32 tics)
|
||||
{
|
||||
Draw::TextElement text =
|
||||
tics != UINT32_MAX ?
|
||||
Draw::TextElement(
|
||||
"{}'{}\"{}",
|
||||
G_TicsToMinutes(tics, true),
|
||||
G_TicsToSeconds(tics),
|
||||
G_TicsToCentiseconds(tics)
|
||||
) :
|
||||
Draw::TextElement("--'--\"--");
|
||||
text.font(Draw::Font::kZVote);
|
||||
row.x(-text.width()).flags(V_ORANGEMAP).text(label);
|
||||
row.y(1).text(text);
|
||||
row = row.y(10);
|
||||
};
|
||||
if (modeattacking & ATTACKING_TIME)
|
||||
insert("Finish: ", hu_demotime);
|
||||
if (modeattacking & ATTACKING_LAP)
|
||||
insert("Best Lap: ", hu_demolap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
21
src/k_kart.c
21
src/k_kart.c
|
|
@ -118,6 +118,7 @@ void K_TimerReset(void)
|
|||
{
|
||||
starttime = introtime = 0;
|
||||
memset(&g_darkness, 0, sizeof g_darkness);
|
||||
memset(&g_musicfade, 0, sizeof g_musicfade);
|
||||
numbulbs = 1;
|
||||
inDuel = rainbowstartavailable = false;
|
||||
linecrossed = 0;
|
||||
|
|
@ -125,11 +126,6 @@ void K_TimerReset(void)
|
|||
g_pointlimit = 0;
|
||||
}
|
||||
|
||||
boolean K_ShouldSpawnDuelItems(void)
|
||||
{
|
||||
return (inDuel == true || (grandprixinfo.gp && grandprixinfo.eventmode == GPEVENT_BONUS));
|
||||
}
|
||||
|
||||
static void K_SpawnItemCapsules(void)
|
||||
{
|
||||
mapthing_t *mt = mapthings;
|
||||
|
|
@ -281,7 +277,10 @@ void K_TimerInit(void)
|
|||
timelimitintics = K_TimeLimitForGametype();
|
||||
g_pointlimit = K_PointLimitForGametype();
|
||||
|
||||
if (K_ShouldSpawnDuelItems())
|
||||
// K_TimerInit is called after all mapthings are spawned,
|
||||
// so they didn't know if it's supposed to be a duel
|
||||
// (inDuel is always false before K_TimerInit is called).
|
||||
if (inDuel)
|
||||
{
|
||||
K_SpawnDuelOnlyItems();
|
||||
}
|
||||
|
|
@ -1017,7 +1016,8 @@ boolean K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2)
|
|||
|
||||
K_SpawnBumpForObjs(mobj1, mobj2);
|
||||
|
||||
if (mobj1->type == MT_PLAYER && mobj2->type == MT_PLAYER)
|
||||
if (mobj1->type == MT_PLAYER && mobj2->type == MT_PLAYER
|
||||
&& !mobj1->player->powerupVFXTimer && !mobj2->player->powerupVFXTimer)
|
||||
{
|
||||
boolean guard1 = K_PlayerGuard(mobj1->player);
|
||||
boolean guard2 = K_PlayerGuard(mobj2->player);
|
||||
|
|
@ -8437,6 +8437,10 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
mobj_t *debtflag = P_SpawnMobj(player->mo->x + player->mo->momx, player->mo->y + player->mo->momy,
|
||||
player->mo->z + P_GetMobjZMovement(player->mo) + player->mo->height + (24*player->mo->scale), MT_THOK);
|
||||
|
||||
debtflag->old_x = player->mo->old_x;
|
||||
debtflag->old_y = player->mo->old_y;
|
||||
debtflag->old_z = player->mo->old_z + P_GetMobjZMovement(player->mo) + player->mo->height + (24*player->mo->scale);
|
||||
|
||||
P_SetMobjState(debtflag, S_RINGDEBT);
|
||||
P_SetScale(debtflag, (debtflag->destscale = player->mo->scale));
|
||||
|
||||
|
|
@ -9050,6 +9054,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
if (player->spinouttimer || player->tumbleBounces)
|
||||
{
|
||||
if (player->ballhogcharge)
|
||||
player->ballhogcharge = 0;
|
||||
|
||||
if (player->progressivethrust < MAXCOMBOTIME)
|
||||
player->progressivethrust++;
|
||||
if (player->incontrol > 0)
|
||||
|
|
|
|||
|
|
@ -233,8 +233,6 @@ void K_KartEbrakeVisuals(player_t *p);
|
|||
void K_HandleDirectionalInfluence(player_t *player);
|
||||
fixed_t K_DefaultPlayerRadius(player_t *player);
|
||||
|
||||
boolean K_ShouldSpawnDuelItems(void);
|
||||
|
||||
// sound stuff for lua
|
||||
void K_PlayAttackTaunt(mobj_t *source);
|
||||
void K_PlayBoostTaunt(mobj_t *source);
|
||||
|
|
|
|||
28
src/k_menu.h
28
src/k_menu.h
|
|
@ -353,11 +353,10 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
dopt_screenshot = 0,
|
||||
dopt_addon,
|
||||
dopt_advanced,
|
||||
dopt_spacer1,
|
||||
dopt_replay,
|
||||
dopt_rprecord,
|
||||
dopt_rpsync,
|
||||
dopt_rpsize,
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
dopt_discord,
|
||||
|
|
@ -370,6 +369,14 @@ typedef enum
|
|||
dopt_erase,
|
||||
} dopt_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
daopt_addon = 0,
|
||||
daopt_spacer1,
|
||||
daopt_replay,
|
||||
daopt_replaycons,
|
||||
} daopt_e;
|
||||
|
||||
extern menuitem_t OPTIONS_Profiles[];
|
||||
extern menu_t OPTIONS_ProfilesDef;
|
||||
|
||||
|
|
@ -404,10 +411,8 @@ extern menu_t OPTIONS_VideoDef;
|
|||
extern menuitem_t OPTIONS_VideoModes[];
|
||||
extern menu_t OPTIONS_VideoModesDef;
|
||||
|
||||
#ifdef HWRENDER
|
||||
extern menuitem_t OPTIONS_VideoOGL[];
|
||||
extern menu_t OPTIONS_VideoOGLDef;
|
||||
#endif
|
||||
extern menuitem_t OPTIONS_VideoAdvanced[];
|
||||
extern menu_t OPTIONS_VideoAdvancedDef;
|
||||
|
||||
extern menuitem_t OPTIONS_Sound[];
|
||||
extern menu_t OPTIONS_SoundDef;
|
||||
|
|
@ -420,7 +425,8 @@ extern menu_t OPTIONS_HUDOnlineDef;
|
|||
|
||||
typedef enum
|
||||
{
|
||||
gopt_gamespeed = 0,
|
||||
gopt_spacer0 = 0,
|
||||
gopt_gamespeed,
|
||||
gopt_baselapcount,
|
||||
gopt_frantic,
|
||||
gopt_encore,
|
||||
|
|
@ -451,8 +457,11 @@ extern menu_t OPTIONS_DataDef;
|
|||
extern menuitem_t OPTIONS_DataScreenshot[];
|
||||
extern menu_t OPTIONS_DataScreenshotDef;
|
||||
|
||||
extern menuitem_t OPTIONS_DataAddon[];
|
||||
extern menu_t OPTIONS_DataAddonDef;
|
||||
extern menuitem_t OPTIONS_DataAdvanced[];
|
||||
extern menu_t OPTIONS_DataAdvancedDef;
|
||||
|
||||
extern menuitem_t OPTIONS_DataAdvancedAddon[];
|
||||
extern menu_t OPTIONS_DataAdvancedAddonDef;
|
||||
|
||||
extern menuitem_t OPTIONS_DataErase[];
|
||||
extern menu_t OPTIONS_DataEraseDef;
|
||||
|
|
@ -1104,7 +1113,6 @@ void M_ProfileTryController(INT32 choice);
|
|||
void M_ProfileControlsConfirm(INT32 choice);
|
||||
|
||||
// video modes menu (resolution)
|
||||
void M_VideoModeMenu(INT32 choice);
|
||||
void M_HandleVideoModes(INT32 ch);
|
||||
|
||||
// data stuff
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ void M_DrawMenuMessage(void)
|
|||
}
|
||||
|
||||
V_DrawString((BASEVIDWIDTH - V_StringWidth(string, 0))/2, y, 0, string);
|
||||
y += 9;
|
||||
y += 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3338,38 +3338,25 @@ static void M_DrawHighLowLevelTitle(INT16 x, INT16 y, INT16 map)
|
|||
}
|
||||
else
|
||||
{
|
||||
boolean donewithone = false;
|
||||
|
||||
char *ttlsource =
|
||||
mapheaderinfo[map]->menuttl[0]
|
||||
? mapheaderinfo[map]->menuttl
|
||||
: mapheaderinfo[map]->lvlttl;
|
||||
|
||||
for (i = 0; i < 22; i++)
|
||||
// If there are 2 or more words:
|
||||
// - Last word goes on word2
|
||||
// - Everything else on word1
|
||||
char *p = strrchr(ttlsource, ' ');
|
||||
if (p)
|
||||
{
|
||||
if (!ttlsource[i])
|
||||
break;
|
||||
|
||||
if (ttlsource[i] == ' ')
|
||||
{
|
||||
if (!donewithone)
|
||||
{
|
||||
donewithone = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (donewithone)
|
||||
{
|
||||
word2[word2len] = ttlsource[i];
|
||||
word2len++;
|
||||
}
|
||||
else
|
||||
{
|
||||
word1[word1len] = ttlsource[i];
|
||||
word1len++;
|
||||
}
|
||||
word2len = strlen(p + 1);
|
||||
memcpy(word2, p + 1, word2len);
|
||||
}
|
||||
else
|
||||
p = ttlsource + strlen(ttlsource);
|
||||
|
||||
word1len = p - ttlsource;
|
||||
memcpy(word1, ttlsource, word1len);
|
||||
}
|
||||
|
||||
if (!mapheaderinfo[map]->menuttl[0] && mapheaderinfo[map]->actnum)
|
||||
|
|
@ -4545,9 +4532,12 @@ box_found:
|
|||
}
|
||||
/* FALLTHRU */
|
||||
case IT_NOTHING:
|
||||
case IT_DYBIGSPACE:
|
||||
y += SMALLLINEHEIGHT;
|
||||
break;
|
||||
|
||||
case IT_DYBIGSPACE:
|
||||
y += SMALLLINEHEIGHT/2;
|
||||
break;
|
||||
#if 0
|
||||
case IT_BIGSLIDER:
|
||||
M_DrawThermo(x, y, currentMenu->menuitems[i].itemaction.cvar);
|
||||
|
|
|
|||
|
|
@ -176,8 +176,6 @@ void M_ChangeCvarDirect(INT32 choice, consvar_t *cv)
|
|||
choice *= (TICRATE/7);
|
||||
else if (cv == &cv_maxsend)
|
||||
choice *= 512;
|
||||
else if (cv == &cv_maxping)
|
||||
choice *= 50;
|
||||
|
||||
CV_AddValue(cv, choice);
|
||||
}
|
||||
|
|
@ -275,6 +273,25 @@ static boolean M_GamestateCanOpenMenu(void)
|
|||
//
|
||||
boolean M_Responder(event_t *ev)
|
||||
{
|
||||
if (ev->type == ev_keydown && !ev->data2)
|
||||
{
|
||||
extern consvar_t cv_showhud;
|
||||
switch (ev->data1)
|
||||
{
|
||||
case KEY_F3: // Toggle HUD
|
||||
// I am lazy so this button is also
|
||||
// hardcoded.
|
||||
CV_SetValue(&cv_showhud, !cv_showhud.value);
|
||||
return true;
|
||||
|
||||
case KEY_F11: // Fullscreen
|
||||
// F11 can always be used to toggle
|
||||
// fullscreen, it's a safe key.
|
||||
CV_AddValue(&cv_fullscreen, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dedicated
|
||||
|| (demo.playback && demo.attract)
|
||||
|| M_GamestateCanOpenMenu() == false)
|
||||
|
|
|
|||
|
|
@ -209,6 +209,11 @@ void Obj_DashRingTouch(mobj_t *mobj, player_t *player);
|
|||
void Obj_DashRingPlayerThink(player_t *player);
|
||||
boolean Obj_DashRingPlayerHasNoGravity(player_t *player);
|
||||
|
||||
/* Adventure Dash Ring */
|
||||
void Obj_AdventureAirBoosterSetup(mobj_t *mobj, mapthing_t *mthing);
|
||||
void Obj_AdventureAirBoosterHitboxTouch(mobj_t *hitbox, player_t *player);
|
||||
void Obj_AdventureAirBoosterFuse(mobj_t *mobj);
|
||||
|
||||
/* Sneaker Panels */
|
||||
void Obj_SneakerPanelSpriteScale(mobj_t *mobj);
|
||||
void Obj_SneakerPanelSpawn(mobj_t *mobj);
|
||||
|
|
@ -398,10 +403,9 @@ void Obj_TalkPointInit(mobj_t* mo);
|
|||
void Obj_TalkPointThink(mobj_t* mo);
|
||||
void Obj_TalkPointOrbThink(mobj_t* mo);
|
||||
|
||||
/* Adventure Dash Ring */
|
||||
void Obj_AdventureAirBoosterSetup(mobj_t *mobj, mapthing_t *mthing);
|
||||
void Obj_AdventureAirBoosterHitboxTouch(mobj_t *hitbox, player_t *player);
|
||||
void Obj_AdventureAirBoosterFuse(mobj_t *mobj);
|
||||
/* Power-up Spinner */
|
||||
void Obj_SpawnPowerUpSpinner(mobj_t *source, INT32 powerup, tic_t duration);
|
||||
void Obj_TickPowerUpSpinner(mobj_t *mobj);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include "k_battle.h"
|
||||
#include "k_kart.h"
|
||||
#include "k_objects.h"
|
||||
#include "k_powerup.h"
|
||||
|
|
@ -54,44 +55,45 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
|
|||
Obj_SpawnPowerUpAura(player);
|
||||
}
|
||||
|
||||
S_StartSound(NULL, sfx_gsha7);
|
||||
S_StartSound(NULL, sfx_gsha7l);
|
||||
player->flashing = 2*TICRATE;
|
||||
K_AddHitLag(player->mo, BATTLE_POWERUP_VFX_TIME, false);
|
||||
player->mo->hitlag += BATTLE_POWERUP_VFX_TIME;
|
||||
player->powerupVFXTimer = BATTLE_POWERUP_VFX_TIME;
|
||||
Obj_SpawnPowerUpSpinner(player->mo, powerup, BATTLE_POWERUP_VFX_TIME);
|
||||
|
||||
g_darkness.start = leveltime;
|
||||
g_darkness.end = leveltime + BATTLE_POWERUP_VFX_TIME + DARKNESS_FADE_TIME;
|
||||
|
||||
g_musicfade.start = leveltime;
|
||||
g_musicfade.end = g_musicfade.start + 90;
|
||||
g_musicfade.fade = 20;
|
||||
g_musicfade.ticked = false;
|
||||
|
||||
switch (powerup)
|
||||
{
|
||||
case POWERUP_SMONITOR:
|
||||
S_StartSound(NULL, sfx_bpwrua);
|
||||
K_AddMessageForPlayer(player, "Got S MONITOR!", true, false);
|
||||
K_DoInvincibility(player, player->invincibilitytimer + time);
|
||||
player->powerup.superTimer += time;
|
||||
break;
|
||||
|
||||
case POWERUP_BARRIER:
|
||||
S_StartSound(NULL, sfx_bpwrub);
|
||||
K_AddMessageForPlayer(player, "Got MEGA BARRIER!", true, false);
|
||||
player->powerup.barrierTimer += time;
|
||||
Obj_SpawnMegaBarrier(player);
|
||||
break;
|
||||
|
||||
case POWERUP_BUMPER:
|
||||
S_StartSound(NULL, sfx_bpwruc);
|
||||
K_AddMessageForPlayer(player, "Got BUMPER RESTOCK!", true, false);
|
||||
K_GiveBumpersToPlayer(player, nullptr, 5);
|
||||
break;
|
||||
|
||||
case POWERUP_BADGE:
|
||||
S_StartSound(NULL, sfx_bpwrud);
|
||||
K_AddMessageForPlayer(player, "Got RHYTHM BADGE!", true, false);
|
||||
player->powerup.rhythmBadgeTimer += time;
|
||||
break;
|
||||
|
||||
case POWERUP_SUPERFLICKY:
|
||||
S_StartSound(NULL, sfx_bpwrue);
|
||||
K_AddMessageForPlayer(player, "Got SUPER FLICKY!", true, false);
|
||||
if (K_PowerUpRemaining(player, POWERUP_SUPERFLICKY))
|
||||
{
|
||||
|
|
@ -104,7 +106,6 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
|
|||
break;
|
||||
|
||||
case POWERUP_POINTS:
|
||||
S_StartSound(NULL, sfx_bpwruf);
|
||||
K_AddMessageForPlayer(player, "Got 6 POINTS!", true, false);
|
||||
K_GivePointsToPlayer(player, nullptr, 6);
|
||||
|
||||
|
|
@ -127,7 +128,7 @@ void K_DropPowerUps(player_t* player)
|
|||
|
||||
if (remaining)
|
||||
{
|
||||
K_DropPaperItem(player, powerup, remaining);
|
||||
K_DropPaperItem(player, powerup, std::max<tic_t>(remaining, BATTLE_POWERUP_DROPPED_TIME));
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ target_sources(SRB2SDL2 PRIVATE
|
|||
main-profile-select.c
|
||||
options-1.c
|
||||
options-data-1.c
|
||||
options-data-addons.c
|
||||
options-data-advanced-1.c
|
||||
options-data-advanced-addon.c
|
||||
options-data-erase-1.c
|
||||
options-data-erase-profile.c
|
||||
options-data-screenshots.c
|
||||
|
|
@ -26,7 +27,7 @@ target_sources(SRB2SDL2 PRIVATE
|
|||
options-server-advanced.c
|
||||
options-sound.cpp
|
||||
options-video-1.c
|
||||
options-video-gl.c
|
||||
options-video-advanced.c
|
||||
options-video-modes.c
|
||||
play-1.c
|
||||
play-char-select.c
|
||||
|
|
|
|||
|
|
@ -11,25 +11,25 @@
|
|||
menuitem_t OPTIONS_Main[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_CALL, "Profile Setup", "Remap keys & buttons to your likings.",
|
||||
{IT_STRING | IT_CALL, "Profile Setup", "Remap keys & buttons.",
|
||||
NULL, {.routine = M_ProfileSelectInit}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "Video Options", "Change video settings such as the resolution.",
|
||||
{IT_STRING | IT_CALL, "Video Options", "Change the resolution.",
|
||||
NULL, {.routine = M_VideoOptions}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "Sound Options", "Adjust various sound settings such as the volume.",
|
||||
{IT_STRING | IT_CALL, "Sound Options", "Adjust the volume.",
|
||||
NULL, {.routine = M_SoundOptions}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "HUD Options", "Options related to the Heads-Up Display.",
|
||||
{IT_STRING | IT_SUBMENU, "HUD Options", "Tweak the Heads-Up Display.",
|
||||
NULL, {.submenu = &OPTIONS_HUDDef}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "Gameplay Options", "Change various game related options",
|
||||
{IT_STRING | IT_CALL, "Gameplay Options", "Modify game mechanics.",
|
||||
NULL, {.routine = M_GameplayOptions}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "Server Options", "Change various specific options for your game server.",
|
||||
{IT_STRING | IT_CALL, "Server Options", "Update server settings.",
|
||||
NULL, {.routine = M_ServerOptions}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Data Options", "Miscellaneous data options such as the screenshot format.",
|
||||
{IT_STRING | IT_SUBMENU, "Data Options", "Video recording, file saving, Discord status.",
|
||||
NULL, {.submenu = &OPTIONS_DataDef}, 0, 0},
|
||||
|
||||
#ifdef TODONEWMANUAL
|
||||
|
|
@ -96,9 +96,9 @@ void M_InitOptions(INT32 choice)
|
|||
(M_SecretUnlocked(SECRET_ENCORE, false) ? (IT_STRING | IT_CVAR) : IT_DISABLED);
|
||||
}
|
||||
|
||||
OPTIONS_DataDef.menuitems[dopt_addon].status = (M_SecretUnlocked(SECRET_ADDONS, true)
|
||||
OPTIONS_DataAdvancedDef.menuitems[daopt_addon].status = (M_SecretUnlocked(SECRET_ADDONS, true)
|
||||
? (IT_STRING | IT_SUBMENU)
|
||||
: (IT_TRANSTEXT2 | IT_SPACE));
|
||||
: (IT_NOTHING | IT_SPACE));
|
||||
OPTIONS_DataDef.menuitems[dopt_erase].status = (gamestate == GS_MENU
|
||||
? (IT_STRING | IT_SUBMENU)
|
||||
: (IT_TRANSTEXT2 | IT_SPACE));
|
||||
|
|
@ -212,6 +212,11 @@ static void M_OptionsMenuGoto(menu_t *assignment)
|
|||
{
|
||||
assignment->prevMenu = currentMenu;
|
||||
M_SetupNextMenu(assignment, false);
|
||||
if (currentMenu != &OPTIONS_MainDef)
|
||||
{
|
||||
optionsmenu.ticker = 0;
|
||||
M_OptionsTick();
|
||||
}
|
||||
}
|
||||
|
||||
void M_VideoOptions(INT32 choice)
|
||||
|
|
@ -232,12 +237,14 @@ void M_GameplayOptions(INT32 choice)
|
|||
{
|
||||
(void)choice;
|
||||
M_OptionsMenuGoto(&OPTIONS_GameplayDef);
|
||||
OPTIONS_MainDef.lastOn = mopt_gameplay;
|
||||
}
|
||||
|
||||
void M_ServerOptions(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
M_OptionsMenuGoto(&OPTIONS_ServerDef);
|
||||
OPTIONS_MainDef.lastOn = mopt_server;
|
||||
}
|
||||
|
||||
boolean M_OptionsInputs(INT32 ch)
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ extern consvar_t cv_netdemosize;
|
|||
menuitem_t OPTIONS_Data[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Video Recording...", "Set options relative to screenshot and movie capture.",
|
||||
{IT_STRING | IT_SUBMENU, "Video Recording...", "Options for recording clips.",
|
||||
NULL, {.submenu = &OPTIONS_DataScreenshotDef}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Addons...", "Set options relative to the addons menu.",
|
||||
NULL, {.submenu = &OPTIONS_DataAddonDef}, 0, 0},
|
||||
{IT_STRING | IT_SUBMENU, "Advanced...", "Technical settings that you probably don't want to change.",
|
||||
NULL, {.submenu = &OPTIONS_DataAdvancedDef}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
|
@ -22,12 +22,9 @@ menuitem_t OPTIONS_Data[] =
|
|||
{IT_HEADER, "Replays...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Record Replays", "Select when to save replays.",
|
||||
{IT_STRING | IT_CVAR, "Record Replays", "How the save prompt should appear.",
|
||||
NULL, {.cvar = &cv_recordmultiplayerdemos}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Net Consistency Quality", "For filesize, how often do we write position data in online replays?",
|
||||
NULL, {.cvar = &cv_netdemosyncquality}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Buffer Size (MB)", "Lets replays last longer with more players. Uses more RAM.",
|
||||
NULL, {.cvar = &cv_netdemosize}, 0, 0},
|
||||
|
||||
|
|
@ -51,7 +48,7 @@ menuitem_t OPTIONS_Data[] =
|
|||
{IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "\x85""Erase Data...", "Erase specific data. Be careful, what's deleted is gone forever!",
|
||||
{IT_STRING | IT_SUBMENU, "\x85""Erase Data...", "Erase save data. Be careful, what's deleted is gone forever!",
|
||||
NULL, {.submenu = &OPTIONS_DataEraseDef}, 0, 0},
|
||||
|
||||
};
|
||||
|
|
|
|||
41
src/menus/options-data-advanced-1.c
Normal file
41
src/menus/options-data-advanced-1.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/// \file menus/options-data-advanced.c
|
||||
/// \brief Advanced Data Options
|
||||
|
||||
#include "../k_menu.h"
|
||||
#include "../filesrch.h" // addons cvars
|
||||
|
||||
// advanced data options menu -- see daopt_e
|
||||
menuitem_t OPTIONS_DataAdvanced[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Addons...", NULL,
|
||||
NULL, {.submenu = &OPTIONS_DataAdvancedAddonDef}, 0, 0},
|
||||
|
||||
{IT_NOTHING | IT_SPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Replays (Advanced)...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Net Consistency Quality", "For filesize, how often do we write position data in online replays?",
|
||||
NULL, {.cvar = &cv_netdemosyncquality}, 0, 0},
|
||||
|
||||
};
|
||||
|
||||
menu_t OPTIONS_DataAdvancedDef = {
|
||||
sizeof (OPTIONS_DataAdvanced) / sizeof (menuitem_t),
|
||||
&OPTIONS_DataDef,
|
||||
0,
|
||||
OPTIONS_DataAdvanced,
|
||||
48, 80,
|
||||
SKINCOLOR_BLUEBERRY, 0,
|
||||
MBF_DRAWBGWHILEPLAYING,
|
||||
NULL,
|
||||
2, 5,
|
||||
M_DrawGenericOptions,
|
||||
M_DrawOptionsCogs,
|
||||
M_OptionsTick,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
/// \file menus/options-data-addons.c
|
||||
/// \brief Addon Options
|
||||
|
||||
#include "../k_menu.h"
|
||||
#include "../filesrch.h" // addons cvars
|
||||
|
||||
menuitem_t OPTIONS_DataAddon[] =
|
||||
menuitem_t OPTIONS_DataAdvancedAddon[] =
|
||||
{
|
||||
|
||||
{IT_HEADER, "Addon List", NULL,
|
||||
|
|
@ -27,11 +24,11 @@ menuitem_t OPTIONS_DataAddon[] =
|
|||
|
||||
};
|
||||
|
||||
menu_t OPTIONS_DataAddonDef = {
|
||||
sizeof (OPTIONS_DataAddon) / sizeof (menuitem_t),
|
||||
&OPTIONS_DataDef,
|
||||
menu_t OPTIONS_DataAdvancedAddonDef = {
|
||||
sizeof (OPTIONS_DataAdvancedAddon) / sizeof (menuitem_t),
|
||||
&OPTIONS_DataAdvancedDef,
|
||||
0,
|
||||
OPTIONS_DataAddon,
|
||||
OPTIONS_DataAdvancedAddon,
|
||||
48, 80,
|
||||
SKINCOLOR_BLUEBERRY, 0,
|
||||
MBF_DRAWBGWHILEPLAYING,
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
menuitem_t OPTIONS_DataScreenshot[] =
|
||||
{
|
||||
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
||||
{IT_HEADER, "Movie Recording (F9)", NULL,
|
||||
{IT_HEADER, "WebM Recording (F9)", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Max. Duration (s)", "Automatically stop recording after this much time.",
|
||||
|
|
@ -28,10 +28,10 @@ menuitem_t OPTIONS_DataScreenshot[] =
|
|||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Resolution", "Video resolution",
|
||||
{IT_STRING | IT_CVAR, "Resolution", "Video resolution.",
|
||||
NULL, {.cvar = &cv_movie_resolution}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Max. FPS", "Video framerate",
|
||||
{IT_STRING | IT_CVAR, "Max. FPS", "Video framerate.",
|
||||
NULL, {.cvar = &cv_movie_fps}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Record Audio", "Record audio.",
|
||||
|
|
@ -41,7 +41,7 @@ menuitem_t OPTIONS_DataScreenshot[] =
|
|||
{IT_HEADER, "Lossless Recording (F10)", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Recording Format", "What file format will lossless recordings use?",
|
||||
{IT_STRING | IT_CVAR, "Recording Format", "Which file format will lossless recordings use?",
|
||||
NULL, {.cvar = &cv_lossless_recorder}, 0, 0},
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,16 +10,16 @@ menuitem_t OPTIONS_Gameplay[] =
|
|||
{IT_HEADER, "Race...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Game Speed", "Change Game Speed for the next map.",
|
||||
{IT_STRING | IT_CVAR, "Game Speed", "Gear for the next map.",
|
||||
NULL, {.cvar = &cv_kartspeed}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Base Lap Count", "Change how many laps must be completed per race.",
|
||||
{IT_STRING | IT_CVAR, "Base Lap Count", "How many laps must be completed per race.",
|
||||
NULL, {.cvar = &cv_numlaps}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Frantic Items", "Make item odds crazier with more powerful items!",
|
||||
NULL, {.cvar = &cv_kartfrantic}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Encore Mode", "Forces Encore Mode on for the next map.",
|
||||
{IT_STRING | IT_CVAR, "Encore Mode", "Play in Encore Mode next map.",
|
||||
NULL, {.cvar = &cv_kartencore}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Exit Countdown", "How long players have to finish after 1st place finishes.",
|
||||
|
|
@ -29,20 +29,20 @@ menuitem_t OPTIONS_Gameplay[] =
|
|||
{IT_HEADER, "Battle...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Time Limit", "Change the time limit for Battle rounds.",
|
||||
{IT_STRING | IT_CVAR, "Time Limit", "Time limit for Battle rounds.",
|
||||
NULL, {.cvar = &cv_timelimit}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Point Limit", "How many strikes it takes to win a Battle.",
|
||||
NULL, {.cvar = &cv_pointlimit}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Starting Bumpers", "Change how many bumpers player start with in Battle.",
|
||||
{IT_STRING | IT_CVAR, "Starting Bumpers", "How many bumpers players start with in Battle.",
|
||||
NULL, {.cvar = &cv_kartbumpers}, 0, 0},
|
||||
|
||||
|
||||
{IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Random Item Toggles...", "Change which items to enable for your games.",
|
||||
{IT_STRING | IT_SUBMENU, "Random Item Toggles...", "Which items appear in your games.",
|
||||
NULL, {.submenu = &OPTIONS_GameplayItemsDef}, 0, 0},
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,35 +8,31 @@
|
|||
menuitem_t OPTIONS_HUD[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_CVAR, "Show HUD (F3)", "Toggles HUD display. Great for taking screenshots!",
|
||||
{IT_STRING | IT_CVAR, "Show HUD (F3)", "Toggles the Heads-Up display. Great for taking screenshots!",
|
||||
NULL, {.cvar = &cv_showhud}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Speedometer", "Choose to what speed unit to display or toggle off the speedometer.",
|
||||
{IT_STRING | IT_CVAR, "Speedometer", "Choose which speed unit to display on the speedometer.",
|
||||
NULL, {.cvar = &cv_kartspeedometer}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
/* -- Nah, console isn't even bound by default, if you know how to use it you can change the size there
|
||||
{IT_STRING | IT_CVAR, "Console Text Size", "Size of the text within the console.",
|
||||
NULL, {.cvar = &cv_constextsize}, 0, 0},*/
|
||||
|
||||
{IT_STRING | IT_CVAR, "Show FPS", "Displays the game framerate at the lower right corner of the screen.",
|
||||
{IT_STRING | IT_CVAR, "Show FPS", "Displays the framerate in the lower right corner of the screen.",
|
||||
NULL, {.cvar = &cv_ticrate}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Show Input Delay", "Displays your input delay at the lower right corner of the screen.",
|
||||
{IT_STRING | IT_CVAR, "Show Input Delay", "Displays your input delay in the lower right corner of the screen.",
|
||||
NULL, {.cvar = &cv_showping}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Show \"FOCUS LOST\"", "Displays \"FOCUS LOST\" when the game window isn't the active window.",
|
||||
{IT_STRING | IT_CVAR, "Show \"FOCUS LOST\"", "Displays \"FOCUS LOST\" when the game cannot accept inputs.",
|
||||
NULL, {.cvar = &cv_showfocuslost}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Online Chat Options...", "HUD options related to the online chat box.",
|
||||
{IT_STRING | IT_SUBMENU, "Online Chat Options...", "Visual options for the online chat box.",
|
||||
NULL, {.submenu = &OPTIONS_HUDOnlineDef}, 0, 0},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
menuitem_t OPTIONS_HUDOnline[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_CVAR, "Chat Mode", "Choose whether to display chat in its own window or the console.",
|
||||
{IT_STRING | IT_CVAR, "Show Chat", "Show chat by default or keep it hidden until you open it.",
|
||||
NULL, {.cvar = &cv_consolechat}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
|
|
@ -28,7 +28,7 @@ menuitem_t OPTIONS_HUDOnline[] =
|
|||
{IT_STRING | IT_CVAR, "Message Fadeout Time (s)", "How long chat messages stay displayed with the chat closed.",
|
||||
NULL, {.cvar = &cv_chattime}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Message Tint", "Shows the tint for new chat messages when the box is closed.",
|
||||
{IT_STRING | IT_CVAR, "Message Fadeout Tint", "Shows the tint for new chat messages when the box is closed.",
|
||||
NULL, {.cvar = &cv_chatbacktint}, 0, 0},
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@ menuitem_t OPTIONS_EditProfile[] = {
|
|||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Profile ID", "6-character long name to identify this Profile.",
|
||||
NULL, {.cvar = &cv_dummyprofilename}, 0, 41},
|
||||
|
||||
{IT_STRING | IT_CALL, "Controls", "Select the button mappings for this Profile.",
|
||||
{IT_STRING | IT_CALL, "Controls", "Change the button mappings.",
|
||||
NULL, {.routine = M_ProfileDeviceSelect}, 0, 71},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Accessibility", "Acccessibility and quality of life options.",
|
||||
NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 91},
|
||||
|
||||
{IT_STRING | IT_CALL, "Character", "Default character and color for this Profile.",
|
||||
{IT_STRING | IT_CALL, "Character", "Default character and color.",
|
||||
NULL, {.routine = M_CharacterSelect}, 0, 111},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online when using this Profile.",
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online and in replays.",
|
||||
NULL, {.cvar = &cv_dummyprofileplayername}, 0, 141},
|
||||
|
||||
{IT_STRING | IT_CALL, "Confirm", "Confirm changes.",
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ menuitem_t OPTIONS_Server[] =
|
|||
{IT_HEADER, "Advertising...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Name", "Change the name of your server.",
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Name", "Name of your server.",
|
||||
NULL, {.cvar = &cv_servername}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Contact", "Where you should be contacted for Master Server moderation.",
|
||||
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Contact", "How you should be contacted for Master Server moderation.",
|
||||
NULL, {.cvar = &cv_server_contact}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Advertise", "Display your game in the Server Browser for other players.",
|
||||
{IT_STRING | IT_CVAR, "Advertise", "Display your server in the Browser for other players to join.",
|
||||
NULL, {.cvar = &cv_advertise}, 0, 0},
|
||||
|
||||
|
||||
|
|
@ -28,49 +28,49 @@ menuitem_t OPTIONS_Server[] =
|
|||
{IT_STRING | IT_CVAR, "Maximum Connections", "How many players & spectators can connect to the server.",
|
||||
NULL, {.cvar = &cv_maxconnections}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "CPU Difficulty", "Bots can fill unused slots. How strong should they be?",
|
||||
{IT_STRING | IT_CVAR, "CPU Level", "Bots can fill unused slots. How strong should they be?",
|
||||
NULL, {.cvar = &cv_kartbot}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Use PWR.LV", "Set whether players should be rated on their performance.",
|
||||
{IT_STRING | IT_CVAR, "Use PWR.LV", "Should players should be rated on their performance?",
|
||||
NULL, {.cvar = &cv_kartusepwrlv}, 0, 0},
|
||||
|
||||
|
||||
{IT_HEADER, "Progression...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Intermission", "Set how long to stay on the result screen.",
|
||||
{IT_STRING | IT_CVAR, "Intermission", "How long to stay on the result screen.",
|
||||
NULL, {.cvar = &cv_inttime}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Map Progression", "Set how the next map is chosen.",
|
||||
{IT_STRING | IT_CVAR, "Map Progression", "How the next map is chosen.",
|
||||
NULL, {.cvar = &cv_advancemap}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Vote Timer", "Set how long players have to vote.",
|
||||
{IT_STRING | IT_CVAR, "Vote Timer", "How long players have to vote.",
|
||||
NULL, {.cvar = &cv_votetime}, 0, 0},
|
||||
|
||||
|
||||
{IT_HEADER, "Permissions...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Allow Joining", "Sets whether players can connect to your server.",
|
||||
{IT_STRING | IT_CVAR, "Allow Joining", "Let players connect to your server.",
|
||||
NULL, {.cvar = &cv_allownewplayer}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Allow Downloads", "Allows joiners to download missing files from you.",
|
||||
{IT_STRING | IT_CVAR, "Allow Downloads", "Let players download missing files from your server.",
|
||||
NULL, {.cvar = &cv_downloading}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Pause Permissions", "Sets who can pause the game.",
|
||||
{IT_STRING | IT_CVAR, "Pause Permissions", "Who is allowed to pause the game?",
|
||||
NULL, {.cvar = &cv_pause}, 0, 0},
|
||||
|
||||
|
||||
{IT_HEADER, "Chat...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Mute Chat", "Prevents non-admins from sending chat messages.",
|
||||
{IT_STRING | IT_CVAR, "Mute Chat", "Prevent everyone but admins from sending chat messages.",
|
||||
NULL, {.cvar = &cv_mute}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Chat Spam Protection", "Prevents too many message from a single player.",
|
||||
{IT_STRING | IT_CVAR, "Chat Spam Protection", "Prevent too many messages from a single player.",
|
||||
NULL, {.cvar = &cv_chatspamprotection}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Advanced...", NULL,
|
||||
{IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Advanced...", "Advanced options. Be careful when messing with these!",
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ menuitem_t OPTIONS_ServerAdvanced[] =
|
|||
{IT_STRING | IT_CVAR, "Resynch. Attempts", "How many times to attempt sending data to desynchronized players.",
|
||||
NULL, {.cvar = &cv_resynchattempts}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Ping Limit (ms)", "Players above the ping limit will get kicked from the server.",
|
||||
{IT_STRING | IT_CVAR, "Delay Limit (tics)", "Players above the delay limit will get kicked from the server.",
|
||||
NULL, {.cvar = &cv_maxping}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Ping Timeout (s)", "Players must be above the ping limit for this long before being kicked.",
|
||||
{IT_STRING | IT_CVAR, "Delay Timeout (seconds)", "Players must be above the delay limit for this long before being kicked.",
|
||||
NULL, {.cvar = &cv_pingtimeout}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Connection Timeout (tics)", "Players not giving any netowrk activity for this long are kicked.",
|
||||
{IT_STRING | IT_CVAR, "Connection Timeout (tics)", "Players not giving any network activity for this long are kicked.",
|
||||
NULL, {.cvar = &cv_nettimeout}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Join Timeout (tics)", "Players taking too long to join are kicked.",
|
||||
|
|
@ -38,7 +38,7 @@ menuitem_t OPTIONS_ServerAdvanced[] =
|
|||
{IT_HEADER, "Addon Downloading", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Max File Transfer", "Maximum size of the files that can be downloaded from joining clients. (KB)",
|
||||
{IT_STRING | IT_CVAR, "Max File Transfer", "Maximum size of each file that joining players may download. (KB)",
|
||||
NULL, {.cvar = &cv_maxsend}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "File Transfer Speed", "File transfer packet rate. Larger values send more data.",
|
||||
|
|
@ -48,13 +48,13 @@ menuitem_t OPTIONS_ServerAdvanced[] =
|
|||
{IT_HEADER, "Logging", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Log Joiner IPs", "Shows the IP of connecting players.",
|
||||
{IT_STRING | IT_CVAR, "Log Joiner IPs", "Shows the IP address of connecting players as they join.",
|
||||
NULL, {.cvar = &cv_showjoinaddress}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Log Resynch", "Shows which players need resynchronization.",
|
||||
NULL, {.cvar = &cv_blamecfail}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Log Transfers", "Shows when clients are downloading files from you.",
|
||||
{IT_STRING | IT_CVAR, "Log Transfers", "Shows when players are downloading files from you.",
|
||||
NULL, {.cvar = &cv_noticedownload}, 0, 0},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -220,22 +220,22 @@ boolean input_routine(INT32)
|
|||
menuitem_t OPTIONS_Sound[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "Volume", "Adjust the volume of game audio.",
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "Volume", "Loudness of all game audio.",
|
||||
NULL, {.routine = slider_routine}, 0, Slider::kMasterVolume},
|
||||
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "SFX Volume", "Adjust the volume of sound effects.",
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "SFX Volume", "Loudness of sound effects.",
|
||||
NULL, {.routine = slider_routine}, 0, Slider::kSfxVolume},
|
||||
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "Music Volume", "Adjust the volume of music playback.",
|
||||
{IT_STRING | IT_ARROWS | IT_CV_SLIDER, "Music Volume", "Loudness of music.",
|
||||
NULL, {.routine = slider_routine}, 0, Slider::kMusicVolume},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Chat Notifications", "Set when to play notification sounds when chat messages are received.",
|
||||
{IT_STRING | IT_CVAR, "Chat Notifications", "Play a sound effect when chat messages appear.",
|
||||
NULL, {.cvar = &cv_chatnotifications}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Character Voices", "Set how often to play character voices in game.",
|
||||
{IT_STRING | IT_CVAR, "Character Voices", "How often to play character voices in a race.",
|
||||
NULL, {.cvar = &cv_kartvoices}, 0, 0},
|
||||
|
||||
{IT_SPACE | IT_NOTHING, NULL, NULL,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
/// \brief Video Options
|
||||
|
||||
#include "../k_menu.h"
|
||||
#include "../r_main.h" // cv_skybox
|
||||
#include "../v_video.h" // cv_globalgamma
|
||||
#include "../r_fps.h" // fps cvars
|
||||
|
||||
|
|
@ -10,65 +9,34 @@
|
|||
menuitem_t OPTIONS_Video[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_CALL, "Set Resolution...", "Change the screen resolution for the game.",
|
||||
NULL, {.routine = M_VideoModeMenu}, 0, 0},
|
||||
{IT_STRING | IT_SUBMENU, "Resolution...", "Change the aspect ratio and image quality.",
|
||||
NULL, {.submenu = &OPTIONS_VideoModesDef}, 0, 0},
|
||||
|
||||
{IT_NOTHING|IT_SPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||
{IT_STRING | IT_CVAR, "Fullscreen", "Set whether you want to use fullscreen or windowed mode.",
|
||||
{IT_STRING | IT_CVAR, "Fullscreen", "Play on the big screen or in a small window.",
|
||||
NULL, {.cvar = &cv_fullscreen}, 0, 0},
|
||||
#endif
|
||||
|
||||
{IT_STRING | IT_CVAR, "Vertical Sync", "Works with your screen to reduce image tearing and judder.",
|
||||
{IT_STRING | IT_CVAR, "V-Sync", "Reduce image tearing and judder.",
|
||||
NULL, {.cvar = &cv_vidwait}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "FPS Cap", "Handles the frame rate of the game (35 to match game logic)",
|
||||
{IT_STRING | IT_CVAR, "FPS Cap", "Limit the frame rate. Higher values may consume more CPU usage.",
|
||||
NULL, {.cvar = &cv_fpscap}, 0, 0},
|
||||
|
||||
{IT_NOTHING|IT_SPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
#if 0 // See Profiles/Accessibility
|
||||
{IT_STRING | IT_CVAR, "Screen Tilting", "The view rotatation on inclines can be disabled to reduce motion sickness.",
|
||||
NULL, {.cvar = &cv_tilting}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Reduce Visual Effects", "If on, some less-important particle cues will be hidden.",
|
||||
NULL, {.cvar = &cv_reducevfx}, 0, 0},
|
||||
#endif
|
||||
|
||||
/*
|
||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER, "Gamma", "Adjusts the overall brightness of the game.",
|
||||
NULL, {.cvar = &cv_globalgamma}, 0, 0},
|
||||
{IT_STRING | IT_CVAR, "Screen Effect", "Uses a special effect when displaying the game.",
|
||||
NULL, {.cvar = &cv_scr_effect}, 0, 0},
|
||||
|
||||
{IT_NOTHING|IT_SPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
*/
|
||||
|
||||
{IT_HEADER, "Advanced...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Draw Distance", "How far objects can be drawn. A tradeoff between performance & visibility.",
|
||||
NULL, {.cvar = &cv_drawdist}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Weather Draw Distance", "Affects how far weather visuals can be drawn. Lower values improve performance.",
|
||||
NULL, {.cvar = &cv_drawdist_precip}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Enable Skyboxes", "Turning this off may improve performance, but reduces courses' background details.",
|
||||
NULL, {.cvar = &cv_skybox}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Parallel Software", "Uses multiple CPU cores for the software renderer if available, for a FPS boost.",
|
||||
NULL, {.cvar = &cv_parallelsoftware}, 0, 0},
|
||||
|
||||
#ifdef HWRENDER
|
||||
{IT_NOTHING|IT_SPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "Hardware Options...", "For usage and configuration of the OpenGL renderer.",
|
||||
NULL, {.submenu = &OPTIONS_VideoOGLDef}, 0, 0},
|
||||
#endif
|
||||
{IT_STRING | IT_SUBMENU, "Advanced...", "Advanced performance options and experimental rendering features.",
|
||||
NULL, {.submenu = &OPTIONS_VideoAdvancedDef}, 0, 0},
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,26 @@
|
|||
/// \brief OpenGL Options
|
||||
|
||||
#include "../k_menu.h"
|
||||
#include "../r_main.h" // cv_skybox
|
||||
#include "../hardware/hw_main.h" // gl consvars
|
||||
|
||||
menuitem_t OPTIONS_VideoOGL[] =
|
||||
menuitem_t OPTIONS_VideoAdvanced[] =
|
||||
{
|
||||
{IT_HEADER, "Performance...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Draw Distance", "How far objects can be drawn. A tradeoff between performance & visibility.",
|
||||
NULL, {.cvar = &cv_drawdist}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Weather Draw Distance", "Affects how far weather visuals can be drawn. Lower values improve performance.",
|
||||
NULL, {.cvar = &cv_drawdist_precip}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Enable Skyboxes", "Turning this off may improve performance, but reduces courses' background details.",
|
||||
NULL, {.cvar = &cv_skybox}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Parallel Software", "Uses multiple CPU cores for the software renderer if available, for a FPS boost.",
|
||||
NULL, {.cvar = &cv_parallelsoftware}, 0, 0},
|
||||
|
||||
|
||||
{IT_HEADER, "Rendering Backend...", "Watch people get confused anyway!!",
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
|
@ -67,11 +83,11 @@ menuitem_t OPTIONS_VideoOGL[] =
|
|||
NULL, {.cvar = &cv_glshearing}, 0, 0},
|
||||
};
|
||||
|
||||
menu_t OPTIONS_VideoOGLDef = {
|
||||
sizeof (OPTIONS_VideoOGL) / sizeof (menuitem_t),
|
||||
menu_t OPTIONS_VideoAdvancedDef = {
|
||||
sizeof (OPTIONS_VideoAdvanced) / sizeof (menuitem_t),
|
||||
&OPTIONS_VideoDef,
|
||||
0,
|
||||
OPTIONS_VideoOGL,
|
||||
OPTIONS_VideoAdvanced,
|
||||
48, 80,
|
||||
SKINCOLOR_PLAGUE, 0,
|
||||
MBF_DRAWBGWHILEPLAYING,
|
||||
|
|
@ -12,6 +12,8 @@ menuitem_t OPTIONS_VideoModes[] = {
|
|||
|
||||
};
|
||||
|
||||
static void M_VideoModeMenu(void);
|
||||
|
||||
menu_t OPTIONS_VideoModesDef = {
|
||||
sizeof (OPTIONS_VideoModes) / sizeof (menuitem_t),
|
||||
&OPTIONS_VideoDef,
|
||||
|
|
@ -25,20 +27,18 @@ menu_t OPTIONS_VideoModesDef = {
|
|||
M_DrawVideoModes,
|
||||
M_DrawOptionsCogs,
|
||||
M_OptionsTick,
|
||||
NULL,
|
||||
M_VideoModeMenu,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
// setup video mode menu
|
||||
void M_VideoModeMenu(INT32 choice)
|
||||
static void M_VideoModeMenu(void)
|
||||
{
|
||||
INT32 i, j, vdup, nummodes;
|
||||
UINT32 width, height;
|
||||
const char *desc;
|
||||
|
||||
(void)choice;
|
||||
|
||||
memset(optionsmenu.modedescs, 0, sizeof(optionsmenu.modedescs));
|
||||
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||
|
|
@ -100,8 +100,6 @@ void M_VideoModeMenu(INT32 choice)
|
|||
}
|
||||
|
||||
optionsmenu.vidm_column_size = (optionsmenu.vidm_nummodes+2) / 3;
|
||||
|
||||
M_SetupNextMenu(&OPTIONS_VideoModesDef, false);
|
||||
}
|
||||
|
||||
// special menuitem key handler for video mode list
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ static void tick_routine(void)
|
|||
{
|
||||
case drace_mritems:
|
||||
M_SetupNextMenu(&OPTIONS_GameplayItemsDef, false);
|
||||
optionsmenu.ticker = 0;
|
||||
M_OptionsTick();
|
||||
break;
|
||||
|
||||
case drace_encore:
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ menuitem_t PLAY_MP_Host[] =
|
|||
{IT_STRING | IT_ARROWS, "Gametype", "Choose the type of play on your serer.",
|
||||
NULL, {.routine = M_HandleHostMenuGametype}, 0, 0},
|
||||
|
||||
{IT_STRING2 | IT_CALL, "Gameplay Options...", "Adjust settings pertaining to gameplay.",
|
||||
{IT_STRING2 | IT_CALL, "Gameplay Options...", "Modify game mechanics.",
|
||||
NULL, {.routine = M_GameplayOptions}, 0, 0},
|
||||
|
||||
{IT_STRING2 | IT_CALL, "Server Options...", "Adjust settings pertaining to online play.",
|
||||
{IT_STRING2 | IT_CALL, "Server Options...", "Update server settings.",
|
||||
NULL, {.routine = M_ServerOptions}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "Map Select", "Go on and select a level!",
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ void Music_Init(void)
|
|||
tune.song = "kgrow";
|
||||
tune.priority = 20;
|
||||
tune.resume_fade_in = 200;
|
||||
tune.use_level_volume = true;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -78,6 +79,7 @@ void Music_Init(void)
|
|||
|
||||
tune.song = "kinvnc";
|
||||
tune.priority = 21;
|
||||
tune.use_level_volume = true;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ target_sources(SRB2SDL2 PRIVATE
|
|||
waterfall-particle.c
|
||||
sealed-star.c
|
||||
talk-point.cpp
|
||||
powerup-spinner.cpp
|
||||
adventure-air-booster.c
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -123,11 +123,11 @@ Obj_AudienceInit
|
|||
// The following is derived from the default bobamp
|
||||
if (mobj->type != MT_EMBLEM && !(mobj->flags & MF_NOGRAVITY) && followers[followerpick].bobamp < 4*FRACUNIT)
|
||||
{
|
||||
audience_bobamp(mobj) = 4*mobj->scale;
|
||||
audience_bobamp(mobj) = 4*mapobjectscale;
|
||||
}
|
||||
else
|
||||
{
|
||||
audience_bobamp(mobj) = FixedMul(mobj->scale, followers[followerpick].bobamp);
|
||||
audience_bobamp(mobj) = FixedMul(mapobjectscale, followers[followerpick].bobamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
97
src/objects/powerup-spinner.cpp
Normal file
97
src/objects/powerup-spinner.cpp
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
// DR. ROBOTNIK'S RING RACERS
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by James Robert Roman
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "objects.hpp"
|
||||
|
||||
#include "../m_easing.h"
|
||||
#include "../m_fixed.h"
|
||||
#include "../tables.h"
|
||||
|
||||
using namespace srb2::objects;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
struct Spinner : Mobj
|
||||
{
|
||||
static constexpr int kDuration = 40;
|
||||
|
||||
void extravalue1() = delete;
|
||||
INT32 powerup() const { return mobj_t::extravalue1; }
|
||||
void powerup(INT32 n) { mobj_t::extravalue1 = n; }
|
||||
|
||||
void extravalue2() = delete;
|
||||
INT32 duration() const { return mobj_t::extravalue2; }
|
||||
void duration(INT32 n) { mobj_t::extravalue2 = n; }
|
||||
|
||||
static void spawn(Mobj* source, INT32 powerup, tic_t duration)
|
||||
{
|
||||
Spinner* x = Mobj::spawn<Spinner>(source->pos(), MT_GOTPOWERUP);
|
||||
K_UpdateMobjItemOverlay(x, powerup, 1);
|
||||
x->frame |= FF_PAPERSPRITE | FF_ADD;
|
||||
x->fuse = duration;
|
||||
x->powerup(powerup);
|
||||
x->duration(duration);
|
||||
}
|
||||
|
||||
void think()
|
||||
{
|
||||
fixed_t f = FRACUNIT - std::clamp(fuse, 0, duration()) * FRACUNIT / std::max(duration(), 1);
|
||||
|
||||
if (fuse == duration() - 20)
|
||||
{
|
||||
S_StartSound(nullptr, sound());
|
||||
}
|
||||
|
||||
angle += Easing_InQuad(f, ANGLE_11hh, ANGLE_45);
|
||||
renderflags = (renderflags & ~RF_TRANSMASK) | (Easing_Linear(f, 0, 9) << RF_TRANSSHIFT);
|
||||
spritescale({Easing_Linear(f, 4*FRACUNIT, FRACUNIT/4), Easing_Linear(f, FRACUNIT, 6*FRACUNIT)});
|
||||
|
||||
if (--fuse <= 0)
|
||||
{
|
||||
remove();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
sfxenum_t sound() const
|
||||
{
|
||||
switch (powerup())
|
||||
{
|
||||
case POWERUP_SMONITOR:
|
||||
return sfx_bpwrua;
|
||||
case POWERUP_BARRIER:
|
||||
return sfx_bpwrub;
|
||||
case POWERUP_BUMPER:
|
||||
return sfx_bpwruc;
|
||||
case POWERUP_BADGE:
|
||||
return sfx_bpwrud;
|
||||
case POWERUP_SUPERFLICKY:
|
||||
return sfx_bpwrue;
|
||||
case POWERUP_POINTS:
|
||||
return sfx_bpwruf;
|
||||
default:
|
||||
return sfx_thok;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace
|
||||
|
||||
void Obj_SpawnPowerUpSpinner(mobj_t *source, INT32 powerup, tic_t duration)
|
||||
{
|
||||
Spinner::spawn(static_cast<Mobj*>(source), powerup, duration);
|
||||
}
|
||||
|
||||
void Obj_TickPowerUpSpinner(mobj_t *mobj)
|
||||
{
|
||||
static_cast<Spinner*>(mobj)->think();
|
||||
}
|
||||
|
|
@ -112,6 +112,10 @@ struct camera_t
|
|||
fixed_t floorz;
|
||||
fixed_t ceilingz;
|
||||
|
||||
// From the player
|
||||
fixed_t centerfloorz;
|
||||
fixed_t centerceilingz;
|
||||
|
||||
// For movement checking.
|
||||
fixed_t radius;
|
||||
fixed_t height;
|
||||
|
|
|
|||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -6596,6 +6596,11 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
Obj_SSGobletMobjThink(mobj);
|
||||
return;
|
||||
}
|
||||
case MT_GOTPOWERUP:
|
||||
{
|
||||
Obj_TickPowerUpSpinner(mobj);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
if (mobj->fuse)
|
||||
{ // Scenery object fuse! Very basic!
|
||||
|
|
@ -12491,12 +12496,18 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!K_ShouldSpawnDuelItems())
|
||||
// This duel check is tricky.
|
||||
// At map load, inDuel is always false, because
|
||||
// K_TimerInit is called afterward. K_TimerInit will then
|
||||
// spawn all the duel mode objects itself, which ends up
|
||||
// calling this function again.
|
||||
// So that's why this check is even here.
|
||||
if (inDuel == false && (grandprixinfo.gp == false || grandprixinfo.eventmode != GPEVENT_BONUS))
|
||||
{
|
||||
if (K_IsDuelItem(i) == true
|
||||
&& K_DuelItemAlwaysSpawns(mthing) == false)
|
||||
{
|
||||
// Only spawns in Duels.
|
||||
// Only spawns in Duels or GP bonus rounds.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6567,6 +6567,11 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending)
|
|||
WRITEUINT32(save->p, g_darkness.start);
|
||||
WRITEUINT32(save->p, g_darkness.end);
|
||||
|
||||
WRITEUINT32(save->p, g_musicfade.start);
|
||||
WRITEUINT32(save->p, g_musicfade.end);
|
||||
WRITEUINT32(save->p, g_musicfade.fade);
|
||||
WRITEUINT8(save->p, g_musicfade.ticked);
|
||||
|
||||
WRITEUINT16(save->p, numchallengedestructibles);
|
||||
|
||||
// Is it paused?
|
||||
|
|
@ -6753,6 +6758,11 @@ static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
|
|||
g_darkness.start = READUINT32(save->p);
|
||||
g_darkness.end = READUINT32(save->p);
|
||||
|
||||
g_musicfade.start = READUINT32(save->p);
|
||||
g_musicfade.end = READUINT32(save->p);
|
||||
g_musicfade.fade = READUINT32(save->p);
|
||||
g_musicfade.ticked = READUINT8(save->p);
|
||||
|
||||
numchallengedestructibles = READUINT16(save->p);
|
||||
|
||||
// Is it paused?
|
||||
|
|
|
|||
20
src/p_tick.c
20
src/p_tick.c
|
|
@ -808,6 +808,22 @@ static void P_TickDarkness(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void P_TickMusicFade(void)
|
||||
{
|
||||
if (leveltime >= g_musicfade.start && leveltime <= g_musicfade.end)
|
||||
{
|
||||
INT32 half = (g_musicfade.end - g_musicfade.start) / 2;
|
||||
INT32 fade = max(1, g_musicfade.fade);
|
||||
INT32 mid = half - fade;
|
||||
INT32 t = abs((INT32)leveltime - (INT32)(g_musicfade.start + half));
|
||||
Music_LevelVolume((max(t, mid) - mid) * 100 / fade);
|
||||
}
|
||||
else if (!g_musicfade.ticked)
|
||||
Music_LevelVolume(100);
|
||||
|
||||
g_musicfade.ticked = true;
|
||||
}
|
||||
|
||||
//
|
||||
// P_Ticker
|
||||
//
|
||||
|
|
@ -1081,7 +1097,8 @@ void P_Ticker(boolean run)
|
|||
ACS_RunPositionScript();
|
||||
}
|
||||
|
||||
if (timelimitintics > 0 && leveltime == (timelimitintics + starttime + 1))
|
||||
if ((gametyperules & GTR_OVERTIME) && !battleprisons &&
|
||||
timelimitintics > 0 && leveltime == (timelimitintics + starttime + 1))
|
||||
{
|
||||
ACS_RunOvertimeScript();
|
||||
}
|
||||
|
|
@ -1101,6 +1118,7 @@ void P_Ticker(boolean run)
|
|||
racecountdown--;
|
||||
|
||||
P_TickDarkness();
|
||||
P_TickMusicFade();
|
||||
|
||||
if (exitcountdown >= 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3053,6 +3053,8 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
|||
thiscam->x = x;
|
||||
thiscam->y = y;
|
||||
thiscam->z = z;
|
||||
thiscam->centerfloorz = player->mo->floorz;
|
||||
thiscam->centerceilingz = player->mo->ceilingz;
|
||||
|
||||
thiscam->angle = player->mo->angle;
|
||||
thiscam->aiming = 0;
|
||||
|
|
@ -3570,6 +3572,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
R_ResetViewInterpolation(num + 1);
|
||||
}
|
||||
|
||||
thiscam->centerfloorz = mo->floorz;
|
||||
thiscam->centerceilingz = mo->ceilingz;
|
||||
|
||||
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,19 @@ constexpr GLenum map_texture_wrap(rhi::TextureWrapMode wrap)
|
|||
return GL_REPEAT;
|
||||
case rhi::TextureWrapMode::kMirroredRepeat:
|
||||
return GL_MIRRORED_REPEAT;
|
||||
default:
|
||||
return GL_REPEAT;
|
||||
}
|
||||
}
|
||||
|
||||
constexpr GLenum map_texture_filter(rhi::TextureFilterMode filter)
|
||||
{
|
||||
switch (filter)
|
||||
{
|
||||
case rhi::TextureFilterMode::kNearest:
|
||||
return GL_NEAREST;
|
||||
case rhi::TextureFilterMode::kLinear:
|
||||
return GL_LINEAR;
|
||||
default:
|
||||
return GL_NEAREST;
|
||||
}
|
||||
|
|
@ -595,9 +608,9 @@ rhi::Handle<rhi::Texture> Gl2Rhi::create_texture(const rhi::TextureDesc& desc)
|
|||
|
||||
gl_->BindTexture(GL_TEXTURE_2D, name);
|
||||
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, map_texture_filter(desc.min));
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, map_texture_filter(desc.mag));
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, map_texture_wrap(desc.u_wrap));
|
||||
GL_ASSERT;
|
||||
|
|
@ -672,6 +685,34 @@ void Gl2Rhi::update_texture(
|
|||
GL_ASSERT;
|
||||
}
|
||||
|
||||
void Gl2Rhi::update_texture_settings(
|
||||
Handle<GraphicsContext> ctx,
|
||||
Handle<Texture> texture,
|
||||
TextureWrapMode u_wrap,
|
||||
TextureWrapMode v_wrap,
|
||||
TextureFilterMode min,
|
||||
TextureFilterMode mag
|
||||
)
|
||||
{
|
||||
SRB2_ASSERT(graphics_context_active_ == true);
|
||||
|
||||
SRB2_ASSERT(texture_slab_.is_valid(texture) == true);
|
||||
auto& t = texture_slab_[texture];
|
||||
|
||||
gl_->ActiveTexture(GL_TEXTURE0);
|
||||
GL_ASSERT;
|
||||
gl_->BindTexture(GL_TEXTURE_2D, t.texture);
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, map_texture_wrap(u_wrap));
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, map_texture_wrap(v_wrap));
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, map_texture_filter(min));
|
||||
GL_ASSERT;
|
||||
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, map_texture_filter(mag));
|
||||
GL_ASSERT;
|
||||
}
|
||||
|
||||
rhi::Handle<rhi::Buffer> Gl2Rhi::create_buffer(const rhi::BufferDesc& desc)
|
||||
{
|
||||
GLenum target = map_buffer_type(desc.type);
|
||||
|
|
|
|||
|
|
@ -198,6 +198,14 @@ public:
|
|||
srb2::rhi::PixelFormat data_format,
|
||||
tcb::span<const std::byte> data
|
||||
) override;
|
||||
virtual void update_texture_settings(
|
||||
Handle<GraphicsContext> ctx,
|
||||
Handle<Texture> texture,
|
||||
TextureWrapMode u_wrap,
|
||||
TextureWrapMode v_wrap,
|
||||
TextureFilterMode min,
|
||||
TextureFilterMode mag
|
||||
) override;
|
||||
virtual Handle<UniformSet>
|
||||
create_uniform_set(Handle<GraphicsContext> ctx, const CreateUniformSetInfo& info) override;
|
||||
virtual Handle<BindingSet>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,26 @@ const ProgramRequirements srb2::rhi::kProgramRequirementsPostimg = {
|
|||
ProgramSamplerRequirements {{{SamplerName::kSampler0, true}, {SamplerName::kSampler1, false}}}
|
||||
};
|
||||
|
||||
const ProgramRequirements srb2::rhi::kProgramRequirementsSharpBilinear = {
|
||||
ProgramVertexInputRequirements {
|
||||
{ProgramVertexInput {VertexAttributeName::kPosition, VertexAttributeFormat::kFloat3, true},
|
||||
ProgramVertexInput {VertexAttributeName::kTexCoord0, VertexAttributeFormat::kFloat2, false},
|
||||
ProgramVertexInput {VertexAttributeName::kColor, VertexAttributeFormat::kFloat4, false}}},
|
||||
ProgramUniformRequirements {
|
||||
{{{{UniformName::kProjection, true}}},
|
||||
{{{UniformName::kModelView, true}, {UniformName::kTexCoord0Transform, true}, {UniformName::kSampler0Size, true}}}}},
|
||||
ProgramSamplerRequirements {{{SamplerName::kSampler0, true}}}};
|
||||
|
||||
const ProgramRequirements srb2::rhi::kProgramRequirementsCrt = {
|
||||
ProgramVertexInputRequirements {
|
||||
{ProgramVertexInput {VertexAttributeName::kPosition, VertexAttributeFormat::kFloat3, true},
|
||||
ProgramVertexInput {VertexAttributeName::kTexCoord0, VertexAttributeFormat::kFloat2, false},
|
||||
ProgramVertexInput {VertexAttributeName::kColor, VertexAttributeFormat::kFloat4, false}}},
|
||||
ProgramUniformRequirements {
|
||||
{{{{UniformName::kProjection, true}}},
|
||||
{{{UniformName::kModelView, true}, {UniformName::kTexCoord0Transform, true}, {UniformName::kSampler0Size, true}}}}},
|
||||
ProgramSamplerRequirements {{{SamplerName::kSampler0, true}, {SamplerName::kSampler1, true}}}};
|
||||
|
||||
const ProgramRequirements& rhi::program_requirements_for_program(PipelineProgram program) noexcept
|
||||
{
|
||||
switch (program)
|
||||
|
|
@ -79,6 +99,10 @@ const ProgramRequirements& rhi::program_requirements_for_program(PipelineProgram
|
|||
return kProgramRequirementsPostprocessWipe;
|
||||
case PipelineProgram::kPostimg:
|
||||
return kProgramRequirementsPostimg;
|
||||
case PipelineProgram::kSharpBilinear:
|
||||
return kProgramRequirementsSharpBilinear;
|
||||
case PipelineProgram::kCrt:
|
||||
return kProgramRequirementsCrt;
|
||||
default:
|
||||
std::terminate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,9 @@ enum class PipelineProgram
|
|||
kUnshaded,
|
||||
kUnshadedPaletted,
|
||||
kPostprocessWipe,
|
||||
kPostimg
|
||||
kPostimg,
|
||||
kSharpBilinear,
|
||||
kCrt
|
||||
};
|
||||
|
||||
enum class BufferType
|
||||
|
|
@ -285,6 +287,8 @@ extern const ProgramRequirements kProgramRequirementsUnshaded;
|
|||
extern const ProgramRequirements kProgramRequirementsUnshadedPaletted;
|
||||
extern const ProgramRequirements kProgramRequirementsPostprocessWipe;
|
||||
extern const ProgramRequirements kProgramRequirementsPostimg;
|
||||
extern const ProgramRequirements kProgramRequirementsSharpBilinear;
|
||||
extern const ProgramRequirements kProgramRequirementsCrt;
|
||||
|
||||
const ProgramRequirements& program_requirements_for_program(PipelineProgram program) noexcept;
|
||||
|
||||
|
|
@ -480,6 +484,12 @@ enum class TextureWrapMode
|
|||
kClamp
|
||||
};
|
||||
|
||||
enum class TextureFilterMode
|
||||
{
|
||||
kNearest,
|
||||
kLinear
|
||||
};
|
||||
|
||||
struct TextureDesc
|
||||
{
|
||||
TextureFormat format;
|
||||
|
|
@ -487,6 +497,8 @@ struct TextureDesc
|
|||
uint32_t height;
|
||||
TextureWrapMode u_wrap;
|
||||
TextureWrapMode v_wrap;
|
||||
TextureFilterMode min;
|
||||
TextureFilterMode mag;
|
||||
};
|
||||
|
||||
struct BufferDesc
|
||||
|
|
@ -618,6 +630,14 @@ struct Rhi
|
|||
srb2::rhi::PixelFormat data_format,
|
||||
tcb::span<const std::byte> data
|
||||
) = 0;
|
||||
virtual void update_texture_settings(
|
||||
Handle<GraphicsContext> ctx,
|
||||
Handle<Texture> texture,
|
||||
TextureWrapMode u_wrap,
|
||||
TextureWrapMode v_wrap,
|
||||
TextureFilterMode min,
|
||||
TextureFilterMode mag
|
||||
) = 0;
|
||||
virtual Handle<UniformSet> create_uniform_set(Handle<GraphicsContext> ctx, const CreateUniformSetInfo& info) = 0;
|
||||
virtual Handle<BindingSet>
|
||||
create_binding_set(Handle<GraphicsContext> ctx, Handle<Pipeline> pipeline, const CreateBindingSetInfo& info) = 0;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ extern INT32 scr_bpp;
|
|||
extern UINT8 *scr_borderpatch; // patch used to fill the view borders
|
||||
|
||||
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderer, cv_renderhitbox, cv_fullscreen;
|
||||
extern consvar_t cv_scr_effect;
|
||||
extern consvar_t cv_vhseffect, cv_shittyscreen;
|
||||
extern consvar_t cv_parallelsoftware;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ static constexpr const char* pipeline_lump_slug(rhi::PipelineProgram program)
|
|||
return "postprocesswipe";
|
||||
case rhi::PipelineProgram::kPostimg:
|
||||
return "postimg";
|
||||
case rhi::PipelineProgram::kSharpBilinear:
|
||||
return "sharpbilinear";
|
||||
case rhi::PipelineProgram::kCrt:
|
||||
return "crt";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1420,6 +1420,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"gsha5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gsha6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gsha7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gsha7l",false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gsha8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gsha9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gshaa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
|
|
|||
|
|
@ -1496,6 +1496,7 @@ typedef enum
|
|||
sfx_gsha5,
|
||||
sfx_gsha6,
|
||||
sfx_gsha7,
|
||||
sfx_gsha7l,
|
||||
sfx_gsha8,
|
||||
sfx_gsha9,
|
||||
sfx_gshaa,
|
||||
|
|
|
|||
|
|
@ -1279,20 +1279,30 @@ static void ST_overlayDrawer(void)
|
|||
{
|
||||
if (!demo.attract && !P_IsLocalPlayer(stplyr) && !camera[viewnum].freecam)
|
||||
{
|
||||
if (!r_splitscreen)
|
||||
if (r_splitscreen <= 1)
|
||||
{
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("VIEWPOINT:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_HUDTRANSHALF, player_names[stplyr-players]);
|
||||
}
|
||||
else if (r_splitscreen == 1)
|
||||
{
|
||||
char name[MAXPLAYERNAME+12];
|
||||
INT32 flags = V_SNAPTOBOTTOM | V_SPLITSCREEN | V_HUDTRANS;
|
||||
INT32 x = BASEVIDWIDTH/2;
|
||||
INT32 y = (BASEVIDHEIGHT / (r_splitscreen + 1)) - 34;
|
||||
INT32 width = 50;
|
||||
|
||||
INT32 y = (viewnum == 0) ? 4 : BASEVIDHEIGHT/2-12;
|
||||
sprintf(name, "VIEWPOINT: %s", player_names[stplyr-players]);
|
||||
V_DrawRightAlignedThinString(BASEVIDWIDTH-40, y, V_HUDTRANSHALF|V_SNAPTOTOP|V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_SPLITSCREEN, name);
|
||||
if (r_splitscreen)
|
||||
{
|
||||
flags = (flags & ~V_ALPHAMASK) | V_HUDTRANSHALF;
|
||||
y += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawFill(x - width/2, y + 6, width, 2, flags | 31);
|
||||
V_DrawCenteredThinString(x, y, flags | V_ORANGEMAP, "Watching");
|
||||
}
|
||||
|
||||
const char *text = player_names[stplyr-players];
|
||||
fixed_t textwidth = V_StringScaledWidth(FRACUNIT, FRACUNIT, FRACUNIT, flags, KART_FONT, text);
|
||||
V_DrawStringScaled(x*FRACUNIT - textwidth/2, (y+10)*FRACUNIT,
|
||||
FRACUNIT, FRACUNIT, FRACUNIT, flags, NULL, KART_FONT, text);
|
||||
}
|
||||
else if (r_splitscreen)
|
||||
else
|
||||
{
|
||||
V_DrawCenteredThinString((vid.width/vid.dupx)/4, BASEVIDHEIGHT/2 - 12, V_HUDTRANSHALF|V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_SPLITSCREEN, player_names[stplyr-players]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ TYPEDEF (cupheader_t);
|
|||
TYPEDEF (unloaded_cupheader_t);
|
||||
TYPEDEF (exitcondition_t);
|
||||
TYPEDEF (darkness_t);
|
||||
TYPEDEF (musicfade_t);
|
||||
|
||||
// font.h
|
||||
TYPEDEF (font_t);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue