Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TEXTURECONVERT_H
  8. #define TEXTURECONVERT_H
  9. #pragma once
  10. #include "MapWorld.h"
  11. #include "MapSolid.h"
  12. #include "MapFace.h"
  13. #include "MapDecal.h"
  14. #include "IEditorTexture.h"
  15. #include "resource.h"
  16. #include "ProgDlg.h"
  17. class CTextureConverter
  18. {
  19. public:
  20. static void ConvertWorldTextures( CMapWorld * pWorld );
  21. private:
  22. static void Initialize( void );
  23. static void ConvertSolids( CMapWorld * pWorld );
  24. static void ConvertDecals( CMapWorld * pWorld );
  25. static bool CountMapSolids( CMapSolid * pSolid, DWORD );
  26. static bool CountMapDecals( CMapEntity *, DWORD );
  27. static bool CheckSolidTextures( CMapSolid * pSolid, DWORD );
  28. static bool CheckDecalTextures( CMapEntity * pEnt, DWORD );
  29. static void CheckFaceTexture( CMapFace * pFace );
  30. static void ConvertFaceTexture( CMapFace * pFace );
  31. static void ConvertDecalTexture( CMapEntity * pEnt );
  32. static void GetNewTextureMatches( const char * pszOldName, EditorTextureList_t &MatchList );
  33. static bool TextureNameMatchesMaterialName( const char * pszTextureName, const char * pszMaterialName );
  34. static void ReplaceFaceTexture( CMapFace * pFace, IEditorTexture * pNewTexture );
  35. static void ReplaceDecalTexture( CMapEntity * pEnt, IEditorTexture * pNewTexture );
  36. static IEditorTexture * FindWAD3Texture( const char * pszName );
  37. static void RescaleFaceTexture( CMapFace * pFace, IEditorTexture * pNewTexture );
  38. static void MsgConvertFace( CMapFace * pFace, const char * format, ... );
  39. static void MsgConvertDecal( CMapEntity * pEnt, const char * format, ... );
  40. static void DisplayStatistics( void );
  41. static CProgressDlg * m_pProgDlg;
  42. static int m_nSolidCount;
  43. static int m_nFaceCount;
  44. static int m_nDecalCount;
  45. static int m_nCurrentSolid;
  46. static int m_nCurrentDecal;
  47. static int m_nSuccesses;
  48. static int m_nErrors;
  49. static int m_nSkipped;
  50. static int m_nWarnings;
  51. };
  52. #endif // TEXTURECONVERT_H