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 /sp/src/common/replay/replaytime.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 'sp/src/common/replay/replaytime.h')
| -rw-r--r-- | sp/src/common/replay/replaytime.h | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/sp/src/common/replay/replaytime.h b/sp/src/common/replay/replaytime.h index 02359db7..eb1c3295 100644 --- a/sp/src/common/replay/replaytime.h +++ b/sp/src/common/replay/replaytime.h @@ -1,57 +1,57 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-//=======================================================================================//
-
-#ifndef REPLAYTIME_H
-#define REPLAYTIME_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-//----------------------------------------------------------------------------------------
-
-class KeyValues;
-
-//----------------------------------------------------------------------------------------
-
-#include "vgui/ILocalize.h"
-
-//----------------------------------------------------------------------------------------
-
-class CReplayTime
-{
-public:
- CReplayTime();
-
- void InitDateAndTimeToNow();
-
- void Read( KeyValues *pIn );
- void Write( KeyValues *pOut );
-
- // Modifiers:
- void SetDate( int nDay, int nMonth, int nYear );
- void SetTime( int nHour, int nMin, int nSec );
- inline void SetRawDate( int nRawDate ) { m_fDate = nRawDate; }
- inline void SetRawTime( int nRawTime ) { m_fTime = nRawTime; }
-
- // Accessors:
- void GetTime( int &nHour, int &nMin, int &nSec ) const;
- void GetDate( int &nDay, int &nMonth, int &nYear ) const;
-
- static const char *FormatTimeString( int nSecs );
- static const char *FormatPreciseTimeString( float flSecs );
- static const wchar_t *GetLocalizedMonth( vgui::ILocalize *pLocalize, int nMonth );
- static const wchar_t *GetLocalizedDay( vgui::ILocalize *pLocalize, int nDay );
- static const wchar_t *GetLocalizedYear( vgui::ILocalize *pLocalize, int nYear );
- static const wchar_t *GetLocalizedTime( vgui::ILocalize *pLocalize, int nHour, int nMin, int nSec );
- static const wchar_t *GetLocalizedDate( vgui::ILocalize *pLocalize, int nDay, int nMonth, int nYear,
- int *pHour = NULL, int *pMin = NULL, int *pSec = NULL, bool bForceFullFormat = false ); // bForceFullFormat true will keep from returning "today" or "yesterday"
- static const wchar_t *GetLocalizedDate( vgui::ILocalize *pLocalize, const CReplayTime &t, bool bForceFullFormat = false );
-
- int m_fDate; // Representation of a date (bitfield)
- int m_fTime; // Representation of time (bitfield)
-};
-
-//----------------------------------------------------------------------------------------
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +//=======================================================================================// + +#ifndef REPLAYTIME_H +#define REPLAYTIME_H +#ifdef _WIN32 +#pragma once +#endif + +//---------------------------------------------------------------------------------------- + +class KeyValues; + +//---------------------------------------------------------------------------------------- + +#include "vgui/ILocalize.h" + +//---------------------------------------------------------------------------------------- + +class CReplayTime +{ +public: + CReplayTime(); + + void InitDateAndTimeToNow(); + + void Read( KeyValues *pIn ); + void Write( KeyValues *pOut ); + + // Modifiers: + void SetDate( int nDay, int nMonth, int nYear ); + void SetTime( int nHour, int nMin, int nSec ); + inline void SetRawDate( int nRawDate ) { m_fDate = nRawDate; } + inline void SetRawTime( int nRawTime ) { m_fTime = nRawTime; } + + // Accessors: + void GetTime( int &nHour, int &nMin, int &nSec ) const; + void GetDate( int &nDay, int &nMonth, int &nYear ) const; + + static const char *FormatTimeString( int nSecs ); + static const char *FormatPreciseTimeString( float flSecs ); + static const wchar_t *GetLocalizedMonth( vgui::ILocalize *pLocalize, int nMonth ); + static const wchar_t *GetLocalizedDay( vgui::ILocalize *pLocalize, int nDay ); + static const wchar_t *GetLocalizedYear( vgui::ILocalize *pLocalize, int nYear ); + static const wchar_t *GetLocalizedTime( vgui::ILocalize *pLocalize, int nHour, int nMin, int nSec ); + static const wchar_t *GetLocalizedDate( vgui::ILocalize *pLocalize, int nDay, int nMonth, int nYear, + int *pHour = NULL, int *pMin = NULL, int *pSec = NULL, bool bForceFullFormat = false ); // bForceFullFormat true will keep from returning "today" or "yesterday" + static const wchar_t *GetLocalizedDate( vgui::ILocalize *pLocalize, const CReplayTime &t, bool bForceFullFormat = false ); + + int m_fDate; // Representation of a date (bitfield) + int m_fTime; // Representation of time (bitfield) +}; + +//---------------------------------------------------------------------------------------- + #endif // REPLAYTIME_H
\ No newline at end of file |