User Tools

Site Tools


banjo_kazooie:setup_file_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
banjo_kazooie:setup_file_data [2024/11/03 16:38]
Bl00D4NGEL Improve documentation for sprite object structures
banjo_kazooie:setup_file_data [2024/11/06 21:13] (current)
Bl00D4NGEL Improve documentation for model structures
Line 113: Line 113:
 === Sprite Structure === === Sprite Structure ===
 Sprites: 2D Objects that will face the camera at all times (aka Billboarding). Sprites: 2D Objects that will face the camera at all times (aka Billboarding).
-Sprites contain information about their ID, RGB values, their scale, whether they are mirrored or not, their position and which "​frame"​.+Sprites contain information about their id, RGB values, their scale, whether they are mirrored or not, their position and which "​frame"​. 
 +The sprite id has no offset in it's declaration. However while loading the sprite asset an offset of 0x572 is added on top of the id. 
 + 
 The 12 bytes contain this information in the following parts: The 12 bytes contain this information in the following parts:
    
Line 120: Line 122:
 The last 2 bytes mainly define the frame The last 2 bytes mainly define the frame
 ^ Address ^ Value/​Syntax ^ Description ^ ^ Address ^ Value/​Syntax ^ Description ^
-| 0x00 | <color red   >OOOO OOOO OOOO PRRR</​color>​ | Object Id, padding, RGB red |+| 0x00 | <color red   >SSSS SSSS SSSS PRRR</​color>​ | Sprite id, padding, RGB red |
 | 0x02 | <color orange>​GGGB BBSS SSSS SSMP</​color>​ | RGB green, RGB blue, scale, is mirror, padding | | 0x02 | <color orange>​GGGB BBSS SSSS SSMP</​color>​ | RGB green, RGB blue, scale, is mirror, padding |
 | 0x04 | <color yellow>​XX XX</​color>​ | X Position | | 0x04 | <color yellow>​XX XX</​color>​ | X Position |
Line 133: Line 135:
  
 First 4 bytes are ''​0x16 0x40 0x00 0xB4''​ in hex or ''​00010110 01000000 00000000 10110100''​ in binary First 4 bytes are ''​0x16 0x40 0x00 0xB4''​ in hex or ''​00010110 01000000 00000000 10110100''​ in binary
-  * 0x164 = object id = Music Note+  * 0x164 = object id = Music Note (0x6D6 with offset)
   * 0b0 = padding   * 0b0 = padding
   * 0b000 = RGB red   * 0b000 = RGB red
Line 199: Line 201:
   * 0b0 = isActorProp -> This is false for all "​Simple Object structures"​   * 0b0 = isActorProp -> This is false for all "​Simple Object structures"​
  
-=== Static ​Structure === +=== Model Structure === 
-Static: Objects that do not change unless given accompanied by script object.+Models: Objects that have model ID associated with it which are placed in the map. 
 +The Model ID has no offset in it's declaration. However while loading the model asset an offset of 0x2D1 is added to the id. 
 ^ Address ^ Value/​Syntax ^ Description ^ ^ Address ^ Value/​Syntax ^ Description ^
-| 0x00 | <color red>OO OO</​color>​ | Object ​Id | +| 0x00 | <color red   ​>MMMM MMMM MMMM PPPP</​color>​ | Model Id, padding
-| 0x02 | <color orange>RR</​color>​ | Rotation (Y Axis) +| 0x02 | <color orange>PP</​color>​ | Pitch 
-| 0x03 | <color yellow>​RR</​color>​ | Rotation (XZ Axis) |+| 0x03 | <color yellow>​RR</​color>​ | Roll |
 | 0x04 | <color green>XX XX</​color>​ | X Position | | 0x04 | <color green>XX XX</​color>​ | X Position |
 | 0x06 | <color lightgreen>​YY YY</​color>​ | Y Position | | 0x06 | <color lightgreen>​YY YY</​color>​ | Y Position |
 | 0x08 | <color cyan>ZZ ZZ</​color>​ | Z Position | | 0x08 | <color cyan>ZZ ZZ</​color>​ | Z Position |
-| 0x0A | <color lightblue>​SS</​color>​ | Size +| 0x0A | <color lightblue>​SS</​color>​ | Scale 
-| 0x0B | <color gray>​UU</​color>​ | Unknown Byte |+| 0x0B | <color gray>​UU</​color>​ | Padding ​| 
 +The 12 bytes contain this information in the following parts: 
 +  
 +The first 12 bits are the model id padded with 4 bits to create 2 byte. 
 +The next 6 bytes are 3 s16's to describe the position (XYZ) 
 +The last 2 bytes mainly define the scale of the model 
 + 
 + 
 +Example(s) for the dust bins next to banjos house in Spiral Mountain: 
 + 
 +{{:​banjo_kazooie:​bk_dust_bins_sm.png?​400|}} 
 + 
 + 
 +Bytes in level setup: ''​0x01,​ 0xC4, 0x01, 0x2B, 0x13, 0x02, 0xFE, 0x30, 0x1A, 0xE9, 0x32, 0xD2''​ 
 + 
 +First 2 bytes are ''​0x01 0xC4''​ in hex or ''​00000001 11000100''​ in binary 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x01 = Pitch 
 +  * 0x2B = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x1302 = X = 4866 
 +  * 0xFE30 = Y = -464 
 +  * 0x1AE9 = Z = 6889 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b110100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
 +Bytes in level setup: ''​0x01,​ 0xC4, 0x41, 0x00, 0x12, 0x81, 0xFE, 0x11, 0x1A, 0x3A, 0x32, 0x52''​ 
 + 
 +First 2 bytes are ''​0x01 0xC4''​ in hex or ''​00000001 11000100''​ in binary 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x41 = Pitch 
 +  * 0x00 = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x1281 = X = 4737 
 +  * 0xFE11 = Y = -495 
 +  * 0x1A3A = Z = 6714 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b010100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
 + 
 +Bytes in level setup: ''​0x01,​ 0xC4, 0x00, 0x01, 0x12, 0x3A, 0xFE, 0x0E, 0x1A, 0xF0, 0x32, 0xD2''​ 
 + 
 +First 2 bytes are ''​0x01 0xC4''​ in hex or ''​00000001 11000100''​ in binary 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x00 = Pitch 
 +  * 0x01 = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x123A = X = 4666 
 +  * 0xFE0E = Y = -498 
 +  * 0x1AF0 = Z = 6896 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b110100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
  
 ===== Camera Structure ===== ===== Camera Structure =====
banjo_kazooie/setup_file_data.1730651906.txt.gz · Last modified: 2024/11/03 16:38 by Bl00D4NGEL