diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/client/view.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/client/view.h')
| -rw-r--r-- | mp/src/game/client/view.h | 196 |
1 files changed, 98 insertions, 98 deletions
diff --git a/mp/src/game/client/view.h b/mp/src/game/client/view.h index 51f0f98d..7c41593a 100644 --- a/mp/src/game/client/view.h +++ b/mp/src/game/client/view.h @@ -1,98 +1,98 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $Workfile: $
-// $Date: $
-// $NoKeywords: $
-//=============================================================================//
-
-#if !defined( VIEW_H )
-#define VIEW_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#if _DEBUG
-extern bool g_bRenderingCameraView; // For debugging (frustum fix for cameras)...
-#endif
-
-class VMatrix;
-class Vector;
-class QAngle;
-class VPlane;
-
-
-// near and far Z it uses to render the world.
-#ifndef HL1_CLIENT_DLL
-#define VIEW_NEARZ 7
-#else
-#define VIEW_NEARZ 3
-#endif
-//#define VIEW_FARZ 28400
-
-
-//-----------------------------------------------------------------------------
-// There's a difference between the 'current view' and the 'main view'
-// The 'main view' is where the player is sitting. Current view is just
-// what's currently being rendered, which, owing to monitors or water,
-// could be just about anywhere.
-//-----------------------------------------------------------------------------
-const Vector &MainViewOrigin();
-const QAngle &MainViewAngles();
-const Vector &PrevMainViewOrigin();
-const QAngle &PrevMainViewAngles();
-const VMatrix &MainWorldToViewMatrix();
-const Vector &MainViewForward();
-const Vector &MainViewRight();
-const Vector &MainViewUp();
-
-const Vector &CurrentViewOrigin();
-const QAngle &CurrentViewAngles();
-const VMatrix &CurrentWorldToViewMatrix();
-const Vector &CurrentViewForward();
-const Vector &CurrentViewRight();
-const Vector &CurrentViewUp();
-
-void AllowCurrentViewAccess( bool allow );
-bool IsCurrentViewAccessAllowed();
-
-// Returns true of the sphere is outside the frustum defined by pPlanes.
-// (planes point inwards).
-bool R_CullSphere( const VPlane *pPlanes, int nPlanes, const Vector *pCenter, float radius );
-float ScaleFOVByWidthRatio( float fovDegrees, float ratio );
-
-extern ConVar mat_wireframe;
-
-extern const ConVar *sv_cheats;
-
-
-static inline int WireFrameMode( void )
-{
- if ( !sv_cheats )
- {
- sv_cheats = cvar->FindVar( "sv_cheats" );
- }
-
- if ( sv_cheats && sv_cheats->GetBool() )
- return mat_wireframe.GetInt();
- else
- return 0;
-}
-
-static inline bool ShouldDrawInWireFrameMode( void )
-{
- if ( !sv_cheats )
- {
- sv_cheats = cvar->FindVar( "sv_cheats" );
- }
-
- if ( sv_cheats && sv_cheats->GetBool() )
- return ( mat_wireframe.GetInt() != 0 );
- else
- return false;
-}
-
-void ComputeCameraVariables( const Vector &vecOrigin, const QAngle &vecAngles, Vector *pVecForward, Vector *pVecRight, Vector *pVecUp, VMatrix *pMatCamInverse );
-
-#endif // VIEW_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// $NoKeywords: $ +//=============================================================================// + +#if !defined( VIEW_H ) +#define VIEW_H +#ifdef _WIN32 +#pragma once +#endif + +#if _DEBUG +extern bool g_bRenderingCameraView; // For debugging (frustum fix for cameras)... +#endif + +class VMatrix; +class Vector; +class QAngle; +class VPlane; + + +// near and far Z it uses to render the world. +#ifndef HL1_CLIENT_DLL +#define VIEW_NEARZ 7 +#else +#define VIEW_NEARZ 3 +#endif +//#define VIEW_FARZ 28400 + + +//----------------------------------------------------------------------------- +// There's a difference between the 'current view' and the 'main view' +// The 'main view' is where the player is sitting. Current view is just +// what's currently being rendered, which, owing to monitors or water, +// could be just about anywhere. +//----------------------------------------------------------------------------- +const Vector &MainViewOrigin(); +const QAngle &MainViewAngles(); +const Vector &PrevMainViewOrigin(); +const QAngle &PrevMainViewAngles(); +const VMatrix &MainWorldToViewMatrix(); +const Vector &MainViewForward(); +const Vector &MainViewRight(); +const Vector &MainViewUp(); + +const Vector &CurrentViewOrigin(); +const QAngle &CurrentViewAngles(); +const VMatrix &CurrentWorldToViewMatrix(); +const Vector &CurrentViewForward(); +const Vector &CurrentViewRight(); +const Vector &CurrentViewUp(); + +void AllowCurrentViewAccess( bool allow ); +bool IsCurrentViewAccessAllowed(); + +// Returns true of the sphere is outside the frustum defined by pPlanes. +// (planes point inwards). +bool R_CullSphere( const VPlane *pPlanes, int nPlanes, const Vector *pCenter, float radius ); +float ScaleFOVByWidthRatio( float fovDegrees, float ratio ); + +extern ConVar mat_wireframe; + +extern const ConVar *sv_cheats; + + +static inline int WireFrameMode( void ) +{ + if ( !sv_cheats ) + { + sv_cheats = cvar->FindVar( "sv_cheats" ); + } + + if ( sv_cheats && sv_cheats->GetBool() ) + return mat_wireframe.GetInt(); + else + return 0; +} + +static inline bool ShouldDrawInWireFrameMode( void ) +{ + if ( !sv_cheats ) + { + sv_cheats = cvar->FindVar( "sv_cheats" ); + } + + if ( sv_cheats && sv_cheats->GetBool() ) + return ( mat_wireframe.GetInt() != 0 ); + else + return false; +} + +void ComputeCameraVariables( const Vector &vecOrigin, const QAngle &vecAngles, Vector *pVecForward, Vector *pVecRight, Vector *pVecUp, VMatrix *pMatCamInverse ); + +#endif // VIEW_H |