home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / vehicle / VehicleController.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  2KB  |  70 lines

  1. //----------------------------------------------------------------
  2. // VehicleController.h
  3. //
  4. // Copyright 2002-2004 Raven Software
  5. //----------------------------------------------------------------
  6.  
  7. #ifndef __GAME_VEHICLECONTROLLER_H__
  8. #define __GAME_VEHICLECONTROLLER_H__
  9.  
  10. class rvVehicle;
  11. class rvVehiclePosition;
  12.  
  13. class rvVehicleController {
  14. public:
  15.  
  16.     rvVehicleController ( void );
  17.  
  18.     void            Save                ( idSaveGame *savefile ) const;
  19.     void            Restore                ( idRestoreGame *savefile );
  20.  
  21.     bool            Drive                ( rvVehicle* vehicle, idActor* driver );
  22.     bool            Eject                ( bool force = false );
  23.  
  24.     bool            FindClearExitPoint    ( idVec3& origin, idMat3& axis ) const;
  25.  
  26.     bool            IsDriving            ( void ) const;
  27.  
  28.     rvVehicle*        GetVehicle            ( void ) const;
  29.     idActor*        GetDriver            ( void ) const;
  30.     int                GetPosition            ( void ) const;
  31.     
  32.     void            SetInput            ( const usercmd_t& cmd, const idAngles &newAngles );
  33.     void            GetInput            ( usercmd_t& cmd, idAngles &newAngles ) const;
  34.     
  35.     idUserInterface* GetHud                ( void );
  36.     const idUserInterface* GetHud        ( void ) const;
  37.     void            DrawHUD                ( void );
  38.     void            UpdateCursorGUI        ( idUserInterface* ui );
  39.     
  40.     void            StartRadioChatter    ( void );
  41.     void            StopRadioChatter    ( void );
  42.     
  43.     void            Give                ( const char* statname, const char* value );
  44.     void            GetEyePosition        ( idVec3& origin, idMat3& axis ) const;
  45.     void            GetDriverPosition    ( idVec3& origin, idMat3& axis ) const;
  46.  
  47.     static void        KillVehicles        ( void );
  48.  
  49.     void            WriteToSnapshot        ( idBitMsgDelta &msg ) const;
  50.     void            ReadFromSnapshot    ( const idBitMsgDelta &msg );
  51.         
  52.     void            SelectWeapon        ( int weapon );
  53.  
  54. protected:
  55.  
  56.     idEntityPtr<rvVehicle>    mVehicle;
  57.     int                        mPosition;
  58. };
  59.  
  60. ID_INLINE bool rvVehicleController::IsDriving ( void ) const {
  61.     return mVehicle.IsValid ( );
  62. }
  63.  
  64. ID_INLINE int rvVehicleController::GetPosition ( void ) const {
  65.     return mPosition;
  66. }
  67.  
  68. #endif // __GAME_VEHICLECONTROLLER_H__
  69.  
  70.