aboutsummaryrefslogtreecommitdiff
path: root/sp/src/utils/common/pacifier.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/utils/common/pacifier.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/utils/common/pacifier.cpp')
-rw-r--r--sp/src/utils/common/pacifier.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/sp/src/utils/common/pacifier.cpp b/sp/src/utils/common/pacifier.cpp
index 6d9c73f2..41a10184 100644
--- a/sp/src/utils/common/pacifier.cpp
+++ b/sp/src/utils/common/pacifier.cpp
@@ -1,63 +1,63 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#include <stdio.h>
-#include "basetypes.h"
-#include "pacifier.h"
-#include "tier0/dbg.h"
-
-
-static int g_LastPacifierDrawn = -1;
-static bool g_bPacifierSuppressed = false;
-
-#define clamp(a,b,c) ( (a) > (c) ? (c) : ( (a) < (b) ? (b) : (a) ) )
-
-void StartPacifier( char const *pPrefix )
-{
- Msg( "%s", pPrefix );
- g_LastPacifierDrawn = -1;
- UpdatePacifier( 0.001f );
-}
-
-void UpdatePacifier( float flPercent )
-{
- int iCur = (int)(flPercent * 40.0f);
- iCur = clamp( iCur, g_LastPacifierDrawn, 40 );
-
- if( iCur != g_LastPacifierDrawn && !g_bPacifierSuppressed )
- {
- for( int i=g_LastPacifierDrawn+1; i <= iCur; i++ )
- {
- if ( !( i % 4 ) )
- {
- Msg("%d", i/4);
- }
- else
- {
- if( i != 40 )
- {
- Msg(".");
- }
- }
- }
-
- g_LastPacifierDrawn = iCur;
- }
-}
-
-void EndPacifier( bool bCarriageReturn )
-{
- UpdatePacifier(1);
-
- if( bCarriageReturn && !g_bPacifierSuppressed )
- Msg("\n");
-}
-
-void SuppressPacifier( bool bSuppress )
-{
- g_bPacifierSuppressed = bSuppress;
-}
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#include <stdio.h>
+#include "basetypes.h"
+#include "pacifier.h"
+#include "tier0/dbg.h"
+
+
+static int g_LastPacifierDrawn = -1;
+static bool g_bPacifierSuppressed = false;
+
+#define clamp(a,b,c) ( (a) > (c) ? (c) : ( (a) < (b) ? (b) : (a) ) )
+
+void StartPacifier( char const *pPrefix )
+{
+ Msg( "%s", pPrefix );
+ g_LastPacifierDrawn = -1;
+ UpdatePacifier( 0.001f );
+}
+
+void UpdatePacifier( float flPercent )
+{
+ int iCur = (int)(flPercent * 40.0f);
+ iCur = clamp( iCur, g_LastPacifierDrawn, 40 );
+
+ if( iCur != g_LastPacifierDrawn && !g_bPacifierSuppressed )
+ {
+ for( int i=g_LastPacifierDrawn+1; i <= iCur; i++ )
+ {
+ if ( !( i % 4 ) )
+ {
+ Msg("%d", i/4);
+ }
+ else
+ {
+ if( i != 40 )
+ {
+ Msg(".");
+ }
+ }
+ }
+
+ g_LastPacifierDrawn = iCur;
+ }
+}
+
+void EndPacifier( bool bCarriageReturn )
+{
+ UpdatePacifier(1);
+
+ if( bCarriageReturn && !g_bPacifierSuppressed )
+ Msg("\n");
+}
+
+void SuppressPacifier( bool bSuppress )
+{
+ g_bPacifierSuppressed = bSuppress;
+}