VAMOSWORLD Class Reference

#include <vamosworld.h>

Collaboration diagram for VAMOSWORLD:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 VAMOSWORLD ()
 ~VAMOSWORLD ()
void Init (TRACK *track)
void Update (float timefactor, float fps, SDL_Joystick **js)
void UpdateSettings ()
void reset ()
void LoadHUD ()
void UnloadHUD ()
void DeInit ()
void Draw ()
void DrawShadows ()
void DrawCars ()
void DrawTopLevel ()
void SetCameraMode (CameraMode newmode)
Vamos_Body::CarGetPlayerCar ()
Vamos_World::Car_InformationGetCar (CONTROLLERTYPE p)
void add_car (Vamos_Body::Car *car)
void clear_cars ()
void FuelPlayerCar ()

Private Member Functions

void PhysUpdate (float dt)
void draw_cars (bool draw_interior, bool draw_focused_car)
void DrawHUD ()
void draw_shadows ()
void DisplayJoyInfo ()
void build_track_shot ()
void ProcessControls (SDL_Joystick **js, float timefactor, float fps)
void steer_to (float val, float timefactor, float fps)
void steer_set (float val, bool left)
void steer_commit ()
void DoOp (Vamos_World::Car_Information *c, string dofunction, float dovalue, float dotime, bool held, float timefactor, float fps)
void ShadowTexCoord (VERTEX &carpos, QUATERNION &carorientation, VERTEX &shadowdim, VERTEX &vert, float roadheight)

Private Attributes

Vamos_World::Worldworld
float steerpos
CameraMode cammode
bool joyinfo
bool propsteer
int oldseg
bool initdone
float shift_time
ofstream error_log
TEXTURE_HANDLE tachbase
TEXTURE_HANDLE tachredband
TEXTURE_HANDLE tachband
TEXTURE_HANDLE speedo
TEXTURE_HANDLE needle
TEXTURE_HANDLE fuelgauge
TEXTURE_HANDLE fgbox
TEXTURE_HANDLE m_ballh
TEXTURE_HANDLE m_sliderh
TEXTURE_HANDLE m_ballv
TEXTURE_HANDLE m_sliderv
TEXTURE_HANDLE sphere_reflection
TEXTURE_HANDLE car_shadow
double l_timefactor
double l_fps
SDL_Joystick * joyinfo_js
SDL_Joystick ** joyinfo_jsarray
TRACKtrack_p
float steervals [2]
VERTEX cam_lastpos
VERTEX cam_lastpos2
VERTEX cam_lastvel
VERTEX cam_lastaccel
VERTEX cam_jerk
int tire_source [4]
VERTEX oldtirepos [4]
float lastcamchange
VERTEX oldcampos
bool camneedupdate
bool MPH
bool auto_clutch
bool display_hud
bool input_graph_enabled
bool car_shadows_enabled

Detailed Description

Definition at line 77 of file vamosworld.h.


Constructor & Destructor Documentation

VAMOSWORLD::VAMOSWORLD  ) 
 

Definition at line 33 of file vamosworld.cc.

References error_log.

VAMOSWORLD::~VAMOSWORLD  ) 
 

Definition at line 102 of file vamosworld.cc.

References DeInit(), error_log, and verbose_output.


Member Function Documentation

void VAMOSWORLD::add_car Vamos_Body::Car car  )  [inline]
 

Definition at line 147 of file vamosworld.h.

References Vamos_World::World::add_car(), and world.

Referenced by SelectCar().

void VAMOSWORLD::build_track_shot  )  [private]
 

Definition at line 1696 of file vamosworld.cc.

void VAMOSWORLD::clear_cars  ) 
 

Definition at line 1846 of file vamosworld.cc.

References Vamos_World::World::m_cars, and world.

Referenced by SelectCar().

void VAMOSWORLD::DeInit  ) 
 

Definition at line 39 of file vamosworld.cc.

References TRACK::ClearRoads(), initdone, track_p, UnloadHUD(), and world.

Referenced by UnloadWorld(), and ~VAMOSWORLD().

void VAMOSWORLD::DisplayJoyInfo  )  [private]
 

Definition at line 1663 of file vamosworld.cc.

References joyinfo_jsarray.

Referenced by DrawTopLevel().

void VAMOSWORLD::DoOp Vamos_World::Car_Information c,
string  dofunction,
float  dovalue,
float  dotime,
bool  held,
float  timefactor,
float  fps
[private]
 

Definition at line 1323 of file vamosworld.cc.

References AUTO_CLUTCH_ENGAGE_TIME, Vamos_Body::Car::brake(), Vamos_World::Car_Information::car, Vamos_Body::Car::clutch(), CONT_PLAYERLOCAL, Vamos_Body::Car::disengage_clutch(), Vamos_Body::Car::engage_clutch(), Vamos_Body::Car::gas(), GetCar(), Vamos_Body::Car::handbrake(), Vamos_Body::Car::last_gear(), Vamos_World::World::reset(), Vamos_Body::Car::shift(), Vamos_Body::Car::shift_down(), shift_time, Vamos_Body::Car::shift_up(), Vamos_Body::Car::steer(), Vamos_Body::Car::transmission(), and world.

Referenced by ProcessControls(), and steer_commit().

void VAMOSWORLD::Draw  ) 
 

Definition at line 127 of file vamosworld.cc.

References QUATERNION::GetMat(), LightPosition, QUATERNION::ReturnConjugate(), QUATERNION::Rotate(), QUATERNION::RotateVec(), VERTEX::Set(), VERTEX::x, VERTEX::y, and VERTEX::z.

void VAMOSWORLD::draw_cars bool  draw_interior,
bool  draw_focused_car
[private]
 

Definition at line 163 of file vamosworld.cc.

References Vamos_World::World::m_cars, UTILITY::SelectTU(), sphere_reflection, utility, and world.

Referenced by DrawCars().

void VAMOSWORLD::draw_shadows  )  [private]
 

Definition at line 197 of file vamosworld.cc.

References Vamos_World::Car_Information::car, Vamos_Body::Car::chassis(), CONT_PLAYERLOCAL, GetCar(), Vamos_World::World::m_cars, MP_DBGDEEP, VERTEX::Set(), and world.

Referenced by DrawShadows().

void VAMOSWORLD::DrawCars  ) 
 

Definition at line 1891 of file vamosworld.cc.

References draw_cars(), QUATERNION::GetMat(), LightPosition, QUATERNION::ReturnConjugate(), QUATERNION::Rotate(), QUATERNION::RotateVec(), VERTEX::Set(), VERTEX::x, VERTEX::y, and VERTEX::z.

void VAMOSWORLD::DrawHUD  )  [private]
 

Definition at line 1492 of file vamosworld.cc.

References Vamos_World::Car_Information::car, CONT_PLAYERLOCAL, UTILITY::Draw2D(), fgbox, font, Vamos_Body::Car::fuel_tank(), GetCar(), MULTIPLAY::GetRxRate(), MULTIPLAY::GetTxRate(), Vamos_Geometry::m_s_to_km_h(), MPH, multiplay, needle, MULTIPLAY::NumConnected(), REPLAY::Playing(), FONT::Print(), Vamos_Geometry::rad_s_to_rpm(), REPLAY::Recording(), replay, QUATERNION::Rotate(), QUATERNION::RotateVec(), VERTEX::Set(), speedo, tachband, tachbase, tachredband, Vamos_Body::Car::transmission(), utility, Vamos_Body::Car::wheel(), VERTEX::x, and VERTEX::y.

Referenced by DrawTopLevel().

void VAMOSWORLD::DrawShadows  ) 
 

Definition at line 114 of file vamosworld.cc.

References draw_shadows(), and MP_DBGDEEP.

void VAMOSWORLD::DrawTopLevel  ) 
 

Definition at line 1922 of file vamosworld.cc.

References display_hud, DisplayJoyInfo(), TIMER::Draw(), PARTICLE::Draw(), DrawHUD(), joyinfo, particle, and timer.

void VAMOSWORLD::FuelPlayerCar  ) 
 

Definition at line 1841 of file vamosworld.cc.

References Vamos_World::Car_Information::car, Vamos_Body::Car::fuel_tank(), and GetCar().

Vamos_World::Car_Information * VAMOSWORLD::GetCar CONTROLLERTYPE  p  ) 
 

Definition at line 1874 of file vamosworld.cc.

References Vamos_World::World::m_cars, and world.

Referenced by DoOp(), draw_shadows(), DrawHUD(), FuelPlayerCar(), GetPlayerCar(), ProcessControls(), and steer_commit().

Vamos_Body::Car* VAMOSWORLD::GetPlayerCar  )  [inline]
 

Definition at line 145 of file vamosworld.h.

References Vamos_World::Car_Information::car, CONT_PLAYERLOCAL, and GetCar().

void VAMOSWORLD::Init TRACK track  ) 
 

Definition at line 50 of file vamosworld.cc.

References cam, CMChase, CMChaseRigid, CMExternal, CMExtFollow, CMFree, CMHood, CMInCar, CMOrbit, SETTINGS::Get(), TRACK::GetStart(), initdone, lastcamchange, LoadHUD(), CAMERA::position, VERTEX::ScaleR(), SetCameraMode(), settings, track, track_p, UnloadHUD(), UpdateSettings(), world, and VERTEX::y.

Referenced by LoadWorld().

void VAMOSWORLD::LoadHUD  ) 
 

Definition at line 1950 of file vamosworld.cc.

References fgbox, TEXTURE_HANDLE::Load(), m_ballh, m_ballv, m_sliderh, m_sliderv, needle, speedo, sphere_reflection, tachband, tachbase, and tachredband.

Referenced by ChangeDisplay(), and Init().

void VAMOSWORLD::PhysUpdate float  dt  )  [private]
 

Definition at line 1856 of file vamosworld.cc.

References REPLAY::GhostCar(), Vamos_World::World::interact(), Vamos_World::World::m_cars, multiplay, replay, MULTIPLAY::TickCar(), and world.

void VAMOSWORLD::ProcessControls SDL_Joystick **  js,
float  timefactor,
float  fps
[private]
 

Definition at line 944 of file vamosworld.cc.

References CONT_PLAYERLOCAL, CONT_REPLAY, DoOp(), GetCar(), REPLAY::GetFunc(), REPLAY::GetNumFuncs(), REPLAY::GhostCar(), joyinfo_js, joyinfo_jsarray, REPLAY::Playing(), and replay.

void VAMOSWORLD::reset  ) 
 

Definition at line 1658 of file vamosworld.cc.

References Vamos_World::World::reset(), and world.

Referenced by ResetWorld().

void VAMOSWORLD::SetCameraMode CameraMode  newmode  ) 
 

Definition at line 1813 of file vamosworld.cc.

References cam, cam_jerk, cam_lastpos, cam_lastpos2, cam_lastvel, cammode, camneedupdate, CMExternal, CMExtFollow, CMFree, CMInCar, KEYMAN::freecam, keyman, lastcamchange, CAMERA::position, SETTINGS::Set(), settings, and VERTEX::zero().

Referenced by Init().

void VAMOSWORLD::ShadowTexCoord VERTEX carpos,
QUATERNION carorientation,
VERTEX shadowdim,
VERTEX vert,
float  roadheight
[private]
 

Definition at line 534 of file vamosworld.cc.

References QUATERNION::RotateVec(), VERTEX::x, VERTEX::y, and VERTEX::z.

void VAMOSWORLD::steer_commit  )  [private]
 

Definition at line 1795 of file vamosworld.cc.

References DoOp(), GetCar(), REPLAY::GhostCar(), l_fps, l_timefactor, REPLAY::Playing(), replay, steer_to(), steerpos, and steervals.

void VAMOSWORLD::steer_set float  val,
bool  left
[private]
 

Definition at line 1787 of file vamosworld.cc.

References steervals.

void VAMOSWORLD::steer_to float  val,
float  timefactor,
float  fps
[private]
 

Definition at line 1700 of file vamosworld.cc.

References gamecontrols, GAMECONTROLS::GetCompensation(), and GAMECONTROLS::GetJoystickType().

Referenced by steer_commit().

void VAMOSWORLD::UnloadHUD  ) 
 

Definition at line 1967 of file vamosworld.cc.

References fgbox, m_ballh, m_ballv, m_sliderh, m_sliderv, needle, speedo, sphere_reflection, tachband, tachbase, tachredband, and TEXTURE_HANDLE::Unload().

Referenced by ChangeDisplay(), DeInit(), and Init().

void VAMOSWORLD::Update float  timefactor,
float  fps,
SDL_Joystick **  js
 

Definition at line 571 of file vamosworld.cc.

References TRACK::GetLapSequence(), l_fps, l_timefactor, Vamos_World::World::m_cars, SOUNDMANAGER::MuteAll(), TRACK::NumSectors(), sound, track_p, and world.

Referenced by Update().

void VAMOSWORLD::UpdateSettings  ) 
 

Definition at line 1941 of file vamosworld.cc.

References auto_clutch, car_shadows_enabled, display_hud, SETTINGS::Get(), input_graph_enabled, MPH, and settings.

Referenced by Init(), VGUI::Gui::ProcessAction(), and ReloadDisplay().


Member Data Documentation

bool VAMOSWORLD::auto_clutch [private]
 

Definition at line 109 of file vamosworld.h.

Referenced by UpdateSettings().

VERTEX VAMOSWORLD::cam_jerk [private]
 

Definition at line 102 of file vamosworld.h.

Referenced by SetCameraMode().

VERTEX VAMOSWORLD::cam_lastaccel [private]
 

Definition at line 101 of file vamosworld.h.

VERTEX VAMOSWORLD::cam_lastpos [private]
 

Definition at line 98 of file vamosworld.h.

Referenced by SetCameraMode().

VERTEX VAMOSWORLD::cam_lastpos2 [private]
 

Definition at line 99 of file vamosworld.h.

Referenced by SetCameraMode().

VERTEX VAMOSWORLD::cam_lastvel [private]
 

Definition at line 100 of file vamosworld.h.

Referenced by SetCameraMode().

CameraMode VAMOSWORLD::cammode [private]
 

Definition at line 82 of file vamosworld.h.

Referenced by SetCameraMode().

bool VAMOSWORLD::camneedupdate [private]
 

Definition at line 107 of file vamosworld.h.

Referenced by SetCameraMode().

TEXTURE_HANDLE VAMOSWORLD::car_shadow [private]
 

Definition at line 92 of file vamosworld.h.

bool VAMOSWORLD::car_shadows_enabled [private]
 

Definition at line 112 of file vamosworld.h.

Referenced by UpdateSettings().

bool VAMOSWORLD::display_hud [private]
 

Definition at line 110 of file vamosworld.h.

Referenced by DrawTopLevel(), and UpdateSettings().

ofstream VAMOSWORLD::error_log [private]
 

Definition at line 88 of file vamosworld.h.

Referenced by VAMOSWORLD(), and ~VAMOSWORLD().

TEXTURE_HANDLE VAMOSWORLD::fgbox [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::fuelgauge [private]
 

Definition at line 89 of file vamosworld.h.

bool VAMOSWORLD::initdone [private]
 

Definition at line 86 of file vamosworld.h.

Referenced by DeInit(), and Init().

bool VAMOSWORLD::input_graph_enabled [private]
 

Definition at line 111 of file vamosworld.h.

Referenced by UpdateSettings().

bool VAMOSWORLD::joyinfo [private]
 

Definition at line 83 of file vamosworld.h.

Referenced by DrawTopLevel().

SDL_Joystick* VAMOSWORLD::joyinfo_js [private]
 

Definition at line 94 of file vamosworld.h.

Referenced by ProcessControls().

SDL_Joystick** VAMOSWORLD::joyinfo_jsarray [private]
 

Definition at line 95 of file vamosworld.h.

Referenced by DisplayJoyInfo(), and ProcessControls().

double VAMOSWORLD::l_fps [private]
 

Definition at line 93 of file vamosworld.h.

Referenced by steer_commit(), and Update().

double VAMOSWORLD::l_timefactor [private]
 

Definition at line 93 of file vamosworld.h.

Referenced by steer_commit(), and Update().

float VAMOSWORLD::lastcamchange [private]
 

Definition at line 105 of file vamosworld.h.

Referenced by Init(), and SetCameraMode().

TEXTURE_HANDLE VAMOSWORLD::m_ballh [private]
 

Definition at line 90 of file vamosworld.h.

Referenced by LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::m_ballv [private]
 

Definition at line 90 of file vamosworld.h.

Referenced by LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::m_sliderh [private]
 

Definition at line 90 of file vamosworld.h.

Referenced by LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::m_sliderv [private]
 

Definition at line 90 of file vamosworld.h.

Referenced by LoadHUD(), and UnloadHUD().

bool VAMOSWORLD::MPH [private]
 

Definition at line 108 of file vamosworld.h.

Referenced by DrawHUD(), and UpdateSettings().

TEXTURE_HANDLE VAMOSWORLD::needle [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

VERTEX VAMOSWORLD::oldcampos [private]
 

Definition at line 106 of file vamosworld.h.

int VAMOSWORLD::oldseg [private]
 

Definition at line 85 of file vamosworld.h.

VERTEX VAMOSWORLD::oldtirepos[4] [private]
 

Definition at line 104 of file vamosworld.h.

bool VAMOSWORLD::propsteer [private]
 

Definition at line 84 of file vamosworld.h.

float VAMOSWORLD::shift_time [private]
 

Definition at line 87 of file vamosworld.h.

Referenced by DoOp().

TEXTURE_HANDLE VAMOSWORLD::speedo [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::sphere_reflection [private]
 

Definition at line 91 of file vamosworld.h.

Referenced by draw_cars(), LoadHUD(), and UnloadHUD().

float VAMOSWORLD::steerpos [private]
 

Definition at line 81 of file vamosworld.h.

Referenced by steer_commit().

float VAMOSWORLD::steervals[2] [private]
 

Definition at line 97 of file vamosworld.h.

Referenced by steer_commit(), and steer_set().

TEXTURE_HANDLE VAMOSWORLD::tachband [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::tachbase [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

TEXTURE_HANDLE VAMOSWORLD::tachredband [private]
 

Definition at line 89 of file vamosworld.h.

Referenced by DrawHUD(), LoadHUD(), and UnloadHUD().

int VAMOSWORLD::tire_source[4] [private]
 

Definition at line 103 of file vamosworld.h.

TRACK* VAMOSWORLD::track_p [private]
 

Definition at line 96 of file vamosworld.h.

Referenced by DeInit(), Init(), and Update().

Vamos_World::World* VAMOSWORLD::world [private]
 

Definition at line 80 of file vamosworld.h.

Referenced by add_car(), clear_cars(), DeInit(), DoOp(), draw_cars(), draw_shadows(), GetCar(), Init(), PhysUpdate(), reset(), and Update().


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