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.

39 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: .360 file creation of Choreo VCD files
  4. //
  5. //=====================================================================================//
  6. #include "MakeGameData.h"
  7. #include "sceneimage.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. class CDefaultStatus : public ISceneCompileStatus
  11. {
  12. public:
  13. virtual void UpdateStatus( char const *pchSceneName, bool bQuiet, int nIndex, int nCount )
  14. {
  15. if ( !bQuiet )
  16. {
  17. Msg( "Scenes: Compiling: %s\n", pchSceneName );
  18. }
  19. }
  20. };
  21. bool CreateSceneImageFile( char const *pchModPath, bool bWriteToZip, bool bLittleEndian, bool bQuiet, DiskWriteMode_t eWriteModeForConversions )
  22. {
  23. CUtlBuffer targetBuffer;
  24. const char *pFilename = bLittleEndian ? "scenes/scenes.image" : "scenes/scenes.360.image";
  25. CDefaultStatus statusHelper;
  26. bool bSuccess = g_pSceneImage->CreateSceneImageFile( targetBuffer, pchModPath, bLittleEndian, bQuiet, &statusHelper );
  27. if ( bSuccess )
  28. {
  29. bSuccess = WriteBufferToFile( pFilename, targetBuffer, bWriteToZip, eWriteModeForConversions );
  30. }
  31. return bSuccess;
  32. }