aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/scenefilecache
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/public/scenefilecache
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/public/scenefilecache')
-rw-r--r--sp/src/public/scenefilecache/ISceneFileCache.h86
-rw-r--r--sp/src/public/scenefilecache/SceneImageFile.h116
2 files changed, 101 insertions, 101 deletions
diff --git a/sp/src/public/scenefilecache/ISceneFileCache.h b/sp/src/public/scenefilecache/ISceneFileCache.h
index c8ec3635..973c6ef7 100644
--- a/sp/src/public/scenefilecache/ISceneFileCache.h
+++ b/sp/src/public/scenefilecache/ISceneFileCache.h
@@ -1,43 +1,43 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================
-
-#ifndef ISCENEFILECACHE_H
-#define ISCENEFILECACHE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "interface.h"
-#include "appframework/IAppSystem.h"
-
-// the file cache can support persisting some calcs
-struct SceneCachedData_t
-{
- unsigned int msecs;
- int numSounds;
- int sceneId;
-};
-
-class ISceneFileCache : public IAppSystem
-{
-public:
-
- // async implemenation
- virtual size_t GetSceneBufferSize( char const *filename ) = 0;
- virtual bool GetSceneData( char const *filename, byte *buf, size_t bufsize ) = 0;
-
- // persisted scene data, returns true if valid, false otherwise
- virtual bool GetSceneCachedData( char const *pFilename, SceneCachedData_t *pData ) = 0;
- virtual short GetSceneCachedSound( int iScene, int iSound ) = 0;
- virtual const char *GetSceneString( short stringId ) = 0;
-
- // Physically reloads image from disk
- virtual void Reload() = 0;
-};
-
-#define SCENE_FILE_CACHE_INTERFACE_VERSION "SceneFileCache002"
-
-#endif // ISCENEFILECACHE_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef ISCENEFILECACHE_H
+#define ISCENEFILECACHE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "interface.h"
+#include "appframework/IAppSystem.h"
+
+// the file cache can support persisting some calcs
+struct SceneCachedData_t
+{
+ unsigned int msecs;
+ int numSounds;
+ int sceneId;
+};
+
+class ISceneFileCache : public IAppSystem
+{
+public:
+
+ // async implemenation
+ virtual size_t GetSceneBufferSize( char const *filename ) = 0;
+ virtual bool GetSceneData( char const *filename, byte *buf, size_t bufsize ) = 0;
+
+ // persisted scene data, returns true if valid, false otherwise
+ virtual bool GetSceneCachedData( char const *pFilename, SceneCachedData_t *pData ) = 0;
+ virtual short GetSceneCachedSound( int iScene, int iSound ) = 0;
+ virtual const char *GetSceneString( short stringId ) = 0;
+
+ // Physically reloads image from disk
+ virtual void Reload() = 0;
+};
+
+#define SCENE_FILE_CACHE_INTERFACE_VERSION "SceneFileCache002"
+
+#endif // ISCENEFILECACHE_H
diff --git a/sp/src/public/scenefilecache/SceneImageFile.h b/sp/src/public/scenefilecache/SceneImageFile.h
index 258dbb90..26cce486 100644
--- a/sp/src/public/scenefilecache/SceneImageFile.h
+++ b/sp/src/public/scenefilecache/SceneImageFile.h
@@ -1,58 +1,58 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: A Scene Image file aggregates all the compiled binary VCD files into
-// a single file.
-//
-//=====================================================================================//
-#ifndef SCENE_IMAGE_FILE_H
-#define SCENE_IMAGE_FILE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "commonmacros.h"
-#include "tier1/checksum_crc.h"
-
-#define SCENE_IMAGE_ID MAKEID( 'V','S','I','F' )
-#define SCENE_IMAGE_VERSION 2
-
-// scene summary: cached calcs for commmon startup queries, variable sized
-struct SceneImageSummary_t
-{
- unsigned int msecs;
- int numSounds;
- int soundStrings[1]; // has numSounds
-};
-
-// stored sorted by crc filename for binary search
-struct SceneImageEntry_t
-{
- CRC32_t crcFilename; // expected to be normalized as scenes\???.vcd
- int nDataOffset; // offset to dword aligned data from start
- int nDataLength;
- int nSceneSummaryOffset; // offset to summary
-};
-
-struct SceneImageHeader_t
-{
- int nId;
- int nVersion;
- int nNumScenes; // number of scene files
- int nNumStrings; // number of unique strings in table
- int nSceneEntryOffset;
-
- inline const char *String( short iString )
- {
- if ( iString < 0 || iString >= nNumStrings )
- {
- Assert( 0 );
- return NULL;
- }
-
- // access string table (after header) to access pool
- unsigned int *pTable = (unsigned int *)((byte *)this + sizeof( SceneImageHeader_t ));
- return (char *)this + pTable[iString];
- }
-};
-
-#endif // SCENE_IMAGE_FILE_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: A Scene Image file aggregates all the compiled binary VCD files into
+// a single file.
+//
+//=====================================================================================//
+#ifndef SCENE_IMAGE_FILE_H
+#define SCENE_IMAGE_FILE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "commonmacros.h"
+#include "tier1/checksum_crc.h"
+
+#define SCENE_IMAGE_ID MAKEID( 'V','S','I','F' )
+#define SCENE_IMAGE_VERSION 2
+
+// scene summary: cached calcs for commmon startup queries, variable sized
+struct SceneImageSummary_t
+{
+ unsigned int msecs;
+ int numSounds;
+ int soundStrings[1]; // has numSounds
+};
+
+// stored sorted by crc filename for binary search
+struct SceneImageEntry_t
+{
+ CRC32_t crcFilename; // expected to be normalized as scenes\???.vcd
+ int nDataOffset; // offset to dword aligned data from start
+ int nDataLength;
+ int nSceneSummaryOffset; // offset to summary
+};
+
+struct SceneImageHeader_t
+{
+ int nId;
+ int nVersion;
+ int nNumScenes; // number of scene files
+ int nNumStrings; // number of unique strings in table
+ int nSceneEntryOffset;
+
+ inline const char *String( short iString )
+ {
+ if ( iString < 0 || iString >= nNumStrings )
+ {
+ Assert( 0 );
+ return NULL;
+ }
+
+ // access string table (after header) to access pool
+ unsigned int *pTable = (unsigned int *)((byte *)this + sizeof( SceneImageHeader_t ));
+ return (char *)this + pTable[iString];
+ }
+};
+
+#endif // SCENE_IMAGE_FILE_H