Offset | Type | Description |
---|---|---|
0x00 | s16 | id, links to collision |
0x02 | s16 | _0x02; |
0x04 | u32 | quad_seg_ptr to Water Box Quad data |
Offset | Type | Description |
---|---|---|
0x00 | s16 | visibility -1 = Make all water boxes in list invisible, 0 = invisible, 1 = visible |
0x02 | s16 | |
0x04 | s16 | rotation_speed( negative values make it rotate the opposite way.) |
0x06 | s16 | scale( Number of repeats in texture) |
0x08 | s16 | x1 (X position of vertex 1) |
0x0A | s16 | z1 ( Z position of vertex 1) |
0x0C | s16 | x2 ( X position of vertex 2) |
0x0E | s16 | z2 ( Z position of vertex 2) |
0x10 | s16 | x3 ( X position of vertex 3) |
0x12 | s16 | z3 ( Z position of vertex 3) |
0x14 | s16 | x4 ( X position of vertex 4) |
0x16 | s16 | z4 ( Z position of vertex 4) |
0x18 | u16 | rotation_direction( 0x00 = clockwise, 0x01 = counter-clockwise. (Useless?) |
0x1A | u8 | _0x1A |
0x1B | u8 | transparency ( 0x00 = fully transparent, 0xff = fully opague) |
0x1C | u16 | texture_id ( 0 = water, 1 = mist, 2 = JRB water, 4 = lava, etc.) |
0x0E | u16 | _0x1E |
Offset | Type | Description |
---|---|---|
0x00 | u16 | collision_type |
0x02 | u8 | flowing speed LUT value (0x00=metal cap water, 0x02=castle grounds water) |
0x03 | u8 | flowing direction |
0x04 | u8 | flag |
0x05 | u8 | |
0x06 | s16 | ymin |
0x08 | s16 | ymax |
0x0A | s16 | vertex1_x |
0x0C | s16 | vertex1_y |
0x0E | s16 | vertex1_z |
0x10 | s16 | vertex2_x |
0x12 | s16 | vertex2_y |
0x14 | s16 | vertex2_z |
0x16 | s16 | vertex3_x |
0x18 | s16 | vertex3_y |
0x1A | s16 | vertex3_z |
0x1C | float | normal_x |
0x20 | float | normal_y |
0x24 | float | normal_z |
0x28 | float | negdot |
0x2C | u32 | unused? |
Offset | Type | Description |
---|---|---|
0x00 | s16 | stick_x |
0x02 | s16 | stick_y |
0x04 | float | x |
0x08 | float | y |
0x0C | float | z |
0x10 | u16 | currentButton |
0x10 | u16 | previousButton |
0x14 | u32* | statusData |
0x18 | u32* | controllerData |
mario→camera (0x8033C520)
Offset | Type | Description |
---|---|---|
0x00 | u32 | mario_action (copied from mario→action) |
0x04 | float | x (also copied from Mario struct) |
0x08 | float | y |
0x0C | float | z |
0x10 | s16 | mario_0x2c |
0x12 | u16 | rotation (again copied from Mario struct) |
0x14 | s16 | mario_0x30 |
0x16 | s16 | mario_0x32 |
0x18 | u32 | |
0x1C | u16 | |
0x1E | u16 | camera_setting (0x06 = door opening, 0x09 = triggers initial peach animation) |
Incomplete, many other members left? |
A struct array of 8 areas starts at 0x8033B8D0, with each area struct being 0x3C bytes long. Only areas 1, 2, 3, and 4 are ever used in-game. Areas 0, 5, 6, and 7 go unused, but still editable in memory.
Offset | Type | Description |
---|---|---|
0x00 | u8 | Area ID |
0x01 | u8 | is_current_area (1 if the player is in this area, else 0) |
0x02 | s16 | terrain_type |
0x04 | u32 | geo_layout_ptr |
0x08 | u32 | collision_ptr |
0x0C | u32 | |
0x10 | u32 | mini_objects_ptr (pointer to an array of objects defined by command 0x39) |
0x14 | u32 | warp_links_head |
0x18 | u32 | |
0x1C | u32 | |
0x20 | u32* | objects_head (objects linked list head) |
0x24 | u32 | LevelCameraPointer (generated at run-time) |
0x28 | u32 | |
0x2C | u32 | |
0x30 | u32 | |
0x34 | u8 | Level start dialog number (see: Level command 0x30) |
0x35 | u8 | Always 0xFF? |
0x36 | s16 | music_param |
0x38 | s16 | music_param2 (title screen,etc) |
0x3A | u16 | unused (padding) |
Offset | Type | Description |
---|---|---|
0x00 | u16 | graph_node_type |
0x02 | u16 | graph_flags |
0x04 | struct object* | previous object |
0x08 | struct object* | next object |
0x0C | u32 | graph_parent |
0x10 | u32 | graph_child |
0x14 | u32 | geo_layout_ptr |
0x18 | u16 | |
0x1A | u16 | x_rotation2 |
0x1C | u16 | y_rotation2 |
0x1E | u16 | z_rotation2 |
0x20 | float | x_pos2 |
0x24 | float | y_pos2 |
0x28 | float | z_pos2 |
0x2C | float | x_scaling |
0x30 | float | y_scaling |
0x34 | float | z_scaling |
0x38 | u16 | (animation related?) |
0x3A | u16 | (animation related?) |
0x3C | struct animation_data* | animation_data_ptr |
0x40 | u16 | animation_frame |
0x42 | u16 | anim_timer |
0x44 | u16 | anim_current_frame_copy |
0x46 | u16 | animation_increment |
0x48 | u32 | |
0x4C | u32 | |
0x50 | struct matrix* | transform_matrix_ptr (4×4 affine) |
0x54 | float | |
0x58 | float | |
0x5C | float | |
0x60 | struct object* | next_object_ptr |
0x64 | struct object* | prev_object_ptr |
0x68 | struct object* | parent_object_ptr |
0x6C | u32 | |
0x70 | u32 | |
0x74 | u16 | active (0x0000 = inactive, 0x0101 = active) |
0x76 | u16 | num_collided_obj |
0x78 | struct object* | collided_obj_ptr1 (according to YE, pointer to object collided with) |
0x7C | struct object* | collided_obj_ptr2 |
0x80 | struct object* | collided_obj_ptr3 |
0x84 | struct object* | collided_obj_ptr4 |
0x88 | u32 | |
0x8C | u32 | obj_flags |
0x90 | u32 | |
0x94 | u32 | |
0x98 | u32 | |
0x9C | u32 | collision_timer |
0xA0 | float | x_pos |
0xA4 | float | y_pos |
0xA8 | float | z_pos |
0xAC | float | x_speed |
0xB0 | float | y_speed |
0xB4 | float | z_speed |
0xB8 | float | h_speed |
0xBC | u32 | |
0xC0 | u32 | |
0xC4 | u32 | x_rotation |
0xC8 | u32 | y_rotation |
0xCC | u32 | z_rotation |
0xD0 | u32 | x_rotation2 |
0xD4 | u32 | y_rotation2 |
0xD8 | u32 | z_rotation2 |
0xDC | u32 | |
0xE0 | u32 | |
0xE4 | float | gravity |
0xE8 | u32 | floor_height |
0xEC | u32 | move_flags ( 11: over lava; 10: couldn't move; 9: hit wall or floor; 7: above floor; 6: bottom of water; 5: in water, not bottom; 4: over water; 3:just hit water |
0xF0 | u32 | |
0xF4 | u32 | obj type for some behaviors (ie, ice bully), for AMPS, radius of rotation |
0xF8 | u32 | |
0xFC | u32 | |
0x100 | u32 | |
0x104 | u32 | |
0x108 | u32 | |
0x10C | u32 | |
0x110 | u32 | |
0x114 | u16 | |
0x116 | s16 | Moves Mario in Z direction while ontop of the object |
0x118 | u16 | |
0x11A | s16 | Spins Mario around while ontop of the object |
0x11C | u16 | |
0x11E | s16 | Moves Mario in X direction while ontop of the object |
0x120 | u32 | animation_list_ptr (set by 0x27 26 behavior command) entry for animation? |
0x124 | u32 | in some behaviors, action related? |
0x128 | float | min_wall_dist |
0x12C | float | drag_coeff |
0x130 | u32 | interaction (collision_type) |
0x134 | u32 | |
0x138 | u32 | |
0x13C | u32 | |
0x140 | u32 | |
0x144 | u32 | behav_param (sub_type) |
0x148 | u32 | |
0x14C | u32 | action |
0x150 | u32 | resets when action changes |
0x154 | u32 | timer (always incremented) |
0x158 | float | bounce |
0x15C | float | distance_from_mario |
0x160 | u32 | angle_to_mario |
0x164 | float | spawn_x (or “home”) |
0x168 | float | spawn_y |
0x16C | float | spanw_z |
0x170 | float | |
0x174 | float | buoyancy |
0x178 | u32 | |
0x17C | u32 | transparency |
0x180 | u32 | damage_to_mario |
0x184 | u32 | health |
0x188 | u32 | behav_param2 (re-check) |
0x18C | u32 | previous_action |
0x190 | u32 | |
0x194 | float | collision_distance |
0x198 | u32 | |
0x19C | float | drawing_distance |
0x1A0 | u32 | |
0x1A4 | u32 | |
0x1A8 | u32 | |
0x1AC | u32 | |
0x1B0 | u32 | |
0x1B4 | u32 | |
0x1B8 | u32 | |
0x1BC | u32 | |
0x1C0 | u32 | |
0x1C4 | u32 | |
0x1C8 | u32 | |
0x1CC | u32 | script_entry_ptr |
0x1D0 | u32 | stack_index |
0x1D4 | u32 | stack |
0x1D8 | u32 | |
0x1DC | u32 | |
0x1E0 | u32 | |
0x1E4 | u32 | |
0x1E8 | u32 | |
0x1EC | u32 | |
0x1F0 | u32 | |
0x1F4 | u16 | |
0x1F6 | u16 | |
0x1F8 | float | col_cylinder_radius |
0x1FC | float | col_cylinder_height |
0x200 | float | |
0x204 | float | |
0x208 | float | col_cylinder_vertical_offset |
0x20C | u32 | script_start_ptr |
0x210 | u32 | |
0x214 | u32 | collide_obj_ptr |
0x218 | u32 | collision_ptr |
0x21C | float | matrix[0][0] (uknown matrix) |
0x220 | float | matrix[0][1] |
0x224 | float | matrix[0][2] |
0x228 | float | matrix[0][3] |
0x22C | float | matrix[1][0] |
0x230 | float | matrix[1][1] |
0x234 | float | matrix[1][2] |
0x238 | float | matrix[1][3] |
0x23C | float | matrix[2][0] |
0x240 | float | matrix[2][1] |
0x244 | float | matrix[2][2] |
0x248 | float | matrix[2][3] |
0x24C | float | matrix[3][0] |
0x250 | float | matrix[3][1] |
0x254 | float | matrix[3][2] |
0x258 | float | matrix[3][3] |
0x25C | u32 | behav_param_copy_ptr |
Located at 0x8033B170 in RAM
Offset | Type | Description |
---|---|---|
0x00 | u16 | status |
0x02 | u16 | input (15: Z pressed; 14: Z down; 13: B pressed; 9: >10 below water; 7: A down; 6: <150 ceiling; 5: no A; no analog 3: steep; 2: >100 over floor; 1: A pressed) |
0x04 | u32 | flags/caps (5: hat in hand; 4: hat on head; 3: wing cap; 2: metal cap; 1: vanish cap; 0: should have hat |
0x08 | u32 | more flags? (0x01 when emitting smoke, 0x08 when emitting sparkles, 0x20 when underwater, 0x80 when near the top of water) |
0x0C | u32 | action (see: Mario's Actions) |
0x10 | u32 | previous_action |
0x14 | u32 | groundType |
0x18 | u16 | action variable (different uses based on Mario→0x0C) |
0x1A | u16 | action variable (different uses based on Mario→0x0C) |
0x1C | u16 | Front tilt (just visuals?) |
0x1E | u32 | squish_timer |
0x20 | float | analogTilt |
0x24 | s16 | Yaw (Facing) rotation |
0x26 | s16 | hitstun |
0x28 | u8 | number of frames since the A button was pressed. (Up to 255) |
0x29 | u8 | number of frames since the B button was pressed. (Up to 255) |
0x2A | u8 | set to 5 when Mario collides with the floor, but only works with some of Mario's actions. Value decrements every frame if it is greater than 0. |
0x2B | u8 | set to 5 when Mario collides with the wall, but only works with some of Mario's actions. Value decrements every frame if it is greater than 0. |
0x2C | s16 | Pitch rotation (only used when flying or swimming?) |
0x2E | s16 | Yaw (Intended) rotation |
0x30 | s16 | Roll rotation |
0x32 | s16 | Flying Pull Back |
0x34 | s16 | Roll rotation when flying or swimming? Also acts as the speed at which Mario spins bowser while he has grabbed his tail. |
0x36 | u16 | |
0x38 | u32 | Sliding angle |
0x3C | float | x_pos |
0x40 | float | y_pos |
0x44 | float | z_pos |
0x48 | float | x_speed |
0x4C | float | y_speed |
0x50 | float | z_speed |
0x54 | float | speed |
0x58 | float | x_sliding_speed |
0x5C | float | z_sliding_speed |
0x60 | struct collisionTriangle* | current wall collision triangle Mario is up against. |
0x64 | struct collisionTriangle* | current ceiling collision triangle Mario is under. |
0x68 | struct collisionTriangle* | current floor collision triangle Mario is on/above. |
0x6C | float | ceiling_y |
0x70 | float | ground_y |
0x74 | s16 | downHillAngle |
0x76 | s16 | waterHeight |
0x78 | struct object* | pointer to last object Mario interacted with (only with some specific objects?) |
0x7C | struct object* | pointer to object being carried by Mario |
0x80 | struct object* | pointer to last object Mario interacted with (all objects?) |
0x84 | struct object* | pointer to the koopa shell object when Mario is riding on top of it. |
0x88 | struct object* | Mario object |
0x8C | u32* | ptr to 0x8033B4B0 |
0x90 | struct LevelArea* | current level area info |
0x94 | struct camera* | Camera |
0x98 | u32* | ptr to 0x8033B3B0 |
0x9C | struct controller* | controller 1 = 0x8033AF90,controller2 = 0x8033AFAC |
0xA0 | struct MarioAnimation* | MarioAnimationStruct (0x8033B080) |
0xA4 | u32 | behavior interaction flag ID (see: Behavior command 0x2F) |
0xA8 | s16 | coins |
0xAA | s16 | stars |
0xAC | s16 | lives |
0xAE | s16 | power |
0xB0 | u16 | constant_ground_distance (usually 0xBD) |
0xB2 | u16 | misc_timer (on any value other than zero it will decrease until zero) |
0xB4 | u16 | unsquish_timer |
0xB6 | u16 | cap_timer |
0xB8 | s16 | stars (copy of Mario→0xAA). Used to trigger the special dialog messages once you've got a star and jumped out of a painting. |
0xBA | u16 | unused? |
0xBC | float | highest y_pos achieved while gaining height |
0xC0 | float | y_pos offset (usually always 0.0f, but can be modified during cut-scenes) |