mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 09:31:12 +00:00
diff noise reduction.
This commit is contained in:
parent
2c80bff085
commit
0c16f56c23
4 changed files with 118 additions and 192 deletions
|
@ -56,9 +56,12 @@ byte *vid_colormap;
|
|||
cvar_t *cl_name;
|
||||
cvar_t *cl_color;
|
||||
|
||||
cvar_t *writecfg;
|
||||
|
||||
cvar_t *cl_shownet;
|
||||
cvar_t *cl_nolerp;
|
||||
cvar_t *cl_sbar;
|
||||
cvar_t *cl_sbar_separator;
|
||||
cvar_t *cl_hudswap;
|
||||
|
||||
cvar_t *cl_cshift_bonus;
|
||||
|
@ -175,9 +178,7 @@ CL_ClearState (void)
|
|||
memset (cl_temp_entities, 0, sizeof (cl_temp_entities));
|
||||
memset (cl_beams, 0, sizeof (cl_beams));
|
||||
|
||||
//
|
||||
// allocate the efrags and chain together into a free list
|
||||
//
|
||||
cl.free_efrags = cl_efrags;
|
||||
for (i = 0; i < MAX_EFRAGS - 1; i++)
|
||||
cl.free_efrags[i].entnext = &cl.free_efrags[i + 1];
|
||||
|
@ -301,12 +302,10 @@ CL_SignonReply (void)
|
|||
case 2:
|
||||
MSG_WriteByte (&cls.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.message, va ("name \"%s\"\n", cl_name->string));
|
||||
|
||||
MSG_WriteByte (&cls.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.message,
|
||||
va ("color %i %i\n", (cl_color->int_val) >> 4,
|
||||
(cl_color->int_val) & 15));
|
||||
|
||||
MSG_WriteByte (&cls.message, clc_stringcmd);
|
||||
snprintf (str, sizeof (str), "spawn %s", cls.spawnparms);
|
||||
MSG_WriteString (&cls.message, str);
|
||||
|
@ -374,11 +373,9 @@ CL_PrintEntities_f (void)
|
|||
|
||||
|
||||
/*
|
||||
===============
|
||||
SetPal
|
||||
|
||||
Debugging tool, just flashes the screen
|
||||
===============
|
||||
*/
|
||||
void
|
||||
SetPal (int i)
|
||||
|
@ -507,12 +504,10 @@ CL_DecayLights (void)
|
|||
|
||||
|
||||
/*
|
||||
===============
|
||||
CL_LerpPoint
|
||||
|
||||
Determines the fraction between the last two messages that the objects
|
||||
should be put at.
|
||||
===============
|
||||
*/
|
||||
float
|
||||
CL_LerpPoint (void)
|
||||
|
@ -569,9 +564,7 @@ CL_RelinkEntities (void)
|
|||
|
||||
cl_numvisedicts = 0;
|
||||
|
||||
//
|
||||
// interpolate player info
|
||||
//
|
||||
for (i = 0; i < 3; i++)
|
||||
cl.velocity[i] = cl.mvelocity[1][i] +
|
||||
frac * (cl.mvelocity[0][i] - cl.mvelocity[1][i]);
|
||||
|
@ -606,8 +599,7 @@ CL_RelinkEntities (void)
|
|||
VectorCopy (ent->origin, oldorg);
|
||||
|
||||
if (ent->forcelink) { // the entity was not updated in the
|
||||
// last message
|
||||
// so move to the final spot
|
||||
// last message so move to the final spot
|
||||
VectorCopy (ent->msg_origins[0], ent->origin);
|
||||
VectorCopy (ent->msg_angles[0], ent->angles);
|
||||
} else { // if the delta is large, assume a
|
||||
|
@ -616,8 +608,7 @@ CL_RelinkEntities (void)
|
|||
for (j = 0; j < 3; j++) {
|
||||
delta[j] = ent->msg_origins[0][j] - ent->msg_origins[1][j];
|
||||
if (delta[j] > 100 || delta[j] < -100)
|
||||
f = 1; // assume a teleportation, not a
|
||||
// motion
|
||||
f = 1; // assume a teleportation, not a motion
|
||||
}
|
||||
|
||||
// interpolate the origin and angles
|
||||
|
@ -690,7 +681,6 @@ CL_RelinkEntities (void)
|
|||
dl->die = cl.time + 0.001;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (VectorDistance_fast(ent->msg_origins[1], ent->origin) > (256*256))
|
||||
VectorCopy (ent ->origin, ent->msg_origins[1]);
|
||||
if (ent->model->flags & EF_ROCKET) {
|
||||
|
@ -717,7 +707,6 @@ CL_RelinkEntities (void)
|
|||
|
||||
if (i == cl.viewentity && !chase_active->int_val)
|
||||
continue;
|
||||
|
||||
#ifdef QUAKE2
|
||||
if (ent->effects & EF_NODRAW)
|
||||
continue;
|
||||
|
@ -727,16 +716,13 @@ CL_RelinkEntities (void)
|
|||
cl_numvisedicts++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
CL_ReadFromServer
|
||||
|
||||
Read all incoming data from the server
|
||||
===============
|
||||
*/
|
||||
int
|
||||
CL_ReadFromServer (void)
|
||||
|
@ -763,17 +749,11 @@ CL_ReadFromServer (void)
|
|||
CL_RelinkEntities ();
|
||||
CL_UpdateTEnts ();
|
||||
|
||||
//
|
||||
// bring the links up to date
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CL_SendCmd
|
||||
=================
|
||||
*/
|
||||
|
||||
void
|
||||
CL_SendCmd (void)
|
||||
{
|
||||
|
@ -809,11 +789,7 @@ CL_SendCmd (void)
|
|||
SZ_Clear (&cls.message);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CL_Init
|
||||
=================
|
||||
*/
|
||||
|
||||
void
|
||||
CL_Init (void)
|
||||
{
|
||||
|
|
|
@ -44,9 +44,7 @@
|
|||
#include "client.h"
|
||||
#include "server.h"
|
||||
|
||||
int sb_updates; // if >= vid.numpages, no update
|
||||
|
||||
// needed
|
||||
int sb_updates; // if >= vid.numpages, no update needed
|
||||
|
||||
#define STAT_MINUS 10 // num frame for '-' stats digit
|
||||
qpic_t *sb_nums[2][11];
|
||||
|
@ -55,17 +53,13 @@ qpic_t *sb_ibar;
|
|||
qpic_t *sb_sbar;
|
||||
qpic_t *sb_scorebar;
|
||||
|
||||
qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are
|
||||
|
||||
// flashes
|
||||
qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are flashes
|
||||
qpic_t *sb_ammo[4];
|
||||
qpic_t *sb_sigil[4];
|
||||
qpic_t *sb_armor[3];
|
||||
qpic_t *sb_items[32];
|
||||
|
||||
qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are
|
||||
|
||||
// alive
|
||||
qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are alive
|
||||
// 0 is static, 1 is temporary animation
|
||||
qpic_t *sb_face_invis;
|
||||
qpic_t *sb_face_quad;
|
||||
|
@ -85,17 +79,13 @@ int sb_lines; // scan lines to draw
|
|||
|
||||
// MED 01/04/97 added two more weapons + 3
|
||||
// alternates for grenade launcher
|
||||
//qpic_t *hsb_weapons[7][5]; // 0 is active, 1 is owned, 2-5 are
|
||||
|
||||
// flashes
|
||||
//qpic_t *hsb_weapons[7][5]; // 0 is active, 1 is owned, 2-5 are flashes
|
||||
|
||||
// MED 01/04/97 added array to simplify
|
||||
// weapon parsing
|
||||
//int hipweapons[4] =
|
||||
// { HIT_LASER_CANNON_BIT, HIT_MJOLNIR_BIT, 4, HIT_PROXIMITY_GUN_BIT };
|
||||
//qpic_t *hsb_items[2]; // MED 01/04/97 added hipnotic items
|
||||
|
||||
// array
|
||||
//qpic_t *hsb_items[2]; // MED 01/04/97 added hipnotic items array
|
||||
|
||||
qboolean headsup;
|
||||
qboolean sbar_centered;
|
||||
|
@ -103,11 +93,6 @@ qboolean sbar_centered;
|
|||
void Sbar_MiniDeathmatchOverlay (void);
|
||||
void Sbar_DeathmatchOverlay (void);
|
||||
|
||||
/*
|
||||
*
|
||||
* Status Bar Utility Functions
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
Sbar_ColorForMap
|
||||
|
@ -123,7 +108,6 @@ Sbar_ColorForMap (int m)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Sbar_ShowScores
|
||||
|
||||
|
@ -138,6 +122,7 @@ Sbar_ShowScores (void)
|
|||
sb_updates = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sbar_DontShowScores
|
||||
|
||||
|
@ -152,6 +137,7 @@ Sbar_DontShowScores (void)
|
|||
sb_updates = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sbar_Changed
|
||||
|
||||
|
@ -205,6 +191,7 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
|
|||
height);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sbar_DrawTransPic
|
||||
|
||||
|
@ -313,10 +300,8 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color)
|
|||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
int fragsort[MAX_SCOREBOARD];
|
||||
|
||||
char scoreboardtext[MAX_SCOREBOARD][20];
|
||||
int scoreboardtop[MAX_SCOREBOARD];
|
||||
int scoreboardbottom[MAX_SCOREBOARD];
|
||||
|
@ -417,9 +402,6 @@ Sbar_DrawScoreboard (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawInventory (void)
|
||||
{
|
||||
|
@ -636,9 +618,6 @@ Sbar_DrawInventory (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawFrags (void)
|
||||
{
|
||||
|
@ -695,9 +674,6 @@ Sbar_DrawFrags (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawFace (void)
|
||||
{
|
||||
|
@ -918,9 +894,6 @@ Sbar_Draw (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
|
||||
{
|
||||
|
@ -1278,4 +1251,3 @@ Sbar_Init (void)
|
|||
// rsb_ammo[2] = Draw_PicFromWad ("r_ammoplasma");
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ cvar_t *cl_allow_cmd_pkt;
|
|||
|
||||
cvar_t *cl_timeout;
|
||||
|
||||
cvar_t *cl_shownet; // can be 0, 1, or 2
|
||||
cvar_t *cl_shownet;
|
||||
cvar_t *cl_autoexec;
|
||||
cvar_t *cl_sbar;
|
||||
cvar_t *cl_sbar_separator;
|
||||
|
|
|
@ -51,9 +51,7 @@
|
|||
#include "client.h"
|
||||
#include "sbar.h"
|
||||
|
||||
int sb_updates; // if >= vid.numpages, no update
|
||||
|
||||
// needed
|
||||
int sb_updates; // if >= vid.numpages, no update needed
|
||||
|
||||
#define STAT_MINUS 10 // num frame for '-' stats digit
|
||||
qpic_t *sb_nums[2][11];
|
||||
|
@ -62,17 +60,13 @@ qpic_t *sb_ibar;
|
|||
qpic_t *sb_sbar;
|
||||
qpic_t *sb_scorebar;
|
||||
|
||||
qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are
|
||||
|
||||
// flashes
|
||||
qpic_t *sb_weapons[7][8]; // 0 is active, 1 is owned, 2-5 are flashes
|
||||
qpic_t *sb_ammo[4];
|
||||
qpic_t *sb_sigil[4];
|
||||
qpic_t *sb_armor[3];
|
||||
qpic_t *sb_items[32];
|
||||
|
||||
qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are
|
||||
|
||||
// alive
|
||||
qpic_t *sb_faces[7][2]; // 0 is gibbed, 1 is dead, 2-6 are alive
|
||||
// 0 is static, 1 is temporary animation
|
||||
qpic_t *sb_face_invis;
|
||||
qpic_t *sb_face_quad;
|
||||
|
@ -235,11 +229,14 @@ Sbar_Init (void)
|
|||
sb_face_invis_invuln = Draw_PicFromWad ("face_inv2");
|
||||
sb_face_quad = Draw_PicFromWad ("face_quad");
|
||||
|
||||
Cmd_AddCommand ("+showscores", Sbar_ShowScores, "Display information on everyone playing");
|
||||
Cmd_AddCommand ("-showscores", Sbar_DontShowScores, "Stop displaying information on everyone playing");
|
||||
|
||||
Cmd_AddCommand ("+showteamscores", Sbar_ShowTeamScores, "Display information for your team");
|
||||
Cmd_AddCommand ("-showteamscores", Sbar_DontShowTeamScores, "Stop displaying information for your team");
|
||||
Cmd_AddCommand ("+showscores", Sbar_ShowScores,
|
||||
"Display information on everyone playing");
|
||||
Cmd_AddCommand ("-showscores", Sbar_DontShowScores,
|
||||
"Stop displaying information on everyone playing");
|
||||
Cmd_AddCommand ("+showteamscores", Sbar_ShowTeamScores,
|
||||
"Display information for your team");
|
||||
Cmd_AddCommand ("-showteamscores", Sbar_DontShowTeamScores,
|
||||
"Stop displaying information for your team");
|
||||
|
||||
sb_sbar = Draw_PicFromWad ("sbar");
|
||||
sb_ibar = Draw_PicFromWad ("ibar");
|
||||
|
@ -247,16 +244,11 @@ Sbar_Init (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
// drawing routines are reletive to the status bar location
|
||||
|
||||
void
|
||||
Sbar_DrawPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
Draw_Pic (x /* + ((vid.width - 320)>>1) */ , y + (vid.height - SBAR_HEIGHT),
|
||||
pic);
|
||||
Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic);
|
||||
}
|
||||
|
||||
|
||||
|
@ -277,7 +269,7 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
|
|||
void
|
||||
Sbar_DrawTransPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
Draw_Pic (x /* + ((vid.width - 320)>>1) */ , y + (vid.height - SBAR_HEIGHT),
|
||||
Draw_Pic (x, y + (vid.height - SBAR_HEIGHT),
|
||||
pic);
|
||||
}
|
||||
|
||||
|
@ -290,16 +282,14 @@ Sbar_DrawTransPic (int x, int y, qpic_t *pic)
|
|||
void
|
||||
Sbar_DrawCharacter (int x, int y, int num)
|
||||
{
|
||||
Draw_Character8 (x /* + ((vid.width - 320)>>1) */ + 4,
|
||||
y + vid.height - SBAR_HEIGHT, num);
|
||||
Draw_Character8 (x + 4, y + vid.height - SBAR_HEIGHT, num);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawString (int x, int y, char *str)
|
||||
{
|
||||
Draw_String8 (x /* + ((vid.width - 320)>>1) */ ,
|
||||
y + vid.height - SBAR_HEIGHT, str);
|
||||
Draw_String8 (x, y + vid.height - SBAR_HEIGHT, str);
|
||||
}
|
||||
|
||||
|
||||
|
@ -359,8 +349,6 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
//ZOID: this should be MAX_CLIENTS, not MAX_SCOREBOARD!!
|
||||
//int fragsort[MAX_SCOREBOARD];
|
||||
int fragsort[MAX_CLIENTS];
|
||||
|
@ -495,9 +483,6 @@ Sbar_SoloScoreboard (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawInventory (void)
|
||||
{
|
||||
|
@ -599,9 +584,6 @@ Sbar_DrawInventory (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawFrags (void)
|
||||
{
|
||||
|
@ -659,9 +641,6 @@ Sbar_DrawFrags (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_DrawFace (void)
|
||||
{
|
||||
|
@ -812,9 +791,6 @@ Sbar_Draw (void)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
void
|
||||
Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
|
||||
{
|
||||
|
@ -879,8 +855,9 @@ Sbar_TeamOverlay (void)
|
|||
Draw_String8 (x, y, "low/avg/high team total players");
|
||||
y += 8;
|
||||
// Draw_String8 (x, y, "------------ ---- ----- -------");
|
||||
Draw_String8 (x, y,
|
||||
"\x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
Draw_String8 (x, y, "\x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f "
|
||||
"\x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f "
|
||||
"\x1d\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
y += 8;
|
||||
|
||||
// sort the teams
|
||||
|
@ -992,8 +969,9 @@ Sbar_DeathmatchOverlay (int start)
|
|||
Draw_String8 (x, y, "ping pl time frags team name");
|
||||
y += 8;
|
||||
// Draw_String8 ( x , y, "---- -- ---- ----- ---- ----------------");
|
||||
Draw_String8 (x, y,
|
||||
"\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
||||
"\x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e"
|
||||
"\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
y += 8;
|
||||
} else {
|
||||
x = 16;
|
||||
|
@ -1001,8 +979,9 @@ Sbar_DeathmatchOverlay (int start)
|
|||
Draw_String8 (x, y, "ping pl time frags name");
|
||||
y += 8;
|
||||
// Draw_String8 ( x , y, "---- -- ---- ----- ----------------");
|
||||
Draw_String8 (x, y,
|
||||
"\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
||||
"\x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e"
|
||||
"\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
|
||||
y += 8;
|
||||
}
|
||||
|
||||
|
@ -1086,8 +1065,7 @@ Sbar_DeathmatchOverlay (int start)
|
|||
y += skip;
|
||||
}
|
||||
|
||||
if (y >= vid.height - 10) // we ran over the screen size,
|
||||
// squish
|
||||
if (y >= vid.height - 10) // we ran over the screen size, squish
|
||||
largegame = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue