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/textureconverter.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/textureconverter.h')
| -rw-r--r-- | hammer/textureconverter.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/hammer/textureconverter.h b/hammer/textureconverter.h new file mode 100644 index 0000000..a5cffc3 --- /dev/null +++ b/hammer/textureconverter.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef TEXTURECONVERT_H +#define TEXTURECONVERT_H +#pragma once + + +#include "MapWorld.h" +#include "MapSolid.h" +#include "MapFace.h" +#include "MapDecal.h" +#include "IEditorTexture.h" +#include "resource.h" +#include "ProgDlg.h" + +class CTextureConverter +{ +public: + static void ConvertWorldTextures( CMapWorld * pWorld ); + +private: + static void Initialize( void ); + static void ConvertSolids( CMapWorld * pWorld ); + static void ConvertDecals( CMapWorld * pWorld ); + static bool CountMapSolids( CMapSolid * pSolid, DWORD ); + static bool CountMapDecals( CMapEntity *, DWORD ); + static bool CheckSolidTextures( CMapSolid * pSolid, DWORD ); + static bool CheckDecalTextures( CMapEntity * pEnt, DWORD ); + static void CheckFaceTexture( CMapFace * pFace ); + static void ConvertFaceTexture( CMapFace * pFace ); + static void ConvertDecalTexture( CMapEntity * pEnt ); + static void GetNewTextureMatches( const char * pszOldName, EditorTextureList_t &MatchList ); + static bool TextureNameMatchesMaterialName( const char * pszTextureName, const char * pszMaterialName ); + static void ReplaceFaceTexture( CMapFace * pFace, IEditorTexture * pNewTexture ); + static void ReplaceDecalTexture( CMapEntity * pEnt, IEditorTexture * pNewTexture ); + static IEditorTexture * FindWAD3Texture( const char * pszName ); + static void RescaleFaceTexture( CMapFace * pFace, IEditorTexture * pNewTexture ); + static void MsgConvertFace( CMapFace * pFace, PRINTF_FORMAT_STRING const char * format, ... ); + static void MsgConvertDecal( CMapEntity * pEnt, PRINTF_FORMAT_STRING const char * format, ... ); + static void DisplayStatistics( void ); + + static CProgressDlg * m_pProgDlg; + static int m_nSolidCount; + static int m_nFaceCount; + static int m_nDecalCount; + static int m_nCurrentSolid; + static int m_nCurrentDecal; + static int m_nSuccesses; + static int m_nErrors; + static int m_nSkipped; + static int m_nWarnings; +}; + + +#endif // TEXTURECONVERT_H |