========== 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 [[banjo_kazooie:enums#map_exit_indices|mapIndex]] | map index | | 0x02 | u16 [[banjo_kazooie:enums#mlevel_index|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 [[banjo_kazooie:enums#map_exit_indices|mapIndex]] | map index | | 0x02 | u16 [[banjo_kazooie:rom_map#level_model_files|mapROMIndex]] | map model A ROM file index | | 0x04 | u16 [[banjo_kazooie:rom_map#level_model_files|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 [[banjo_kazooie:rom_map#music_files | musicTrackIndex]] | music track index | | 0x17A | u16 [[banjo_kazooie:rom_map#music_files | musicTrackIndex]] | music track index copy | | 0x17C | float | | | 0x180 | float | | | | | | ===== Object Spawn Struct ===== [Size: 0x0C] Referenced when spawning an object. ^ Offset ^ Type ^ Description ^ | 0x00 | [[banjo_kazooie:structs#object_id_struct|objectIDStruct]]* | pointer to [[banjo_kazooie:structs#object_id_struct|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 | [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | | 0x04 | u16 | [[banjo_kazooie:rom_map#object_model_files|objectModelFileIndex]] | | 0x06 | u16 | starting animation list array index | | 0x08 | struct* | [[banjo_kazooie:structs#animation_list_element|animation list pointer]] | | 0x0C | func* | | | 0x10 | func* | | | 0x14 | void (func*)([[ banjo_kazooie:enums#object_type_1_struct | objT2*]], Gfx *, Mtx * * ) | draw function | | ||| | 0x1C | float | shadow scale | ---- ===== Animation List Element ===== [Size: 0x08] ^ Offset ^ Type ^ Description ^ | 0x00 | u32 | [[banjo_kazooie:rom_map#object_animation_files|ROM Animation Index]] | | 0x04 | float | Duration | ===== Object Array Slot ===== [Size: 0x180] These are the 3D Objects ^ Offset ^ Type ^ Description ^ | 0x000 | [[banjo_kazooie:structs#object_type_2_struct | 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 | [[banjo_kazooie:structs#object_movement_struct | objMove]]* | | | 0x018 | anim_list * | animation list ptr | | | | | | 0x01D | &[F0] | | | ::: | &[0E] | animation playback type | | ::: | &[01] | | | | | | | 0x044 | &[FF 00 00 00] | | | ::: | &[00 FF C0 00] | [[banjo_kazooie:enums#object_spawn_index | 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 [[banjo_kazooie:rom_map#object_model_files|modelROMIndex]] | Model File ROM Index | | | | | | 0x0EC | f | Animation Timer | | 0x0F0 | f | Animation Duration | | | | | | 0x0FC | f | Movement Duration | | | | | | 0x100 | [[banjo_kazooie:structs#object_type_2_struct | objType2]]* | | | 0x104 | [[banjo_kazooie:structs#object_type_2_struct | objType2]]* | | | 0x108 | func * | | | 0x10C | func * | | | 0x110 | f | Rotation.Z | | 0x114 | f | Sound Timer | | | | | | 0x125 | u8 | Opacity | | 0x126 | u8 | render order | | | | | | 0x128 | f | Scale | | 0x12C | [[banjo_kazooie:structs#object_id_struct| 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 | [[banjo_kazooie:obj_data#voxel_item_list_struct | voxel_item_struct*]] | voxel_item_ptr | | 0x04 | [[banjo_kazooie:obj_data#voxel_struct | voxel_struct *]] | voxel_ptr | | 0x08 | void (func*)([[ banjo_kazooie:enums#object_type_1_struct | objT2*]], Gfx *, Mtx * *) | draw function | | 0x0C | func* | ??? Value copied from [[banjo_kazooie:rom_map#object_array_slot | ObjArraySlot]] field_0x108 bit_1 | | 0x10 | func * | ??? Value copied from [[banjo_kazooie:rom_map#object_array_slot | ObjArraySlot]] field_0x10C bit_1 | | ||| | 0x1C | func * | ??? Value copied from [[banjo_kazooie:rom_map#object_array_slot | 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 | [[banjo_kazooie:structs#object_animation_struct|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 [[banjo_kazooie:rom_map#object_animation_files | 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 [[banjo_kazooie:rom_map#object_array_slot | 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 [[banjo_kazooie:rom_map#object_animation_files | 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 |