mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- some needed cleanup on the control code before testing can start.
This commit is contained in:
parent
5abc034540
commit
0d878a8604
14 changed files with 28 additions and 343 deletions
|
@ -2580,8 +2580,10 @@ extern int32_t startwin_run(void);
|
|||
bool validate_hud(int layout);
|
||||
void set_hud_layout(int layout);
|
||||
void set_hud_scale(int scale);
|
||||
int32_t GetTime();
|
||||
|
||||
GameInterface Interface = {
|
||||
TICRATE,
|
||||
faketimerhandler,
|
||||
app_main,
|
||||
validate_hud,
|
||||
|
|
|
@ -254,8 +254,6 @@ void CONFIG_SetDefaults(void)
|
|||
Bstrcpy(CommbatMacro[8], "Amateurs!");
|
||||
Bstrcpy(CommbatMacro[9], "Fool! You are already dead.");
|
||||
|
||||
CONFIG_SetDefaultKeys("demolition/defbinds.txt");
|
||||
|
||||
memset(MouseFunctions, -1, sizeof(MouseFunctions));
|
||||
memset(MouseDigitalFunctions, -1, sizeof(MouseDigitalFunctions));
|
||||
memset(JoystickFunctions, -1, sizeof(JoystickFunctions));
|
||||
|
@ -616,6 +614,7 @@ void CONFIG_WriteSettings(void) // save binds and aliases to <cfgname>_settings.
|
|||
|
||||
void CONFIG_WriteSetup(uint32_t flags)
|
||||
{
|
||||
#if 0
|
||||
char buf[128];
|
||||
if (!setupread) return;
|
||||
|
||||
|
@ -796,6 +795,7 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
CONFIG_WriteSettings();
|
||||
G_SaveConfig();
|
||||
Bfflush(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ void ctrlInit(void)
|
|||
KB_ClearKeysDown();
|
||||
KB_FlushKeyboardQueue();
|
||||
KB_FlushKeyboardQueueScans();
|
||||
CONTROL_Startup(controltype_keyboardandmouse, &GetTime, 120);
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
|
||||
|
@ -84,60 +83,6 @@ void ctrlInit(void)
|
|||
// JBF 20040215: evil and nasty place to do this, but joysticks are evil and nasty too
|
||||
for (int i = 0; i < joystick.numAxes; i++)
|
||||
joySetDeadZone(i, JoystickAnalogueDead[i], JoystickAnalogueSaturate[i]);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Forward, false);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Backward, false);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Left, false);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Right, false);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe, false);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Left, false);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Right, false);
|
||||
CONTROL_DefineFlag(gamefunc_Jump, false);
|
||||
CONTROL_DefineFlag(gamefunc_Crouch, false);
|
||||
CONTROL_DefineFlag(gamefunc_Run, false);
|
||||
CONTROL_DefineFlag(gamefunc_AutoRun, false);
|
||||
CONTROL_DefineFlag(gamefunc_Open, false);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Up, false);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Down, false);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Up, false);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Down, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_1, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_2, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_3, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_4, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_5, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_6, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_7, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_8, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_9, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_10, false);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Left, false);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Right, false);
|
||||
CONTROL_DefineFlag(gamefunc_Map_Follow_Mode, false);
|
||||
CONTROL_DefineFlag(gamefunc_Shrink_Screen, false);
|
||||
CONTROL_DefineFlag(gamefunc_Enlarge_Screen, false);
|
||||
CONTROL_DefineFlag(gamefunc_See_Coop_View, false);
|
||||
CONTROL_DefineFlag(gamefunc_See_Chase_View, false);
|
||||
CONTROL_DefineFlag(gamefunc_Mouse_Aiming, false);
|
||||
CONTROL_DefineFlag(gamefunc_Toggle_Crosshair, false);
|
||||
CONTROL_DefineFlag(gamefunc_Next_Weapon, false);
|
||||
CONTROL_DefineFlag(gamefunc_Previous_Weapon, false);
|
||||
CONTROL_DefineFlag(gamefunc_Holster_Weapon, false);
|
||||
CONTROL_DefineFlag(gamefunc_Show_Opponents_Weapon, false);
|
||||
CONTROL_DefineFlag(gamefunc_MedKit, false);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Around, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_Fire, false);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_Special_Fire, false);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Center, false);
|
||||
CONTROL_DefineFlag(gamefunc_Tilt_Left, false);
|
||||
CONTROL_DefineFlag(gamefunc_Tilt_Right, false);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Use, false);
|
||||
CONTROL_DefineFlag(gamefunc_Map_Toggle, false);
|
||||
CONTROL_DefineFlag(gamefunc_Send_Message, false);
|
||||
CONTROL_DefineFlag(gamefunc_BeastVision, false);
|
||||
CONTROL_DefineFlag(gamefunc_CrystalBall, false);
|
||||
CONTROL_DefineFlag(gamefunc_JumpBoots, false);
|
||||
CONTROL_DefineFlag(gamefunc_ProximityBombs, false);
|
||||
CONTROL_DefineFlag(gamefunc_RemoteBombs, false);
|
||||
}
|
||||
|
||||
void ctrlTerm(void)
|
||||
|
|
|
@ -230,6 +230,7 @@ int32_t baselayer_init();
|
|||
|
||||
struct GameInterface
|
||||
{
|
||||
int TicRate;
|
||||
void (*faketimerhandler)();
|
||||
int (*app_main)(int, char const* const*);
|
||||
bool (*validate_hud)(int);
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "control.h"
|
||||
#include "_control.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "build.h"
|
||||
|
||||
/* Notes
|
||||
|
||||
|
@ -52,14 +53,20 @@
|
|||
|
||||
*/
|
||||
|
||||
CVAR(Bool, cl_defaultconfiguration, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(Int, cl_defaultconfiguration, 2, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
FGameConfigFile* GameConfig;
|
||||
static FString GameName;
|
||||
|
||||
void G_LoadConfig(const char *game)
|
||||
{
|
||||
CONFIG_SetDefaultKeys(cl_defaultconfiguration? "demolition/origbinds.txt" : "demolition/defbinds.txt")
|
||||
// This must be done before initializing any data, so doing it late in the startup process won't work.
|
||||
if (CONTROL_Startup(controltype_keyboardandmouse, BGetTime, gi->TicRate ))
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
CONFIG_SetDefaultKeys(cl_defaultconfiguration == 1 ? "demolition/origbinds.txt" : cl_defaultconfiguration == 2 ? "demolition/leftbinds.txt" : "demolition/defbinds.txt");
|
||||
GameConfig = new FGameConfigFile();
|
||||
GameConfig->DoGlobalSetup();
|
||||
GameConfig->DoGameSetup(game);
|
||||
|
|
|
@ -215,8 +215,6 @@ void CONFIG_SetDefaults(void)
|
|||
Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!");
|
||||
#endif
|
||||
|
||||
CONFIG_SetDefaultKeys("demolition/defbinds.txt");
|
||||
|
||||
memset(ud.config.MouseFunctions, -1, sizeof(ud.config.MouseFunctions));
|
||||
memset(ud.config.MouseDigitalFunctions, -1, sizeof(ud.config.MouseDigitalFunctions));
|
||||
memset(ud.config.JoystickFunctions, -1, sizeof(ud.config.JoystickFunctions));
|
||||
|
@ -782,6 +780,7 @@ void CONFIG_WriteSettings(void) // save binds and aliases to <cfgname>_settings.
|
|||
|
||||
void CONFIG_WriteSetup(uint32_t flags)
|
||||
{
|
||||
#if 0
|
||||
if (!ud.config.setupread) return;
|
||||
|
||||
if (ud.config.scripthandle < 0)
|
||||
|
@ -949,6 +948,7 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
CONFIG_WriteSettings();
|
||||
G_SaveConfig();
|
||||
Bfflush(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
char const * CONFIG_GetGameFuncOnKeyboard(int gameFunc)
|
||||
|
|
|
@ -5932,8 +5932,6 @@ static void A_InitEnemyFlags(void)
|
|||
}
|
||||
#undef SETFLAG
|
||||
|
||||
static void G_SetupGameButtons(void);
|
||||
|
||||
#ifdef LUNATIC
|
||||
// Will be used to store CON code translated to Lua.
|
||||
int32_t g_elCONSize;
|
||||
|
@ -6493,8 +6491,8 @@ int app_main(int argc, const char * const*argv)
|
|||
g_mostConcurrentPlayers = ud.multimode; // XXX: redundant?
|
||||
|
||||
++ud.executions;
|
||||
CONFIG_WriteSetup(1);
|
||||
CONFIG_ReadSetup();
|
||||
//CONFIG_WriteSetup(1);
|
||||
//CONFIG_ReadSetup();
|
||||
|
||||
char const * rtsname = g_rtsNamePtr ? g_rtsNamePtr : ud.rtsname;
|
||||
RTS_Init(rtsname);
|
||||
|
@ -6510,14 +6508,6 @@ int app_main(int argc, const char * const*argv)
|
|||
|
||||
if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
{
|
||||
if (CONTROL_Startup(controltype_keyboardandmouse, &BGetTime, TICRATE))
|
||||
{
|
||||
ERRprintf("There was an error initializing the CONTROL system.\n");
|
||||
engineUnInit();
|
||||
Bexit(5);
|
||||
}
|
||||
|
||||
G_SetupGameButtons();
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
|
||||
|
@ -6552,8 +6542,6 @@ int app_main(int argc, const char * const*argv)
|
|||
OSD_Exec(tempbuf);
|
||||
OSD_Exec("autoexec.cfg");
|
||||
|
||||
//CONFIG_SetDefaultKeys("demolition/defbinds.txt", true);
|
||||
|
||||
system_getcvars();
|
||||
|
||||
if (quitevent) return 4;
|
||||
|
@ -7178,69 +7166,6 @@ void A_SpawnRandomGlass(int spriteNum, int wallNum, int glassCnt)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void G_SetupGameButtons(void)
|
||||
{
|
||||
CONTROL_DefineFlag(gamefunc_Move_Forward,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Backward,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Fire,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Open,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Run,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_AutoRun,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Jump,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Crouch,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Up,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Down,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Up,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Down,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_1,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_2,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_3,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_4,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_5,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_6,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_7,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_8,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_9,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_10,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Holo_Duke,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Jetpack,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_NightVision,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_MedKit,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_TurnAround,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_SendMessage,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Map,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Shrink_Screen,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Enlarge_Screen,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Center_View,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Holster_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Show_Opponents_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Map_Follow_Mode,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_See_Coop_View,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Mouse_Aiming,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Toggle_Crosshair,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Steroids,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Kick,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Next_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Previous_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Alt_Fire,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Last_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Save, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Toggle_Crouch, FALSE);
|
||||
}
|
||||
|
||||
extern void faketimerhandler();
|
||||
extern int app_main(int argc, char const* const* argv);
|
||||
extern void app_crashhandler(void);
|
||||
|
@ -7252,6 +7177,7 @@ extern int32_t startwin_idle(void*);
|
|||
extern int32_t startwin_run(void);
|
||||
|
||||
GameInterface Interface = {
|
||||
TICRATE,
|
||||
faketimerhandler,
|
||||
app_main,
|
||||
validate_hud,
|
||||
|
|
|
@ -2298,52 +2298,6 @@ void C_InitQuotes(void)
|
|||
}
|
||||
}
|
||||
|
||||
LUNATIC_EXTERN void C_SetCfgName(const char *cfgname)
|
||||
{
|
||||
if (Bstrcmp(g_setupFileName, cfgname) == 0) // no need to do anything if name is the same
|
||||
return;
|
||||
|
||||
if (Bstrcmp(g_setupFileName, SETUPFILENAME) != 0) // set to something else via -cfg
|
||||
return;
|
||||
|
||||
ud_setup_t const config = ud.setup;
|
||||
#ifdef POLYMER
|
||||
int const renderMode = glrendmode;
|
||||
#endif
|
||||
|
||||
if (!buildvfs_isdir(g_modDir))
|
||||
{
|
||||
if (buildvfs_mkdir(g_modDir, S_IRWXU) != 0)
|
||||
{
|
||||
OSD_Printf("Failed to create directory \"%s\"!\n", g_modDir);
|
||||
return;
|
||||
}
|
||||
else
|
||||
OSD_Printf("Created configuration file directory %s\n", g_modDir);
|
||||
}
|
||||
|
||||
// XXX: Back up 'cfgname' as it may be the global 'tempbuf'.
|
||||
char *temp = Xstrdup(cfgname);
|
||||
|
||||
CONFIG_WriteSetup(1);
|
||||
|
||||
if (g_modDir[0] != '/')
|
||||
Bsnprintf(g_setupFileName, sizeof(g_setupFileName), "%s/%s", g_modDir, temp);
|
||||
else
|
||||
Bstrncpyz(g_setupFileName, temp, sizeof(g_setupFileName));
|
||||
|
||||
DO_FREE_AND_NULL(temp);
|
||||
|
||||
initprintf("Using config file \"%s\".\n", g_setupFileName);
|
||||
|
||||
CONFIG_ReadSetup();
|
||||
|
||||
ud.setup = config;
|
||||
#ifdef POLYMER
|
||||
glrendmode = renderMode;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined LUNATIC
|
||||
static inline void C_BitOrNextValue(int32_t *valptr)
|
||||
{
|
||||
|
@ -5271,8 +5225,7 @@ repeatcase:
|
|||
j++;
|
||||
}
|
||||
tempbuf[j] = '\0';
|
||||
|
||||
C_SetCfgName(tempbuf);
|
||||
// This depends on Build's original configuration file format and setup which no longer exists.
|
||||
}
|
||||
continue;
|
||||
|
||||
|
|
|
@ -210,9 +210,6 @@ void CONFIG_SetDefaults(void)
|
|||
|
||||
// JBF 20031211
|
||||
|
||||
|
||||
CONFIG_SetDefaultKeys("demolition/defbinds.txt");
|
||||
|
||||
memset(ud.config.MouseFunctions, -1, sizeof(ud.config.MouseFunctions));
|
||||
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
||||
{
|
||||
|
@ -577,6 +574,7 @@ void CONFIG_WriteSettings(void) // save binds and aliases to <cfgname>_settings.
|
|||
|
||||
void CONFIG_WriteSetup(uint32_t flags)
|
||||
{
|
||||
#if 0
|
||||
int32_t dummy;
|
||||
|
||||
if (!ud.config.setupread) return;
|
||||
|
@ -752,6 +750,7 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
CONFIG_WriteSettings();
|
||||
G_SaveConfig();
|
||||
Bfflush(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static const char *CONFIG_GetMapEntryName(char m[], char const * const mapname)
|
||||
|
|
|
@ -7374,8 +7374,6 @@ static void A_InitEnemyFlags(void)
|
|||
}
|
||||
#undef SETFLAG
|
||||
|
||||
static void G_SetupGameButtons(void);
|
||||
|
||||
// Throw in everything here that needs to be called after a Lua game state
|
||||
// recreation (or on initial startup in a non-Lunatic build.)
|
||||
void G_PostCreateGameState(void)
|
||||
|
@ -7874,8 +7872,8 @@ int app_main(int argc, char const * const * argv)
|
|||
g_mostConcurrentPlayers = ud.multimode; // XXX: redundant?
|
||||
|
||||
++ud.executions;
|
||||
CONFIG_WriteSetup(1);
|
||||
CONFIG_ReadSetup();
|
||||
//CONFIG_WriteSetup(1);
|
||||
//CONFIG_ReadSetup();
|
||||
|
||||
char const * rtsname = g_rtsNamePtr ? g_rtsNamePtr : ud.rtsname;
|
||||
RTS_Init(rtsname);
|
||||
|
@ -7891,14 +7889,6 @@ int app_main(int argc, char const * const * argv)
|
|||
|
||||
//if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
{
|
||||
if (CONTROL_Startup(controltype_keyboardandmouse, &BGetTime, TICRATE))
|
||||
{
|
||||
ERRprintf("There was an error initializing the CONTROL system.\n");
|
||||
engineUnInit();
|
||||
Bexit(5);
|
||||
}
|
||||
|
||||
G_SetupGameButtons();
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
|
||||
|
@ -7933,8 +7923,6 @@ int app_main(int argc, char const * const * argv)
|
|||
OSD_Exec(tempbuf);
|
||||
OSD_Exec("autoexec.cfg");
|
||||
|
||||
//CONFIG_SetDefaultKeys(keydefaults, true);
|
||||
|
||||
system_getcvars();
|
||||
|
||||
//if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
|
@ -8623,67 +8611,6 @@ void A_SpawnRandomGlass(int spriteNum, int wallNum, int glassCnt)
|
|||
}
|
||||
}
|
||||
|
||||
static void G_SetupGameButtons(void)
|
||||
{
|
||||
CONTROL_DefineFlag(gamefunc_Move_Forward,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Backward,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Fire,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Open,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Run,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_AutoRun,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Jump,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Crouch,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Up,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Down,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Up,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Down,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_1,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_2,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_3,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_4,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_5,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_6,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_7,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_8,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_9,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_10,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Left,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Right,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Holo_Duke,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Jetpack,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_NightVision,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_MedKit,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_TurnAround,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_SendMessage,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Map,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Shrink_Screen,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Enlarge_Screen,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Center_View,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Holster_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Show_Opponents_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Map_Follow_Mode,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_See_Coop_View,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Mouse_Aiming,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Toggle_Crosshair,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Steroids,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Kick,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Next_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Previous_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Last_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Save, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Toggle_Crouch, FALSE);
|
||||
}
|
||||
|
||||
|
||||
extern void faketimerhandler();
|
||||
|
@ -8697,6 +8624,7 @@ extern int32_t startwin_idle(void*);
|
|||
extern int32_t startwin_run(void);
|
||||
|
||||
GameInterface Interface = {
|
||||
TICRATE,
|
||||
faketimerhandler,
|
||||
app_main,
|
||||
validate_hud,
|
||||
|
|
|
@ -199,7 +199,6 @@ void CONFIG_SetDefaults(void)
|
|||
Bstrcpy(WangBangMacro[8], MACRO9);
|
||||
Bstrcpy(WangBangMacro[9], MACRO10);
|
||||
|
||||
SetDefaultKeyDefinitions(0);
|
||||
SetMouseDefaults(0);
|
||||
|
||||
memset(MouseDigitalAxes, -1, sizeof(MouseDigitalAxes));
|
||||
|
@ -532,6 +531,7 @@ int32_t CONFIG_ReadSetup(void)
|
|||
|
||||
void CONFIG_WriteSetup(void)
|
||||
{
|
||||
#if 0
|
||||
int32_t dummy;
|
||||
char buf[80];
|
||||
|
||||
|
@ -607,6 +607,7 @@ void CONFIG_WriteSetup(void)
|
|||
|
||||
SCRIPT_Save(scripthandle, setupfilename);
|
||||
SCRIPT_Free(scripthandle);
|
||||
#endif
|
||||
}
|
||||
|
||||
END_SW_NS
|
||||
|
|
|
@ -1149,8 +1149,6 @@ void CON_LoadSetup(void)
|
|||
}
|
||||
initkeys();
|
||||
CONFIG_ReadSetup();
|
||||
CONTROL_Startup( ControllerType, &GetTime, 120 );
|
||||
SetupGameButtons();
|
||||
|
||||
if (CONTROL_JoystickEnabled)
|
||||
{
|
||||
|
|
|
@ -5928,6 +5928,7 @@ extern int32_t startwin_run(void);
|
|||
/*extern*/ void set_hud(int requested_size) {}
|
||||
|
||||
GameInterface Interface = {
|
||||
140, // Huh?
|
||||
faketimerhandler,
|
||||
app_main,
|
||||
validate_hud,
|
||||
|
|
|
@ -45,25 +45,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
|
||||
BEGIN_SW_NS
|
||||
|
||||
/*
|
||||
===================
|
||||
|
||||
=
|
||||
= SetupGameButtons
|
||||
=
|
||||
===================
|
||||
*/
|
||||
|
||||
void SetupGameButtons(void)
|
||||
{
|
||||
short gamefunc;
|
||||
|
||||
for (gamefunc = 0; gamefunc < NUMGAMEFUNCTIONS; gamefunc++)
|
||||
{
|
||||
CONTROL_DefineFlag(gamefunc,FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void CenterCenter(void)
|
||||
{
|
||||
printf("\nCenter the joystick and press a button\n");
|
||||
|
@ -115,8 +96,6 @@ void InitSetup(void)
|
|||
//CONFIG_GetSetupFilename();
|
||||
//InitializeKeyDefList();
|
||||
//CONFIG_ReadSetup();
|
||||
if (CONTROL_Startup(controltype_keyboardandmouse, &GetTime, /*120*/ 140)) exit(1);
|
||||
SetupGameButtons();
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
|
||||
|
@ -184,59 +163,6 @@ void ShutDown(void)
|
|||
CONFIG_WriteSetup();
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
|
||||
=
|
||||
= SetupGameButtons
|
||||
=
|
||||
===================
|
||||
*/
|
||||
|
||||
void SetupGameButtons(void)
|
||||
{
|
||||
CONTROL_DefineFlag(gamefunc_Move_Forward, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Backward, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Left, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Turn_Right, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Left, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Strafe_Right, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_TurnAround, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Jump, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Crouch, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Fire, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Open, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Up, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Down, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Up, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Aim_Down, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Run, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_SendMessage, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_1, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_2, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_3, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_4, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_5, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_6, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_7, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_8, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_9, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Weapon_10, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Map, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Left, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Look_Right, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Shrink_Screen, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Enlarge_Screen, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_AutoRun, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Center_View, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Holster_Weapon, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Left, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory_Right, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Inventory, FALSE);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
=
|
||||
|
@ -326,8 +252,6 @@ void main()
|
|||
timerhandle = TIME_AddTimer(40, &timer);
|
||||
//CONFIG_GetSetupFilename();
|
||||
CONFIG_ReadSetup();
|
||||
CONTROL_Startup(1, &GetTime, 1500);
|
||||
SetupGameButtons();
|
||||
|
||||
SoundStartup();
|
||||
MusicStartup();
|
||||
|
|
Loading…
Reference in a new issue