From 16614d8e718cefbe1c31ba7f2b6185bb3a0a4da1 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Thu, 31 Aug 2000 20:23:20 +0000 Subject: [PATCH] -3dfx now compiles and works correctly. Fixed a segfault case in starting. --- configure.in | 2 +- source/cl_main.c | 49 +++++++++++++++++++------------------------ source/keys.c | 36 +++++++++++++++++++++++++++++++ source/vid_3dfxsvga.c | 14 +++---------- 4 files changed, 62 insertions(+), 39 deletions(-) diff --git a/configure.in b/configure.in index b950c77..c646b8e 100644 --- a/configure.in +++ b/configure.in @@ -966,7 +966,7 @@ if test "x$HAVE_X" = xyes; then fi fi if test "x$HAVE_TDFXGL" = xyes; then -# TARGETS="$TARGETS $PACKAGE-3dfx\$(EXEEXT)" + TARGETS="$TARGETS $PACKAGE-3dfx\$(EXEEXT)" CL_TARGETS="$CL_TARGETS 3Dfx" fi AC_SUBST(TARGETS) diff --git a/source/cl_main.c b/source/cl_main.c index b7c467a..453e63e 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -81,6 +81,27 @@ void CL_InitCvars(void) { show_fps = Cvar_Get("show_fps", "0", CVAR_NONE, "None"); + cl_warncmd = Cvar_Get("cl_warncmd", "0", CVAR_NONE, "None"); + cl_name = Cvar_Get("_cl_name", "player", CVAR_ARCHIVE, "None"); + cl_color = Cvar_Get("_cl_color", "0", CVAR_ARCHIVE, "None"); + cl_upspeed = Cvar_Get("cl_upspeed", "200", CVAR_NONE, "None"); + cl_forwardspeed = Cvar_Get("cl_forwardspeed", "200", CVAR_ARCHIVE, "None"); + cl_backspeed = Cvar_Get("cl_backspeed", "200", CVAR_ARCHIVE, "None"); + cl_sidespeed = Cvar_Get("cl_sidespeed", "350", CVAR_NONE, "None"); + cl_movespeedkey = Cvar_Get("cl_movespeedkey", "2.0", CVAR_NONE, "None"); + cl_yawspeed = Cvar_Get("cl_yawspeed", "140", CVAR_NONE, "None"); + cl_pitchspeed = Cvar_Get("cl_pitchspeed", "150", CVAR_NONE, "None"); + cl_anglespeedkey = Cvar_Get("cl_anglespeedkey", "1.5", CVAR_NONE, "None"); + cl_shownet = Cvar_Get("cl_shownet", "0", CVAR_NONE, "can be 0, 1, or 2"); + cl_nolerp = Cvar_Get("cl_nolerp", "0", CVAR_NONE, "None"); + lookspring = Cvar_Get("lookspring", "0", CVAR_ARCHIVE, "None"); + lookstrafe = Cvar_Get("lookstrafe", "0", CVAR_ARCHIVE, "None"); + sensitivity = Cvar_Get("sensitivity", "3", CVAR_ARCHIVE, "None"); + + m_pitch = Cvar_Get("m_pitch", "0.022", CVAR_ARCHIVE, "None"); + m_yaw = Cvar_Get("m_yaw", "0.022", CVAR_ARCHIVE, "None"); + m_forward = Cvar_Get("m_forward", "1", CVAR_ARCHIVE, "None"); + m_side = Cvar_Get("m_side", "0.8", CVAR_ARCHIVE, "None"); } /* @@ -792,34 +813,7 @@ void CL_Init (void) CL_InitInput (); CL_InitTEnts (); - -// -// register our commands -// - cl_warncmd = Cvar_Get("cl_warncmd", "0", CVAR_NONE, "None"); - cl_name = Cvar_Get("_cl_name", "player", CVAR_ARCHIVE, "None"); - cl_color = Cvar_Get("_cl_color", "0", CVAR_ARCHIVE, "None"); - cl_upspeed = Cvar_Get("cl_upspeed", "200", CVAR_NONE, "None"); - cl_forwardspeed = Cvar_Get("cl_forwardspeed", "200", CVAR_ARCHIVE, "None"); - cl_backspeed = Cvar_Get("cl_backspeed", "200", CVAR_ARCHIVE, "None"); - cl_sidespeed = Cvar_Get("cl_sidespeed", "350", CVAR_NONE, "None"); - cl_movespeedkey = Cvar_Get("cl_movespeedkey", "2.0", CVAR_NONE, "None"); - cl_yawspeed = Cvar_Get("cl_yawspeed", "140", CVAR_NONE, "None"); - cl_pitchspeed = Cvar_Get("cl_pitchspeed", "150", CVAR_NONE, "None"); - cl_anglespeedkey = Cvar_Get("cl_anglespeedkey", "1.5", CVAR_NONE, "None"); - cl_shownet = Cvar_Get("cl_shownet", "0", CVAR_NONE, "can be 0, 1, or 2"); - cl_nolerp = Cvar_Get("cl_nolerp", "0", CVAR_NONE, "None"); - lookspring = Cvar_Get("lookspring", "0", CVAR_ARCHIVE, "None"); - lookstrafe = Cvar_Get("lookstrafe", "0", CVAR_ARCHIVE, "None"); - sensitivity = Cvar_Get("sensitivity", "3", CVAR_ARCHIVE, "None"); - m_pitch = Cvar_Get("m_pitch", "0.022", CVAR_ARCHIVE, "None"); - m_yaw = Cvar_Get("m_yaw", "0.022", CVAR_ARCHIVE, "None"); - m_forward = Cvar_Get("m_forward", "1", CVAR_ARCHIVE, "None"); - m_side = Cvar_Get("m_side", "0.8", CVAR_ARCHIVE, "None"); - -// Cvar_RegisterVariable (&cl_autofire); - Cmd_AddCommand ("entities", CL_PrintEntities_f); Cmd_AddCommand ("disconnect", CL_Disconnect_f); Cmd_AddCommand ("record", CL_Record_f); @@ -827,4 +821,5 @@ void CL_Init (void) Cmd_AddCommand ("playdemo", CL_PlayDemo_f); Cmd_AddCommand ("timedemo", CL_TimeDemo_f); } + diff --git a/source/keys.c b/source/keys.c index 0346c2d..086bcb4 100644 --- a/source/keys.c +++ b/source/keys.c @@ -83,6 +83,12 @@ keyname_t keynames[] = {"ESCAPE", K_ESCAPE}, {"SPACE", K_SPACE}, {"BACKSPACE", K_BACKSPACE}, + + {"CAPSLOCK",K_CAPSLOCK}, + {"PRINTSCR", K_PRNTSCR}, + {"SCRLCK", K_SCRLCK}, + {"PAUSE", K_PAUSE}, + {"UPARROW", K_UPARROW}, {"DOWNARROW", K_DOWNARROW}, {"LEFTARROW", K_LEFTARROW}, @@ -92,6 +98,36 @@ keyname_t keynames[] = {"CTRL", K_CTRL}, {"SHIFT", K_SHIFT}, + // Keypad stuff.. + + // These are duplicated + {"NUMLOCK", KP_NUMLCK}, + {"KP_NUMLCK", KP_NUMLCK}, + {"KP_NUMLOCK", KP_NUMLCK}, + {"KP_SLASH", KP_DIVIDE}, + {"KP_DIVIDE", KP_DIVIDE}, + {"KP_STAR", KP_MULTIPLY}, + {"KP_MULTIPLY", KP_MULTIPLY}, + {"KP_MINUS", KP_MINUS}, + + {"KP_HOME", KP_HOME}, + {"KP_UPARROW", KP_UPARROW}, + {"KP_PGUP", KP_PGUP}, + {"KP_PLUS", KP_PLUS}, + + {"KP_LEFTARROW", KP_LEFTARROW}, + {"KP_5", KP_5}, + {"KP_RIGHTARROW", KP_RIGHTARROW}, + + {"KP_END", KP_END}, + {"KP_DOWNARROW", KP_DOWNARROW}, + {"KP_PGDN", KP_PGDN}, + + {"KP_INS", KP_INS}, + {"KP_DEL", KP_DEL}, + {"KP_ENTER", KP_ENTER}, + + {"F1", K_F1}, {"F2", K_F2}, {"F3", K_F3}, diff --git a/source/vid_3dfxsvga.c b/source/vid_3dfxsvga.c index f673124..19bc012 100644 --- a/source/vid_3dfxsvga.c +++ b/source/vid_3dfxsvga.c @@ -30,7 +30,6 @@ */ #include "qtypes.h" -#include "quakedef.h" #include "glquake.h" #include "sys.h" #include "console.h" @@ -39,10 +38,13 @@ #include "qendian.h" #include "qargs.h" //#include "lib_replace.h" +#include "host.h" +#include "quakefs.h" #include #include #include +#include #ifdef HAVE_DLFCN_H # include @@ -636,16 +638,6 @@ void VID_InitCvars () gl_triplebuffer = Cvar_Get ("gl_triplebuffer","1",CVAR_ARCHIVE,"None"); } -void -VID_LockBuffer ( void ) -{ -} - -void -VID_UnlockBuffer ( void ) -{ -} - void VID_SetCaption (char *text) { }