Geometry (Metroid Prime): Difference between revisions
Jump to navigation
Jump to search
→Surface
>Aruki |
>Aruki |
||
Line 65: | Line 65: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! | ! Type | ||
! | ! Count | ||
! Name | |||
! Notes | ! Notes | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | float | ||
| '''Center | | 3 | ||
| '''Center Point''' | |||
| Used for depth sorting on CMDL and used as the eye position for reflections | | Used for depth sorting on CMDL and used as the eye position for reflections | ||
|- | |- | ||
| 0xC | | 0xC | ||
| | | u32 | ||
| '''Material | | 1 | ||
| '''Material Index''' | |||
| | | | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| | | u16 | ||
| 1 | |||
| '''Mantissa''' | | '''Mantissa''' | ||
| | | Always 0x8000. | ||
|- | |- | ||
| 0x12 | | 0x12 | ||
| | | u16 | ||
| 1 | |||
| '''Primitive table size''' | | '''Primitive table size''' | ||
| '''Important: this value is not always reliable''' | | '''Important: this value is not always reliable''' | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
| | | u32 | ||
| ''' | | 1 | ||
| Always 0 | | '''Model Pointer Storage''' | ||
| Always 0; the game uses this space at runtime to store a pointer to the parent CCubeModel instance | |||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 4 | | 4 | ||
| '''Next | | '''Next Surface Pointer Storage''' | ||
| Always 0 | | Always 0; the game uses this space at runtime to store a pointer to the next surface | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
| | | u32 | ||
| '''Extra | | 1 | ||
| '''Extra Data Size''' | |||
| Amount of space taken up by extra data. Always 0 on CMDLs, 0x18 on MREAs. | | Amount of space taken up by extra data. Always 0 on CMDLs, 0x18 on MREAs. | ||
|- | |- | ||
| 0x20 | | 0x20 | ||
| | | float | ||
| '''Surface | | 3 | ||
| '''Surface Normal''' | |||
| On materials that use the Samus reflection, this is used to project the reflection onto the surface | | On materials that use the Samus reflection, this is used to project the reflection onto the surface | ||
|- | |- | ||
| 0x2C | | 0x2C | ||
| | | u16 | ||
| {{unknown| | | 1 | ||
| Not in Prime 1 | | {{unknown|Unknown}} | ||
| Not in Prime 1. | |||
|- | |- | ||
| 0x2E | | 0x2E | ||
| | | u16 | ||
| {{unknown| | | 1 | ||
| Not in Prime 1 | | {{unknown|Unknown}} | ||
| Not in Prime 1. | |||
|- | |- | ||
| 0x30 | | 0x30 | ||
| | | u8 | ||
| '''Extra | | ''Extra Data Size'' | ||
| Empty on CMDL; contains a bounding box used for depth sorting on MREA | | '''Extra Data''' | ||
| Empty on CMDL; contains a bounding box used for depth sorting on MREA. | |||
|- | |- | ||
| colspan= | | colspan=5 {{unknown|End of surface header; pad to multiple of 32 before primitive data starts}} | ||
|} | |} | ||
Line 146: | Line 157: | ||
|- | |- | ||
| 0x98 | | 0x98 | ||
| Triangle | | Triangle Strip | ||
|- | |- | ||
| 0xA0 | | 0xA0 | ||
| Triangle | | Triangle Fan | ||
|- | |- | ||
| 0xA8 | | 0xA8 | ||
Line 155: | Line 166: | ||
|- | |- | ||
| 0xB0 | | 0xB0 | ||
| Line | | Line Strip | ||
|- | |- | ||
| 0xB8 | | 0xB8 |