This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
banjo_kazooie:geometry_layouts [2019/12/12 19:19] pfedak more geo layout commands |
banjo_kazooie:geometry_layouts [2023/08/27 21:10] minirop [0x0E: UNKNOWN] |
||
---|---|---|---|
Line 9: | Line 9: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 01] | Sort Command ID | | | [00 00 00 01] | Sort Command ID | | ||
- | | [00 00 <color #ff7f27>aa aa</color>] | Continue* | | + | | [<color #ff7f27>aa aa aa aa</color>] | Command Length* (0x28)| |
| [<color darkred>xx xx xx xx</color>] | first child x (float) | | | [<color darkred>xx xx xx xx</color>] | first child x (float) | | ||
| [<color darkgreen>yy yy yy yy</color>] | first child y (float) | | | [<color darkgreen>yy yy yy yy</color>] | first child y (float) | | ||
Line 27: | Line 27: | ||
| [00 00 00 02] | Bone Command ID | | | [00 00 00 02] | Bone Command ID | | ||
| [00 00 <color darkred>aa aa</color>] | Load DL - DL Segment Address/8 (Example: 0x1C = 0xE0)| | | [00 00 <color darkred>aa aa</color>] | Load DL - DL Segment Address/8 (Example: 0x1C = 0xE0)| | ||
- | | [<color darkgreen>bb</color> <color darkblue>cc</color> <color purple>dd dd</color>] | <color darkgreen>bb</color>=Continue*, <color darkblue>cc</color>=Bone ID, <color purple>dddd</color>=?? | | + | | [<color darkgreen>bb</color> <color darkblue>cc</color> <color purple>dd dd</color>] | <color darkgreen>bb</color>=Command Length* (0x10), <color darkblue>cc</color>=Bone ID, <color purple>dddd</color>=?? | |
- | | [00 00 00 00] | If <color darkgreen>bb</color>=10, these four bytes are written before the next command. | | + | | [00 00 00 00] | If <color darkgreen>bb</color>=10, these four bytes are written before the next command. (Padding) | |
- | *Continue: If 00, GeoLayout stops after command. If 0x10, GeoLayout continues. | + | |
---- | ---- | ||
Line 38: | Line 38: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 03] | Load DL Command ID | | | [00 00 00 03] | Load DL Command ID | | ||
- | | [00 00 00 <color darkred>aa</color>] | 00 to end GeoLayout after command, 0x10 to continue | | + | | [<color darkred>aa aa aa aa</color>] | Command Length* (0x10)| |
| [<color darkgreen>bb bb</color> <color darkblue>cc cc</color>] | <color darkgreen>bbbb</color>=Offset in DL Segment/0x08, <color darkblue>cccc</color>=Tri Count | | | [<color darkgreen>bb bb</color> <color darkblue>cc cc</color>] | <color darkgreen>bbbb</color>=Offset in DL Segment/0x08, <color darkblue>cccc</color>=Tri Count | | ||
- | | [00 00 00 00] | If <color darkred>aa</color>=10, these four bytes are written before the next command. | | + | | [00 00 00 00] | If <color darkred>aa</color>=10, these four bytes are written before the next command. (Padding)| |
- | *Continue: If 00, GeoLayout stops after command. If 0x10, GeoLayout continues. | + | |
''Example: 00 00 00 03 00 00 00 00 00 2D 00 10'' | ''Example: 00 00 00 03 00 00 00 00 00 2D 00 10'' | ||
Line 55: | Line 55: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 05] | Skinning Command ID | | | [00 00 00 05] | Skinning Command ID | | ||
- | | [00 00 <color darkred>aa aa</color>] | Continue* | | + | | [<color darkred>aa aa aa aa</color>] | Command Length* (Varies)| |
| [<color darkgreen>bb bb</color> <color darkblue>cc cc</color>] | <color darkgreen>bb bb</color>=DL segment offset, sets up vertics on previous bone | | | [<color darkgreen>bb bb</color> <color darkblue>cc cc</color>] | <color darkgreen>bb bb</color>=DL segment offset, sets up vertics on previous bone | | ||
| [<color purple>dd dd</color> <color #b5e61d>ee ee</color>] | <color darkblue>cc cc</color>, <color purple>dd dd</color>, <color #b5e61d>ee ee</color>, ...=zero-terminated list of DL offsets for current bone, using setup vertices | | | [<color purple>dd dd</color> <color #b5e61d>ee ee</color>] | <color darkblue>cc cc</color>, <color purple>dd dd</color>, <color #b5e61d>ee ee</color>, ...=zero-terminated list of DL offsets for current bone, using setup vertices | | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 0x06: BRANCH ==== | ||
+ | (unused?) | ||
+ | |||
+ | Jumps. Usage: | ||
+ | |||
+ | ^ Value/Syntax ^ Description ^ | ||
+ | | [00 00 00 06] | Branch Command ID | | ||
+ | | [<color darkred>aa aa aa aa</color>] | Command Length* (0x10)| | ||
+ | | [<color darkgreen>bb bb bb bb</color>] | GeoLayout Command Target Offset (This should accept negative values)| | ||
+ | | [<color #FFFFFF>00 00 00 00</color>] | Padding | | ||
---- | ---- | ||
Line 67: | Line 80: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
- | | [00 00 00 05] | Skinning Command ID | | + | | [00 00 00 08] | LOD Command ID | |
- | | [00 00 <color orange>aa aa</color>] | Continue* | | + | | [<color orange>aa aa aa aa</color>] | Command Length* (0x20)*| |
| [<color #b5e61d>bb bb bb bb</color>] | max distance (float) | | | [<color #b5e61d>bb bb bb bb</color>] | max distance (float) | | ||
| [<color #99d9ea>cc cc cc cc</color>] | min distance (float) | | | [<color #99d9ea>cc cc cc cc</color>] | min distance (float) | | ||
Line 76: | Line 89: | ||
| [<color #c8bfe7>dd dd dd dd</color>] | geometry layout offset | | | [<color #c8bfe7>dd dd dd dd</color>] | geometry layout offset | | ||
+ | *Note that the command length actually includes the length of the child GL list to run, and the length can be 0 to denote the end of a list, but there could still be MANY child commands to run. | ||
---- | ---- | ||
Line 85: | Line 99: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 0A] | Reference Point Command ID | | | [00 00 00 0A] | Reference Point Command ID | | ||
- | | [00 00 <color orange>aa aa</color>] | Continue* | | + | | [<color orange>aa aa aa aa</color>] | Command Length* (0x18)| |
| [<color #b5e61d>bb bb</color> <color purple>cc cc</color>] | <color #b5e61d>bb bb</color>= reference point index, <color purple>cc cc</color>=bone index | | | [<color #b5e61d>bb bb</color> <color purple>cc cc</color>] | <color #b5e61d>bb bb</color>= reference point index, <color purple>cc cc</color>=bone index | | ||
| [<color darkred>xx xx xx xx</color>] | bone offset x (float) | | | [<color darkred>xx xx xx xx</color>] | bone offset x (float) | | ||
Line 101: | Line 115: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 0C] | Reference Point Command ID | | | [00 00 00 0C] | Reference Point Command ID | | ||
- | | [00 00 <color orange>aa aa</color>] | Continue* | | + | | [<color orange>aa aa aa aa</color>] | Command Length* (Varies) | |
| [<color #b5e61d>bb bb</color> <color purple>cc cc</color>] | <color #b5e61d>bb bb</color>=child count, <color purple>cc cc</color>=selector index | | | [<color #b5e61d>bb bb</color> <color purple>cc cc</color>] | <color #b5e61d>bb bb</color>=child count, <color purple>cc cc</color>=selector index | | ||
| [<color darkred>dd dd dd dd</color>] | <color darkred>dd dd dd dd</color>, <color darkgreen>ee ee ee ee</color>, ...=list of <color #b5e61d>bb bb</color> offsets to geometry layouts that might be selected | | | [<color darkred>dd dd dd dd</color>] | <color darkred>dd dd dd dd</color>, <color darkgreen>ee ee ee ee</color>, ...=list of <color #b5e61d>bb bb</color> offsets to geometry layouts that might be selected | | ||
Line 115: | Line 129: | ||
^ Value/Syntax ^ Description ^ | ^ Value/Syntax ^ Description ^ | ||
| [00 00 00 0D] | Command | | | [00 00 00 0D] | Command | | ||
- | | [00 00 00 <color darkred>aa</color>] | 00 for final instance, 28 otherwise | | + | | [<color orange>aa aa aa aa</color>] | Command Length* | |
| [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Draw distance: Negative Coords| | | [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Draw distance: Negative Coords| | ||
| [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Draw distance: Positive Coords | | | [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Draw distance: Positive Coords | | ||
| [<color darkred>bb bb</color> <color darkgreen>cc cc</color>] | <color darkred>bbbb</color>= ?? Usually 0018, <color darkgreen>cccc</color>= ????? | | | [<color darkred>bb bb</color> <color darkgreen>cc cc</color>] | <color darkred>bbbb</color>= ?? Usually 0018, <color darkgreen>cccc</color>= ????? | | ||
+ | |||
+ | *Command Length: If value is nonzero, GeoLayout continues, else it is the last command. | ||
---- | ---- | ||
+ | ==== 0x0E: UNKNOWN ==== | ||
+ | |||
+ | Usage: | ||
+ | ^ Value/Syntax ^ Description ^ | ||
+ | | [00 00 00 0E] | Command | | ||
+ | | [<color orange>aa aa aa aa</color>] | Command Length | | ||
+ | | [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Coords | | ||
+ | | [<color darkred>XX XX</color> <color darkgreen>YY YY</color> <color darkblue>ZZ ZZ</color>] | Coords | | ||
+ | | [00 00 00 00] | padding | | ||
+ | | ... | Child commands* | | ||
+ | |||
+ | *Child commands: if Command Length is not zero, then read commands until size is reached | ||
+ | |||
+ | ---- | ||