void CONFIG_SetupMouse( void ) { int32 i; char str[80],*p; char temp[80]; int32 function, scale; if (scripthandle < 0) return; for (i=0;i<MAXMOUSEBUTTONS;i++) { Bsprintf(str,"MouseButton%d",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) MouseButtons[i] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseButtonClicked%d",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) MouseButtonsClicked[i] = CONFIG_FunctionNameToNum(temp); } // map over the axes for (i=0;i<MAXMOUSEAXES;i++) { Bsprintf(str,"MouseAnalogAxes%d",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%d_0",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseDigitalAxes[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%d_1",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseDigitalAxes[i][1] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseAnalogScale%d",i); scale = MouseAnalogScale[i]; SCRIPT_GetNumber(scripthandle, "Controls", str,&scale); MouseAnalogScale[i] = scale; } // 0 to 65536 SCRIPT_GetNumber( scripthandle, "Controls","MouseSensitivity",&function); gs.MouseSpeed = function; for (i=0; i<MAXMOUSEBUTTONS; i++) { CONTROL_MapButton( MouseButtons[i], i, FALSE, controldevice_mouse ); CONTROL_MapButton( MouseButtonsClicked[i], i, TRUE, controldevice_mouse ); } for (i=0; i<MAXMOUSEAXES; i++) { CONTROL_MapAnalogAxis( i, MouseAnalogAxes[i], controldevice_mouse); CONTROL_MapDigitalAxis( i, MouseDigitalAxes[i][0], 0,controldevice_mouse ); CONTROL_MapDigitalAxis( i, MouseDigitalAxes[i][1], 1,controldevice_mouse ); CONTROL_SetAnalogAxisScale( i, MouseAnalogScale[i], controldevice_mouse ); } CONTROL_SetMouseSensitivity(gs.MouseSpeed); }
void CONFIG_SetupJoystick( void ) { int32 i; char str[80],*p; char temp[80]; int32 function, scale; if (scripthandle < 0) return; for (i=0;i<MAXJOYBUTTONS;i++) { Bsprintf(str,"JoystickButton%ld",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) JoystickFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickButtonClicked%ld",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) JoystickFunctions[i][1] = CONFIG_FunctionNameToNum(temp); } // map over the axes for (i=0;i<MAXJOYAXES;i++) { Bsprintf(str,"JoystickAnalogAxes%ld",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum(temp); Bsprintf(str,"JoystickDigitalAxes%ld_0",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickDigitalAxes%ld_1",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickAnalogScale%ld",i); scale = JoystickAnalogueScale[i]; SCRIPT_GetNumber(scripthandle, "Controls", str,&scale); JoystickAnalogueScale[i] = scale; Bsprintf(str,"JoystickAnalogDead%ld",i); scale = JoystickAnalogueDead[i]; SCRIPT_GetNumber(scripthandle, "Controls", str,&scale); JoystickAnalogueDead[i] = scale; Bsprintf(str,"JoystickAnalogSaturate%ld",i); scale = JoystickAnalogueSaturate[i]; SCRIPT_GetNumber(scripthandle, "Controls", str,&scale); JoystickAnalogueSaturate[i] = scale; } for (i=0;i<MAXJOYBUTTONS;i++) { CONTROL_MapButton( JoystickFunctions[i][0], i, FALSE, controldevice_joystick ); CONTROL_MapButton( JoystickFunctions[i][1], i, TRUE, controldevice_joystick ); } for (i=0;i<MAXJOYAXES;i++) { CONTROL_MapAnalogAxis(i, JoystickAnalogueAxes[i], controldevice_joystick); CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick ); CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick ); CONTROL_SetAnalogAxisScale( i, JoystickAnalogueScale[i], controldevice_joystick ); } }
void CONFIG_SetupMouse( void ) { int32 i; char str[80],*p; char temp[80]; int32 function, scale; if (scripthandle < 0) return; #if 0 for (i=0;i<MAXMOUSEBUTTONS;i++) { Bsprintf(str,"MouseButton%ld",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) MouseFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseButtonClicked%ld",i); temp[0] = 0; if (!SCRIPT_GetString( scripthandle,"Controls", str,temp)) MouseFunctions[i][1] = CONFIG_FunctionNameToNum(temp); } #endif // map over the axes for (i=0;i<MAXMOUSEAXES;i++) { Bsprintf(str,"MouseAnalogAxes%ld",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%ld_0",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%ld_1",i); temp[0] = 0; if (!SCRIPT_GetString(scripthandle, "Controls", str,temp)) MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseAnalogScale%ld",i); scale = MouseAnalogueScale[i]; SCRIPT_GetNumber(scripthandle, "Controls", str,&scale); MouseAnalogueScale[i] = scale; } function = 32768; SCRIPT_GetNumber( scripthandle, "Controls","MouseSensitivity",&function); #if 0 CONTROL_SetMouseSensitivity(function); #else dnSetMouseSensitivity(function); #endif #if 0 for (i=0; i<MAXMOUSEBUTTONS; i++) { CONTROL_MapButton( MouseFunctions[i][0], i, 0, controldevice_mouse ); CONTROL_MapButton( MouseFunctions[i][1], i, 1, controldevice_mouse ); } #endif for (i=0; i<MAXMOUSEAXES; i++) { CONTROL_MapAnalogAxis( i, MouseAnalogueAxes[i], controldevice_mouse); CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][0], 0,controldevice_mouse ); CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][1], 1,controldevice_mouse ); CONTROL_SetAnalogAxisScale( i, MouseAnalogueScale[i], controldevice_mouse ); } }
void CONFIG_SetDefaults( void ) { int32 i,f; byte k1,k2; FXDevice = 0; MusicDevice = 0; NumVoices = 16; NumChannels = 2; NumBits = 16; MixRate = 44100; SoundToggle = 1; MusicToggle = 1; VoiceToggle = 1; AmbienceToggle = 1; FXVolume = 220; MusicVolume = 200; ReverseStereo = 0; myaimmode = ps[0].aim_mode = 1; ud.mouseaiming = 0; ud.weaponswitch = 3; // new+empty AutoAim = 0; UseJoystick = 0; UseMouse = 1; ud.mouseflip = 0; ud.runkey_mode = 0; ud.statusbarscale = 100; ud.screen_size = 8; ud.screen_tilting = 1; ud.shadows = 1; ud.detail = 1; ud.lockout = 0; ud.pwlockout[0] = '\0'; ud.crosshair = 1; ud.m_marker = 1; ud.m_ffire = 1; ud.levelstats = 0; ud.vsync = 1; ud.fps_max = 120; ShowOpponentWeapons = 0; Bstrcpy(ud.rtsname, "DUKE.RTS"); Bstrcpy(myname, "Duke"); Bstrcpy(ud.ridecule[0], "An inspiration for birth control."); Bstrcpy(ud.ridecule[1], "You're gonna die for that!"); Bstrcpy(ud.ridecule[2], "It hurts to be you."); Bstrcpy(ud.ridecule[3], "Lucky Son of a Bitch."); Bstrcpy(ud.ridecule[4], "Hmmm....Payback time."); Bstrcpy(ud.ridecule[5], "You bottom dwelling scum sucker."); Bstrcpy(ud.ridecule[6], "Damn, you're ugly."); Bstrcpy(ud.ridecule[7], "Ha ha ha...Wasted!"); Bstrcpy(ud.ridecule[8], "You suck!"); Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!"); #if 0 memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys)); for (i=0; i < (int32)(sizeof(keydefaults)/sizeof(keydefaults[0])); i+=3) { f = CONFIG_FunctionNameToNum( keydefaults[i+0] ); if (f == -1) continue; KeyboardKeys[f][0] = KB_StringToScanCode( keydefaults[i+1] ); KeyboardKeys[f][1] = KB_StringToScanCode( keydefaults[i+2] ); if (f == gamefunc_Show_Console) OSD_CaptureKey(KeyboardKeys[f][0]); else CONTROL_MapKey( f, KeyboardKeys[f][0], KeyboardKeys[f][1] ); } memset(MouseFunctions, -1, sizeof(MouseFunctions)); for (i=0; i<MAXMOUSEBUTTONS; i++) { MouseFunctions[i][0] = CONFIG_FunctionNameToNum( mousedefaults[i] ); CONTROL_MapButton( MouseFunctions[i][0], i, 0, controldevice_mouse ); if (i>=4) continue; MouseFunctions[i][1] = CONFIG_FunctionNameToNum( mouseclickeddefaults[i] ); CONTROL_MapButton( MouseFunctions[i][1], i, 1, controldevice_mouse ); } memset(MouseDigitalFunctions, -1, sizeof(MouseDigitalFunctions)); for (i=0; i<MAXMOUSEAXES; i++) { MouseAnalogueScale[i] = -65536; CONTROL_SetAnalogAxisScale( i, MouseAnalogueScale[i], controldevice_mouse ); MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum( mousedigitaldefaults[i*2] ); MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum( mousedigitaldefaults[i*2+1] ); CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][0], 0, controldevice_mouse ); CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][1], 1, controldevice_mouse ); MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum( mouseanalogdefaults[i] ); CONTROL_MapAnalogAxis( i, MouseAnalogueAxes[i], controldevice_mouse); } CONTROL_SetMouseSensitivity(32768); memset(JoystickFunctions, -1, sizeof(JoystickFunctions)); for (i=0; i<MAXJOYBUTTONS; i++) { JoystickFunctions[i][0] = CONFIG_FunctionNameToNum( joystickdefaults[i] ); JoystickFunctions[i][1] = CONFIG_FunctionNameToNum( joystickclickeddefaults[i] ); CONTROL_MapButton( JoystickFunctions[i][0], i, 0, controldevice_joystick ); CONTROL_MapButton( JoystickFunctions[i][1], i, 1, controldevice_joystick ); } memset(JoystickDigitalFunctions, -1, sizeof(JoystickDigitalFunctions)); for (i=0; i<MAXJOYAXES; i++) { JoystickAnalogueScale[i] = 65536; JoystickAnalogueDead[i] = 1000; JoystickAnalogueSaturate[i] = 9500; CONTROL_SetAnalogAxisScale( i, JoystickAnalogueScale[i], controldevice_joystick ); JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum( joystickdigitaldefaults[i*2] ); JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum( joystickdigitaldefaults[i*2+1] ); CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick ); CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick ); JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum( joystickanalogdefaults[i] ); CONTROL_MapAnalogAxis(i, JoystickAnalogueAxes[i], controldevice_joystick); } #endif dnResetBindings(); }
void CONFIG_SetupJoystick(void) { int32_t i; char str[80]; char temp[80]; int32_t scale; if (ud.config.scripthandle < 0) return; for (i=0; i<MAXJOYBUTTONSANDHATS; i++) { Bsprintf(str,"JoystickButton%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle,"Controls", str,temp)) ud.config.JoystickFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickButtonClicked%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle,"Controls", str,temp)) ud.config.JoystickFunctions[i][1] = CONFIG_FunctionNameToNum(temp); } // map over the axes for (i=0; i<MAXJOYAXES; i++) { Bsprintf(str,"JoystickAnalogAxes%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_AnalogNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum(temp); Bsprintf(str,"JoystickDigitalAxes%d_0",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_FunctionNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickDigitalAxes%d_1",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_FunctionNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"JoystickAnalogScale%d",i); scale = ud.config.JoystickAnalogueScale[i]; SCRIPT_GetNumber(ud.config.scripthandle, "Controls", str,&scale); ud.config.JoystickAnalogueScale[i] = scale; Bsprintf(str,"JoystickAnalogDead%d",i); scale = ud.config.JoystickAnalogueDead[i]; SCRIPT_GetNumber(ud.config.scripthandle, "Controls", str,&scale); ud.config.JoystickAnalogueDead[i] = scale; Bsprintf(str,"JoystickAnalogSaturate%d",i); scale = ud.config.JoystickAnalogueSaturate[i]; SCRIPT_GetNumber(ud.config.scripthandle, "Controls", str,&scale); ud.config.JoystickAnalogueSaturate[i] = scale; } for (i=0; i<MAXJOYBUTTONSANDHATS; i++) { CONTROL_MapButton(ud.config.JoystickFunctions[i][0], i, 0, controldevice_joystick); CONTROL_MapButton(ud.config.JoystickFunctions[i][1], i, 1, controldevice_joystick); } for (i=0; i<MAXJOYAXES; i++) { CONTROL_MapAnalogAxis(i, ud.config.JoystickAnalogueAxes[i], controldevice_joystick); CONTROL_MapDigitalAxis(i, ud.config.JoystickDigitalFunctions[i][0], 0, controldevice_joystick); CONTROL_MapDigitalAxis(i, ud.config.JoystickDigitalFunctions[i][1], 1, controldevice_joystick); CONTROL_SetAnalogAxisScale(i, ud.config.JoystickAnalogueScale[i], controldevice_joystick); } }
void CONFIG_SetupMouse(void) { int32_t i; char str[80]; char temp[80]; int32_t scale; if (ud.config.scripthandle < 0) return; for (i=0; i<MAXMOUSEBUTTONS; i++) { Bsprintf(str,"MouseButton%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle,"Controls", str,temp)) ud.config.MouseFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseButtonClicked%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle,"Controls", str,temp)) ud.config.MouseFunctions[i][1] = CONFIG_FunctionNameToNum(temp); } // map over the axes for (i=0; i<MAXMOUSEAXES; i++) { Bsprintf(str,"MouseAnalogAxes%d",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_AnalogNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%d_0",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_FunctionNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseDigitalAxes%d_1",i); temp[0] = 0; if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp)) if (CONFIG_FunctionNameToNum(temp) != -1 || (!temp[0] && CONFIG_FunctionNameToNum(temp) != -1)) ud.config.MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(temp); Bsprintf(str,"MouseAnalogScale%d",i); scale = ud.config.MouseAnalogueScale[i]; SCRIPT_GetNumber(ud.config.scripthandle, "Controls", str,&scale); ud.config.MouseAnalogueScale[i] = scale; } { tempbuf[0] = 0; SCRIPT_GetString(ud.config.scripthandle, "Controls","Mouse_Sensitivity",&tempbuf[0]); if (tempbuf[0]) CONTROL_MouseSensitivity = atof(tempbuf); } for (i=0; i<MAXMOUSEBUTTONS; i++) { CONTROL_MapButton(ud.config.MouseFunctions[i][0], i, 0, controldevice_mouse); CONTROL_MapButton(ud.config.MouseFunctions[i][1], i, 1, controldevice_mouse); } for (i=0; i<MAXMOUSEAXES; i++) { CONTROL_MapAnalogAxis(i, ud.config.MouseAnalogueAxes[i], controldevice_mouse); CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][0], 0,controldevice_mouse); CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][1], 1,controldevice_mouse); CONTROL_SetAnalogAxisScale(i, ud.config.MouseAnalogueScale[i], controldevice_mouse); } }
void CONFIG_SetDefaults(void) { // JBF 20031211 int32_t i; ud.config.scripthandle = -1; #ifdef __ANDROID__ droidinput.forward_sens = 5.f; droidinput.strafe_sens = 5.f; droidinput.pitch_sens = 5.f; droidinput.yaw_sens = 5.f; droidinput.hideStick = 0; droidinput.gameControlsAlpha = 0.5; droidinput.toggleCrouch = 1; droidinput.quickSelectWeapon = 1; ud.config.ScreenWidth = droidinfo.screen_width; ud.config.ScreenHeight = droidinfo.screen_height; #elif defined _3DS ud.config.ScreenWidth = 400; ud.config.ScreenHeight = 240; #else ud.config.ScreenWidth = 1024; ud.config.ScreenHeight = 768; #endif ud.config.ScreenMode = 0; #ifdef USE_OPENGL ud.config.ScreenBPP = 32; #else ud.config.ScreenBPP = 8; #endif ud.config.useprecache = 1; ud.config.ForceSetup = 1; ud.config.NoAutoLoad = 1; ud.config.AmbienceToggle = 1; ud.config.AutoAim = 1; ud.config.MasterVolume = 255; ud.config.FXVolume = 225; #if defined(_WIN32) ud.config.MixRate = 44100; #elif defined __ANDROID__ ud.config.MixRate = droidinfo.audio_sample_rate; #else ud.config.MixRate = 32730; #endif ud.config.MouseBias = 0; ud.config.MouseDeadZone = 0; ud.config.MusicToggle = 1; ud.config.MusicVolume = 100; g_myAimMode = g_player[0].ps->aim_mode = 1; ud.config.NumBits = 16; ud.config.NumChannels = 1; ud.config.NumVoices = 16; ud.config.ReverseStereo = 0; ud.auto_run = 1; ud.config.ShowOpponentWeapons = 0; ud.config.SmoothInput = 1; ud.config.SoundToggle = 1; ud.althud = 1; ud.automsg = 0; ud.autovote = 0; ud.brightness = 8; ud.camerasprite = -1; #if defined GEKKO || defined __OPENDINGUX__ ud.camera_time = 11; #elif defined(__ANDROID__) ud.camera_time = 7; #else ud.camera_time = 4; #endif ud.color = 0; ud.crosshair = 1; ud.crosshairscale = 50; ud.obituaries = 1; ud.democams = 1; ud.detail = 1; ud.drawweapon = 1; ud.idplayers = 1; ud.levelstats = 0; ud.lockout = 0; ud.m_ffire = 1; ud.m_marker = 1; ud.mouseaiming = 0; ud.mouseflip = 1; ud.msgdisptime = 120; ud.pwlockout[0] = '\0'; ud.runkey_mode = 0; ud.screen_size = 4; ud.screen_tilting = 1; ud.shadows = 1; ud.statusbarmode = 1; ud.statusbarscale = 100; ud.team = 0; ud.viewbob = 1; ud.weaponsway = 1; ud.weaponswitch = 3; // new+empty ud.angleinterpolation = 0; #ifdef GEKKO ud.config.UseJoystick = 1; #else ud.config.UseJoystick = 1; #endif ud.config.UseMouse = 1; ud.config.VoiceToggle = 5; // bitfield, 1 = local, 2 = dummy, 4 = other players in DM ud.display_bonus_screen = 1; ud.show_level_text = 1; ud.configversion = 0; ud.weaponscale = 100; ud.textscale = 100; ud.config.CheckForUpdates = 1; if (g_rtsNamePtr == NULL) Bstrcpy(ud.rtsname, G_DefaultRtsFile()); Bstrcpy(szPlayerName, "Duke"); Bstrcpy(ud.ridecule[0], "An inspiration for birth control."); Bstrcpy(ud.ridecule[1], "You're gonna die for that!"); Bstrcpy(ud.ridecule[2], "It hurts to be you."); Bstrcpy(ud.ridecule[3], "Lucky son of a bitch."); Bstrcpy(ud.ridecule[4], "Hmmm... payback time."); Bstrcpy(ud.ridecule[5], "You bottom dwelling scum sucker."); Bstrcpy(ud.ridecule[6], "Damn, you're ugly."); Bstrcpy(ud.ridecule[7], "Ha ha ha... wasted!"); Bstrcpy(ud.ridecule[8], "You suck!"); Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!"); // JBF 20031211 CONFIG_SetDefaultKeys((const char (*)[MAXGAMEFUNCLEN])keydefaults); memset(ud.config.MouseFunctions, -1, sizeof(ud.config.MouseFunctions)); for (i=0; i<MAXMOUSEBUTTONS; i++) { ud.config.MouseFunctions[i][0] = CONFIG_FunctionNameToNum(mousedefaults[i]); CONTROL_MapButton(ud.config.MouseFunctions[i][0], i, 0, controldevice_mouse); if (i>=4) continue; ud.config.MouseFunctions[i][1] = CONFIG_FunctionNameToNum(mouseclickeddefaults[i]); CONTROL_MapButton(ud.config.MouseFunctions[i][1], i, 1, controldevice_mouse); } memset(ud.config.MouseDigitalFunctions, -1, sizeof(ud.config.MouseDigitalFunctions)); for (i=0; i<MAXMOUSEAXES; i++) { ud.config.MouseAnalogueScale[i] = DEFAULTMOUSEANALOGUESCALE; CONTROL_SetAnalogAxisScale(i, ud.config.MouseAnalogueScale[i], controldevice_mouse); ud.config.MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2]); ud.config.MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2+1]); CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][0], 0, controldevice_mouse); CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][1], 1, controldevice_mouse); ud.config.MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]); CONTROL_MapAnalogAxis(i, ud.config.MouseAnalogueAxes[i], controldevice_mouse); } CONTROL_MouseSensitivity = DEFAULTMOUSESENSITIVITY; memset(ud.config.JoystickFunctions, -1, sizeof(ud.config.JoystickFunctions)); for (i=0; i<MAXJOYBUTTONSANDHATS; i++) { ud.config.JoystickFunctions[i][0] = CONFIG_FunctionNameToNum(joystickdefaults[i]); ud.config.JoystickFunctions[i][1] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]); CONTROL_MapButton(ud.config.JoystickFunctions[i][0], i, 0, controldevice_joystick); CONTROL_MapButton(ud.config.JoystickFunctions[i][1], i, 1, controldevice_joystick); } memset(ud.config.JoystickDigitalFunctions, -1, sizeof(ud.config.JoystickDigitalFunctions)); for (i=0; i<MAXJOYAXES; i++) { ud.config.JoystickAnalogueScale[i] = DEFAULTJOYSTICKANALOGUESCALE; ud.config.JoystickAnalogueDead[i] = DEFAULTJOYSTICKANALOGUEDEAD; ud.config.JoystickAnalogueSaturate[i] = DEFAULTJOYSTICKANALOGUESATURATE; CONTROL_SetAnalogAxisScale(i, ud.config.JoystickAnalogueScale[i], controldevice_joystick); ud.config.JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2]); ud.config.JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2+1]); CONTROL_MapDigitalAxis(i, ud.config.JoystickDigitalFunctions[i][0], 0, controldevice_joystick); CONTROL_MapDigitalAxis(i, ud.config.JoystickDigitalFunctions[i][1], 1, controldevice_joystick); ud.config.JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum(joystickanalogdefaults[i]); CONTROL_MapAnalogAxis(i, ud.config.JoystickAnalogueAxes[i], controldevice_joystick); } }