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 func*
0x1C float 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 u8 State
0x011 u8
0x012 u8
0x013 u8
0x014 objMove*
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)
0x078 &[FF FF FF FC] ???
&[00 00 00 02] animation playback direction
&[00 00 00 01] note: same a obj_movement_struct field 0x22
0x0BC u32 modelROMIndex Model File ROM Index
0x0EC f Animation Timer
0x0F0 f Animation Duration
0x0FC f Movement Duration
0x100 objType2*
0x104 objType2*
0x110 f Rotation.Z
0x114 f Sound Timer
0x125 u8 Opacity
0x128 f Scale
0x12C objID* Object ID Struct Pointer
0x14C bone* Bone Array 1 Ptr
0x150 bone* Bone Array 2 Ptr

Object Type 1 Struct

[Size: 0x60]

Offset Type Description
0x00 u16
0x02 s16 Scale
0x04 s16 Position.X
0x06 s16 Position.Y
0x08 s16 Position.Z
0x0A 16
0x0B &[E0] ???
&[10] Object Collectable Bit
&[08] Rotation Direction Bit (0=CCW, 1=CW)
&[04] ???
&[03] StructType
0x0C u32 ??? Value copied from ObjArraySlot field_0x108 bit_1
0x10 u32 ??? Value copied from ObjArraySlot field_0x10C bit_1
0x1C u32 ??? Value copied from ObjArraySlot field_0x134 bit_1
0x2C &[FF E0 00 00] Object Array Slot Index
&[00 01 FF FE] ???
&[00 00 00 01] Object Collidable
0x3C &[FF FC 00 00] ???
&[00 03 FF FC] Object Model ROM Index
&[00 00 00 03] ???

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: 2019/09/12 07:21 by mittenz