include "target.tmh"
// include "CaptSolbeamer_v1.0.ttm"...define stuff that does not exist :)
//this code gives you thrust/brake on the LEFT stick, and stearing on the RIGHT
alias T16001; // second T16000 handle, which will be used all mapping commands
alias T16A; // for handy switching purposes only
alias T16B; // same here
define switchthem 1 // make 0/1 if left=right
int main()
{
Configure(&HCougar, MODE_EXCLUDED);
Configure(&Joystick, MODE_EXCLUDED);
Configure(&Throttle, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
&T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A")); //pc expects a joystick on this adress
if (switchthem)
{
&T16A = &T16000;
&T16B = &T16001;
&T16000 = &T16B;
&T16001 = &T16A;
}
// this was about making the left one right and vice...
///////////////////////
//The Axis:
//Left stick axis
//thrust/backw, rolling and up/down (deadzones at 14%)
KeyAxis (&T16000, JOYY, 0, AXMAP2 (LIST (0, 43, 57, 100), 'w', 0, 's')); // forward/backward
KeyAxis (&T16000, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'q', 0, 'e')); //Strafe left/right
KeyAxis (&T16000, RUDDER, 0, AXMAP2 (LIST (0, 43, 57, 100), 'f', 0, 'r')); // Strafe Down/Up
//Right stick axis
//yaw and pitch and :
MapAxis (&T16001, JOYY, DX_Y_AXIS); //pitch
KeyAxis (&T16001, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'a', 0, 'd')); // roll
MapAxis (&T16001, RUDDER, DX_X_AXIS); //yaw
SetSCurve (&T16001, JOYY, 0, 6, 0, 4, 0); // deadzone first number,
SetSCurve (&T16001, RUDDER, 0, 12, 0, 4, 0); // 2nd = sensitivy (range -20/20)
////////////////
// left stick..
MapKey (&T16000, TS1, MOUSE_LEFT); // fire w1
MapKey (&T16000, TS2, USB[0x2C]) ; // Spacebar = brake
MapKey (&T16000, TS3, TEMPO ( CHAIN (USB[0xE6], 'm'), CHAIN (USB[0x2B], USB[0xE0]) , 850 ) ); // RALT(=R_MENU)+M/ TAB+LCTRL =Look ahead, or after 0,8 pushdown sec Head Look
MapKey (&T16000, TS4, USB [0xE2] ); // Gimball locked (L_ALT=L_MENU)
MapKey (&T16000, H1U, TEMPO ('u', 'g', 850 ) ) ; // PIN, CYCLE PINNED
//MapKey (&T16000, H1D, // Second Reticle Speed...soon implemented by CIG I hope
MapKey (&T16000, H1L, L_CTL+CAPS); //'CTRL+CAPS' = g-safe
MapKey (&T16000, H1R, USB[0x39]); //'CAPS' = decouple
//The buttons left stick:
// 11,12,13 7,6,5
// []
// 16,15,14 8,9,10
MapKey (&T16000, B11, '1'); // power to group 1
MapKey (&T16000, B12, '2'); // Power to group 2
MapKey (&T16000, B13, '3'); // power to group 3
MapKey (&T16000, B16, '0'); // equalize powergrid
MapKey (&T16000, B15, USB[0x5D]); // equalize shield powergrid (nump 5)
MapKey (&T16000, B14, '.'); // Camera Looks behind me
MapKey (&T16000, B7, USB[0x4A]); // focus HUD
MapKey (&T16000, B6, USB[0x52]); // arrow UP
MapKey (&T16000, B5, USB[0x28]); // Interact with HUD (ENTER)
MapKey (&T16000, B8, USB[0x50]); // arrow LEFT
MapKey (&T16000, B9, USB[0x51]); // arrow DOWN
MapKey (&T16000, B10, USB[0x4F]); // arrow RIGHT
//////////////////////////
//////////////////////////
//Right stick
//rightstick POV:
//U,D,L,R, bind ingame for ship follows reticle
MapKey (&T16001, H1U, '8'); // Aim up
MapKey (&T16001, H1D, '9'); // Aim down
MapKey (&T16001, H1L, '6'); // Aim left
MapKey (&T16001, H1R, '7'); // Aim right
MapKey (&T16001, TS1, MOUSE_RIGHT ); // Fire w2
MapKey (&T16001, TS2, TEMPO (MOUSE_CENTER, 'z' , 850) ); //Mousewheel (missile) / FLARE
MapKey (&T16001, TS3, DX3); // weapon 3 = mouse4 button
MapKey (&T16001, TS4, 'x' ); // Cycle cm. (and missile cycle in future by tempo)
/// 5,6,7 13,12,11
/// []
///10,9,8 14,15,16
//shield stuff
MapKey (&T16001, B5, USB[0x5F]); // nump7
MapKey (&T16001, B6, USB[0x60]); // nump8
MapKey (&T16001, B7, USB[0x61]); // nump9
MapKey (&T16001, B10, USB[0x5C]); // nump4
MapKey (&T16001, B9, USB[0x5A]); // nump2
MapKey (&T16001, B8, USB[0x5E]); // nump6
MapKey (&T16001, B13, ','); // zoom radar
MapKey (&T16001, B12, 'o'); // toggle lights or ninja/mode
MapKey (&T16001, B11, 't'); // Cycle (find) all enemies
MapKey (&T16001, B14, 'k'); // cycle radar backw
MapKey (&T16001, B15, 'j'); // cycle radar forward
MapKey (&T16001, B16, R_ALT +'l'); // Ejectos (USB[0xE6]) (R_ALT=R_MENU)
//doubletap bind ingame or with combining it with [ENTER] (B5 left sstick)
//to go to camera view. B5, B7, B10 and B8 = top, bottom, left and right camera then
}
//event handler
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
//add event handling code here
}