Merged IN_Commands with IN_Frame.

This commit is contained in:
Marcus Sundberg 2000-02-19 14:52:17 +00:00
parent 9baa100ca8
commit be77f29ec8
12 changed files with 65 additions and 52 deletions

View file

@ -252,13 +252,10 @@ Host_FrameMain ( float time )
if ( !Host_FilterTime(time) )
return;
// get new key events
// get new events
IN_SendKeyEvents ();
IN_Frame();
// allow mice or other external controllers to add commands
IN_Commands ();
// process console commands
Cbuf_Execute ();

View file

@ -192,11 +192,11 @@ void IN_Shutdown (void)
/*
===========
IN_Commands
===========
========
IN_Frame
========
*/
void IN_Commands (void)
void IN_Frame(void)
{
int i;

View file

@ -19,31 +19,43 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// in_null.c -- for systems without a mouse
// in_null.c -- for systems without inputs...
#include "quakedef.h"
#include "input.h"
void IN_Init (void)
void
IN_Init(void)
{
}
void IN_Shutdown (void)
void
IN_Shutdown(void)
{
}
void IN_Commands (void)
void
IN_Frame(void)
{
}
void IN_Move (usercmd_t *cmd)
void
IN_Move(usercmd_t *cmd)
{
}
void IN_ModeChanged (void)
void
IN_ModeChanged(void)
{
}
void IN_ClearStates (void)
void
IN_ClearStates(void)
{
}

View file

@ -164,11 +164,11 @@ void IN_Shutdown (void)
XAutoRepeatOn( x_disp );
}
//
// IN_Commands - process buttons
//
/*
IN_Frame
*/
void IN_Commands (void)
void IN_Frame(void)
{
// done in X event handler
}
@ -178,7 +178,7 @@ void IN_Commands (void)
//
void
IN_Move (usercmd_t *cmd)
IN_Move(usercmd_t *cmd)
{
static int last_dx, last_dy;
static long long last_movement;

View file

@ -291,7 +291,7 @@ void IN_SendKeyEvents(void)
}
void IN_Commands(void)
void IN_Frame(void)
{
#ifdef QUAKEWORLD
if (UseMouse)
@ -379,7 +379,3 @@ void IN_Move(usercmd_t *cmd)
}
}
}
void IN_Frame()
{
}

View file

@ -950,11 +950,13 @@ void Joy_AdvancedUpdate_f (void)
/*
===========
IN_Commands
===========
========
IN_Frame
========
*/
void IN_Commands (void)
void
IN_Frame(void)
{
int i, key_index;
DWORD buttonstate, povstate;

View file

@ -261,7 +261,9 @@ static void event_motion(XEvent *event)
}
}
void IN_Frame()
void
IN_Frame(void)
{
if (old_windowed_mouse != _windowed_mouse.value) {
old_windowed_mouse = _windowed_mouse.value;
@ -277,17 +279,14 @@ void IN_Frame()
}
}
void IN_SendKeyEvents(void)
void
IN_SendKeyEvents(void)
{
/* Get events from X server. */
x11_process_events();
}
void IN_Commands(void)
{
/* Nothing to do here */
}
void IN_Move(usercmd_t *cmd)
{

View file

@ -27,7 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int IN_Init();
void IN_Shutdown();
void IN_SendKeyEvents();
void IN_Commands();
void IN_Move();
void IN_Frame();

View file

@ -884,7 +884,8 @@ void IN_Frame(void)
}
void IN_Init(void)
void
IN_Init(void)
{
Cvar_RegisterVariable(&m_filter);
if (COM_CheckParm ("-nomouse")) return;
@ -893,17 +894,16 @@ void IN_Init(void)
mouse_avail = 1;
}
void IN_Shutdown(void)
void
IN_Shutdown(void)
{
mouse_avail = 0;
}
void IN_Commands(void)
{
/* Mouse buttons are sent from GetEvent() */
}
void IN_Move(usercmd_t *cmd)
void
IN_Move(usercmd_t *cmd)
{
if (!mouse_avail) return;
@ -940,14 +940,18 @@ void IN_Move(usercmd_t *cmd)
mouse_x = mouse_y = 0.0;
}
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
void
VID_ExtraOptionDraw(unsigned int options_draw_cursor)
{
// Windowed Mouse
M_Print (16, options_draw_cursor+=8, " Use Mouse");
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
}
void VID_ExtraOptionCmd(int option_cursor)
void
VID_ExtraOptionCmd(int option_cursor)
{
switch(option_cursor) {
case 1: // _windowed_mouse

View file

@ -376,7 +376,7 @@ void IN_Shutdown (void)
mouse_avail = 0;
}
void IN_Commands (void)
void IN_Frame(void)
{
int i;
int mouse_buttonstate;

View file

@ -1164,7 +1164,7 @@ IN_Shutdown(void)
void
IN_Commands(void)
IN_Frame(void)
{
/* Nothing to do here */
}

View file

@ -1190,12 +1190,16 @@ void IN_Init (void)
mouse_avail = 1;
}
void IN_Shutdown (void)
void
IN_Shutdown(void)
{
mouse_avail = 0;
mouse_avail = 0;
}
void IN_Commands (void)
void
IN_Frame(void)
{
int i;