diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/dummytexture.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/dummytexture.h')
| -rw-r--r-- | hammer/dummytexture.h | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/hammer/dummytexture.h b/hammer/dummytexture.h new file mode 100644 index 0000000..fa17a0e --- /dev/null +++ b/hammer/dummytexture.h @@ -0,0 +1,153 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Implementation of IEditorTexture interface for placeholder textures. +// Placeholder textures are used for textures that are referenced in +// the map file but not found in storage. +// +//=============================================================================// + +#ifndef DUMMYTEXTURE_H +#define DUMMYTEXTURE_H +#ifdef _WIN32 +#pragma once +#endif + + +#include <afxtempl.h> +#include "IEditorTexture.h" + + +enum TEXTUREFORMAT; + + +class CDummyTexture : public IEditorTexture +{ + public: + + CDummyTexture(const char *pszName, TEXTUREFORMAT eFormat); + virtual ~CDummyTexture(); + + inline const char *GetName() const + { + return(m_szName); + } + int GetShortName(char *pszName) const; + + int GetKeywords(char *pszKeywords) const; + + void Draw(CDC *pDC, RECT &rect, int iFontHeight, int iIconHeight, DrawTexData_t &DrawTexData); + + const char *GetFileName(void) const; + + void GetSize(SIZE &size) const; + + inline bool IsDummy() const + { + return(true); + } + + int GetImageDataRGB( void *pImageRGB ); + int GetImageDataRGBA( void *pImageRGBA ); + + inline int GetImageWidth() const + { + return(0); + } + + inline int GetImageHeight() const + { + return(0); + } + + inline float GetDecalScale() const + { + return(1.0f); + } + + CPalette *GetPalette() const + { + return(NULL); + } + + inline int GetWidth() const + { + return(0); + } + + inline int GetHeight() const + { + return(0); + } + + inline int GetTextureID() const + { + return(0); + } + + inline TEXTUREFORMAT GetTextureFormat() const + { + return(m_eTextureFormat); + } + + inline int GetSurfaceAttributes() const + { + return(0); + } + + inline int GetSurfaceContents() const + { + return(0); + } + + inline int GetSurfaceValue() const + { + return(0); + } + + inline bool HasAlpha() const + { + return(false); + } + + inline bool HasData() const + { + return(false); + } + + inline bool HasPalette() const + { + return(false); + } + + bool Load( void ); + void Reload( bool bFullReload ) {} + + inline bool IsLoaded() const + { + return true; + } + + inline void SetTextureFormat(TEXTUREFORMAT eFormat) + { + m_eTextureFormat = eFormat; + } + + inline void SetTextureID( int nTextureID ) + { + } + + bool IsWater( void ) const + { + return false; + } + + protected: + + char m_szName[MAX_PATH]; + char m_szFileName[MAX_PATH]; + + TEXTUREFORMAT m_eTextureFormat; +}; + + +#endif // DUMMYTEXTURE_H |