summaryrefslogtreecommitdiff
path: root/public/bitmap/tgaloader.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/bitmap/tgaloader.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/bitmap/tgaloader.h')
-rw-r--r--public/bitmap/tgaloader.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/public/bitmap/tgaloader.h b/public/bitmap/tgaloader.h
new file mode 100644
index 0000000..413eb17
--- /dev/null
+++ b/public/bitmap/tgaloader.h
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//===========================================================================//
+
+#ifndef TGALOADER_H
+#define TGALOADER_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "bitmap/imageformat.h"
+#include "tier1/utlmemory.h"
+
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class CUtlBuffer;
+
+
+namespace TGALoader
+{
+
+int TGAHeaderSize();
+
+bool GetInfo( const char *fileName, int *width, int *height, ImageFormat *imageFormat, float *sourceGamma );
+bool GetInfo( CUtlBuffer &buf, int *width, int *height, ImageFormat *imageFormat, float *sourceGamma );
+
+bool Load( unsigned char *imageData, const char *fileName, int width, int height,
+ ImageFormat imageFormat, float targetGamma, bool mipmap );
+bool Load( unsigned char *imageData, CUtlBuffer &buf, int width, int height,
+ ImageFormat imageFormat, float targetGamma, bool mipmap );
+
+bool LoadRGBA8888( const char *pFileName, CUtlMemory<unsigned char> &outputData, int &outWidth, int &outHeight );
+bool LoadRGBA8888( CUtlBuffer &buf, CUtlMemory<unsigned char> &outputData, int &outWidth, int &outHeight );
+
+} // end namespace TGALoader
+
+#endif // TGALOADER_H