This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
super_mario_64:geometry_layout_commands [2018/10/19 08:00] David Added documentation for the geometry layout commands: [06: Store Current Node Pointer To Table (Unused)] and [07: Set/OR/AND Node Flags (Unused)] |
super_mario_64:geometry_layout_commands [2018/10/21 06:33] David Added documentation for the commands [11: Translate Node (and Load Display List or Start Geo Layout)] and [12: Rotate Node (and Load Display List or Start Geo Layout)] |
||
---|---|---|---|
Line 321: | Line 321: | ||
---- | ---- | ||
- | ==== 13: Load Display List ==== | + | ==== 11: Translate Node (and Load Display List or Start Geo Layout) ==== |
- | Loads display list with drawing layer and offsets the model on X/Y/Z axis. | + | Applies translation to the child nodes, and a display list if one is specified. You can start a geometry layout with this command to set the offset for the entire model. You cannot start a geometry layout and load a display list at the same time, as it will cause the game to freeze (white-screen). |
+ | |||
+ | |||
+ | |||
+ | ''11 [<color orange>B</color>][<color lightgrey>L</color>] [<color darkred>XX XX</color>] [<color darkgreen>YY YY</color>] [<color darkblue>ZZ ZZ</color>] {<color purple>AA AA AA AA</color>}'' | ||
+ | |||
+ | | <color orange>B</color> | Include last 4 bytes if set to 8 (command will be C bytes long instead of 8) | | ||
+ | | <color darkgrey>L</color> | Drawing layer if <color orange>B</color> is set, otherwise will always be zero | | ||
+ | | <color darkred>X</color> | X translation offset (s16) | | ||
+ | | <color darkgreen>Y</color> | Y translation offset (s16) | | ||
+ | | <color darkblue>Z</color> | Z translation offset (s16) | | ||
+ | | <color purple>A</color> | Segmented address with display list if <color orange>B</color> is set. \\ Also creates a joint of some kind? (Does not work with animations?) | | ||
+ | |||
+ | Length: 8-C (variable) | ||
+ | |||
+ | Note: You can't just use the 8-byte version of 0x11 command just anywhere. It seems like the command needs a joint in it's parent node(s) for it to work properly (created from geo layout commands 0x11, 0x12, and 0x13). | ||
+ | |||
+ | 0B000000 | ||
+ | 04000000 | ||
+ | 11 00 0000 0100 0000 // This will cause a crash | ||
+ | 04000000 | ||
+ | 15 01 00 00 0700A290 | ||
+ | 05000000 | ||
+ | 05000000 | ||
+ | 01000000 | ||
+ | |||
+ | 0B000000 | ||
+ | 04000000 | ||
+ | 11 80 0000 0100 0000 00000000 // This will work, since it creates a joint. | ||
+ | 04000000 | ||
+ | 15 01 00 00 0700A290 | ||
+ | 05000000 | ||
+ | 05000000 | ||
+ | 01000000 | ||
+ | |||
+ | 11 00 0000 0100 0000 // This will also work, since it is starting the geo layout. | ||
+ | 04000000 | ||
+ | 15 01 00 00 0700A290 | ||
+ | 05000000 | ||
+ | 01000000 | ||
+ | |||
+ | 0B000000 | ||
+ | 04000000 | ||
+ | 13 01 0000 0000 0000 00000000 | ||
+ | 04000000 | ||
+ | 11 00 0000 0100 0000 // This will also work, since there is a joint above it. | ||
+ | 04000000 | ||
+ | 15 01 00 00 0700A290 | ||
+ | 05000000 | ||
+ | 05000000 | ||
+ | 05000000 | ||
+ | 01000000 | ||
+ | |||
+ | ---- | ||
+ | ==== 12: Rotate Node (and Load Display List or Start Geo Layout) ==== | ||
+ | Applies rotation to the child nodes, and a display list if one is specified. You can start a geometry layout with this command to set the rotation for the entire model. You cannot start a geometry layout and load a display list at the same time, as it will cause the game to freeze (white-screen). | ||
+ | |||
+ | ''12 [<color orange>B</color>][<color lightgrey>L</color>] [<color darkred>RX RX</color>] [<color darkgreen>RY RY</color>] [<color darkblue>RZ RZ</color>] {<color purple>AA AA AA AA</color>}'' | ||
+ | |||
+ | | <color orange>B</color> | Include last 4 bytes if set to 8 (command will be C bytes long instead of 8) | | ||
+ | | <color darkgrey>L</color> | Drawing layer if <color orange>B</color> is set, otherwise will always be zero | | ||
+ | | <color darkred>RX</color> | X rotation (s16) | | ||
+ | | <color darkgreen>RY</color> | Y rotation (s16) | | ||
+ | | <color darkblue>RZ</color> | Z rotation (s16) | | ||
+ | | <color purple>A</color> | Segmented address with display list if <color orange>B</color> is set.\\ Also creates a joint of some kind? (Does not work with animations?) | | ||
+ | |||
+ | Length: 8-C (variable) | ||
+ | |||
+ | Note: You can't just use the 8-byte version of 0x12 command just anywhere. It seems like the command needs a joint in it's parent node(s) for it to work properly (created from geo layout commands 0x11, 0x12, and 0x13). | ||
+ | |||
+ | (see geo layout command 0x11 for examples) | ||
+ | |||
+ | ---- | ||
+ | ==== 13: Load Display List With Offset ==== | ||
+ | Loads display list with drawing layer and offsets the model and the node's children on X/Y/Z axis. | ||
''13 [<color darkgray>LL</color>] [<color darkred>XX XX</color>] [<color darkgreen>YY YY</color>] [<color darkblue>ZZ ZZ</color>] [<color purple>AA AA AA AA</color>]'' | ''13 [<color darkgray>LL</color>] [<color darkred>XX XX</color>] [<color darkgreen>YY YY</color>] [<color darkblue>ZZ ZZ</color>] [<color purple>AA AA AA AA</color>]'' |