User Tools

Site Tools


banjo_kazooie:structs

Structures

List of common structures found in Banjo-Kazooie


Map ID Slot

[Size: 0x08] Defines look and behavior of object

Offset Type Description
0x00 u16 mapIndex map index
0x02 u16 levelIndex associated level
0x04 char* map name string

Map Model Lookup Slot

[Size: 0x18] Defines look and behavior of object

Offset Type Description
0x00 u16 mapIndex map index
0x02 u16 mapROMIndex map model A ROM file index
0x04 u16 mapROMIndex map model B ROM file index
0x14 float model scale

Music Track Struct

[Size: 0x1A0] Defines look and behavior of object

Offset Type Description
0x000 u16
0x002 u8
0x003 u8
0x004 ALCSeq seq
0x124 ALCSeqPlayer seqp
0x178 u16 musicTrackIndex music track index
0x17A u16 musicTrackIndex music track index copy
0x17C float
0x180 float

Object Spawn Struct

[Size: 0x0C] Referenced when spawning an object.

Offset Type Description
0x00 objectIDStruct* pointer to objectIDStruct
0x04 func* pointer to object's loading function?
0x08 u32

Object ID Struct

Defines look and behavior of object [Size: 0x20]

Offset Type Description
0x00 u16
0x02 u16 objectSpawnIndex
0x04 u16 objectModelFileIndex
0x06 u16 starting animation list array index
0x08 struct* animation list pointer
0x0C func*
0x10 func*
0x14 void (func*)( objT2*, Gfx *, Mtx * * ) draw function
0x1C float shadow scale

Animation List Element

[Size: 0x08]

Offset Type Description
0x00 u32 ROM Animation Index
0x04 float Duration

Object Array Slot

[Size: 0x180] These are the 3D Objects

Offset Type Description
0x000 objType2* Object Type 2 struct pointer
0x004 f Position.X
0x008 f Position.Y
0x00C f Position.Z
0x010 &[FC 00 00 00] current animation index
&[00 00 00 10] targeting player flag
&[00 00 00 0C] float_array_0x8036e598 index, (actor rotation convergence rate ?)
0x014 objMove*
0x018 anim_list * animation list ptr
0x01D &[F0]
&[0E] animation playback type
&[01]
0x044 &[FF 00 00 00]
&[00 FF C0 00] Actor Index
&[00 00 3F FF]
0x050 f Rotation.Y (Facing Angle)
0x060 f Respawn Timer
0x064 f Rotation.Y (Moving Angle)
0x068 f Rotation.X
0x06C f Destination.Rotation.X
0x078 &[FF FF FF FC] ???
&[00 00 00 02] animation playback direction
&[00 00 00 01] note: same a obj_movement_struct field 0x22
0x07C i Unknown x pos
0x080 i Unknown y pos
0x084 i Unknown z pos
0x0BC u32 modelROMIndex Model File ROM Index
0x0EC f Animation Timer
0x0F0 f Animation Duration
0x0FC f Movement Duration
0x100 objType2*
0x104 objType2*
0x108 func *
0x10C func *
0x110 f Rotation.Z
0x114 f Sound Timer
0x125 u8 Opacity
0x126 u8 render order
0x128 f Scale
0x12C objID* Object ID Struct Pointer
0x134 func *
0x14C bone* Bone Array 1 Ptr
0x150 bone* Bone Array 2 Ptr

Object Type 1 Struct

[Size: 0x60]

Offset Type Description
0x00 voxel_item_struct* voxel_item_ptr
0x04 voxel_struct * voxel_ptr
0x08 void (func*)( objT2*, Gfx *, Mtx * *) draw function
0x0C func* ??? Value copied from ObjArraySlot field_0x108 bit_1
0x10 func * ??? Value copied from ObjArraySlot field_0x10C bit_1
0x1C func * ??? Value copied from ObjArraySlot field_0x134 bit_1
0x24 void(func *)(actor_struct) actor specific spawn function
0x2C &[FF E0 00 00] Object Array Slot Index
&[00 01 FF FE] ???
&[00 00 00 01] Object Collidable
0x34 func * copied from actor_ID_struct.field_0x10
0x3C &[FF FC 00 00] ???
&[00 03 FF FC] Object Model ROM Index
&[00 00 00 03] ???
0x54 func * copied from actor_ID_struct.field_0x10
0x58 func * copied from actor_ID_struct.field_0x10

Object Movement Struct

[Size: 0x28]

Offset Type Description
0x00 objAnim* Object Animation Struct Pointer
0x04 float Sound Timer
0x08 float ???
0x0C float Movement Duration
0x10 float Animation Duration
0x14 float Transition Duration
0x1C u32 ROMAnimIndex Animation ROM File Index
0x20 u8 playback Type 1 = play once, 2 = loop, 3 = stop
0x21 u8 playback Direction 0 = reverse, 1 = forwards
0x22 u8 bool ??? Value copied from ObjArraySlot field_0x078 bit_1
0x23 u8
0x24 u8

Object Animation Struct

[Size: 0x20]

Offset Type Description
0x00 func* Animation State Machine Pointer
0x04 f
0x08 u8
0x09 u8
0x0A u16
0x0C u16
0x0E u16
0x10 u32 ROMAnimIndex ROM Animation File Index
0x14 f Animation Timer
0x18 f Animation Duration
0x1C u8
0x1D u8
0x1E u8
0x1F u8

Player Movement State Array Slot

[Size: 0x10] These are the 3D Objects

Offset Type Description
0x00 func* function executes player movement/update animation
0x04 func* function updates next movement state
0x08 func* ???
0x0C func* updates next movement state based on collision with certain objects
banjo_kazooie/structs.txt · Last modified: 2020/01/20 01:13 by mittenz