Browse Source

init Repo

master
Tholo 10 months ago
parent
commit
84db103f15
  1. 282
      StarCitizen_Solarfly_v3_10_r0.tmc
  2. 169
      solarfly.tmh
  3. 12
      solarfly_gameglass_mapping.tmh
  4. 151
      solarfly_mapping.tmh
  5. 73
      solarfly_mfd.tmh

282
StarCitizen_Solarfly_v3_10_r0.tmc

@ -0,0 +1,282 @@
// Copyright (c) 2015-2018 Derek Douville ("solarfly")
// commit by Tholo
// Version 3.10
// Nov 11, 2020
//
// You may freely distribute or modify this profile to as you see fit,
// so long as this copyright stays intact.
/// commits from Tholo are printed with ///
include "target.tmh"
include "solarfly.tmh"
include "solarfly_mfd.tmh"
int main()
{
Configure(&HCougar, MODE_EXCLUDED);
Configure(&T16000, MODE_EXCLUDED);
Configure(&T16000L, MODE_EXCLUDED);
Configure(&TWCSThrottle, MODE_EXCLUDED);
if (USEMFD == 0) {
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
}
if (RUDDERS < 2) {
Configure(&TFRPRudder, MODE_EXCLUDED);
} else {
Configure(&TFRPRudder, MODE_FILTERED);
}
if(Init(&EventHandle)) return 1;
if (RUDDERS == 2) {
MapAxis(&TFRPRudder, TRUDDER, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
MapAxis(&TFRPRudder, TRPLEFT, DX_XROT_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
MapAxis(&TFRPRudder, TRPRIGHT, DX_YROT_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
}
SetKBRate(40, 35);
/// add Keyboard Layouts
if (KBLAYOUT == 1) {
SetKBLayout(KB_GER);
} else if (KBLAYOUT == 2) {
SetKBLayout(KB_FR);
} else {
SetKBLayout(KB_ENG);
}
// =======================================================================================
// Initialize MFD Assignments
if (USEMFD > 0)
init_mfd_left();
if (USEMFD > 1)
init_mfd_right();
// =======================================================================================
// Initialize GameGlass
if (GAMEGLASS == 1) {
printf("GameGlass is running"); // Todo: start GameGlass Software
}
// =======================================================================================
// Initialize the Joystick & Throttle AXIS Assignments
// ---------------------------------------------------------------------------------------
// (Curve/Zoom can be chosen by using the FLAPS switch).
MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_REVERSED, MAP_ABSOLUTE); // vertical; js1_slider1
MapAxis(&Joystick, 0, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE);
MapAxis(&Joystick, 0, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_RELATIVE);
MapAxis(&Joystick, 0, MOUSE_Z_AXIS, AXIS_NORMAL, MAP_RELATIVE);
sc_set_axis(&Throttle, THR_LEFT, sc_get_axis_zero(&Throttle, THR_LEFT));
sc_set_axis(&Throttle, THR_RIGHT, sc_get_axis_zero(&Throttle, THR_RIGHT));
MapAxis(&Throttle, SCX, 0, AXIS_NORMAL, MAP_RELATIVE);
MapAxis(&Throttle, SCY, 0, AXIS_NORMAL, MAP_ABSOLUTE);
// =======================================================================================
// ---------------------------------------------------------------------------------------
// JOYSTICK FUNCTION ASSIGNMENTS
// ---------------------------------------------------------------------------------------
// -- Shift States --
// PSM: Defensive (Shield Control)
// PSF: Offensive (Power & Weapon Control) Todo: Check this
// PSB: Interact
SetShiftButton(&Throttle, 0, &Throttle, PSF, PSB); // InnerThought Control Switch, Offense/Defense/View Mode
// -- FIRE CONTROL -----------------------------------------------------------------------
MapKey(&Joystick, TG1, DX1); // Group 0
MapKey(&Joystick, TG2, DX5); // Group 0 and Group 1
MapKey(&Joystick, H4P, DX5); // Group 1
MapKey(&Joystick, S1, EXEC("sc_master_mode(0);")); // S1
MapKeyR(&Joystick, S1, EXEC("sc_master_mode(AP_RELEASE);")); // S1
MapKey(&Joystick, S2, DX2); // BSF: Quantum Drive, BSM: Lead/Lag Ret., BSB: Scanning see master_mode
MapKey(&Joystick, S3, PULSE+v_ifcs_toggle_vector_decoupling); // Fire Countermeasures 3.0, 2.4 bug which required keyboard
MapKey(&Joystick, S4, PULSE+v_strafe_longitudinal_invert);
MapKey(&Throttle, CHB, PULSE+v_weapon_launch_countermeasure);
MapKey(&Throttle, CHF, PULSE+v_weapon_cycle_countermeasure_fwd);
// View Mangagement
MapKey(&Throttle, SC, TEMPO(v_view_cycle_fwd, PULSE+TRACKIR_CENTER, 300)); // Look Camera
MapKey(&Joystick, H1U, v_view_pitch_up); // Note now the stick X axis also functions
MapKey(&Joystick, H1D, v_view_pitch_down);
MapKey(&Joystick, H1L, v_view_yaw_left);
MapKey(&Joystick, H1R, v_view_yaw_right);
MapKey(&Throttle, PSB, DOWN+pc_interaction_mode);
MapKeyR(&Throttle, PSB, UP+pc_interaction_mode);
// -- TARGET MANAGEMENT --------------------------------------------------
// H2
MapKey(&Joystick, H2U, TEMPO(PULSE+v_target_nearest_hostile, // short: target
PULSE+v_target_toggle_pinned_focused, 300)); // long: pin the target
MapKey(&Joystick, H2D, TEMPO(PULSE+v_target_reticle_focus, // short: target
PULSE+v_target_toggle_pinned_focused, 300)); // long: pin the target
MapKey(&Joystick, H2R, TEMPO(PULSE+v_target_cycle_hostile_fwd, // Short: Cycle Hostile fwd
PULSE+v_target_cycle_hostile_back, 300)); // Long: Cycle hostile Back
MapKey(&Joystick, H2L, TEMPO(PULSE+v_target_cycle_friendly_fwd, // Short: Cycle Friendly Fwd
PULSE+v_target_cycle_friendly_back, 300)); // Long: cycle Friendly Back
// ** H4 SHIELD / POWER MANAGEMENT / HUD CONTROL**
// PSM, H4 controls shields Fwd, Back, Left, Right; MSU/D on throttle controls top/bot
// PSF: H4 controls Power distribution to G1, G2, G3, Normalize; MSU/D controls power throttle
// PSF, PSM, PSD
MapKeyUMD(&Throttle, MSU, v_power_throttle_up, v_shield_up, 0); // Increase Power / Shield Top
MapKeyUMD(&Throttle, MSD, v_power_throttle_down, v_shield_down, 0); // Decrease Power / Shield Bot
// -------- POWER MANAGEMENT -----------------------------------------------
// U/M/D = PSF PSM PSF
// XXX CIG BUG - POWER DISTRIBUTION IS BROKEN
MapKeyUMD(&Joystick, H3U, TEMPO(PULSE+v_target_cycle_nearest_friendly, PULSE+v_target_deselect, 300),
TEMPO(PULSE+v_target_cycle_nearest_friendly, PULSE+v_target_deselect, 300),
pc_interaction_focus); // S: Nearest Friendly L:
MapKey(&Joystick, H3D, TEMPO(PULSE+v_target_cycle_pinned_fwd,
PULSE+v_target_cycle_pinned_back, 300));
MapKey(&Joystick, H3R, TEMPO(PULSE+v_target_cycle_all_fwd,
PULSE+v_target_cycle_all_back, 300)); // Power G2 / Shield Down / HUD Down
MapKey(&Joystick, H3L, TEMPO(PULSE+v_target_cycle_subsystem_fwd,
PULSE+v_target_reset_subsystem, 300)); // Power G1 / Shield Left / HUD Left
// -------- SHIELD/POWER MANAGEMENT -----------------
MapKeyUMD(&Joystick, H4U, PULSE+v_power_reset_focus, v_shield_forward, v_shield_forward); // Shield Top / Shield Fwd
MapKeyUMD(&Joystick, H4D, PULSE+v_power_focus_group_3, v_shield_back, v_shield_back); // Shield Bot / Shield Back
MapKeyUMD(&Joystick, H4R, PULSE+v_power_focus_group_2, v_shield_right, v_shield_right); // Shield Reset / Shield Right
MapKeyUMD(&Joystick, H4L, PULSE+v_power_focus_group_1, v_shield_left, v_shield_left); // Shield Reset/ Shield Left
// =======================================================================================
// ---------------------------------------------------------------------------------------
// THROTTLE ENGINE MANAGEMENT
// ---------------------------------------------------------------------------------------
MapKey(&Throttle, BSB, 0); // Scanning Master Mode
MapKeyR(&Throttle, BSB, 0); // Lead/Lag master mode
MapKey(&Throttle, BSF, 0); // Quantum Drive Master Mode (See S1)
MapKeyR(&Throttle, BSF, 0);
MapKey(&Throttle, EFRNORM, EXEC("sc_disable_axis(&Throttle, THR_RIGHT); pickup_thr_right=1;")); // Center Throttle Mode
MapKeyR(&Throttle, EFRNORM, EXEC("sc_disable_axis(&Throttle, THR_RIGHT); pickup_thr_right=1;")); // Normal Throttle Mode
MapKey(&Throttle, EFLNORM, EXEC("sc_disable_axis(&Throttle, THR_LEFT); pickup_thr_left=0;"));
MapKeyR(&Throttle, EFLNORM, EXEC("sc_disable_axis(&Throttle, THR_LEFT); pickup_thr_left=1;"));
MapKey(&Throttle, LTB, PULSE+v_toggle_vtol);
// -- Brake / Afterburners / Flight Control ------------------------------
MapKey(&Throttle, SPDB, KEYON+DOWN+v_afterburner);
MapKeyR(&Throttle, SPDB, KEYON+UP+v_afterburner);
MapKey(&Throttle, SPDF, v_brake);
MapKey(&Throttle, APUON, PULSE+v_toggle_yaw_roll_swap);
// -- RUDDER / STRAFE SETUP --------------------------------------------------------------
// Combat Strafe Up/Down is mapped to CSU/CSU in all configurations.
//
// If RUDDER is 1, roll and strafe lateral will be assigned to the rudders and pedals.
// If RUDDER is 0:
// - Roll will be assigned to CSL/CSR.
// - Strafe L/R will be mapped to SCX Axis
if (!RUDDERS) {
printf("No rudders\x0a");
printf("Roll on CS, Strafe\x0a");
// Add Roll somewhere for non-rudder users
}
MapKey(&Throttle, CSU, v_strafe_up);
MapKey(&Throttle, CSD, v_strafe_down);
MapKey(&Throttle, CSL, v_strafe_left);
MapKey(&Throttle, CSR, v_strafe_right);
// MapKey(&Throttle, MSR, 0);
// MapKey(&Throttle, MSL, 0);
// Countermeasures Cycling / PIP Mode / Gimbals / Look Ahead modes
// -- Engine Power Off (Pull back on throttle)
printf(" * * * NOTE! If throttle Idle pulled back to detent, use ENGLOVER to override and fix throttle position\x0a");
MapKey(&Throttle, IDLERON, PULSE+v_power_toggle_group_3); // Right throttle [6]
MapKey(&Throttle, IDLEROFF, PULSE+v_power_toggle_group_3); // Right throttle [6]
MapKey(&Throttle, IDLELON, 0); // Reserved for future
MapKey(&Throttle, IDLELOFF, 0);
// -- Push to Talk & Comms -----------------------------------------------
MapKey(&Throttle, MSP, MIC_PTT); // Match teamspeak or whatever key to the pilot_settings
// -- EJECT EJECT EJECT --------------------------------------------------
// ------------- ENGINE THROTTLE MANAGEMENT --------
// MapKey(&Throttle, FLAPU, EXEC("sc_set_joystick_curves();")); // This is also awesome voodoo magic
// MapKeyR(&Throttle, FLAPU, EXEC("sc_set_joystick_curves();"));
MapKey(&Throttle, FLAPU, v_accel_range_increase);
MapKey(&Throttle, FLAPM, 0);
MapKey(&Throttle, FLAPD, v_accel_range_decrease);
// MapKey(&Throttle, FLAPD, EXEC("sc_set_joystick_curves();"));
// MapKeyR(&Throttle, FLAPD, EXEC("sc_set_joystick_curves();"));
MapKey(&Throttle, EOLNORM, 0);
MapKeyR(&Throttle, EOLMOTOR, 0); // Swap TG1 and TG2 group assignments
MapKeyR(&Throttle, EOLMOTOR, PULSE+v_flightready);
MapKey(&Throttle, EOLIGN, PULSE+v_power_toggle);
MapKey(&Throttle, LDGH, TEMPO(PULSE+v_weapon_cycle_aimmode, PULSE+v_look_ahead_enable, 300));
MapKey(&Throttle, RDRNRM, PULSE+scan_toggle_mode);
MapKey(&Throttle, RDRDIS, PULSE+scan_toggle_mode);
MapKey(&Throttle, EORNORM, 0);
MapKey(&Throttle, EORMOTOR, DOWN+mobiglass_scoreboard); // Seems more like a Thrustmaster MFD thing/keyboard though
MapKeyR(&Throttle, EORMOTOR, UP+mobiglass_scoreboard);
MapKey(&Throttle, EORIGN, PULSE+v_starmap); // Toggle the Starmap
//printf(" * * * NOTE: If Trigger fires Group 2 and you wanted Group 1, flip RDR ALTM switch to NRM.\x0a");
MapKey(&Throttle, APAH, 0); // Flight Modes
// =============== NAVIGATION, QDRIVE, CRUISE MANAGEMENT ========================================================
MapKey(&Throttle, APPAT, 0); // S: Mining Mode when Engage Pressed
MapKeyR(&Throttle, APPAT, 0); // S: Cruise Mode L: Disable/Enable when Engage pressed
MapKey(&Throttle, APALT, 0); // S: Landing Mode L: autoland, when Engage pressed
MapKey(&Throttle, APENG, TEMPO(EXEC("sc_set_ap_mode_engage(AP_SHORT);"), EXEC("sc_set_ap_mode_engage(AP_LONG);"), 300));
MapKeyR(&Throttle, APENG, EXEC("sc_set_ap_mode_engage(AP_RELEASE);"));
MapKey(&Throttle, APDIS, 0);
}
int pickup_thr_right = 0;
int pickup_thr_left = 0;
int EventHandle(int type, alias o, int x)
{
int dev = x;
int rc;
int zero;
int thr_r_pos;
if(&o == &TFRPRudder) {
// T.Flight rudders accessed by direct hardware. Swap them to match profile.
// Huge thanks to @samneric from the RSI forums for helping me debug this all day!
GetAxisData(&o, x);
if (axdata.dxmap == DX_XROT_AXIS) dev = TRPRIGHT;
else if (axdata.dxmap == DX_YROT_AXIS) dev = TRPLEFT;
axdata.val = AxisVal(o[x], &axdata);
GameOutput(&o, dev, AxisVal(o[x], &axdata));
return 0;
}
// Smooth throttle axes pickup for when throttle modes are switched
if(&o == &Throttle & ((x == THR_RIGHT & pickup_thr_right) | (x == THR_LEFT & pickup_thr_left))) {
zero = sc_get_axis_zero(&o, x);
rc = sc_throttle_pickup_zero(&o, x, zero, 1000);
if (rc != -1) {
sc_set_axis(&o, x, rc);
if (x == THR_RIGHT) pickup_thr_right = 0;
else pickup_thr_left = 0;
}
}
DefaultMapping(&o, x);
}

169
solarfly.tmh

@ -0,0 +1,169 @@
// Copyright (c) 2015-2020 Derek Douville ("solarfly")
//
// Version 3.8.2_v1
// Apr 10, 2020 7:50AM CST
//
// You are free to modify or redistrubute so long as my Copyright stays intact.
define MAX_INT 32767
define MIN_INT -32767
include "pilot_settings.tmh"
include "solarfly_mapping.tmh"
include "solarfly_gameglass_mapping.tmh"
define AP_SHORT 1
define AP_LONG 2
define AP_RELEASE 3
// Reconfigure the Master Mode button every time the Boat Switch is repositioned
int sc_master_mode(int t) {
printf("sc_master_mode(%d)\x0a", t);
if (t == AP_RELEASE) {
if (Throttle[BSF])
ActKey(KEYON+UP+v_toggle_qdrive_engagement); // Same binding for both, just hold it
} else {
if (Throttle[BSF])
ActKey(KEYON+DOWN+v_toggle_qdrive_engagement); // Same binding for both, just hold it
else if (Throttle[BSB]) {
printf("Throttle is BSB\0xa");
ActKey(KEYON+PULSE+scan_toggle_mode);
} else // BSM
ActKey(KEYON+PULSE+v_target_cycle_reticle_mode);
}
}
// Return the new position once the axis crosses the target position within a
// threshold, otherwise return -1. While -1 is a valid value, it's a
// 1/65536 chance the user lands exactly there.
int sc_throttle_pickup_zero(alias o, int axis, int pickup_target, int threshold) {
if (axis < IN_POSITION_AXES | axis > IN_POSITION_AXES+IN_MAX_AXES)
return -1;
if (threshold == 0)
threshold = 1000;
int pos = AxisVal(o[axis], &axdata);
int min = MIN_INT;
int max = MAX_INT;
if (pickup_target > MIN_INT + abs(threshold))
min = pickup_target - threshold;
if (pickup_target < MAX_INT - abs(threshold))
max = pickup_target + threshold;
if (pos > min & pos < max) {
return pos;
}
return -1;
}
// Assign the correct DX axis to physical axis and set curves depending on
// the position of the EFL and EFR switches
int sc_set_axis(alias o, int axis, int val) {
int dx_axis = 0;
if (axis < IN_POSITION_AXES | axis > IN_POSITION_AXES+IN_MAX_AXES)
return -1;
if (&o == &Throttle & (axis == THR_RIGHT | axis == THR_LEFT)) {
if (axis == THR_RIGHT) {
if (Throttle[EFRNORM]) {
dx_axis = DX_Z_AXIS;
SetSCurve(&o, axis, 0, 0, 0, 0, 0);
SetJCurve(&o, axis, 70, 50); // Nice and smooth
} else {
dx_axis = DX_THROTTLE_AXIS;
SetSCurve(&o, axis, 0, THR_STRAFE_DEADZONE, 0, THR_STRAFE_CURVE, 0);
}
} else { // THR_LEFT
if (Throttle[EFLNORM])
dx_axis = 0;
else {
dx_axis = DX_ZROT_AXIS;
SetSCurve(&o, axis, 0, THR_STRAFE_DEADZONE, 0, THR_STRAFE_CURVE, 0);
}
}
DXSetAxis(dx_axis, val);
MapAxis(&o, axis, dx_axis, AXIS_REVERSED, MAP_ABSOLUTE);
}
}
// Return the zero-value of what an axis should be given the position of EFR switches
int sc_get_axis_zero(alias o, int axis) {
if (&o == &Throttle) {
if ((axis == THR_RIGHT & Throttle[EFRNORM]) | axis == DX_Z_AXIS)
return MIN_INT;
}
return 0;
}
// Disconnect a physical axis from a DX axis until the EventLoop calls sc_set_axis
// to prevent unwanted position jumps in Star Citizen when changing behaviors
int sc_disable_axis(alias o, int axis)
{
if (axis < IN_POSITION_AXES | axis > IN_POSITION_AXES+IN_MAX_AXES)
return -1;
if (&o == &Throttle) {
if (axis == THR_LEFT)
DXSetAxis(DX_ZROT_AXIS, sc_get_axis_zero(&o, DX_ZROT_AXIS));
if (axis == THR_RIGHT) {
DXSetAxis(DX_THROTTLE_AXIS, sc_get_axis_zero(&o, DX_THROTTLE_AXIS));
DXSetAxis(DX_Z_AXIS, sc_get_axis_zero(&o, DX_Z_AXIS));
}
}
MapAxis(&o, axis, 0, AXIS_REVERSED, MAP_ABSOLUTE);
}
// Read the position of the Autopilot switch and the Engage
// button press combination and emit the correct event
int sc_set_ap_mode_engage(int t) {
// t == AP_SHORT, AP_LONG or AP_RELEASE (for MapKeyR)
if (t == AP_RELEASE) {
ActKey(KEYON+UP+v_autoland);
return 0;
}
if (Throttle[APPAT]) { // Quantum Drive
ActKey(KEYON+PULSE+v_toggle_mining_mode);
} else if (Throttle[APAH]) {
if (t == AP_SHORT)
ActKey(KEYON+PULSE+v_ifcs_toggle_cruise_control);
if (t == AP_LONG)
ActKey(KEYON+PULSE+v_ifcs_toggle_speed_limiter);
} else { // (Throttle[APALT])
if (t == AP_SHORT)
ActKey(KEYON+PULSE+v_toggle_landing_system);
if (t == AP_LONG)
ActKey(KEYON+DOWN+v_autoland); // Auto or Manual
}
}
/*
int sc_set_joystick_curves()
{
// FLAP position sets joystick curve profile defined in pilot_settings.tmh
int profile;
if (Throttle[FLAPU]) profile = 0;
if (!Throttle[FLAPU] & !Throttle[FLAPD]) profile = 1;
if (Throttle[FLAPD]) profile = 2;
SetSCurve(&Joystick, JOYX, 0, 0, 0, JS_CURVE[profile], JS_ZOOM[profile]);
SetSCurve(&Joystick, JOYY, 0, 0, 0, JS_CURVE[profile], JS_ZOOM[profile]);
printf("Profile[%d]: Curve=%d, Zoom=%d\x0a", profile, JS_CURVE[profile], JS_ZOOM[profile]);
//led2bin(profile);
}
int sc_set_tg1_h4p()
{
// If RDRALT
int secondary_fire = 0;
if (Throttle[EOLMOTOR]) { // Normal
MapKey(&Joystick, TG1, DX1); // fire group 1
MapKey(&Joystick, TG2, DX5);
secondary_fire = DX5;
printf("RDRNRM: Weapon Group 1 on TG1, Weapon Group 2 on H4P\x0a");
} else {
MapKey(&Joystick, TG1, DX5); // fire group 1
MapKey(&Joystick, TG2, DX1);
secondary_fire = DX1;
printf("RDRDIS: Weapon Group 2 on TG1, Weapon Group 1 on H4P\x0a");
}
MapKeyIO(&Joystick, H4P, PULSE+pc_select, secondary_fire); // EACARM: Inner Thought select, EACNORM: Secondary fire
}
*/

12
solarfly_gameglass_mapping.tmh

@ -0,0 +1,12 @@
// Copyright (c) 2015-2020 Derek Douville ("solarfly")
//
// Version 3.8.2_v1
// Apr 10, 2020 7:50AM CST
//
// You are free to modify or redistrubute so long as my Copyright stays intact.
// Keybindings to match StarCitizen Solarfly XML Mappings. DO NOT EDIT.
//
// =========================== FLIGHT - COCKPIT =====================================
define GG_SET 1

151
solarfly_mapping.tmh

@ -0,0 +1,151 @@
// Copyright (c) 2015-2018 Derek Douville ("solarfly")
// commit by Tholo
// Version 3.10
// Nov 11, 2020
//
// You may freely distribute or modify this profile to as you see fit,
// so long as this copyright stays intact.
/// commits from Tholo are printed with ///
// Keybindings to match StarCitizen Solarfly XML Mappings. DO NOT EDIT.
//
// =========================== FLIGHT - COCKPIT =====================================
define v_self_destruct L_ALT+BSP // 3.0 --
define v_eject R_CTL+'l' // 3.0 -- (double) > R_CTRL+'l' (single)
define v_lights 't' // 3.8
define v_respawn 'x' // 2.4 OK - but do not use x for vector decoupling, use a DirectX
define v_flightready 'r' // 3.8
define v_exit 'y'
define v_toggle_all_doors 'k' // 3.8 OK
define v_toggle_all_locks 'l' // 3.8 OK
//define v_doors_open_all F6 // 3.0 --
//define v_doors_close_all F6 // 3.0 --
//define v_doors_lock_all 'l' // 3.0 --
//define v_doors_unlock_all F8 // 3.0 --
// ===================== FLIGHT - VIEW =====================================================
define v_view_cycle_fwd F4 // 3.0 OK; 3.8?
//define v_view_look_behind '' // 3.0 --; Solarfly
//define v_view_cycle_headlook_mode DX24 // cycle camera orbit in 3.8
define v_view_freelook_mode 'z' // 3.8 'z'
define v_view_zoom_out DX13 // Solarfly
define v_view_zoom_in DX11 // Solarfly
define v_view_pitch_down DXHATDOWN // For 3.0, we use the joystick itself under View mode to look around
define v_view_pitch_up DXHATUP //
define v_view_yaw_right DXHATRIGHT //
define v_view_yaw_left DXHATLEFT //
define v_target_head_tracking R_CTL+'l' // Custom XXX 3.0 ???
//
// =========================== FLIGHT - MOVEMENT =====================================
define v_afterburner DX30 // 3.8 L_Shift; Solarfly
define v_brake DX31 // 3.8 'x'; Solarfly
//define v_match_target_velocity 'm' // 3.8 - Unmapped; Solarfly
define v_strafe_left 'a' // 3.8 OK: Pedals bound to DX axis control, used for joystick
define v_strafe_right 'd' // 3.8 OK: " " "
define v_strafe_up SPC // 3.8 OK; Solarfly buond to left throttle axis
define v_strafe_down L_CTL // 3.8 OK
define v_toggle_yaw_roll_swap L_ALT+'.' // 3.8 --
define v_roll_left 'q' // 3.0 OK; Pedals bound to roll by default
define v_roll_right 'e' // 3.0 OK
define v_accel_range_increase DX23 // 3.8 --; Solarfly
define v_accel_range_decrease DX24 // 3.8 --; Solarfly
define v_strafe_longitudinal_invert '/' // 3.8 --; Solarfly
define v_toggle_vtol 'j' // 3.8 OK
// define v_strafe_fwd '2' // 3.0ao OK; Solarfly unbound
// define v_strafe_back '3' // 3.0ao OK; Solarfly unbound
//define v_yaw_left // 2.6 Unmapped
//define v_yaw_right // 2.6 Unmapped
// ...ifcs
define v_ifcs_toggle_gforce_safety_kb L_ALT+';' // 3.8 --; Solarfly
define v_ifcs_toggle_gforce_safety_js DX26 // 3.8 --; Solarfly
define v_ifcs_toggle_esp_kb R_ALT+';' // 3.8 --; Solarfly, CHF so DX works with scanning
//define v_ifcs_toggle_esp_js DX26 // 3.8 --; Solarfly, CHF so DX works with scanning
define v_ifcs_toggle_vector_decoupling 'v' // 3.8 OK
define v_ifcs_toggle_cruise_control L_ALT+'c' // 3.8 'c': Solarfly
define v_ifcs_toggle_speed_limiter R_ALT+'c' // 3.8 Unbound
// ...Landing/Qdrive Management
define v_toggle_landing_system 'n' // 3.0 OK
define v_autoland 'n' // 3.0 OK But Long-Press XXX needs remap to r_ctrl+n
define v_toggle_qdrive_engagement 'b' // 2.6 OK XXX 3.0 B Long-press to engage, this should be a separate binding
define v_toggle_qdrive_system 'b' // 3.8 Needs long press
// ========================== TARGET MANAGEMENT ============================================
define v_target_nearest_hostile DX7 // 3.8 'lalt+1' - Solarfly
define v_target_cycle_hostile_fwd DX8 // 3.8 '3'
define v_target_cycle_hostile_back R_CTL+DX8 // 3.8 'lalt+3'
define v_target_cycle_subsystem_fwd DX13 // 3.8 '2'
define v_target_cycle_subsystem_back R_CTL+DX13 // 3.8 'lalt+2'
define v_target_reset_subsystem DX14
define v_target_reticle_focus DX9 // 3.8 '1' - Solarfly
define v_target_cycle_reticle_mode DX25 // 3.0 --; Solarfly
define v_target_cycle_all_fwd DX12 // 3.0 --; Solarfly
define v_target_cycle_all_back R_CTL+DX12 // 3.0 'k'
define v_target_cycle_friendly_fwd DX11 // 3.8 '5'
define v_target_cycle_friendly_back R_CTL+DX11 // 3.8 'lalt+5'
define v_target_cycle_nearest_friendly DX10
define v_target_cycle_pinned_fwd DX27 // 3.8 '4'
define v_target_cycle_pinned_back R_CTL+DX27 // 3.8 'lalt+4' L
define v_target_toggle_pinned_focused DX28 // 3.8 '1' OK
define v_target_deselect DX29 // 3.8 '0; Solarfly
//define v_toggle_relative_mouse_mode R_ALT+'x' // 2.4 OK XXX 3.0 ???
define v_toggle_weapon_gimbal_lock L_ALT+'j' // 3.0 OK
define v_couple_aim_to_move L_ALT+'m' // 3.0 OK - "Look Ahead"
define v_look_ahead_enable L_ALT+'r' // 3.8 OK
// RADAR functions but these are under spaceship_targeting
define scan_toggle_mode TAB // 3.8
define scan_active_ping R_CTL+'o' // 3.0 --; Solarfly
// ======================== Power Management ===============================================
define v_power_focus_group_1 F7 // 3.8 OK - Divert power to Weapons
define v_power_focus_group_2 F6 // 3.8 OK - Divert power to Shields
define v_power_focus_group_3 F5 // 3.8 OK - Divert power to Engines
define v_power_reset_focus F8 // 3.8 OK - Normalize Power
define v_power_toggle_group_1 'p' // 3.8 OK - Toggle power to Weapons 4
define v_power_toggle_group_2 'o' // 3.8 OK - Toggle Power to shields 5
define v_power_toggle_group_3 'i' // 3.8 OK - Toggle power to engines 6
define v_power_throttle_up '7' // 3.0 L_ALT+Num5 - increase power XXX I think I remapped here
define v_power_throttle_down '8' // 3.0 L_ALT+Num4 - decrease power XXX
define v_power_toggle 'u' // 3.8
// Shield Management
define v_shield_forward DX15 // 3.8 NUM8
define v_shield_right DX16 // 3.8 NUM6
define v_shield_back DX17 // 3.8 NUM2
define v_shield_left DX18 // 3.8 NUM4
define v_shield_up R_ALT+DX15 // 3.8 NUM7
define v_shield_down R_ALT+DX17 // 3.8 NUM9
define v_shield_reset DX19 // 3.8 Num5
// ===================== Weapon Management ===================================================
define v_weapon_launch_countermeasure DX3 // 3.8 G OK; Solarfly
define v_weapon_cycle_countermeasure_fwd 'h' // 3.8 OK
define v_weapon_cycle_aimmode R_ALT+'r' // 3.8 R; Solarfly
// Radar Management
//define v_radar_cycle_focus_fwd 'j' // 3.0 Obsolete
define v_radar_cycle_zoom_fwd L_ALT+',' // 3.0 comma, Solarfly L_ALT+,
define v_radar_toggle_active_or_passive R_CTL+',' // 3.0 period, R_CTRL+,
// Mobiglass/Innerthought interaction
define pc_interaction_mode DX6 // 3.8 'f'
define pc_interaction_focus DX22
//define pc_select DX5 // Same as weapon group 2
// pc_zoom_in and pc_zoom_out same as other zooms
define mobiglass_scoreboard F1 // 3.8 F1 & TAB; Solarfly combine
define v_starmap F2 // 3.0 StarMap
//define toggle_scoreboard F1 // combined with mobiglass
define toggle_contact F11 // 3.8 OK
define toggle_chat F12 // 3.8 IJ
define v_toggle_mining_mode 'm' // 3.8 OK

73
solarfly_mfd.tmh

@ -0,0 +1,73 @@
// Copyright (c) 2015-2020 Derek Douville ("solarfly")
//
// Version 3.8.2_v1
// Apr 10, 2020 7:50AM CST
//
// You are free to modify or redistrubute so long as my Copyright stays intact.
int init_mfd_left() {
// HUD Management
// MapKey(&LMFD, GAINU, EXEC("sc_force_toggle_headmode();"));
// MapKey(&LMFD, GAIND, EXEC("sc_force_toggle_hudent();"));
MapKey(&LMFD, OSB01, 0);
MapKey(&LMFD, OSB02, 0);
MapKey(&LMFD, OSB03, 0);
MapKey(&LMFD, OSB04, 0);
// Look Modes and Self Destruct
MapKey(&LMFD, SYMU, TEMPO(PULSE+mobiglass_scoreboard, PULSE+toggle_contact, 300));
// 2.4 removed:
//MapKey(&LMFD, SYMD, PULSE+toggle_ar_mode);
MapKey(&LMFD, OSB06, PULSE+toggle_chat);
MapKey(&LMFD, OSB07, 0); // Reserved for Starmap in the future
MapKey(&LMFD, OSB08, TEMPO(0, v_self_destruct, EJECT_DELAY)); // Hold to self destruct
MapKey(&LMFD, OSB09, PULSE+v_toggle_weapon_gimbal_lock); // Gimbals
MapKey(&LMFD, OSB10, PULSE+v_couple_aim_to_move); // Look-ahead mode
// Navigation Modes
MapKey(&LMFD, CONU, 0); // Reserved for HUD Contrast in the future
MapKey(&LMFD, COND, 0); // Reserved future
MapKey(&LMFD, OSB11, PULSE+v_lights);
// MapKey(&LMFD, OSB12, PULSE+v_ifcs_mode_shift); // Obsolete in 2.6
MapKey(&LMFD, OSB13, TEMPO(PULSE+v_toggle_qdrive_system, PULSE+v_toggle_qdrive_engagement, 300));
MapKey(&LMFD, OSB14, PULSE+v_autoland); // S: request, L: Auto/manual
MapKey(&LMFD, OSB15, PULSE+v_toggle_landing_system);
// Power
MapKey(&LMFD, BRTU, v_power_throttle_up);
MapKey(&LMFD, BRTD, v_power_throttle_down);
MapKey(&LMFD, OSB16, TEMPO(0, PULSE+v_power_toggle_group_3, 300)); // Engine Power
MapKey(&LMFD, OSB17, TEMPO(0, PULSE+v_power_toggle_group_2, 300)); // Shield Power
MapKey(&LMFD, OSB18, TEMPO(0, PULSE+v_power_toggle_group_1, 300)); // Weapon Power
MapKey(&LMFD, OSB19, PULSE+v_ifcs_toggle_safeties);
MapKey(&LMFD, OSB20, PULSE+v_ifcs_toggle_esp);
}
int init_mfd_right() {
MapKey(&RMFD, GAINU, PULSE+v_radar_cycle_zoom_fwd);
MapKey(&RMFD, GAIND, 0);
MapKey(&RMFD, OSB01, 0);
MapKey(&RMFD, OSB02, 0);
MapKey(&RMFD, OSB03, 0);
MapKey(&RMFD, OSB04, 0);
MapKey(&RMFD, OSB05, 0);
MapKey(&RMFD, OSB06, 0);
MapKey(&RMFD, OSB07, 0);
MapKey(&RMFD, OSB08, 0);
MapKey(&RMFD, OSB09, 0);
MapKey(&RMFD, OSB10, 0);
MapKey(&RMFD, OSB11, 0);
MapKey(&RMFD, OSB12, 0);
MapKey(&RMFD, OSB13, 0);
MapKey(&RMFD, OSB14, 0);
MapKey(&RMFD, OSB15, 0);
MapKey(&RMFD, OSB16, 0);
MapKey(&RMFD, OSB17, 0);
MapKey(&RMFD, OSB18, 0);
MapKey(&RMFD, OSB19, 0);
MapKey(&RMFD, OSB20, 0);
MapKey(&RMFD, BRTU, 0);
MapKey(&RMFD, BRTD, 0);
MapKey(&RMFD, CONU, 0);
MapKey(&RMFD, COND, 0);
}
Loading…
Cancel
Save