Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRATH: Aeon of Ruin upstream support #1

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3d3b769
Implement "forcenearest" particle effect key, ported from wrath-darkp…
MarioSMB May 30, 2020
5f55f83
Add support for CACHEPICFLAG_LINEAR (currently unused), ported from w…
MarioSMB May 30, 2020
0cb0479
Don't crash the game if a "nasty" -game name is rejected, matches beh…
MarioSMB May 30, 2020
bcaf48e
Save cl_maxfps_alwayssleep changes to config
MarioSMB May 30, 2020
6f684f2
Increase MAX_CACHED_PICS to 2048, as per wrath-darkplaces
MarioSMB May 30, 2020
c5b1865
Implement pausesound command, ported from wrath-darkplaces
MarioSMB May 30, 2020
9204771
Fix a potential memory leak with wavefront sounds
MarioSMB May 30, 2020
775cf78
Don't show beam list overflow spam warnings normally
MarioSMB May 30, 2020
85d4aaa
Some minor tweaks to CACHEPICFLAG_LINEAR and the nasty -game name rej…
MarioSMB May 30, 2020
aeaaffc
Implement wrath's workaround for #152: only apply nogravityonground w…
MarioSMB May 31, 2020
d3deefd
Implement wrath's workaround for #136: don't clear the onground flag …
MarioSMB May 31, 2020
abe995d
Remove the linear flag from some particle textures and adjust an off …
MarioSMB May 31, 2020
8ed9fdd
Don't save scr_loadingscreen_picture to config (matches other loading…
MarioSMB Jun 2, 2020
bb4f48e
Implement texture lookup table GLSL shader, ported from wrath-darkplaces
MarioSMB Jun 2, 2020
d76626e
Remove forced linear flag from motion blur texture, as per wrath-dark…
MarioSMB Jun 2, 2020
4ff05ac
Increase maximum beams from 256 to 4096, as per wrath-darkplaces
MarioSMB Jun 2, 2020
ac6cc77
Add GLSL implementation of texture lookup tables (LUT), ported from W…
MarioSMB Jun 9, 2020
7b6c729
Merge branch 'master' into Mario/wrath-darkplaces
Jun 10, 2020
b6ef825
Fix compile warnings
Jun 10, 2020
43335be
Merge branch 'Mario/wrath-darkplaces' into Mario/wrath-darkplaces_extra
Jun 10, 2020
b61e9d0
Implement EXT_WRATH
Jun 10, 2020
e7fb44e
Implement GAME_WRATH and its codepaths
Jun 10, 2020
a1c2de7
Implement EXT_NODEGRAPH
Jun 10, 2020
7f8bd47
Implement EXT_WRATH fields
Jun 10, 2020
4b2e338
Merge branch 'master' into Mario/wrath-darkplaces_extra
Cloudwalk9 Aug 25, 2020
e4cec23
Fix compile warnings
Cloudwalk9 Aug 26, 2020
18ba7b8
Merge branch 'master' into Mario/wrath-darkplaces_extra
Cloudwalk9 Dec 18, 2020
b3298e5
Merge branch 'master' into Mario/wrath-darkplaces_extra
Cloudwalk9 Dec 23, 2020
e0fb2ce
Merge branch 'master' into Mario/wrath-darkplaces_extra
Cloudwalk9 May 26, 2021
e355c37
Merge branch 'master' into Mario/wrath-darkplaces_extra
Cloudwalk9 May 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,7 @@ static void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
vec3_t wishdir;
vec3_t yawangles;
trace_t trace;
qbool moving;

CL_ClientMovement_Physics_CheckJump(s);

Expand Down Expand Up @@ -1378,6 +1379,7 @@ static void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
VectorMA(s->velocity, accelspeed, wishdir, s->velocity);
}
gravity = cl.movevars_gravity * cl.movevars_entgravity * s->cmd.frametime;
moving = s->velocity[0] || s->velocity[1];
if(!(cl.moveflags & MOVEFLAG_NOGRAVITYONGROUND))
{
if(cl.moveflags & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
Expand All @@ -1387,9 +1389,10 @@ static void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
}
if (cls.protocol == PROTOCOL_QUAKEWORLD)
s->velocity[2] = 0;
moving = s->velocity[0] || s->velocity[1];
if (VectorLength2(s->velocity))
CL_ClientMovement_Move(s);
if(!(cl.moveflags & MOVEFLAG_NOGRAVITYONGROUND) || !s->onground)
if(!(cl.moveflags & MOVEFLAG_NOGRAVITYONGROUND) || !s->onground || (s->onground && moving))
{
if(cl.moveflags & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
s->velocity[2] -= gravity * 0.5f;
Expand Down Expand Up @@ -1448,8 +1451,9 @@ static void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
s->velocity[2] -= gravity * 0.5f;
else
s->velocity[2] -= gravity;
moving = s->velocity[0] || s->velocity[1];
CL_ClientMovement_Move(s);
if(!(cl.moveflags & MOVEFLAG_NOGRAVITYONGROUND) || !s->onground)
if(!(cl.moveflags & MOVEFLAG_NOGRAVITYONGROUND) || !s->onground || (s->onground && moving))
{
if(cl.moveflags & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
s->velocity[2] -= gravity * 0.5f;
Expand Down
18 changes: 16 additions & 2 deletions cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void CL_KeepaliveMessage (qbool readmessages)
{
if(cls.state != ca_dedicated)
{
if(countdownupdate <= 0) // check if time stepped backwards
if(countdownupdate <= 0 || gamemode == GAME_WRATH) // check if time stepped backwards
{
SCR_UpdateLoadingScreenIfShown();
countdownupdate = 2;
Expand Down Expand Up @@ -484,6 +484,7 @@ static void CL_SetupWorldModel(void)
strlcpy(cl.worldname, cl.worldmodel->name, sizeof(cl.worldname));
FS_StripExtension(cl.worldname, cl.worldnamenoextension, sizeof(cl.worldnamenoextension));
strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
SCR_SetLoadingSplash(cl.worldbasename); // set the loading splash once we know the map name for sure
Cvar_SetQuick(&cl_worldmessage, cl.worldmessage);
Cvar_SetQuick(&cl_worldname, cl.worldname);
Cvar_SetQuick(&cl_worldnamenoextension, cl.worldnamenoextension);
Expand Down Expand Up @@ -1349,7 +1350,8 @@ static void CL_BeginDownloads(qbool aborteddownload)
// finished loading sounds
}

SCR_PopLoadingScreen(false);
if (gamemode != GAME_WRATH) // this will be done after the "press any key" screen
SCR_ClearLoadingScreen(false);

if (!cl.loadfinished)
{
Expand Down Expand Up @@ -1660,6 +1662,17 @@ static void CL_SignonReply (void)
Con_ClearNotify();
if (Sys_CheckParm("-profilegameonly"))
Sys_AllowProfiling(true);

if (gamemode == GAME_WRATH)
{
// HACK: pause the game and display "loading ended, press any key" screen
SCR_ClearLoadingScreen(false);
if (cl.islocalgame)
{
SCR_PushLoadingScreen("$", 1);
sv.paused = true;
}
}
break;
}
}
Expand All @@ -1686,6 +1699,7 @@ static void CL_ParseServerInfo (void)
// if server is active, we already began a loading plaque
if (!sv.active)
{
SCR_SetLoadingSplash(NULL);
SCR_BeginLoadingPlaque(false);
S_StopAllSounds();
// free q3 shaders so that any newly downloaded shaders will be active
Expand Down
18 changes: 9 additions & 9 deletions cl_particles.c
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,7 @@ static void R_InitParticleTexture (void)
// we invert it again during the blendfunc to make it work...

#ifndef DUMPPARTICLEFONT
decalskinframe = R_SkinFrame_LoadExternal("particles/particlefont.tga", TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, false, false);
decalskinframe = R_SkinFrame_LoadExternal("particles/particlefont.tga", TEXF_ALPHA | TEXF_RGBMULTIPLYBYALPHA, false, false);
if (decalskinframe)
{
particlefonttexture = decalskinframe->base;
Expand Down Expand Up @@ -2286,7 +2286,7 @@ static void R_InitParticleTexture (void)
Image_WriteTGABGRA ("particles/particlefont.tga", PARTICLEFONTSIZE, PARTICLEFONTSIZE, particletexturedata);
#endif

decalskinframe = R_SkinFrame_LoadInternalBGRA("particlefont", TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, particletexturedata, PARTICLEFONTSIZE, PARTICLEFONTSIZE, 0, 0, 0, false);
decalskinframe = R_SkinFrame_LoadInternalBGRA("particlefont", TEXF_ALPHA | TEXF_RGBMULTIPLYBYALPHA, particletexturedata, PARTICLEFONTSIZE, PARTICLEFONTSIZE, 0, 0, 0, false);
particlefonttexture = decalskinframe->base;

Mem_Free(particletexturedata);
Expand All @@ -2298,14 +2298,14 @@ static void R_InitParticleTexture (void)
{
CL_Particle_PixelCoordsForTexnum(i, &basex, &basey, &w, &h);
particletexture[i].texture = particlefonttexture;
particletexture[i].s1 = (basex + 1) / (float)particlefontwidth;
particletexture[i].t1 = (basey + 1) / (float)particlefontheight;
particletexture[i].s2 = (basex + w - 1) / (float)particlefontwidth;
particletexture[i].t2 = (basey + h - 1) / (float)particlefontheight;
particletexture[i].s1 = (basex + 0) / (float)particlefontwidth;
particletexture[i].t1 = (basey + 0) / (float)particlefontheight;
particletexture[i].s2 = (basex + w - 0) / (float)particlefontwidth;
particletexture[i].t2 = (basey + h - 0) / (float)particlefontheight;
}

#ifndef DUMPPARTICLEFONT
particletexture[tex_beam].texture = loadtextureimage(particletexturepool, "particles/nexbeam.tga", false, TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, true, vid.sRGB3D);
particletexture[tex_beam].texture = loadtextureimage(particletexturepool, "particles/nexbeam.tga", false, TEXF_ALPHA | TEXF_RGBMULTIPLYBYALPHA, true, vid.sRGB3D);
if (!particletexture[tex_beam].texture)
#endif
{
Expand All @@ -2328,7 +2328,7 @@ static void R_InitParticleTexture (void)
#ifdef DUMPPARTICLEFONT
Image_WriteTGABGRA ("particles/nexbeam.tga", 64, 64, &data2[0][0][0]);
#endif
particletexture[tex_beam].texture = R_LoadTexture2D(particletexturepool, "nexbeam", 16, 64, &data2[0][0][0], TEXTYPE_BGRA, TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, -1, NULL);
particletexture[tex_beam].texture = R_LoadTexture2D(particletexturepool, "nexbeam", 16, 64, &data2[0][0][0], TEXTYPE_BGRA, TEXF_ALPHA | TEXF_RGBMULTIPLYBYALPHA, -1, NULL);
}
particletexture[tex_beam].s1 = 0;
particletexture[tex_beam].t1 = 0;
Expand Down Expand Up @@ -2388,7 +2388,7 @@ static void R_InitParticleTexture (void)
Con_Printf("particles/particlefont.txt: texnum %i outside valid range (0 to %i)\n", i, MAX_PARTICLETEXTURES);
continue;
}
sf = R_SkinFrame_LoadExternal(texturename, TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, true, true); // note: this loads as sRGB if sRGB is active!
sf = R_SkinFrame_LoadExternal(texturename, TEXF_ALPHA | TEXF_RGBMULTIPLYBYALPHA, true, true); // note: this loads as sRGB if sRGB is active!
particletexture[i].texture = sf->base;
particletexture[i].s1 = s1;
particletexture[i].t1 = t1;
Expand Down
194 changes: 143 additions & 51 deletions cl_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ cvar_t vid_conwidthauto = {CF_CLIENT | CF_ARCHIVE, "vid_conwidthauto", "1", "aut
cvar_t vid_conwidth = {CF_CLIENT | CF_ARCHIVE, "vid_conwidth", "640", "virtual width of 2D graphics system (note: changes may be overwritten, see vid_conwidthauto)"};
cvar_t vid_conheight = {CF_CLIENT | CF_ARCHIVE, "vid_conheight", "480", "virtual height of 2D graphics system"};
cvar_t vid_pixelheight = {CF_CLIENT | CF_ARCHIVE, "vid_pixelheight", "1", "adjusts vertical field of vision to account for non-square pixels (1280x1024 on a CRT monitor for example)"};
cvar_t scr_aspectname = {CF_CLIENT, "scr_aspectname", "16-9", "string name for the current aspect ratio; use a dash instead of a colon, e. g. 16-9"};
cvar_t scr_screenshot_jpeg = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg","1", "save jpeg instead of targa"};
cvar_t scr_screenshot_jpeg_quality = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg_quality","0.9", "image quality of saved jpeg"};
cvar_t scr_screenshot_png = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_png","0", "save png instead of targa"};
Expand Down Expand Up @@ -1909,8 +1910,11 @@ static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y, float size
len = strlen(s->msg);
x = (vid_conwidth.integer - DrawQ_TextWidth(s->msg, len, size, size, true, FONT_INFOBAR)) / 2;
y -= size;
DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 1, 0);
DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
if (gamemode != GAME_WRATH)
{
DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 1, 0);
DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
}
total += size;
}
#endif
Expand All @@ -1923,7 +1927,7 @@ static void SCR_DrawLoadingStack(void)
float colors[16];

loadingscreenheight = SCR_DrawLoadingStack_r(loadingscreenstack, vid_conheight.integer, scr_loadingscreen_barheight.value);
if(loadingscreenstack)
if(gamemode != GAME_WRATH && loadingscreenstack)
{
// height = 32; // sorry, using the actual one is ugly
GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
Expand Down Expand Up @@ -1959,8 +1963,47 @@ static void SCR_DrawLoadingStack(void)
}

static cachepic_t *loadingscreenpic;
static cachepic_t *loadingscreenind;
static float loadingscreenpic_vertex3f[12];
static float loadingscreenpic_texcoord2f[8];
static float loadingscreenind_vertex3f[12];
static float loadingscreenind_texcoord2f[8];
static float loadingscreenind_angle;
static float loadingscreenind_pos[2];
static qbool loadingscreenind_show;

void SCR_SetLoadingSplash (const char *mapname)
{
char vabuf[1024] = { 0 };

if (gamemode != GAME_WRATH)
return; // let god sort em out

// if we're connecting somewhere, the mapname is unknown until the server sends it to us,
// so the pic is set once we get the server info,
// otherwise the appropriate function just calls this with a known mapname.
// to reset to black screen, just call this with NULL mapname

if (mapname && mapname[0]) {
// try the current aspect ratio
dpsnprintf(vabuf, sizeof(vabuf), "gfx/splashes/%s_%s", mapname, scr_aspectname.string);
if (!Draw_PicExists(vabuf)) {
// try the default aspect ratio (16:9)
dpsnprintf(vabuf, sizeof(vabuf), "gfx/splashes/%s_16-9", mapname);
if (!Draw_PicExists(vabuf)) {
// try without aspect ratio
dpsnprintf(vabuf, sizeof(vabuf), "gfx/splashes/%s", mapname);
if (!Draw_PicExists(vabuf))
vabuf[0] = 0; // give up
}
}
}

if (!vabuf[0])
strlcpy(vabuf, "gfx/splashes/_blank", sizeof(vabuf));

Cvar_SetQuick(&scr_loadingscreen_picture, vabuf);
}

static void SCR_DrawLoadingScreen_SharedSetup (qbool clear)
{
Expand All @@ -1982,59 +2025,103 @@ static void SCR_DrawLoadingScreen_SharedSetup (qbool clear)
R_Textures_Frame();
R_Mesh_Start();
R_EntityMatrix(&identitymatrix);
// draw the loading plaque
loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "%s%d", scr_loadingscreen_picture.string, loadingscreenpic_number+1) : scr_loadingscreen_picture.string, loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);

if (gamemode == GAME_WRATH)
{
// setup the splash
loadingscreenpic = Draw_CachePic_Flags(scr_loadingscreen_picture.string, 0);
loadingscreenpic_vertex3f[2] = loadingscreenpic_vertex3f[5] = loadingscreenpic_vertex3f[8] = loadingscreenpic_vertex3f[11] = 0;
loadingscreenpic_vertex3f[0] = loadingscreenpic_vertex3f[9] = 0;
loadingscreenpic_vertex3f[1] = loadingscreenpic_vertex3f[4] = 0;
loadingscreenpic_vertex3f[3] = loadingscreenpic_vertex3f[6] = vid_conwidth.integer;
loadingscreenpic_vertex3f[7] = loadingscreenpic_vertex3f[10] = vid_conheight.integer;
loadingscreenpic_texcoord2f[0] = 0;loadingscreenpic_texcoord2f[1] = 0;
loadingscreenpic_texcoord2f[2] = 1;loadingscreenpic_texcoord2f[3] = 0;
loadingscreenpic_texcoord2f[4] = 1;loadingscreenpic_texcoord2f[5] = 1;
loadingscreenpic_texcoord2f[6] = 0;loadingscreenpic_texcoord2f[7] = 1;

// spinning circle/arrow thing
if (SCR_LoadingScreenWaiting())
{
loadingscreenind = loadingscreenind_show ? Draw_CachePic_Flags ("gfx/splashes/arrow", 0) : NULL;
loadingscreenind_angle = 0.f;
}
else
{
loadingscreenind = Draw_CachePic_Flags ("gfx/splashes/loading_ring", 0);
}

w = Draw_GetPicWidth(loadingscreenpic);
h = Draw_GetPicHeight(loadingscreenpic);
if (loadingscreenind)
{
loadingscreenind_pos[0] = vid_conwidth.integer - 20;
loadingscreenind_pos[1] = vid_conheight.integer - 20;
loadingscreenind_vertex3f[2] = loadingscreenind_vertex3f[5] = loadingscreenind_vertex3f[8] = loadingscreenind_vertex3f[11] = 0;
loadingscreenind_vertex3f[0] = loadingscreenind_vertex3f[9] = -Draw_GetPicWidth(loadingscreenind) / 2;
loadingscreenind_vertex3f[1] = loadingscreenind_vertex3f[4] = -Draw_GetPicHeight(loadingscreenind) / 2;
loadingscreenind_vertex3f[3] = loadingscreenind_vertex3f[6] = Draw_GetPicWidth(loadingscreenind) / 2;
loadingscreenind_vertex3f[7] = loadingscreenind_vertex3f[10] = Draw_GetPicHeight(loadingscreenind) / 2;
loadingscreenind_texcoord2f[0] = 0;loadingscreenind_texcoord2f[1] = 0;
loadingscreenind_texcoord2f[2] = 1;loadingscreenind_texcoord2f[3] = 0;
loadingscreenind_texcoord2f[4] = 1;loadingscreenind_texcoord2f[5] = 1;
loadingscreenind_texcoord2f[6] = 0;loadingscreenind_texcoord2f[7] = 1;
}
}
else
{
// draw the loading plaque
loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "%s%d", scr_loadingscreen_picture.string, loadingscreenpic_number+1) : scr_loadingscreen_picture.string, loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);

// apply scale
w *= scr_loadingscreen_scale.value;
h *= scr_loadingscreen_scale.value;
w = Draw_GetPicWidth(loadingscreenpic);
h = Draw_GetPicHeight(loadingscreenpic);

// apply scale base
if(scr_loadingscreen_scale_base.integer)
{
w *= vid_conwidth.integer / (float) vid.width;
h *= vid_conheight.integer / (float) vid.height;
}
// apply scale
w *= scr_loadingscreen_scale.value;
h *= scr_loadingscreen_scale.value;

// apply scale limit
sw = w / vid_conwidth.integer;
sh = h / vid_conheight.integer;
f = 1;
switch(scr_loadingscreen_scale_limit.integer)
{
case 1:
f = max(sw, sh);
break;
case 2:
f = min(sw, sh);
break;
case 3:
f = sw;
break;
case 4:
f = sh;
break;
}
if(f > 1)
{
w /= f;
h /= f;
}
// apply scale base
if(scr_loadingscreen_scale_base.integer)
{
w *= vid_conwidth.integer / (float) vid.width;
h *= vid_conheight.integer / (float) vid.height;
}

// apply scale limit
sw = w / vid_conwidth.integer;
sh = h / vid_conheight.integer;
f = 1;
switch(scr_loadingscreen_scale_limit.integer)
{
case 1:
f = max(sw, sh);
break;
case 2:
f = min(sw, sh);
break;
case 3:
f = sw;
break;
case 4:
f = sh;
break;
}
if(f > 1)
{
w /= f;
h /= f;
}

x = (vid_conwidth.integer - w)/2;
y = (vid_conheight.integer - h)/2;
loadingscreenpic_vertex3f[2] = loadingscreenpic_vertex3f[5] = loadingscreenpic_vertex3f[8] = loadingscreenpic_vertex3f[11] = 0;
loadingscreenpic_vertex3f[0] = loadingscreenpic_vertex3f[9] = x;
loadingscreenpic_vertex3f[1] = loadingscreenpic_vertex3f[4] = y;
loadingscreenpic_vertex3f[3] = loadingscreenpic_vertex3f[6] = x + w;
loadingscreenpic_vertex3f[7] = loadingscreenpic_vertex3f[10] = y + h;
loadingscreenpic_texcoord2f[0] = 0;loadingscreenpic_texcoord2f[1] = 0;
loadingscreenpic_texcoord2f[2] = 1;loadingscreenpic_texcoord2f[3] = 0;
loadingscreenpic_texcoord2f[4] = 1;loadingscreenpic_texcoord2f[5] = 1;
loadingscreenpic_texcoord2f[6] = 0;loadingscreenpic_texcoord2f[7] = 1;
x = (vid_conwidth.integer - w)/2;
y = (vid_conheight.integer - h)/2;
loadingscreenpic_vertex3f[2] = loadingscreenpic_vertex3f[5] = loadingscreenpic_vertex3f[8] = loadingscreenpic_vertex3f[11] = 0;
loadingscreenpic_vertex3f[0] = loadingscreenpic_vertex3f[9] = x;
loadingscreenpic_vertex3f[1] = loadingscreenpic_vertex3f[4] = y;
loadingscreenpic_vertex3f[3] = loadingscreenpic_vertex3f[6] = x + w;
loadingscreenpic_vertex3f[7] = loadingscreenpic_vertex3f[10] = y + h;
loadingscreenpic_texcoord2f[0] = 0;loadingscreenpic_texcoord2f[1] = 0;
loadingscreenpic_texcoord2f[2] = 1;loadingscreenpic_texcoord2f[3] = 0;
loadingscreenpic_texcoord2f[4] = 1;loadingscreenpic_texcoord2f[5] = 1;
loadingscreenpic_texcoord2f[6] = 0;loadingscreenpic_texcoord2f[7] = 1;
}
}

static void SCR_DrawLoadingScreen (void)
Expand Down Expand Up @@ -2148,6 +2235,11 @@ void SCR_UpdateLoadingScreen (qbool clear, qbool startup)
key_consoleactive = old_key_consoleactive;
}

qbool SCR_LoadingScreenWaiting(void)
{
return cl.islocalgame && (loadingscreenstack && loadingscreenstack->msg[0] == '$' && loadingscreenstack->msg[1] == '\0');
}

qbool R_Stereo_ColorMasking(void)
{
return r_stereo_redblue.integer || r_stereo_redgreen.integer || r_stereo_redcyan.integer;
Expand Down
1 change: 1 addition & 0 deletions client.h
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ typedef struct client_state_s
qbool oldonground;
double lastongroundtime;
double hitgroundtime;
double bobongroundtime;
float bob2_smooth;
float bobfall_speed;
float bobfall_swing;
Expand Down
Loading