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.

42 lines
1.1 KiB

  1. //============ Copyright Valve Corporation, All rights reserved. =============
  2. //
  3. // When embroidered patches are generated from sticker kits, we must wait
  4. // for the textures to be generated before saving to disk.
  5. //
  6. //=============================================================================
  7. #ifndef CS_CUSTOM_EMBROIDER_GENERATION_MGR_H
  8. #define CS_CUSTOM_EMBROIDER_GENERATION_MGR_H
  9. #include "igamesystem.h"
  10. #include "materialsystem/icustommaterialmanager.h"
  11. #include "utlvector.h"
  12. struct CustomMaterialGenerationData_t
  13. {
  14. ICustomMaterial *pCustomMaterial;
  15. char fileNames[COMBINER_MAX_TEXTURES_PER_MATERIAL][MAX_PATH];
  16. const char *pchChangeListName;
  17. int nTex;
  18. };
  19. class CCSCustomTextureSaver : public CAutoGameSystemPerFrame
  20. {
  21. public:
  22. CCSCustomTextureSaver() { m_bHasJob = false; }
  23. ~CCSCustomTextureSaver() {}
  24. virtual bool Init();
  25. virtual void Shutdown() {};
  26. void AddMaterialToWatch( CustomMaterialGenerationData_t embroiderMaterial );
  27. private:
  28. virtual void Update( float frametime );
  29. CUtlVector<CustomMaterialGenerationData_t> m_materials;
  30. bool m_bHasJob;
  31. };
  32. #endif //CS_CUSTOM_EMBROIDER_GENERATION_MGR_H