Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <flyjoystick.h>
Public Member Functions | |
FlyByJoystick (unsigned int whichplayer) | |
void | Execute () |
The function that gets called and executes all queued suborders. More... | |
virtual | ~FlyByJoystick () |
![]() | |
FlyByKeyboard (unsigned int whichplayer) | |
virtual void | Destroy () |
The virutal function that unrefs all memory then calls Destruct () which takes care of unreffing this or calling delete on this. More... | |
virtual | ~FlyByKeyboard () |
void | Execute (bool) |
void | Execute () |
The function that gets called and executes all queued suborders. More... | |
![]() | |
FlyByWire () | |
~FlyByWire () | |
void | SwitchFlightMode () |
void | ThrustRight (float percent) |
Turns on or off velocity resolution. More... | |
void | ThrustUp (float percent) |
void | ThrustFront (float percent) |
void | DirectThrustRight (float percent) |
void | DirectThrustUp (float percent) |
void | DirectThrustFront (float percent) |
void | SheltonSlide (bool onoff) |
void | InertialFlight (bool onoff) |
bool | InertialFlight () const |
bool | InertialFlightEnable () const |
void | Stop (float percentage) |
Stops... sets desired velocity to 0. More... | |
void | Right (float percentage) |
pass in the percentage of the turn they were turnin right. -age indicates left More... | |
void | Up (float percentage) |
pass in the percentage of the turn they were turning up More... | |
void | RollRight (float percentage) |
void | Afterburn (float percentage) |
Specifies match speed to use afterbuner and gives in higher velocity. More... | |
void | MatchSpeed (const Vector &velocity) |
matches set_speed to this velocity's magnitude More... | |
void | Accel (float percentage) |
negative is decel... 0 = nothing More... | |
virtual std::string | getOrderDescription () |
![]() | |
MatchVelocity (const Vector &desired, const Vector &desired_ang, const bool Local, const bool afterburner, const bool fini=true) | |
void | SetDesiredVelocity (const Vector &desired, const bool Local) |
void | SetAfterburn (bool use_afterburn) |
virtual | ~MatchVelocity () |
![]() | |
MatchAngularVelocity (const Vector &desired, bool Local, bool fini=true) | |
void | SetDesiredAngularVelocity (const Vector &desired, bool Local) |
virtual | ~MatchAngularVelocity () |
![]() | |
virtual void | ChooseTarget () |
this function calls the destructor (needs to be overridden for python; More... | |
virtual bool | PursueTarget (Unit *, bool isleader) |
void | ClearMessages () |
clears the messasges of this order More... | |
Order () | |
The default constructor setting everything to NULL and no dependency on order. More... | |
Order (int type, int subtype) | |
The constructor that specifies what order dependencies this order has. More... | |
Order * | queryType (unsigned int type) |
returns a pointer to the first order that may be bitwised ored with that type More... | |
Order * | queryAny (unsigned int type) |
returns a pointer to the first order that may be bitwise ored with any type More... | |
void | eraseType (unsigned int type) |
Erases all orders that bitwise OR with that type. More... | |
bool | AttachOrder (Unit *targets) |
Attaches a group of targets to this order (used for strategery-type games) More... | |
bool | AttachOrder (QVector target) |
Attaches a navigation point to this order. More... | |
bool | AttachSelfOrder (Unit *targets) |
Attaches a group (form up) to this order. More... | |
Order * | EnqueueOrder (Order *ord) |
Enqueues another order that will be executed (in parallel perhaps) when next void Execute() is called. More... | |
Order * | ReplaceOrder (Order *ord) |
Replaces the first order of that type in the order queue. More... | |
bool | Done () |
int | getType () |
int | getSubType () |
virtual void | SetParent (Unit *parent1) |
Sets the parent of this Unit. Any virtual functions must call this one. More... | |
Unit * | GetParent () const |
virtual void | Communicate (const class CommunicationMessage &c) |
Sends a communication message from the Unit (encapulated in c) to this unit. More... | |
virtual void | ProcessCommMessage (class CommunicationMessage &c) |
processes a single message...generally called by the Messages() func More... | |
virtual void | ProcessCommunicationMessages (float CommRepsonseTime, bool RemoveMessageProcessed) |
responds (or does not) to certain messages in the message queue More... | |
Order * | findOrder (Order *ord) |
return pointer to order or NULL if not found More... | |
void | eraseOrder (Order *ord) |
erase that order from the list More... | |
Order * | EnqueueOrderFirst (Order *ord) |
enqueue order as first order More... | |
virtual olist_t * | getOrderList () |
returns the orderlist (NULL for orders that haven't got any) More... | |
virtual void | AdjustRelationTo (Unit *un, float factor) |
Order * | findOrderList () |
searches the suborders recursively for the first order that has an orderlist More... | |
std::string | createFullOrderDescription (int level=0) |
void | setActionString (std::string astring) |
std::string | getActionString () |
virtual float | getMood () |
Static Public Member Functions | |
static void | JAccelKey (KBSTATE, float, float, int) |
static void | JDecelKey (KBSTATE, float, float, int) |
static void | JShelt (KBSTATE, float, float, int) |
static void | JAB (KBSTATE, float, float, int) |
![]() | |
static void | SwitchWebcam (const KBData &, KBSTATE) |
static void | SwitchSecured (const KBData &, KBSTATE) |
static void | ChangeCommStatus (const KBData &, KBSTATE) |
static void | DownFreq (const KBData &, KBSTATE) |
static void | UpFreq (const KBData &, KBSTATE) |
static void | KSwitchFlightMode (const KBData &, KBSTATE) |
static void | KThrustRight (const KBData &, KBSTATE) |
static void | KThrustLeft (const KBData &, KBSTATE) |
static void | KThrustUp (const KBData &, KBSTATE) |
static void | KThrustDown (const KBData &, KBSTATE) |
static void | KThrustFront (const KBData &, KBSTATE) |
static void | KThrustBack (const KBData &, KBSTATE) |
static void | SheltonKey (const KBData &, KBSTATE) |
static void | InertialToggleKey (const KBData &, KBSTATE) |
static void | InertialPulsorKey (const KBData &, KBSTATE) |
static void | JoyInertialXYPulsorKey (const KBData &, KBSTATE) |
static void | JoyInertialXZPulsorKey (const KBData &, KBSTATE) |
static void | JoyInertialXYToggleKey (const KBData &, KBSTATE) |
static void | JoyInertialXZToggleKey (const KBData &, KBSTATE) |
static void | JoyRollPulsorKey (const KBData &, KBSTATE) |
static void | JoyRollToggleKey (const KBData &, KBSTATE) |
static void | JoyBankPulsorKey (const KBData &, KBSTATE) |
static void | JoyBankToggleKey (const KBData &, KBSTATE) |
static void | StartKey (const KBData &, KBSTATE) |
static void | StopKey (const KBData &, KBSTATE) |
static void | UpKey (const KBData &, KBSTATE) |
static void | DownKey (const KBData &, KBSTATE) |
static void | LeftKey (const KBData &, KBSTATE) |
static void | RightKey (const KBData &, KBSTATE) |
static void | ABKey (const KBData &, KBSTATE) |
static void | AccelKey (const KBData &, KBSTATE) |
static void | DecelKey (const KBData &, KBSTATE) |
static void | RollLeftKey (const KBData &, KBSTATE) |
static void | RollRightKey (const KBData &, KBSTATE) |
static void | MatchSpeedKey (const KBData &, KBSTATE) |
static void | JumpKey (const KBData &, KBSTATE) |
static void | AutoKey (const KBData &, KBSTATE) |
static void | SwitchCombatModeKey (const KBData &, KBSTATE) |
static void | EngageSpecAuto (const KBData &, KBSTATE) |
static void | StopAutoKey (const KBData &, KBSTATE) |
static void | SetVelocityRefKey (const KBData &, KBSTATE) |
static void | SetNullVelocityRefKey (const KBData &, KBSTATE) |
Additional Inherited Members | |
![]() | |
enum | ORDERTYPES { MOVEMENT =1, FACING =2, WEAPON =4, CLOAKING =8, ALLTYPES =(1|2|4|8) } |
The varieties of order types MOVEMENT,FACING, and WEAPON orders may not be mutually executed (lest one engine goes left, the other right) More... | |
enum | SUBORDERTYPES { SLOCATION =1, STARGET =2, SSELF =4 } |
![]() | |
int | whichplayer |
bool | inauto |
![]() | |
enum | joy_mode_enum { joyModeNormal =0, joyModeInertialXY =1, joyModeInertialXZ =2, joyModeRoll =4, joyModeBank =8 } |
![]() | |
void | KeyboardUp (float val) |
void | KeyboardRight (float val) |
void | KeyboardRollRight (float val) |
float | clamp_axis (float v) |
float | reduce_axis (float v) |
![]() | |
char | joy_mode |
Definition at line 3 of file flyjoystick.h.
FlyByJoystick::FlyByJoystick | ( | unsigned int | whichplayer) |
Definition at line 10 of file flyjoystick.cpp.
References FireKeyboard::FireKey(), i, joystick, MAX_JOYSTICKS, and FireKeyboard::MissileKey().
|
virtual |
Definition at line 194 of file flyjoystick.cpp.
|
virtual |
The function that gets called and executes all queued suborders.
Reimplemented from FlyByWire.
Definition at line 56 of file flyjoystick.cpp.
References JoyStick::axis_axis, JoyStick::axis_inverse, VegaConfig::axis_joy, AXIS_THROTTLE, AXIS_X, AXIS_Y, AXIS_Z, Unit::Computer::combat_mode, Orders::MatchAngularVelocity::desired_ang_velocity, Orders::MatchVelocity::desired_velocity, FlyByWire::DirectThrustFront(), FlyByWire::DirectThrustRight(), FlyByWire::DirectThrustUp(), FlyByKeyboard::Execute(), UniverseUtil::exp(), float, Unit::GetComputerData(), VegaConfig::getVariable(), i, JoyStick::joy_axis, FlyByKeyboard::joy_mode, FlyByKeyboard::joyModeBank, FlyByKeyboard::joyModeInertialXY, FlyByKeyboard::joyModeInertialXZ, FlyByKeyboard::joyModeNormal, FlyByKeyboard::joyModeRoll, joystick, MAX_JOYSTICKS, Unit::Computer::max_speed(), Order::parent, XMLSupport::parse_bool(), XMLSupport::parse_float(), FlyByWire::Right(), FlyByWire::RollRight(), Unit::Computer::set_speed, FlyByWire::Up(), Vector, and vs_config.