Formatx.MD2.hpp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // CodeGear C++Builder
  2. // Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'Formatx.MD2.pas' rev: 36.00 (Windows)
  5. #ifndef Formatx_MD2HPP
  6. #define Formatx_MD2HPP
  7. #pragma delphiheader begin
  8. #pragma option push
  9. #if defined(__BORLANDC__) && !defined(__clang__)
  10. #pragma option -w- // All warnings off
  11. #pragma option -Vx // Zero-length empty class member
  12. #endif
  13. #pragma pack(push,8)
  14. #include <System.hpp>
  15. #include <SysInit.hpp>
  16. #include <System.Classes.hpp>
  17. #include <System.SysUtils.hpp>
  18. #include <Stage.VectorTypes.hpp>
  19. //-- user supplied -----------------------------------------------------------
  20. namespace Formatx
  21. {
  22. namespace Md2
  23. {
  24. //-- forward type declarations -----------------------------------------------
  25. struct TMD2VertexIndex;
  26. struct TMD2Triangle;
  27. struct TMD2TriangleVertex;
  28. struct TMD2AliasFrame;
  29. struct TMD2Header;
  30. class DELPHICLASS TFileMD2;
  31. //-- type declarations -------------------------------------------------------
  32. typedef TMD2VertexIndex *PMD2VertexIndex;
  33. struct DECLSPEC_DRECORD TMD2VertexIndex
  34. {
  35. public:
  36. int A;
  37. int B;
  38. int C;
  39. float A_S;
  40. float A_T;
  41. float B_S;
  42. float B_T;
  43. float C_S;
  44. float C_T;
  45. };
  46. struct DECLSPEC_DRECORD TMD2Triangle
  47. {
  48. public:
  49. Stage::Vectortypes::TVector3s VertexIndex;
  50. Stage::Vectortypes::TVector3s TextureCoordIndex;
  51. };
  52. struct DECLSPEC_DRECORD TMD2TriangleVertex
  53. {
  54. public:
  55. System::StaticArray<System::Byte, 3> Vert;
  56. System::Byte LightnormalIndex;
  57. };
  58. typedef TMD2AliasFrame *PMD2AliasFrame;
  59. struct DECLSPEC_DRECORD TMD2AliasFrame
  60. {
  61. public:
  62. Stage::Vectortypes::TVector3f Scale;
  63. Stage::Vectortypes::TVector3f Translate;
  64. System::StaticArray<char, 16> Name;
  65. System::StaticArray<TMD2TriangleVertex, 1> Vertices;
  66. };
  67. struct DECLSPEC_DRECORD TMD2Header
  68. {
  69. public:
  70. int Ident;
  71. int Version;
  72. int SkinWidth;
  73. int SkinHeight;
  74. int FrameSize;
  75. int Num_Skins;
  76. int Num_Vertices;
  77. int Num_TextureCoords;
  78. int Num_VertexIndices;
  79. int Num_GLCommdands;
  80. int Num_Frames;
  81. int Offset_skins;
  82. int Offset_st;
  83. int Offset_tris;
  84. int Offset_frames;
  85. int Offset_glcmds;
  86. int Offset_end;
  87. };
  88. typedef System::DynamicArray<TMD2VertexIndex> TIndexList;
  89. typedef System::DynamicArray<Stage::Vectortypes::TVector3f> Formatx_Md2__1;
  90. typedef System::DynamicArray<System::DynamicArray<Stage::Vectortypes::TVector3f> > TGLVertexList;
  91. #pragma pack(push,4)
  92. class PASCALIMPLEMENTATION TFileMD2 : public System::TObject
  93. {
  94. typedef System::TObject inherited;
  95. private:
  96. System::LongInt FiFrames;
  97. System::LongInt FiVertices;
  98. System::LongInt FiTriangles;
  99. void __fastcall FreeLists();
  100. public:
  101. TIndexList fIndexList;
  102. TGLVertexList fVertexList;
  103. System::Classes::TStrings* FrameNames;
  104. __fastcall virtual TFileMD2();
  105. __fastcall virtual ~TFileMD2();
  106. void __fastcall LoadFromStream(System::Classes::TStream* aStream);
  107. __property System::LongInt iFrames = {read=FiFrames, nodefault};
  108. __property System::LongInt iVertices = {read=FiVertices, nodefault};
  109. __property System::LongInt iTriangles = {read=FiTriangles, nodefault};
  110. __property TIndexList IndexList = {read=fIndexList};
  111. __property TGLVertexList VertexList = {read=fVertexList};
  112. };
  113. #pragma pack(pop)
  114. //-- var, const, procedure ---------------------------------------------------
  115. static _DELPHI_CONST System::Word MAX_MD2_TRIANGLES = System::Word(0x1000);
  116. static _DELPHI_CONST System::Word MAX_MD2_VERTICES = System::Word(0x800);
  117. static _DELPHI_CONST System::Word MAX_MD2_FRAMES = System::Word(0x200);
  118. static _DELPHI_CONST System::Int8 MAX_MD2_SKINS = System::Int8(0x20);
  119. static _DELPHI_CONST System::Int8 MAX_MD2_SKINNAME = System::Int8(0x40);
  120. } /* namespace Md2 */
  121. } /* namespace Formatx */
  122. #if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATX_MD2)
  123. using namespace Formatx::Md2;
  124. #endif
  125. #if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATX)
  126. using namespace Formatx;
  127. #endif
  128. #pragma pack(pop)
  129. #pragma option pop
  130. #pragma delphiheader end.
  131. //-- end unit ----------------------------------------------------------------
  132. #endif // Formatx_MD2HPP