User Tools

Site Tools


banjo_kazooie:obj_data

Object Data

Banjo-Kazooie uses a voxel based system for handling objects and object collisions. This page outline the data structures used for this system. each voxels correspond to a 1000.0 x 1000.0 x 1000.0 in game unit volume of each map.


Static Variables

Address Type Name Description
0x80381FA0 voxel_struct* voxelArray.addr pointer to 3D object voxel array
0x80381FA8 int32_t voxelArray.min.x minimum x voxel value
0x80381FAC int32_t voxelArray.min.y minimum y voxel value
0x80381FB0 int32_t voxelArray.min.z minimum y voxel value
0x80381FB4 int32_t voxelArray.max.x maximum x voxel value
0x80381FB8 int32_t voxelArray.max.y maximum y voxel value
0x80381FBC int32_t voxelArray.max.z maximum z voxel value
0x80381FC0 int32_t voxelArray.size.y number of voxels per y index
0x80381FC4 int32_t voxelArray.size.z number of voxels per z index
0x80381FC8 int32_t voxelArray.size number of voxels in entire array
0x80381FD0 int32_t voxelArray.width.x number of possible x values
0x80381FD4 int32_t voxelArray.width.y number of possible y values
0x80381FD0 int32_t voxelArray.width.z number of possible z values

Voxel Struct

Size: 0x0C

Address Offset BitMask Type Description
0x00 [F1000000] s 5bit x voxel value
[07C00000] s 5bit y voxel value
[003E0000] s 5bit z voxel value
[0001F800] u 6bit voxel List1 count
[000007E0] u 6bit voxel Item Count
[0000001F]
0x04 voxList1*
0x08 voxItemList* pointer to list of collidable objects in voxel

Voxel Item List Struct

There are 2 different structs that can be contained in this list dependent on the type of object. How each field is used for each type will be color coded using red for type 1, and green for type 2.

Type 1 corresponds to objects that exist in the objectArray. These objects tend to have more complex behavior and are often 3D.

Type 2 are simple objects such as notes, eggs, extra lives, etc.

Size: 0x0C

Address Offset BitMask Type Description
0x00 objType1Struct* object type 1 struct pointer
objectType2 id
0x04
0x08 &[FF FF FF FE]
&[00 00 00 01] 0 = Type 2
1 = Type 1

banjo_kazooie/obj_data.txt · Last modified: 2020/01/19 23:42 by mittenz