Anonymous

Changes

From Final Fantasy Inside

FF7/Battle model format (PSX)

3,617 bytes added, 00:13, 6 August 2005
Model information
uint16 Count;
uint16 TexPage;
} PolyCount;</pre> <pre>typedef struct
{
int16 X;
int16 Z;
int16 Unused;
} Vertex;</pre>
<pre>typedef struct
{
uint8 Red;
uint8 Blue;
uint8 Unused;
} Color;</pre>
<pre>typedef struct
{
uint16 A;
uint16 C;
uint16 D;
} PolyIndices;</pre>
<pre>typedef struct
{
PolyIndices Vertexs;
Color Colors[3];
} ColorTriangle;</pre>
<pre>typedef struct
{
PolyIndices Vertexs;
Color Colors[4];
} ColorQuadric;</pre>
<pre>
typedef struct
{
uint8 U1, V1;
uint8 U2, V2;
} TexTriangle;</pre>
<pre>typedef struct
{
PolyIndices Vertex;
uint8 U3, V3;
uint16 Unused;
} TexQuadric;</pre> 
The Flags field on the Textured polygons contains the texture palette offset for the [[PSX/TIM_format|TIM]] texture file associated with the model. The TexPage is not used in any of the battle models however battle scenes do use this to refer another page of texture data (for 8bpp [[PSX/TIM_format|TIM]]'s used in them).
 
<table style="text-align: left; width: 384px;" border="1"
cellspacing="0" cellpadding="2">
<tr>
<td
style="width: 76px; vertical-align: middle; background-color: rgb(204, 204, 204); text-align: center;">Offset<br>
</td>
<td
style="text-align: center; vertical-align: middle; background-color: rgb(204, 204, 204);">Size<br>
</td>
<td
style="text-align: center; vertical-align: middle; background-color: rgb(204, 204, 204);">Description<br>
</td>
</tr>
<tr>
<td
style="width: 76px; vertical-align: middle; text-align: center;">000000<br>
</td>
<td style="vertical-align: top;">4 bytes (long)<br>
</td>
<td style="vertical-align: top;">Vertex pool size (in bytes)<br>
</td>
</tr>
<tr>
<td
style="width: 76px; vertical-align: middle; text-align: center;">000004<br>
</td>
<td style="vertical-align: top;">Vertex Pool Size bytes<br>
</td>
<td style="vertical-align: top;">Bone Length<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">&nbsp;Number of polygons
&lt;textured triangles&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">Polygon flags (Palette)<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">N * 16 bytes<br>
</td>
<td style="vertical-align: top;">Textured Triangles if N polygons
= 0 these ocupy no space<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">Number of polygons &lt;textured
quadrics&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">Polygon flags (Palette)<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">N * 20 bytes<br>
</td>
<td style="vertical-align: top;">Textured Quadrics if N polygons
= 0 these ocupy no space<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">Number of polygons
&lt;triangles&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">&lt;always zero&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">N * 20 bytes<br>
</td>
<td style="vertical-align: top;">Colored vertex triangles if N
polygons = 0 these ocupy no space<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">Number of polygons
&lt;quadrics&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">2 bytes (word)<br>
</td>
<td style="vertical-align: top;">&lt;always zero&gt;<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;">...<br>
</td>
<td style="vertical-align: top;">N * 24 bytes<br>
</td>
<td style="vertical-align: top;">Colored vertex quadrics if N
polygons = 0 these ocupy no space</td>
</tr>
</table>
=== Battle animations ===
Anonymous user