Common Types: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>Aruki (Created page with "Types that are commonly seen in Retro Studios file formats. '''Note:''' Avoid linking directly to this page from articles. There's a template defined for each of the types on...") |
imported>Aruki No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
* '''64-bit IDs''' are used in Metroid Prime 3: Corruption and Donkey Kong Country Returns. | * '''64-bit IDs''' are used in Metroid Prime 3: Corruption and Donkey Kong Country Returns. | ||
* '''128-bit IDs''' are used in Donkey Kong Country: Tropical Freeze. The reason for the seemingly-unnecessary length increase is because it internally uses a new GUID system that's used commonly in a lot of different places throughout the game. | * '''128-bit IDs''' are used in Donkey Kong Country: Tropical Freeze. The reason for the seemingly-unnecessary length increase is because it internally uses a new GUID system that's used commonly in a lot of different places throughout the game. | ||
== FourCC == | |||
FourCCs are a 32-bit identifier that uses four ASCII characters. These are usually seen to represent either magic values or IDs. | |||
{| class="wikitable" | |||
! Offset | |||
! Type | |||
! Name | |||
|- | |||
| 0x0 | |||
| char[4] | |||
| '''Characters''' | |||
|- | |||
| 0x4 | |||
| colspan=2 {{unknown|End of FourCC}} | |||
|} | |||
== Vector3f == | == Vector3f == | ||
Line 24: | Line 41: | ||
| 0x0 | | 0x0 | ||
| float | | float | ||
| '''X | | '''X''' | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| float | | float | ||
| '''Y | | '''Y''' | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| float | | float | ||
| '''Z | | '''Z''' | ||
|- | |- | ||
| 0xC | | 0xC | ||
| colspan=2 {{unknown|End of Vector3f}} | | colspan=2 {{unknown|End of Vector3f}} | ||
|} | |||
== Quaternion == | |||
Used to represent orientations in some file formats. | |||
{| class="wikitable" | |||
! Offset | |||
! Type | |||
! Name | |||
|- | |||
| 0x0 | |||
| float | |||
| '''W''' | |||
|- | |||
| 0x4 | |||
| float | |||
| '''X''' | |||
|- | |||
| 0x8 | |||
| float | |||
| '''Y''' | |||
|- | |||
| 0xC | |||
| float | |||
| '''Z''' | |||
|- | |||
| 0x10 | |||
| colspan=2 {{unknown|End of Quaternion}} | |||
|} | |||
== Color4f == | |||
A Color4f is an RGBA color that uses floats where each color component ranges between 0.0 and 1.0. | |||
{| class="wikitable" | |||
! Offset | |||
! Type | |||
! Name | |||
|- | |||
| 0x0 | |||
| float | |||
| '''R''' | |||
|- | |||
| 0x4 | |||
| float | |||
| '''G''' | |||
|- | |||
| 0x8 | |||
| float | |||
| '''B''' | |||
|- | |||
| 0xC | |||
| float | |||
| '''A''' | |||
|- | |||
| 0x10 | |||
| colspan=2 {{unknown|End of Color4f}} | |||
|} | |||
== Color4i == | |||
A Color4i is an RGBA color that uses 8-bit integers to represent each color component. Color4f is much more common; Color4i is generally only seen on colors that interface closely with hardware (as they usually map to a GXColor structure instead of Retro's CColor class). | |||
{| class="wikitable" | |||
! Offset | |||
! Type | |||
! Name | |||
|- | |||
| 0x0 | |||
| u8 | |||
| '''R''' | |||
|- | |||
| 0x1 | |||
| u8 | |||
| '''G''' | |||
|- | |||
| 0x2 | |||
| u8 | |||
| '''B''' | |||
|- | |||
| 0x3 | |||
| u8 | |||
| '''A''' | |||
|- | |||
| 0x4 | |||
| colspan=2 {{unknown|End of Color4i}} | |||
|} | |} | ||