Difference between revisions of "PTCL (File Format)"

From Deep Sea Knowledge
Jump to navigation Jump to search
(correct data type in GRSC for -1 value)
(document GTRF and GTNT sections)
Line 34: Line 34:
 
== GRTF section ==
 
== GRTF section ==
  
GRTF stands for '''Graphics Res Texture File'''. It contains a GTNT sub-section. Details TODO. Likely contains an offset to an embedded BNTX file.
+
GRTF stands for '''Graphics Res Texture File'''.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Offset !! Type !! Description
 +
|-
 +
| 0x0 || String || "GRTF" (<code>0x47525446</code>) magic number
 +
|-
 +
| 0x4 || UInt32 || File size?
 +
|-
 +
| 0x8 || UInt32 || Offset to GTNT sub-section
 +
|-
 +
| 0xC || UInt32 || Unknown
 +
|-
 +
| 0x10 || UInt32 || Always <code>0xFFFFFFFF</code>
 +
|-
 +
| 0x14 || UInt32 || Offset to BNTX file
 +
|}
 +
 
 +
=== GTNT sub-section ===
 +
 
 +
It is unknown what GTNT stands for.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Offset !! Type !! Description
 +
|-
 +
| 0x0 || String || "GTNT" (<code>0x47544E54</code>) magic number
 +
|-
 +
| 0x4 || UInt32 || Unknown (maybe section size or end offset)
 +
|-
 +
| 0x8 || UInt32 || Always <code>0xFFFFFFFF</code>
 +
|-
 +
| 0xC || UInt32 || Unknown (maybe section size or end offset)
 +
|-
 +
| 0x10 || UInt32 || Always <code>0xFFFFFFFF</code>
 +
|-
 +
| 0x14 || UInt32 || Offset to first texture descriptor
 +
|}
 +
 
 +
==== Texture descriptor ====
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Offset !! Type !! Description
 +
|-
 +
| 0x0 || UInt64 || Texture ID?
 +
|-
 +
| 0x8 || UInt32 || Offset to next texture descriptor
 +
|-
 +
| 0xC || UInt32 || Length of name string (including NULL terminator)
 +
|-
 +
| 0x10 || String || NULL-terminated name string
 +
|}
  
 
== PRMA section ==
 
== PRMA section ==

Revision as of 16:02, 19 December 2018

A Particle file contains data for particle effects.

All offsets are relative to the containing (sub-)section.

Header

Offset Type Description
0x0 String "VFXB[space][space][space][space]" (0x5646584220202020) magic number
0x8 UInt8 Zero?
0x9 UInt8 Graphics API version
0xA UInt16 VFX API version
0xC UInt16 Endianness (0xFFFE for little, 0xFEFF for big)
0xE UInt16 Unknown
0x10 UInt32 Offset to zero-terminated name string
0x14 UInt16 Zero?
0x16 UInt16 Offset to first section
0x18 UInt32 Zero?
0x1C UInt32 File size

GRTF section

GRTF stands for Graphics Res Texture File.

Offset Type Description
0x0 String "GRTF" (0x47525446) magic number
0x4 UInt32 File size?
0x8 UInt32 Offset to GTNT sub-section
0xC UInt32 Unknown
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Offset to BNTX file

GTNT sub-section

It is unknown what GTNT stands for.

Offset Type Description
0x0 String "GTNT" (0x47544E54) magic number
0x4 UInt32 Unknown (maybe section size or end offset)
0x8 UInt32 Always 0xFFFFFFFF
0xC UInt32 Unknown (maybe section size or end offset)
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Offset to first texture descriptor

Texture descriptor

Offset Type Description
0x0 UInt64 Texture ID?
0x8 UInt32 Offset to next texture descriptor
0xC UInt32 Length of name string (including NULL terminator)
0x10 String NULL-terminated name string

PRMA section

PRMA stands for PRiMitive Array. Details TODO.

G3PR section

It is unknown what G3PR stands for. It contains a G3NT sub-section. Details TODO, though this section has an offset to an embedded BFRES file.

GRSN section

GRSN stands for Graphics Res Shader Normal. (Normal as in "regular".)

Offset Type Description
0x0 String "GRSN" (0x4E535247) magic number
0x4 UInt32 File size?
0x8 UInt32 Offset to GSRC sub-section (0xFFFFFFFF if non-existent)
0xC UInt32 Always 0xFFFFFFFF
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Offset to shader archive

GRSC sub-section

GRSC stands for Graphics Res Shader Compute.

Offset Type Description
0x0 String "GRSC" (0x43535247) magic number
0x4 UInt32 File size?
0x8 UInt32 Always 0xFFFFFFFF
0xC UInt32 Always 0xFFFFFFFF
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Offset to compute shader archive

ESTA section

ESTA stands for Emitter SeT Array. Details TODO.

ESFT section

It is unknown what ESFT stands for. Details TODO.