Team Fortress 2 Source Code as on 22/4/2020
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.

101 lines
2.9 KiB

  1. //========= Copyright 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<float> m_flScale;
  28. };
  29. //-----------------------------------------------------------------------------
  30. // Describes a skin source for MDL makefiles
  31. //-----------------------------------------------------------------------------
  32. class CDmeSourceCollisionModel : public CDmeSource
  33. {
  34. DEFINE_ELEMENT( CDmeSourceCollisionModel, CDmeSource );
  35. public:
  36. // These can be built from DCC makefiles
  37. virtual const char **GetSourceMakefileTypes();
  38. private:
  39. };
  40. //-----------------------------------------------------------------------------
  41. // Describes an animation source for MDL makefiles
  42. //-----------------------------------------------------------------------------
  43. class CDmeSourceAnimation : public CDmeSource
  44. {
  45. DEFINE_ELEMENT( CDmeSourceAnimation, CDmeSource );
  46. public:
  47. // These can be built from DCC makefiles
  48. virtual const char **GetSourceMakefileTypes();
  49. CDmaString m_AnimationName;
  50. CDmaString m_SourceAnimationName; // Name in the source file
  51. private:
  52. };
  53. //-----------------------------------------------------------------------------
  54. // Describes a MDL asset: something that is compiled from sources
  55. //-----------------------------------------------------------------------------
  56. class CDmeMDLMakefile : public CDmeMakefile
  57. {
  58. DEFINE_ELEMENT( CDmeMDLMakefile, CDmeMakefile );
  59. public:
  60. void SetSkin( const char *pFullPath );
  61. void AddAnimation( const char *pFullPath );
  62. void RemoveAnimation( const char *pFullPath );
  63. void RemoveAllAnimations( );
  64. virtual DmeMakefileType_t *GetMakefileType();
  65. virtual DmeMakefileType_t* GetSourceTypes();
  66. virtual void GetOutputs( CUtlVector<CUtlString> &fullPaths );
  67. private:
  68. // Inherited classes should re-implement these methods
  69. virtual CDmElement *CreateOutputElement( );
  70. virtual void DestroyOutputElement( CDmElement *pOutput );
  71. virtual const char *GetOutputDirectoryID() { return "makefilegamedir:.."; }
  72. CDmeHandle< CDmeMDL > m_hMDL;
  73. bool m_bFlushMDL;
  74. };
  75. #endif // DMEMDLMAKEFILE_H