Team Fortress 2 Source Code as on 22/4/2020
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.

43 lines
1.1 KiB

  1. //========= Copyright 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. int numSounds;
  18. int sceneId;
  19. };
  20. class ISceneFileCache : public IAppSystem
  21. {
  22. public:
  23. // async implemenation
  24. virtual size_t GetSceneBufferSize( char const *filename ) = 0;
  25. virtual bool GetSceneData( char const *filename, byte *buf, size_t bufsize ) = 0;
  26. // persisted scene data, returns true if valid, false otherwise
  27. virtual bool GetSceneCachedData( char const *pFilename, SceneCachedData_t *pData ) = 0;
  28. virtual short GetSceneCachedSound( int iScene, int iSound ) = 0;
  29. virtual const char *GetSceneString( short stringId ) = 0;
  30. // Physically reloads image from disk
  31. virtual void Reload() = 0;
  32. };
  33. #define SCENE_FILE_CACHE_INTERFACE_VERSION "SceneFileCache002"
  34. #endif // ISCENEFILECACHE_H