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.

45 lines
1.1 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef AMALGAMATEDTEXTUREPARSER_H
  7. #define AMALGAMATEDTEXTUREPARSER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier1/utlvector.h"
  12. class CAmalgamatedTexture;
  13. class CDmeAmalgamatedTexture;
  14. struct SequenceFrame;
  15. // For parsing tool from the command line.
  16. class CAmalgamatedTextureParser
  17. {
  18. public:
  19. CAmalgamatedTextureParser();
  20. void Init( const char *pSourceFileName, const char *pTgaFileName, const char *pShtFileName );
  21. bool ReadFile( CDmeAmalgamatedTexture &amalgTex );
  22. bool ReadFileUsingBuffer( CDmeAmalgamatedTexture &amalgTex );
  23. void ParseFrameImages( CUtlVector<char *> &words, CUtlVector<char *> &outImageNames );
  24. private:
  25. int ParsePackingMode( char *word );
  26. int ParseSequenceType( char *word );
  27. void ValidateFramePacking( SequenceFrame *pBitmap, char *fileName );
  28. const char *m_pSourceFile;
  29. const char *m_pShtFile;
  30. const char *m_pTgaFile;
  31. int m_NumActualLinesRead;
  32. };
  33. #endif // AMALGAMATEDTEXTUREPARSER_H