-
Notifications
You must be signed in to change notification settings - Fork 0
/
FS19-Zeplin-FDR-Movement-v0.1.1.tmc
77 lines (64 loc) · 3.33 KB
/
FS19-Zeplin-FDR-Movement-v0.1.1.tmc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//---------------------------------------------------------------------------
//
// FS19 Zeplin FDR Movement Script version 0.1
//
// Script branch on GitHub: https://github.com/zeplintwo/FS19-TARGET-Profiles/tree/Zeplin-SCRIPT
//
// Master Branch on GetHub: https://github.com/zeplintwo/FS19-TARGET-Profiles/tree/master
//
// The inspration for the control profile comes from FDR Loging found here: https://www.fdrlogging.com/
// Scripts and codes are inspired from ED and other sources Aussiedroid has heavly influnced me.
//
// This is a early attempt to build a dynamic keymap for FS19 based on the T16000.m Dual sticks.
// Most of the code checks out and works in exteral testing and the short game play that I have tested it.
//
// Please report any bugs, features or suggestion to above script branch.
//
// This is a WIP there will be issues.
//
// Use FS19-Zeplin-Setting-v#.#.ttm to adjust user preferances.
//
// Script is built on the basis of a default FS19 keybind.
// Use FS19-Keymaps-v#.#.ttm to adjust any non-standard keybinds for script to function properly.
//
//---------------------------------------------------------------------------
include "target_zeplin_dx128-v0.1.tmh" //modded target.tmh file so that it looks diffrent from stock
include "FS19-Zeplin-Keymaps-v0.1.1.ttm" //Defined keymap based on FDR and FS19 default maps can be change here for non-standard keybind layouts. Default profile is best. Also allows expanded 120 DX functions and 8 DXHAT functions.
include "FS19-Zeplin-Settings-v0.1.1.ttm" //User settings that can be changed to adjust behavior of programed actions.
include "FS19-Zeplin-Macros-v0.1.1.ttm" //Storage of higher function macros
//program startup
int main()
{
//following lines turn off other thrustmaster stick except for t.16000
Configure(&HCougar, MODE_EXCLUDED);
//Configure(&Joystick, MODE_EXCLUDED);
Configure(&JoystickF18, MODE_EXCLUDED);
Configure(&Throttle, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
Configure(&TFRPRudder, MODE_EXCLUDED);
Configure(&TWCSThrottle, MODE_EXCLUDED);
Configure(&TFRPHARudder, MODE_EXCLUDED);
//end of exclustions
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
SetKBRate(32, 50);
SetKBLayout(KB_ENG);
StartScriptOut();
//Motion control initilazation see FS19-Zeplin-Macros-v#.#.ttm
if (ControlStyle == 0) ForestyControlButtons();
if (ControlStyle == 1) TractorControlButtons();
if (WarthogStick == 1) MapKey(&Joystick, S1, EXEC("ControlCount();")); //Toggle for ingame Foresty/Tractor binds
else MapKey(&T16000,B11,EXEC("ControlCount();")); //Toggle for ingame Foresty/Tractor binds
MotionControlAssign(); //Call to set FDR or One Stick
JoyAxisSet(); //Call to set Joystick Axis
MapKey(&T16000L, B11, EXEC("JoyAxisCurveCount();"));//Toggle for ingame Joystick curve switching
JoyAxisCurveSet(); //Call to set Joystick Curves
JoyThrottleCurveSet(); //Call to set Throttle Curves
//MapKey(&T16000, B16, EXEC("MorseF();"));//CHAIN(KEYON+Lights,D(MorseDashDelay),PULSE+Lights,D(MorseDelay),KEYON+Lights,D(MorseDotDelay),PULSE+Lights,D(MorseDelay),KEYON+Lights,D(MorseDashDelay),PULSE+Lights));
}
//event handler
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
//add event handling code here
}