summaryrefslogtreecommitdiff
path: root/utils/xbox/MakeGameData/MakeScenes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/xbox/MakeGameData/MakeScenes.cpp')
-rw-r--r--utils/xbox/MakeGameData/MakeScenes.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/xbox/MakeGameData/MakeScenes.cpp b/utils/xbox/MakeGameData/MakeScenes.cpp
new file mode 100644
index 0000000..4077978
--- /dev/null
+++ b/utils/xbox/MakeGameData/MakeScenes.cpp
@@ -0,0 +1,40 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: .360 file creation of Choreo VCD files
+//
+//=====================================================================================//
+
+#include "MakeGameData.h"
+#include "sceneimage.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+class CDefaultStatus : public ISceneCompileStatus
+{
+public:
+ virtual void UpdateStatus( char const *pchSceneName, bool bQuiet, int nIndex, int nCount )
+ {
+ if ( !bQuiet )
+ {
+ Msg( "Scenes: Compiling: %s\n", pchSceneName );
+ }
+ }
+};
+
+bool CreateSceneImageFile( char const *pchModPath, bool bWriteToZip, bool bLittleEndian, bool bQuiet, DiskWriteMode_t eWriteModeForConversions )
+{
+ CUtlBuffer targetBuffer;
+
+ const char *pFilename = bLittleEndian ? "scenes/scenes.image" : "scenes/scenes.360.image";
+
+ CDefaultStatus statusHelper;
+
+ bool bSuccess = g_pSceneImage->CreateSceneImageFile( targetBuffer, pchModPath, bLittleEndian, bQuiet, &statusHelper );
+ if ( bSuccess )
+ {
+ bSuccess = WriteBufferToFile( pFilename, targetBuffer, bWriteToZip, eWriteModeForConversions );
+ }
+
+ return bSuccess;
+} \ No newline at end of file