Remove unused/useless code (#1005)

Namely the following:

I_ScanCode2DoomCode()
I_DoomCode2ScanCode()
amclock
This commit is contained in:
Alaux 2023-04-23 08:49:39 -03:00 committed by GitHub
parent 8cf15febe3
commit dddbfe8cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 38 deletions

View File

@ -251,7 +251,6 @@ static int f_h;
static int lightlev; // used for funky strobing effect static int lightlev; // used for funky strobing effect
static byte* fb; // pseudo-frame buffer static byte* fb; // pseudo-frame buffer
static int amclock;
static mpoint_t m_paninc; // how far the window pans each tic (map coords) static mpoint_t m_paninc; // how far the window pans each tic (map coords)
static fixed_t mtof_zoommul; // how far the window zooms each tic (map coords) static fixed_t mtof_zoommul; // how far the window zooms each tic (map coords)
@ -571,7 +570,6 @@ void AM_initVariables(void)
automapactive = true; automapactive = true;
fb = screens[0]; fb = screens[0];
amclock = 0;
lightlev = 0; lightlev = 0;
m_paninc.x = m_paninc.y = 0; m_paninc.x = m_paninc.y = 0;
@ -1121,8 +1119,6 @@ void AM_Ticker (void)
if (!automapactive) if (!automapactive)
return; return;
amclock++;
// Change the zoom if necessary. // Change the zoom if necessary.
if (ftom_zoommul != FRACUNIT) if (ftom_zoommul != FRACUNIT)
{ {

View File

@ -399,21 +399,6 @@ static int TranslateKey(SDL_Keysym *sym)
} }
} }
int I_ScanCode2DoomCode (int a)
{
// haleyjd
return a;
}
// Automatic caching inverter, so you don't need to maintain two tables.
// By Lee Killough
int I_DoomCode2ScanCode (int a)
{
// haleyjd
return a;
}
// [FG] mouse button and movement handling from Chocolate Doom 3.0 // [FG] mouse button and movement handling from Chocolate Doom 3.0
static void UpdateMouseButtonState(unsigned int button, boolean on, unsigned int dclick) static void UpdateMouseButtonState(unsigned int button, boolean on, unsigned int dclick)

View File

@ -58,9 +58,6 @@ void I_FinishUpdate (void);
void I_ReadScreen (byte* scr); void I_ReadScreen (byte* scr);
int I_DoomCode2ScanCode(int); // killough
int I_ScanCode2DoomCode(int); // killough
void I_ResetScreen(void); // killough 10/98 void I_ResetScreen(void); // killough 10/98
void I_ToggleToggleFullScreen(void); // [FG] fullscreen mode menu toggle void I_ToggleToggleFullScreen(void); // [FG] fullscreen mode menu toggle
void I_ToggleVsync(void); // [JN] Calls native SDL vsync toggle void I_ToggleVsync(void); // [JN] Calls native SDL vsync toggle

View File

@ -1086,14 +1086,6 @@ default_t defaults[] = {
// Controls // Controls
// //
// For key bindings, the values stored in the key_* variables // phares
// are the internal Doom Codes. The values stored in the default.cfg
// file are the keyboard codes. I_ScanCode2DoomCode converts from
// keyboard codes to Doom Codes. I_DoomCode2ScanCode converts from
// Doom Codes to keyboard codes, and is only used when writing back
// to default.cfg. For the printable keys (i.e. alphas, numbers)
// the Doom Code is the ascii code.
{ {
"input_turnright", "input_turnright",
NULL, NULL, NULL, NULL,
@ -2801,9 +2793,8 @@ void M_SaveDefaults (void)
if (dp->type != input) if (dp->type != input)
{ {
if (dp->type == number ? fprintf(f, "%-*s %i\n", maxlen, dp->name, if (dp->type == number ?
strncmp(dp->name, "key_", 4) ? value.i : fprintf(f, "%-*s %i\n", maxlen, dp->name, value.i) == EOF :
I_DoomCode2ScanCode(value.i)) == EOF :
fprintf(f,"%-*s \"%s\"\n", maxlen, dp->name, (char *) value.s) == EOF) fprintf(f,"%-*s \"%s\"\n", maxlen, dp->name, (char *) value.s) == EOF)
goto error; goto error;
} }
@ -2941,9 +2932,6 @@ boolean M_ParseOption(const char *p, boolean wad)
if (sscanf(strparm, "%i", &parm) != 1) if (sscanf(strparm, "%i", &parm) != 1)
return 1; // Not A Number return 1; // Not A Number
if (!strncmp(name, "key_", 4)) // killough
parm = I_ScanCode2DoomCode(parm);
//jff 3/4/98 range check numeric parameters //jff 3/4/98 range check numeric parameters
if ((dp->limit.min == UL || dp->limit.min <= parm) && if ((dp->limit.min == UL || dp->limit.min <= parm) &&
(dp->limit.max == UL || dp->limit.max >= parm)) (dp->limit.max == UL || dp->limit.max >= parm))