Skip to content

Commit

Permalink
refs #31
Browse files Browse the repository at this point in the history
  • Loading branch information
IR4T4 committed Oct 14, 2012
1 parent 78eb702 commit a95f6f1
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 189 deletions.
2 changes: 1 addition & 1 deletion src/client/cl_cgame.c
Expand Up @@ -594,7 +594,7 @@ void CL_ShutdownCGame(void)
cgvm = NULL;
}

static int FloatAsInt(float f)
static int FloatAsInt(float f)
{
floatint_t fi;
fi.f = f;
Expand Down
28 changes: 8 additions & 20 deletions src/client/cl_console.c
Expand Up @@ -34,7 +34,6 @@

#include "client.h"


int g_console_field_width = 78;

#define COLNSOLE_COLOR COLOR_WHITE //COLOR_BLACK
Expand All @@ -53,7 +52,6 @@ cvar_t *con_restricted;
vec4_t console_color = { 1.0, 1.0, 1.0, 1.0 };
vec4_t console_highlightcolor = { 0.5, 0.5, 0.2, 0.45 };


/*
================
Con_ToggleConsole_f
Expand Down Expand Up @@ -83,7 +81,7 @@ void Con_ToggleConsole_f(void)
if (cls.keyCatchers & KEYCATCH_CONSOLE)
{
cls.keyCatchers &= ~KEYCATCH_CONSOLE;
con.desiredFrac = 0.0;
con.desiredFrac = 0.0f;
}
else
{
Expand Down Expand Up @@ -148,7 +146,6 @@ void Con_MessageMode3_f(void)
cls.keyCatchers ^= KEYCATCH_MESSAGE;
}


/*
================
Con_Clear_f
Expand Down Expand Up @@ -235,7 +232,6 @@ void Con_Dump_f(void)
FS_FCloseFile(f);
}


/*
================
Con_ClearNotify
Expand All @@ -251,8 +247,6 @@ void Con_ClearNotify(void)
}
}



/*
================
Con_CheckResize
Expand Down Expand Up @@ -369,7 +363,6 @@ void Con_Init(void)
Cmd_SetCommandCompletionFunc("condump", Cmd_CompleteTxtName);
}


/*
===============
Con_Linefeed
Expand Down Expand Up @@ -541,7 +534,6 @@ DRAWING
==============================================================================
*/


/*
================
Con_DrawInput
Expand Down Expand Up @@ -583,7 +575,6 @@ void Con_DrawInput(void)
SCREEN_WIDTH - 3 * SMALLCHAR_WIDTH, qtrue);
}


/*
================
Con_DrawNotify
Expand All @@ -598,7 +589,7 @@ void Con_DrawNotify(void)
int i;
int time;
int skip;
int currentColor;
int currentColor = 7;

currentColor = 7;
re.SetColor(g_color_table[currentColor]);
Expand Down Expand Up @@ -681,7 +672,6 @@ void Con_DrawNotify(void)

v += BIGCHAR_HEIGHT;
}

}

/*
Expand Down Expand Up @@ -742,13 +732,13 @@ void Con_DrawSolidConsole(float frac)
}

// ydnar: matching light text
color[0] = 0.75;
color[1] = 0.75;
color[2] = 0.75;
color[0] = 0.75f;
color[1] = 0.75f;
color[2] = 0.75f;
color[3] = 1.0f;
if (frac < 1.0)
if (frac < 1)
{
SCR_FillRect(0, y, SCREEN_WIDTH, 1.25, color);
SCR_FillRect(0, y, SCREEN_WIDTH, 1.25f, color);
}


Expand Down Expand Up @@ -845,7 +835,7 @@ void Con_DrawConsole(void)
{
if (!(cls.keyCatchers & (KEYCATCH_UI | KEYCATCH_CGAME)))
{
Con_DrawSolidConsole(1.0);
Con_DrawSolidConsole(1.0f);
return;
}
}
Expand Down Expand Up @@ -907,7 +897,6 @@ void Con_RunConsole(void)

}


void Con_PageUp(void)
{
con.display -= 2;
Expand Down Expand Up @@ -940,7 +929,6 @@ void Con_Bottom(void)
con.display = con.current;
}


void Con_Close(void)
{
if (!com_cl_running->integer)
Expand Down
51 changes: 3 additions & 48 deletions src/client/cl_input.c
Expand Up @@ -80,10 +80,6 @@ void IN_MLookDown(void)
void IN_MLookUp(void)
{
kb[KB_MLOOK].active = qfalse;
if (!cl_freelook->integer)
{
// IN_CenterView ();
}
}

void IN_KeyDown(kbutton_t *b)
Expand Down Expand Up @@ -186,8 +182,6 @@ void IN_KeyUp(kbutton_t *b)
b->active = qfalse;
}



/*
===============
CL_KeyState
Expand Down Expand Up @@ -237,8 +231,6 @@ float CL_KeyState(kbutton_t *key)
return val;
}



void IN_UpDown(void)
{
IN_KeyDown(&kb[KB_UP]);
Expand Down Expand Up @@ -396,7 +388,6 @@ void IN_SprintUp(void)
IN_KeyUp(&kb[KB_BUTTONS5]);
}


// wbuttons (wolf buttons)
void IN_Wbutton0Down(void)
{
Expand Down Expand Up @@ -459,19 +450,6 @@ void IN_ButtonUp(void)
IN_KeyUp(&kb[KB_BUTTONS1]);
}

/*
void IN_CenterView (void) {
cl.viewangles[PITCH] = -SHORT2ANGLE(cl.snap.ps.delta_angles[PITCH]);
}
*/

void IN_Notebook(void)
{
//if ( cls.state == CA_ACTIVE && !clc.demoplaying ) {
//VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_NOTEBOOK); // startup notebook
//}
}

void IN_Help(void)
{
if (cls.state == CA_ACTIVE && !clc.demoplaying)
Expand All @@ -480,7 +458,6 @@ void IN_Help(void)
}
}


//==========================================================================
cvar_t *cl_yawspeed;
cvar_t *cl_pitchspeed;
Expand Down Expand Up @@ -537,11 +514,10 @@ void CL_KeyMove(usercmd_t *cmd)
int movespeed;
int forward, side, up;

//
// adjust for speed key / running
// the walking flag is to keep animations consistant
// even during acceleration and develeration
//

if (kb[KB_SPEED].active ^ cl_run->integer)
{
movespeed = 127;
Expand Down Expand Up @@ -642,7 +618,6 @@ void CL_MouseEvent(int dx, int dy, int time)
{
if (cls.keyCatchers & KEYCATCH_UI)
{

// NERVE - SMF - if we just want to pass it along to game
if (cl_bypassMouseInput->integer == 1)
{
Expand All @@ -653,7 +628,6 @@ void CL_MouseEvent(int dx, int dy, int time)
{
VM_Call(uivm, UI_MOUSE_EVENT, dx, dy);
}

}
else if (cls.keyCatchers & KEYCATCH_CGAME)
{
Expand Down Expand Up @@ -769,22 +743,12 @@ void CL_MouseMove(usercmd_t *cmd)
// scale by FOV
accelSensitivity *= cl.cgameSensitivity;

/* NERVE - SMF - this has moved to CG_CalcFov to fix zoomed-in/out transition movement bug
if ( cl.snap.ps.stats[STAT_ZOOMED_VIEW] ) {
if(cl.snap.ps.weapon == WP_SNIPERRIFLE) {
accelSensitivity *= 0.1;
}
else if(cl.snap.ps.weapon == WP_SNOOPERSCOPE) {
accelSensitivity *= 0.2;
}
}
*/
if (rate && cl_showMouseRate->integer)
{
Com_Printf("%f : %f\n", rate, accelSensitivity);
}

// Ridah, experimenting with a slow tracking gun
// Ridah, experimenting with a slow tracking gun

// Rafael - mg42
if (cl.snap.ps.persistant[PERS_HWEAPON_USE])
Expand Down Expand Up @@ -823,7 +787,6 @@ void CL_MouseMove(usercmd_t *cmd)
}
}


/*
==============
CL_CmdButtons
Expand All @@ -833,11 +796,10 @@ void CL_CmdButtons(usercmd_t *cmd)
{
int i;

//
// figure button bits
// send a button bit even if the key was pressed and released in
// less than a frame
//

for (i = 0 ; i < 7 ; i++)
{
if (kb[KB_BUTTONS0 + i].active || kb[KB_BUTTONS0 + i].wasPressed)
Expand Down Expand Up @@ -875,7 +837,6 @@ void CL_CmdButtons(usercmd_t *cmd)
}
}


/*
==============
CL_FinishMove
Expand All @@ -902,7 +863,6 @@ void CL_FinishMove(usercmd_t *cmd)
}
}


/*
=================
CL_CreateCmd
Expand Down Expand Up @@ -970,7 +930,6 @@ usercmd_t CL_CreateCmd(void)
return cmd;
}


/*
=================
CL_CreateNewCommands
Expand Down Expand Up @@ -1198,9 +1157,7 @@ void CL_WritePacket(void)
}
}

//
// deliver the message
//
packetNum = clc.netchan.outgoingSequence & PACKET_MASK;
cl.outPackets[packetNum].p_realtime = cls.realtime;
cl.outPackets[packetNum].p_serverTime = oldcmd->serverTime;
Expand Down Expand Up @@ -1336,14 +1293,12 @@ void CL_InitInput(void)
Cmd_AddCommand("+mlook", IN_MLookDown);
Cmd_AddCommand("-mlook", IN_MLookUp);

//Cmd_AddCommand ("notebook",IN_Notebook);
Cmd_AddCommand("help", IN_Help);

cl_nodelta = Cvar_Get("cl_nodelta", "0", 0);
cl_debugMove = Cvar_Get("cl_debugMove", "0", 0);
}


/*
============
CL_ClearKeys
Expand Down

0 comments on commit a95f6f1

Please sign in to comment.