GAMECONTROLS Class Reference

#include <controls.h>

List of all members.

Public Member Functions

 GAMECONTROLS ()
 ~GAMECONTROLS ()
void LoadControls ()
void LoadControls (string fname)
void ControlIteratorReset ()
CONTROLControlIteratorGetControl ()
void ControlIteratorIncrement ()
int GetNumControls ()
string GetJoystickType ()
void SetJoystickType (string newtype)
void SetControls (CONTROL *newcontrols, int newnum)
void WriteControlFile ()
void WriteControlFile (string fname)
string GetCompensation ()
void SetCompensation (string newcomp)
string GetDeadzone ()
void SetDeadzone (string newdeadzone)
void DeleteControlsWithAction (string actionstr)
void AddControl (CONTROL &other)
void LoadCalibration ()
void WriteCalibration ()
float GetCalibration (int joynum, int joyaxis, bool max)
void MinimizeCalibration ()
void SetCalibrationPoint (int joynum, int joyaxis, float val)
SDL_Joystick * GetJoy (int joynum)
SDL_Joystick ** Get_js ()
void InitJoy ()
void DeinitJoy ()
void UpdateSettings ()

Private Member Functions

void ControlParseError (int line, ifstream &ffrom)

Private Attributes

list< CONTROLcontrols
ofstream error_log
string joysticktype
string compensation
string deadzone
float calibration [MAX_JOYSTICKS][MAX_AXES][2]
SDL_Joystick * js [MAX_JOYSTICKS]
list< CONTROL >::iterator control_iterator


Detailed Description

Definition at line 125 of file controls.h.


Constructor & Destructor Documentation

GAMECONTROLS::GAMECONTROLS  ) 
 

Definition at line 247 of file controls.cc.

References calibration, controls, joysticktype, MAX_AXES, and MAX_JOYSTICKS.

GAMECONTROLS::~GAMECONTROLS  ) 
 

Definition at line 267 of file controls.cc.

References controls, error_log, and verbose_output.


Member Function Documentation

void GAMECONTROLS::AddControl CONTROL other  ) 
 

Definition at line 579 of file controls.cc.

References controls.

Referenced by VGUI::ControlGrab::Save().

CONTROL* GAMECONTROLS::ControlIteratorGetControl  )  [inline]
 

Definition at line 148 of file controls.h.

References control_iterator, controls, and NULL.

Referenced by VGUI::ControlGrab::BuildControlVectors(), and WriteControlFile().

void GAMECONTROLS::ControlIteratorIncrement  )  [inline]
 

Definition at line 149 of file controls.h.

References control_iterator.

Referenced by VGUI::ControlGrab::BuildControlVectors(), and WriteControlFile().

void GAMECONTROLS::ControlIteratorReset  )  [inline]
 

Definition at line 147 of file controls.h.

References control_iterator, and controls.

Referenced by VGUI::ControlGrab::BuildControlVectors(), and WriteControlFile().

void GAMECONTROLS::ControlParseError int  line,
ifstream &  ffrom
[private]
 

Definition at line 228 of file controls.cc.

References error_log, UTILITY::sGetLine(), and utility.

Referenced by LoadControls().

void GAMECONTROLS::DeinitJoy  ) 
 

Definition at line 496 of file controls.cc.

References js.

void GAMECONTROLS::DeleteControlsWithAction string  actionstr  ) 
 

Definition at line 550 of file controls.cc.

References controls.

Referenced by VGUI::ControlGrab::Save().

SDL_Joystick** GAMECONTROLS::Get_js  )  [inline]
 

Definition at line 171 of file controls.h.

References js.

Referenced by Update().

float GAMECONTROLS::GetCalibration int  joynum,
int  joyaxis,
bool  max
 

Definition at line 467 of file controls.cc.

References calibration, MAX_AXES, and MAX_JOYSTICKS.

string GAMECONTROLS::GetCompensation  )  [inline]
 

Definition at line 156 of file controls.h.

References compensation.

Referenced by VAMOSWORLD::steer_to().

string GAMECONTROLS::GetDeadzone  )  [inline]
 

Definition at line 158 of file controls.h.

References deadzone.

SDL_Joystick* GAMECONTROLS::GetJoy int  joynum  )  [inline]
 

Definition at line 170 of file controls.h.

References js.

string GAMECONTROLS::GetJoystickType  )  [inline]
 

Definition at line 151 of file controls.h.

References joysticktype.

Referenced by VAMOSWORLD::steer_to().

int GAMECONTROLS::GetNumControls  ) 
 

Definition at line 282 of file controls.cc.

References controls.

void GAMECONTROLS::InitJoy  ) 
 

Definition at line 487 of file controls.cc.

References js.

void GAMECONTROLS::LoadCalibration  ) 
 

Definition at line 422 of file controls.cc.

References calibration, UTILITY::fGetParam(), SETTINGS::GetSettingsDir(), MAX_AXES, MAX_JOYSTICKS, settings, and utility.

Referenced by LoadControls().

void GAMECONTROLS::LoadControls string  fname  ) 
 

Definition at line 80 of file controls.cc.

References Axis, UTILITY::bGetParam(), Both, Button, compensation, ControlParseError(), controls, deadzone, error_log, CONTROL::GetJoyType(), SETTINGS::GetSettingsDir(), CONTROL::GetType(), UTILITY::iGetParam(), Joy, joysticktype, LoadCalibration(), Negative, Positive, CONTROL::SetJoyButton(), CONTROL::SetJoyNum(), CONTROL::SetJoyPushDown(), CONTROL::SetJoyType(), CONTROL::SetName(), CONTROL::SetOneTime(), settings, CONTROL::SetType(), UTILITY::sGetLine(), UTILITY::sGetParam(), UpdateSettings(), and utility.

void GAMECONTROLS::LoadControls  )  [inline]
 

Definition at line 144 of file controls.h.

References SETTINGS::GetSettingsDir(), and settings.

Referenced by ChangeDisplay(), and InitGameData().

void GAMECONTROLS::MinimizeCalibration  ) 
 

Definition at line 503 of file controls.cc.

References calibration, MAX_AXES, and MAX_JOYSTICKS.

Referenced by VGUI::Calibrate::Save().

void GAMECONTROLS::SetCalibrationPoint int  joynum,
int  joyaxis,
float  val
 

Definition at line 517 of file controls.cc.

References calibration.

Referenced by VGUI::Calibrate::Save().

void GAMECONTROLS::SetCompensation string  newcomp  )  [inline]
 

Definition at line 157 of file controls.h.

References compensation.

void GAMECONTROLS::SetControls CONTROL newcontrols,
int  newnum
 

Definition at line 288 of file controls.cc.

References controls.

void GAMECONTROLS::SetDeadzone string  newdeadzone  )  [inline]
 

Definition at line 159 of file controls.h.

References deadzone.

void GAMECONTROLS::SetJoystickType string  newtype  )  [inline]
 

Definition at line 152 of file controls.h.

References joysticktype.

void GAMECONTROLS::UpdateSettings  ) 
 

Definition at line 525 of file controls.cc.

References compensation, deadzone, SETTINGS::Get(), joysticktype, and settings.

Referenced by LoadControls(), and VGUI::Gui::ProcessAction().

void GAMECONTROLS::WriteCalibration  ) 
 

Definition at line 447 of file controls.cc.

References calibration, SETTINGS::GetSettingsDir(), MAX_AXES, MAX_JOYSTICKS, and settings.

void GAMECONTROLS::WriteControlFile string  fname  ) 
 

Definition at line 304 of file controls.cc.

References Axis, Both, compensation, ControlIteratorGetControl(), ControlIteratorIncrement(), ControlIteratorReset(), deadzone, error_log, Joy, joysticktype, Negative, NULL, Positive, SETTINGS::Set(), and settings.

void GAMECONTROLS::WriteControlFile  ) 
 

Definition at line 299 of file controls.cc.

References SETTINGS::GetSettingsDir(), and settings.

Referenced by Quit().


Member Data Documentation

float GAMECONTROLS::calibration[MAX_JOYSTICKS][MAX_AXES][2] [private]
 

Definition at line 136 of file controls.h.

Referenced by GAMECONTROLS(), GetCalibration(), LoadCalibration(), MinimizeCalibration(), SetCalibrationPoint(), and WriteCalibration().

string GAMECONTROLS::compensation [private]
 

Definition at line 134 of file controls.h.

Referenced by GetCompensation(), LoadControls(), SetCompensation(), UpdateSettings(), and WriteControlFile().

list<CONTROL>::iterator GAMECONTROLS::control_iterator [private]
 

Definition at line 139 of file controls.h.

Referenced by ControlIteratorGetControl(), ControlIteratorIncrement(), and ControlIteratorReset().

list<CONTROL> GAMECONTROLS::controls [private]
 

Definition at line 129 of file controls.h.

Referenced by AddControl(), ControlIteratorGetControl(), ControlIteratorReset(), DeleteControlsWithAction(), GAMECONTROLS(), GetNumControls(), LoadControls(), SetControls(), and ~GAMECONTROLS().

string GAMECONTROLS::deadzone [private]
 

Definition at line 135 of file controls.h.

Referenced by GetDeadzone(), LoadControls(), SetDeadzone(), UpdateSettings(), and WriteControlFile().

ofstream GAMECONTROLS::error_log [private]
 

Definition at line 132 of file controls.h.

Referenced by ControlParseError(), LoadControls(), WriteControlFile(), and ~GAMECONTROLS().

string GAMECONTROLS::joysticktype [private]
 

Definition at line 133 of file controls.h.

Referenced by GAMECONTROLS(), GetJoystickType(), LoadControls(), SetJoystickType(), UpdateSettings(), and WriteControlFile().

SDL_Joystick* GAMECONTROLS::js[MAX_JOYSTICKS] [private]
 

Definition at line 137 of file controls.h.

Referenced by DeinitJoy(), Get_js(), GetJoy(), and InitJoy().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:11:50 2006 by  doxygen 1.4.6