summaryrefslogtreecommitdiff
path: root/movieobjects/dmeimage.cpp
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 /movieobjects/dmeimage.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'movieobjects/dmeimage.cpp')
-rw-r--r--movieobjects/dmeimage.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/movieobjects/dmeimage.cpp b/movieobjects/dmeimage.cpp
new file mode 100644
index 0000000..2b972dc
--- /dev/null
+++ b/movieobjects/dmeimage.cpp
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+#include "movieobjects/dmeimage.h"
+#include "datamodel/dmelementfactoryhelper.h"
+#include "bitmap/imageformat.h"
+
+
+//-----------------------------------------------------------------------------
+// Expose this class to the scene database
+//-----------------------------------------------------------------------------
+IMPLEMENT_ELEMENT_FACTORY( DmeImage, CDmeImage );
+
+
+//-----------------------------------------------------------------------------
+// Constructor, destructor
+//-----------------------------------------------------------------------------
+void CDmeImage::OnConstruction()
+{
+ m_Width.Init( this, "width" );
+ m_Height.Init( this, "height" );
+ m_Format.Init( this, "format" );
+ m_Bits.Init( this, "bits" );
+}
+
+void CDmeImage::OnDestruction()
+{
+}
+
+
+//-----------------------------------------------------------------------------
+// Image format
+//-----------------------------------------------------------------------------
+ImageFormat CDmeImage::Format() const
+{
+ return (ImageFormat)( m_Format.Get() );
+}
+
+const char *CDmeImage::FormatName() const
+{
+ return ImageLoader::GetName( Format() );
+}
+