Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef ISCENEFILECACHE_H
  7. #define ISCENEFILECACHE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "interface.h"
  12. #include "appframework/iappsystem.h"
  13. // the file cache can support persisting some calcs
  14. struct SceneCachedData_t
  15. {
  16. unsigned int msecs;
  17. float m_fLastSpeakSecs;
  18. int numSounds;
  19. int sceneId;
  20. };
  21. class ISceneFileCache : public IAppSystem
  22. {
  23. public:
  24. // async implemenation
  25. virtual size_t GetSceneBufferSize( char const *filename ) = 0;
  26. virtual bool GetSceneData( char const *filename, byte *buf, size_t bufsize ) = 0;
  27. // persisted scene data, returns true if valid, false otherwise
  28. virtual bool GetSceneCachedData( char const *pFilename, SceneCachedData_t *pData ) = 0;
  29. virtual short GetSceneCachedSound( int iScene, int iSound ) = 0;
  30. virtual const char *GetSceneString( short stringId ) = 0;
  31. // Physically reloads image from disk
  32. virtual void Reload() = 0;
  33. };
  34. #define SCENE_FILE_CACHE_INTERFACE_VERSION "SceneFileCache002"
  35. #endif // ISCENEFILECACHE_H