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.

102 lines
2.9 KiB

  1. //====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =====//
  2. //
  3. // Describes the way to compile a MDL file (eventual replacement for qc)
  4. //
  5. //===========================================================================//
  6. #ifndef DMEMDLMAKEFILE_H
  7. #define DMEMDLMAKEFILE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmemakefile.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. class CDmeMDL;
  16. //-----------------------------------------------------------------------------
  17. // Describes a skin source for MDL makefiles
  18. //-----------------------------------------------------------------------------
  19. class CDmeSourceSkin : public CDmeSource
  20. {
  21. DEFINE_ELEMENT( CDmeSourceSkin, CDmeSource );
  22. public:
  23. // These can be built from DCC makefiles
  24. virtual const char **GetSourceMakefileTypes();
  25. CDmaString m_SkinName;
  26. CDmaVar<bool> m_bFlipTriangles;
  27. CDmaVar<bool> m_bQuadSubd;
  28. CDmaVar<float> m_flScale;
  29. };
  30. //-----------------------------------------------------------------------------
  31. // Describes a skin source for MDL makefiles
  32. //-----------------------------------------------------------------------------
  33. class CDmeSourceCollisionModel : public CDmeSource
  34. {
  35. DEFINE_ELEMENT( CDmeSourceCollisionModel, CDmeSource );
  36. public:
  37. // These can be built from DCC makefiles
  38. virtual const char **GetSourceMakefileTypes();
  39. private:
  40. };
  41. //-----------------------------------------------------------------------------
  42. // Describes an animation source for MDL makefiles
  43. //-----------------------------------------------------------------------------
  44. class CDmeSourceAnimation : public CDmeSource
  45. {
  46. DEFINE_ELEMENT( CDmeSourceAnimation, CDmeSource );
  47. public:
  48. // These can be built from DCC makefiles
  49. virtual const char **GetSourceMakefileTypes();
  50. CDmaString m_AnimationName;
  51. CDmaString m_SourceAnimationName; // Name in the source file
  52. private:
  53. };
  54. //-----------------------------------------------------------------------------
  55. // Describes a MDL asset: something that is compiled from sources
  56. //-----------------------------------------------------------------------------
  57. class CDmeMDLMakefile : public CDmeMakefile
  58. {
  59. DEFINE_ELEMENT( CDmeMDLMakefile, CDmeMakefile );
  60. public:
  61. void SetSkin( const char *pFullPath );
  62. void AddAnimation( const char *pFullPath );
  63. void RemoveAnimation( const char *pFullPath );
  64. void RemoveAllAnimations( );
  65. virtual DmeMakefileType_t *GetMakefileType();
  66. virtual DmeMakefileType_t* GetSourceTypes();
  67. virtual void GetOutputs( CUtlVector<CUtlString> &fullPaths );
  68. private:
  69. // Inherited classes should re-implement these methods
  70. virtual CDmElement *CreateOutputElement( );
  71. virtual void DestroyOutputElement( CDmElement *pOutput );
  72. virtual const char *GetOutputDirectoryID() { return "makefilegamedir:.."; }
  73. CDmeHandle< CDmeMDL > m_hMDL;
  74. bool m_bFlushMDL;
  75. };
  76. #endif // DMEMDLMAKEFILE_H