1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-24 16:01:26 +00:00

more progress on spec

This commit is contained in:
Dragorn421 2025-02-15 22:23:56 +01:00
parent 9e92c36fae
commit 5eff83084c
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335

View file

@ -62,7 +62,7 @@ Two attributes are required on all resource elements: `Name` and `Offset`.
## `Blob`
```xml
<Blob Name="gNameBlob" Offset="0x1230" Size="0x421">
<Blob Name="gNameBlob" Size="0x421" Offset="0x1230">
```
Unstructured binary data.
@ -86,17 +86,109 @@ A display list.
`RawPointers` (defaults to an empty value) is a comma-separated list of values the display list uses as raw pointers ("hex" instead of a symbol). The purpose of this attribute is to silence extraction warnings.
## `Mtx`
```xml
<Mtx Name="gNameMtx" Offset="0x1230"/>
```
A fixed-point matrix.
## `Texture`
```xml
<Texture Name="gNameTex" Format="rgba16" Width="16" Height="16" Offset="0x1230"/>
<Texture Name="gNameTex" Format="ci8" Width="16" Height="16" Offset="0x1230" TlutOffset="0x2340"/>
<Texture Name="gNameTex" Format="ci8" Width="16" Height="16" Offset="0x1230" ExternalTlut="baserom_file" ExternalTlutOffset="0x2340"/>
```
A texture, an image in one of the native N64 formats.
- Required attributes for all formats: `Format`, `Width`, `Height`
- Required attributes for CI formats (`ci4`, `ci8`): `TlutOffset`, or `ExternalTlut` and `ExternalTlutOffset`
`Format` is the format of the texture, one of `rgba32`, `rgba16`, `i4`, `i8`, `ia4`, `ia8`, `ia16`, `ci4` or `ci8`.
`Width` and `Height` specify the dimensions of the texture.
For CI formats, the TLUT (Texture Look Up Table, or palette) must be specified with either `TlutOffset` if the TLUT is in the same file as the texture, or both of `ExternalTlut` and `ExternalTlutOffset` if the TLUT is in a different file. `ExternalTlut` is the name of the baserom file where the TLUT is. In both cases, the TLUT must also be declared as a resource.
## `Array`
```xml
<Array Name="gNameVtx" Count="42" Offset="0x1230">
<Vtx/>
</Array>
<Array Name="gNameVec3sArray" Count="42" Offset="0x1230">
<Vector Type="s16" Dimensions="3"/>
</Array>
<Array Name="gNameS16Array" Count="42" Offset="0x1230">
<Scalar Type="s16"/>
</Array>
```
An array of vertices, vectors or scalars. The child element determines the array's element type.
- Required attributes: `Count`
`Count` is the length of the array.
The child element may be one of `<Vtx/>` (for `Vtx[]`), `<Vector Type="s16" Dimensions="3"/>` (for `Vec3s[]`) or `<Scalar Type="s16">` (for `s16[]`).
## `Scene`
```xml
<Scene Name="name" Offset="0x1230"/>
```
Scene commands.
## `Room`
```xml
<Room Name="name" Offset="0x1230"/>
```
Room commands.
## `Collision`
```xml
<Collision Name="gNameCol" Offset="0x1230"/>
```
Collision header.
## `Cutscene`
```xml
<Cutscene Name="gNameCs" Offset="0x1230"/>
```
Cutscene script.
## `Path`
```xml
<Path Name="gNamePathList" Offset="0x1230" NumPaths="12"/>
```
Path list.
- Required attributes: `NumPaths`
`NumPaths` is the length of the path list.
## `Skeleton`
## `LimbTable`
## `Limb`
## `Animation`
```xml
<Animation Name="gNameAnim" Offset="0x1230"/>
```
Animation.
## `CurveAnimation`
## `LegacyAnimation`
## `PlayerAnimation`