2 #include "XFileExporter.h" 3 #include "XFileDataObject.h" 4 #include "ParaXModel.h" 12 unsigned char Data4[8];
14 #pragma region +[Template UUID define] 15 #define DECLARE_UUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 17 = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } 20 DECLARE_UUID(UUID_ParaXHeader,
21 0x10000000, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
24 DECLARE_UUID(UUID_ParaXBody,
25 0x20000000, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
27 DECLARE_UUID(UUID_ModelView,
28 0x10000007, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
30 DECLARE_UUID(UUID_XViews,
31 0x20000005, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
33 DECLARE_UUID(UUID_ModelTextureDef,
34 0x1000000d, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
36 DECLARE_UUID(UUID_XTextures,
37 0x20000002, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
39 DECLARE_UUID(UUID_AnimationBlock,
40 0x10000003, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
43 DECLARE_UUID(UUID_ModelAttachmentDef,
44 0x10000014, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
46 DECLARE_UUID(UUID_XAttachments,
47 0x20000003, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
49 DECLARE_UUID(UUID_XVertices,
50 0x20000001, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
52 DECLARE_UUID(UUID_XIndices0,
53 0x20000006, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
56 DECLARE_UUID(UUID_ModelGeoset,
57 0x10000008, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
59 DECLARE_UUID(UUID_XGeosets,
60 0x20000007, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
62 DECLARE_UUID(UUID_XRenderPass,
63 0x20000008, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
66 DECLARE_UUID(UUID_ModelBoneDef,
67 0x10000004, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
69 DECLARE_UUID(UUID_XBones,
70 0x20000009, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
73 DECLARE_UUID(UUID_ModelAnimation,
74 0x10000002, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
76 DECLARE_UUID(UUID_XAnimations,
77 0x2000000f, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
79 DECLARE_UUID(UUID_XDWORDArray,
80 0x20000010, 0x0000, 0x0000, 0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x00);
89 XFileTemplateMember_t(
string _name,
string _type,
string _count =
"") :name(_name), type(_type), count(_count) {}
96 vector<XFileTemplateMember_t> members;
98 XFileTemplate_t(
string _name,
UUID_t _uuid,
bool _beExtend =
false) :name(_name), uuid(_uuid), beExtend(_beExtend) {}
99 void Init(
string _name,
UUID_t _uuid,
bool _beExtend =
false)
103 beExtend = _beExtend;
108 uuid = { 0x00000000, 0x0000, 0x0000,{ 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, 0x00, 0x00 } };
123 static bool Export(
const string& filepath,
CParaXModel* pMesh);
125 void ExportParaXModel(ofstream& strm);
128 static void InitTemplates();
130 void WriteTemplates(ofstream& strm);
132 void UUIDToBin(
UUID_t guid,
char* bin);
135 void WriteUUID(ofstream& strm,
UUID_t guid);
142 DWORD CountIsAnimatedValue();
148 bool WriteParaXBodyChild(
XFileDataObjectPtr pData,
const string& strTemplateName,
const string& strName =
"");
180 static vector<XFileTemplate_t> m_vecTemplates;
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: XFileCharModelExporter.h:92
Definition: XFileCharModelExporter.h:84
Definition: animated.h:23
Definition: XFileExporter.h:18
Definition: XFileCharModelExporter.h:116
Definition: XFileCharModelExporter.h:7
Definition: ParaXSerializer.h:29
ParaX model is the model file for character animation, etc in the game world.
Definition: ParaXModel.h:30
Definition: modelheaders.h:186