View difference between Paste ID: AiQmvg83 and z9GFxfxp
SHOW: | | - or go back to the newest paste.
1-
.pak
1+
2-
×ÊÔ´°üÍ·
2+
Översatt version av -------.txt
3
. Pak
4
Resources in Baotou
5-
	char flag[256];
5+
6-
	DWORD dwUnknown;
6+
7-
	DWORD dwIndexCount; // ÎļþË÷Òý×ÜÊý
7+
the flag of a char [256];
8-
	DWORD dwIndexOffset; // ÎļþË÷ÒýÊý¾ÝÔÚpakÆ«ÒÆλÖÃ
8+
DWORD dwUnknown;
9-
};
9+
The DWORD dwIndexCount; / / the total number of file index
10-
// ÿ¸öÎļþµÄË÷ÒýÊý¾Ý£¬Êý¾Ý¿éΪzipѹËõ
10+
The offset location of the the DWORD dwIndexOffset; / / file index data in the pak
11
;}
12
/ / For each file, the data block of the index data is zip
13-
	char fileName[256]; // ÎļþÃû
13+
14-
	DWORD dwSizeCompressed; // ѹËõºó´óС
14+
15-
	DWORD dwSizeUncompressed; // ѹËõÇ°´óС
15+
a char fileName [256]; / / file name
16-
	DWORD dwSize; // ÔÚpak°üÖеĴóС
16+
DWORD dwSizeCompressed; / / the compressed size
17-
	DWORD dwOffset; // ÔÚpakÖÐÆ«ÒÆλÖÃ
17+
DWORD dwSizeUncompressed; / / the uncompressed size
18-
	DWORD dwUnkonwn;
18+
DWORD the dwSize; / / pak package size
19-
	DWORD dwReserved[10];
19+
The location of the DWORD the dwOffset; / / offset in pak
20-
};
20+
DWORD dwUnkonwn;
21
The DWORD dwReserved [10];
22-
.ext 
22+
;}
23-
¶þά±í£¬Ç°ÃæÊDZíÍ·ÁÐ±í£¬ºóÃæÊÇÿһÐеÄÊý¾Ý£¬¸ñʽÊÇ£¬´óС + Êý¾Ý
23+
24-
ÿ¸ö±íÍ·Õ¼¾Ý64byte
24+
. Ext
25-
µÚÒ»¸öuint32δ֪
25+
Two-dimensional table in front of the header list, followed by each row of data, format, size + data
26-
µÚ¶þ¸öuint32ÊDZíÍ·Êý
26+
Each header occupy 64byte
27-
µÚÈý¸öuint32ÊÇÐÐÊý
27+
The first one uint32 unknown
28-
±ÈÈçdefaultcreatetable.ext
28+
The second one uint32 the number of header
29-
µÚ¶þ¸öuint32Ϊ3C010000¼´316ÊDZíÍ·Êý£¬´´½¨ÈËÎïʱµÄÐÅÏ¢
29+
The third uint32 is the number of rows
30-
µÚÈý¸öuint32Ϊ04000000¼´4ÊÇÐÐÊý£¬Ö»ÓÐËĸöÖ°Òµ
30+
For example defaultcreatetable.ext
31-
ÎļþÒÔTHEND½áβ
31+
Second uint32 3C010000 that is, 316 is the number of header information when creating personas
32-
ÿһÐпªÊ¼ÏÈÊÇÒ»¸öuint32µÄÐÐÊý
32+
Third uint32 for the 04 million that is, 4 is the number of rows, only four occupational
33-
ÎļþÍ·
33+
File at the end to the THEND
34
Beginning of each line the first one uint32 the number of rows
35
Header
36-
	uint32 id;
36+
37-
	uint32 maxHeader; // ±íÍ·Êý
37+
38-
	uint32 nLines; // ÐÐÊý
38+
uint32, the id;
39
/ / header uint32, maxHeader;
40-
	// ±íÍ·
40+
uint32 nLines; / / number of rows
41-
	struct _Header
41+
42-
	{
42+
/ / Table header
43-
		char name[64];
43+
44-
		uint32 type; // Êý¾ÝÀàÐÍ£¬3ÊÇ32λÊý£¬1ÊÇ×Ö·û´®µÈµÈ
44+
45-
	};
45+
char name [64];
46-
};
46+
uint32, type; / / data types is 32 digits, a string, etc.
47
;}
48-
.msh 
48+
;}
49-
Ä£ÐÍmesh£¬¸ñʽÈçÏÂ
49+
50
. Msh
51
The model mesh, the following format
52-
	char name[256];
52+
53-
	uint32 version; // °æ±¾
53+
54-
	uint32 nMesh; // mesh×ÜÊý
54+
char name [256];
55-
	uint32 unknown3;
55+
uint32, version; / / version
56-
	uint32 unknown4;
56+
uint32, nMesh; / / total number of the mesh
57-
	vec3f max;
57+
uint32 unknown3;
58-
	vec3f min;
58+
uint32 unknown4;
59-
	uint32 nBone; // ºóÃæ¹Ç÷À×ÜÊý
59+
vec3f max;
60-
};
60+
vec3f min;
61-
´ÓÎļþÍ·¿ªÊ¼Æ«ÒÆ1024×Ö½Ú¼´Îª¹Ç÷ÀÊý¾Ý
61+
uint32 nBone; / / total number of the back bone
62
;}
63
Beginning of the file offset of 1024 bytes is the bone data
64-
	char name[256];
64+
65-
	vec4f a, b, c, d;
65+
66-
};
66+
char name [256];
67-
ÔÙºóÃæÊÇmeshÐÅÏ¢£¬ÒÀ´ÎΪÈý½ÇÐÎË÷Òý£¬¶¥µã£¬·¨Ïߣ¬ÎÆÀí
67+
vec4f a, b, c, d;
68
;}
69
Followed by the mesh information, followed by the triangle index, vertices, normals, texture
70-
	char name1[256];
70+
71-
	char name2[256];
71+
72-
	uint32 nVertex; // ¶¥µã×ÜÊý
72+
a char of name1 [256];
73-
	uint32 count16; // 2×Ö½ÚµÄÈý½ÇÐÎË÷Òý×ÜÊý
73+
a char name2 [256];
74-
	uint32 unknown1;
74+
uint32 nVertex; / / vertices of the total number of
75-
	uint32 renderMode; // renderMode & 0x01 ? GL_TRIANGLE_STRIP : GL_TRIANGLES
75+
uint32 count16; / / 2 bytes of the total number of triangular index
76-
	char unknown[512 - 16];
76+
uint32 unknown1;
77-
};
77+
uint32, renderMode; / / renderMode & 0x01? square using GL_TRIANGLE_STRIP just: GL_TRIANGLES as the
78-
ÔÙºóÃæÊÇ8 * ¶¥µã×ÜÊý¸ö×Ö½ÚµÄÊý¾Ý£¬Ò»¸ö¶¥µãËĸöuint16ÕûÊý£¬¿ÉÄÜÊǸö¥µãµÄËĸö¹Ç÷ÀË÷Òý
78+
char unknown [512 - 16];
79-
ÔÙºóÃæÊÇ16 * ¶¥µã×ÜÊý¸ö×Ö½ÚµÄÊý¾Ý£¬Ò»¸ö¶¥µãËĸö¸¡µãÊý£¬¼ÓÔÚÒ»ÆðÕýºÃÊÇ1£¬¿ÉÄÜÊǸö¥µãµÄËĸö¹Ç÷ÀȨÖØ
79+
;}
80
Followed by 8 * vertex the total number of bytes of data, uint16 four integer a vertex, the vertices of the four bones index
81
Followed by the total number of bytes of data 16 * vertex, a vertex is four floating-point numbers, added together is just one, may be the vertex of the four bone weights
82-
Ò»¸ö.mshÎļþÀï¿ÉÄÜÓжà¸ömesh£¬ÉÏÃæÊÇÖ÷meshÐÅÏ¢
82+
83-
Ö÷meshºóÃæÊÇÒ»¸öuint32µÄÊý£¬±íʾºóÃæµÄ¹Ç÷À×ÜÊý£¬ÕâÀïµÄ¹Ç÷ÀÖ»ÓÐ256×Ö½ÚµÄÃû×Ö£¬¶øûÓÐabcdÕâËĸö¸¡µãÊý
83+
84-
ÔÙºóÃæÊÇSceneRoot£¬¸úÖ÷mesh½á¹¹Ò»Ñù
84+
A msh file may have more than one mesh, above the main mesh information
85-
ÔÙºóÃæÓÖÊÇÒ»¸öuint32µÄÊý£¬±íʾºóÃæµÄ¹Ç÷À×ÜÊý£¬ÒÔ´ËÀàÍÆ
85+
Behind the main mesh is a uint32 number and said the total number of back bone, where the bone is only 256 bytes of the name, but not abcd these four floating-point
86
Followed SceneRoot, with the main mesh structure
87-
.skn
87+
Then followed a uint32 number, said the total number of back bone, and so on
88-
²ÄÖÊÎļþ
88+
89
.. Skn
90
Material file
91
92-
	char name[256]; // flag
92+
93-
	char meshName[256]; // ¶ÔÓ¦meshÃû×Ö
93+
94-
	uint32 version;
94+
char name [256]; / / flag
95-
	uint32 nSkin; // º¬ÓÐskin×ÜÊý
95+
char meshName [256]; / / corresponding mesh name
96-
};
96+
uint32, version;
97
uint32 nSkin; / / containing skin the total number of
98-
ÿ¸ö²ÄÖʵÄÍ·ÐÅÏ¢
98+
;}
99
100
The header information of each material
101-
	char name[256];
101+
102-
	char DiffuseFX[256];
102+
103-
	float32 unknown1;
103+
char name [256];
104-
	uint32 unknown2;
104+
char DiffuseFX [256];
105-
};
105+
float32 unknown1;
106
uint32 unknown2;
107-
ºóÃæµÄÊý¾Ý£¬¶¼ÊÇ×Ö·û´®±êʶÐÎʽ
107+
;}
108-
¿ÉÄÜÊÇÒ»ÖÖ¶ÔÏóÐòÁл¯·½Ê½£¬ÏÈ´æ´¢ÔªËظöÊý£¬È»ºóÊÇÀàÐÍ£¬È»ºóÊý¾Ý´óС£¬È»ºóÊǾßÌåÊý¾Ý
108+
109-
±ÈÈçvec4fÀàÐ;ÍÊÇ2£¬std::string¾ÍÊÇ3£¬float32ÊÇ1£¬×Ö·û´®´æ´¢¸ñʽÊÇ£º´óС + ×Ö½ÚÊý¾Ý + 0
109+
Behind the data is a string form of identification
110
Is an object serialization to store the number of elements, then the type and size of the data, then the specific data
111
For example, vec4f type is 2, the std :: string is 3. Float32 is a string storage format is: Size + bytes data + 0
112-
std::string g_DiffuseTex;
112+
113-
std::string g_MaskTex;
113+
114
std :: string g_DiffuseTex;
115
std :: string g_MaskTex;
116
vec4f g_EmissiveColor;
117
float32 g_EmissivePower;
118
float32 g_EmissivePowerRange;
119-
std::string g_TatooTex;
119+
120
vec4f g_SkinColor;
121
std :: string g_TatooTex;
122
vec4f g_EyeColor;
123-
²¹³ä£º(17:01 2010/8/10)
123+
124
125-
Ò»¸ö.mshÎļþ¿Éº¬Óжà¸ömesh£¬
125+
Added: (17:01 2010/8/10)
126-
ÿ¸ömeshÊý¾Ý¸ñʽΪ£¬Á½¸ö×Ö·û´®Ãû×Ö£¬index£¬vertex£¬normal£¬texcoord
126+
127-
Èç¹ûÓйÇ÷ÀµÄ»°£¬ÔÙºóÃæÊÇboneIndexºÍboneWeight£¬Ã¿¸ö¶¥µã¸÷ÓÐ4¸ö
127+
A msh file can contain more than one mesh,
128-
ÔÙºóÃæÊÇsub bone£¬Ç°ÃæµÄboneIndexÏÈË÷ÒýÕâ¸ösub bone£¬Õâ¸öÔÙË÷ÒýÎļþ¿ªÍ·µÄ¹Ç÷À
128+
Each mesh data format, the two string name, index, the vertex normal, texcoord
129
Bone, then the followed boneIndex and boneWeight, each vertex of each of four
130-
Îļþ¿ªÍ·µÄ¹Ç÷ÀÖ»´æÃû×Ö×Ö·û´®£¬ÓÃÀ´Ë÷Òý.aniÎļþÖеĹÇ÷À£¬
130+
Followed by the sub bone boneIndex, in front of this index the sub bone re-index files at the beginning of bone
131-
ÒÔ±ãÕÒµ½Ó°Ï춥µãµÄij¸ö¹Ç÷ÀÔÚijһ¶¯»­Ö¡µÄ±ä»»¾ØÕó
131+
132
The bones of the beginning of the file only keep the name string is used to index. Ani file in the bone,
133-
.ani¸ñʽ
133+
In order to find the impact of vertices of a bone in a frame animation of the transformation matrix
134-
ÎļþÍ·
134+
135-
	struct _AniHeader
135+
. Ani format
136-
	{
136+
Header
137-
		char name[256];
137+
struct _AniHeader
138-
		uint32 version;
138+
139-
		uint32 nBone; // ¹Ç÷À×ÜÊý
139+
char name [256];
140-
		uint32 nAni; // ¶¯»­×ÜÊý
140+
uint32, version;
141-
	};
141+
uint32, nBone; / / bone the total number of
142-
ºóÃæÊÇÿ¸ö¶¯»­µÄÖ¡ÊýÁÐ±í£¬¾ÍÊÇÿ¸ö¶¯»­µÄ×ÜÖ¡Êý
142+
uint32 nAni; / / animation the total number of
143
;}
144-
ÔÙºóÃæÊý¾Ý°´Ò»¸ö¹Ç÷ÀÒ»¸ö¹Ç÷À·ÖµÄ£¬¹Ç÷ÀÊý¾ÍÊÇÎļþÍ·ÖеÄnBone
144+
Followed by the number of frames in each animation, is the total number of frames for each animation
145-
Ò»¸ö¹Ç÷ÀÀﺬÓÐÈ«²¿¶¯»­Êý¾Ý£¬È»ºóÊÇÏÂÒ»¸ö¹Ç÷À£¬»¹ÊǺ¬ÓиùÇ÷ÀµÄÈ«²¿¶¯»­Êý¾Ý
145+
146
Followed by the data of a bone a bone points, the number of bones in the file header nBone
147-
ÿ¸ö¹Ç÷ÀµÄÊý¾Ý½á¹¹Îª£º
147+
Contains all the animation data in a bone, and then the next bone, or containing the skeletal animation data
148-
¹Ç÷ÀÃû×Ö×Ö·û´®£¬¸¸¹Ç÷ÀÃû×Ö×Ö·û´®
148+
149-
È»ºóÊÇÿ¸ö¶¯»­µÄ±ä»»Êý¾Ý£¬¶¯»­¸öÊý¾ÍÊÇÎļþÍ·ÖеÄnAni
149+
Data structure for each bone:
150
Bone name string, the name of the parent bone string
151-
ÿ¸ö¶¯»­Êý¾ÝµÄ½á¹¹Îª£º
151+
Then the transformation data for each animation, the animation number in the file header nAni
152-
ÏÈÊÇÒ»¸öƽÒÆvec3f£¬Ò»¸öÐýתvec4f£¬Ò»¸öËõ·Åvec3f£¬Õâ¸öÊǸö¯»­³õʼ֡µÄ±ä»»
152+
153
The data structure for each animation:
154-
ºóÃæÊÇÒ»¸öuint32£¬±íʾƽÒƱ任¸öÊý£¬Ã»ÓÐƽÒƱ任¾ÍÊÇ0
154+
First, a translation vec3f a rotating vec4f, a zoom vec3f, this is the the animations initial frame transformation
155-
ÔÙºóÃ滹ÊÇÒ»¸öuint32£¬±íʾÐýת±ä»»¸öÊý£¬Ã»ÓÐÐýת±ä»»¾ÍÊÇ0
155+
156-
ÔÙºóÃ滹ÊÇÒ»¸öuint32£¬±íʾËõ·Å±ä»»¸öÊý£¬Ã»ÓÐËõ·Å±ä»»¾ÍÊÇ0
156+
Followed by a uint32, said to transform the number of translation, no translation transformation is 0
157
Followed by a uint32,, that the rotation transformation number, there is no rotation transformation is 0
158-
ƽÒƱ任½á¹¹£ºÒ»¸öuint16µÄÖ¡Êý£¬Ò»¸övec3f
158+
Followed by a uint32, the scaling transformation number, there is no scaling transformation is 0
159-
Ðýת±ä»»½á¹¹£ºÒ»¸öuint16µÄÖ¡Êý£¬Ò»¸övec4f
159+
160-
Ëõ·Å±ä»»½á¹¹£ºÒ»¸öuint16µÄÖ¡Êý£¬Ò»¸övec3f
160+
Translation transform structure: a uint16 number of frames, a vec3f
161
Rotation transform structure: a uint16 number of frames, a vec4f
162-
ÉÏÃæÊÇversionΪ11µÄaniÎļþ¸ñʽ£¬versionΪ10²»ÊÇuint16¶øÊÇuint32
162+
Scaling transformation structure: a uint16 number of frames, a vec3f
163
164-
versionΪ11£¬Ðýת±ä»»²»ÊÇvec4f£¬¶øÊÇËĸöshort£¬ÐèҪת³É¸¡µãÊýÔÙµ¥Î»»¯Ò»ÏÂ
164+
The above is a version for 11 ani file format, version 10 is not uint16 but uint32
165
166-
Ç°ÃæmeshÖеÄa, b, c, d¹¹³ÉÒ»¸ö±ä»»¾ØÕó£¬ÓÃÓڰѶ¥µã±ä»»µ½¸Ã¹Ç÷À¿Õ¼ä£¬ÊܸùÇ÷ÀÓ°ÏìµÄ¶¥µãÔÚÿһ֡×ö±ä»»Ç°±ØÐëÏȳËÉϸþØÕó
166+
version 11, the rotation transform not vec4f the, but four short, you need to turn into a floating point number and then the unit of about
167
168
In front of a mesh, b, c, d constitute a transformation matrix used to transform the vertices to the bone space affected by the skeleton vertices in each frame to do to transform the former must be multiplied by the matrix