aboutsummaryrefslogtreecommitdiff
path: root/mp/src/public/captioncompiler.h
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 /mp/src/public/captioncompiler.h
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 'mp/src/public/captioncompiler.h')
-rw-r--r--mp/src/public/captioncompiler.h154
1 files changed, 77 insertions, 77 deletions
diff --git a/mp/src/public/captioncompiler.h b/mp/src/public/captioncompiler.h
index fa430356..1b723dc6 100644
--- a/mp/src/public/captioncompiler.h
+++ b/mp/src/public/captioncompiler.h
@@ -1,77 +1,77 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================
-
-#ifndef CAPTIONCOMPILER_H
-#define CAPTIONCOMPILER_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "datamap.h"
-#include "checksum_crc.h"
-
-#define MAX_BLOCK_BITS 13
-
-#define MAX_BLOCK_SIZE (1<<MAX_BLOCK_BITS )
-
-#define COMPILED_CAPTION_FILEID MAKEID( 'V', 'C', 'C', 'D' )
-#define COMPILED_CAPTION_VERSION 1
-
-#pragma pack(1)
-struct CompiledCaptionHeader_t
-{
- DECLARE_BYTESWAP_DATADESC()
- int magic;
- int version;
- int numblocks;
- int blocksize;
- int directorysize;
- int dataoffset;
-};
-
-struct CaptionLookup_t
-{
- DECLARE_BYTESWAP_DATADESC()
- unsigned int hash;
- int blockNum;
- unsigned short offset;
- unsigned short length;
-
- void SetHash( char const *string )
- {
- int len = Q_strlen( string );
- char *tempstr = (char *)_alloca( len + 1 );
- Q_strncpy( tempstr, string, len + 1 );
- Q_strlower( tempstr );
- CRC32_t temp;
- CRC32_Init( &temp );
- CRC32_ProcessBuffer( &temp, tempstr, len );
- CRC32_Final( &temp );
-
- hash = ( unsigned int )temp;
- }
-};
-#pragma pack()
-
-class CCaptionLookupLess
-{
-public:
- bool Less( const CaptionLookup_t& lhs, const CaptionLookup_t& rhs, void *pContext )
- {
- return lhs.hash < rhs.hash;
- }
-};
-
-struct CaptionBlock_t
-{
- byte data[ MAX_BLOCK_SIZE ];
-};
-
-// For swapping compiled caption files
-bool SwapClosecaptionFile( void *pData );
-int UpdateOrCreateCaptionFile( const char *pSourceName, char *pTargetName, int targetLen, bool bForce = false );
-
-#endif // CAPTIONCOMPILER_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef CAPTIONCOMPILER_H
+#define CAPTIONCOMPILER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "datamap.h"
+#include "checksum_crc.h"
+
+#define MAX_BLOCK_BITS 13
+
+#define MAX_BLOCK_SIZE (1<<MAX_BLOCK_BITS )
+
+#define COMPILED_CAPTION_FILEID MAKEID( 'V', 'C', 'C', 'D' )
+#define COMPILED_CAPTION_VERSION 1
+
+#pragma pack(1)
+struct CompiledCaptionHeader_t
+{
+ DECLARE_BYTESWAP_DATADESC()
+ int magic;
+ int version;
+ int numblocks;
+ int blocksize;
+ int directorysize;
+ int dataoffset;
+};
+
+struct CaptionLookup_t
+{
+ DECLARE_BYTESWAP_DATADESC()
+ unsigned int hash;
+ int blockNum;
+ unsigned short offset;
+ unsigned short length;
+
+ void SetHash( char const *string )
+ {
+ int len = Q_strlen( string );
+ char *tempstr = (char *)_alloca( len + 1 );
+ Q_strncpy( tempstr, string, len + 1 );
+ Q_strlower( tempstr );
+ CRC32_t temp;
+ CRC32_Init( &temp );
+ CRC32_ProcessBuffer( &temp, tempstr, len );
+ CRC32_Final( &temp );
+
+ hash = ( unsigned int )temp;
+ }
+};
+#pragma pack()
+
+class CCaptionLookupLess
+{
+public:
+ bool Less( const CaptionLookup_t& lhs, const CaptionLookup_t& rhs, void *pContext )
+ {
+ return lhs.hash < rhs.hash;
+ }
+};
+
+struct CaptionBlock_t
+{
+ byte data[ MAX_BLOCK_SIZE ];
+};
+
+// For swapping compiled caption files
+bool SwapClosecaptionFile( void *pData );
+int UpdateOrCreateCaptionFile( const char *pSourceName, char *pTargetName, int targetLen, bool bForce = false );
+
+#endif // CAPTIONCOMPILER_H