This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
super_mario_64:structs [2018/07/12 21:33] trenavix [Level area(s)] |
super_mario_64:structs [2019/12/20 19:47] (current) jesusyoshi54 [Object] |
||
---|---|---|---|
Line 4: | Line 4: | ||
^ Offset ^ Type ^ Description ^ | ^ Offset ^ Type ^ Description ^ | ||
| 0x00 | u16 | collision_type | | | 0x00 | u16 | collision_type | | ||
- | | 0x02 | u16 | | | + | | 0x02 | u16 | Special Parameter for Col types (e.g. wind direction, flowing water) | |
| 0x04 | u8 | flag | | | 0x04 | u8 | flag | | ||
- | | 0x05 | u8 | | | + | | 0x05 | u8 | index to be used when the asm function 0x8029DBD4 (in the US version) is used in the [[super_mario_64:geometry_layout_commands#eswitch_case|geometry layout switch command]]. | |
| 0x06 | s16 | ymin | | | 0x06 | s16 | ymin | | ||
| 0x08 | s16 | ymax | | | 0x08 | s16 | ymax | | ||
Line 21: | Line 21: | ||
| 0x20 | float | normal_y | | | 0x20 | float | normal_y | | ||
| 0x24 | float | normal_z | | | 0x24 | float | normal_z | | ||
- | | 0x28 | float | negdot | | + | | 0x28 | float | origin offset | |
- | | 0x2C | u32 | unused? | | + | | 0x2C | u32 | *object | |
===== Controller ===== | ===== Controller ===== | ||
Line 59: | Line 59: | ||
| 0x01 | u8 | is_current_area (1 if the player is in this area, else 0) | | | 0x01 | u8 | is_current_area (1 if the player is in this area, else 0) | | ||
| 0x02 | s16 | terrain_type | | | 0x02 | s16 | terrain_type | | ||
- | | 0x04 | u32 | geo_layout_ptr | | + | | 0x04 | u32* | geo_layout_ptr | |
- | | 0x08 | u32 | collision_ptr | | + | | 0x08 | u32* | collision_ptr | |
- | | 0x0C | u32 | | | + | | 0x0C | u32* | surface_rooms_ptr (see: [[super_mario_64:level_commands#frender_area|Level command 0x2F]]) | |
- | | 0x10 | u32 | mini_objects_ptr (pointer to an array of objects defined by command 0x39) | | + | | 0x10 | u32* | mini_objects_ptr (pointer to an array of objects defined by [[super_mario_64:level_commands#place_macro_objects|Level command 0x39]]) | |
- | | 0x14 | u32 | warp_links_head | | + | | 0x14 | u32* | warp_links_ptr | |
- | | 0x18 | u32 | | | + | | 0x18 | u32* | painting_warp_links_ptr | |
- | | 0x1C | u32 | | | + | | 0x1C | u32* | instant_warp_links_ptr | |
- | | 0x20 | u32* | objects_head (objects linked list head)| | + | | 0x20 | u32* | object_spawn_info_ptr (objects linked list head)| |
- | | 0x24 | u32 | LevelCameraPointer (generated at run-time) | | + | | 0x24 | u32* | LevelCameraPointer (generated at run-time) | |
- | | 0x28 | u32 | | | + | | 0x28 | u32 | unused | |
- | | 0x2C | u32 | | | + | | 0x2C | u32* | Whirlpool_1_ptr | |
- | | 0x30 | u32 | | | + | | 0x30 | u32* | Whirlpool_2_ptr | |
| 0x34 | u8 | Level start dialog number (see: [[super_mario_64:level_commands#show_dialog|Level command 0x30]]) | | | 0x34 | u8 | Level start dialog number (see: [[super_mario_64:level_commands#show_dialog|Level command 0x30]]) | | ||
- | | 0x35 | u8 | Always 0xFF? | | + | | 0x35 | u8 | Level start dialog 2 (unused?) | |
| 0x36 | s16 | music_param | | | 0x36 | s16 | music_param | | ||
| 0x38 | s16 | music_param2 (title screen,etc) | | | 0x38 | s16 | music_param2 (title screen,etc) | | ||
- | | 0x3A | u16 | unused (padding) | | ||
===== Object ===== | ===== Object ===== | ||
Line 103: | Line 102: | ||
| 0x44 | u16 | anim_current_frame_copy | | | 0x44 | u16 | anim_current_frame_copy | | ||
| 0x46 | u16 | animation_increment | | | 0x46 | u16 | animation_increment | | ||
- | | 0x48 | u32 | | | + | | 0x48 | u32 | animation accel | |
- | | 0x4C | u32 | | | + | | 0x4C | struct | Spawn Info | |
| 0x50 | struct matrix* | transform_matrix_ptr (4x4 affine) | | | 0x50 | struct matrix* | transform_matrix_ptr (4x4 affine) | | ||
- | | 0x54 | float | | | + | | 0x54 | float | Cam to Obj X | |
- | | 0x58 | float | | | + | | 0x58 | float | Cam to Obj Y | |
- | | 0x5C | float | | | + | | 0x5C | float | Cam to Obj Z | |
| 0x60 | struct object* | next_object_ptr | | | 0x60 | struct object* | next_object_ptr | | ||
| 0x64 | struct object* | prev_object_ptr | | | 0x64 | struct object* | prev_object_ptr | | ||
| 0x68 | struct object* | parent_object_ptr | | | 0x68 | struct object* | parent_object_ptr | | ||
- | | 0x6C | u32 | | | + | | 0x6C | struct object* | prev object | |
- | | 0x70 | u32 | | | + | | 0x70 | u32 | Collided Obj Interact Type | |
- | | 0x74 | u16 | active (0x0000 = inactive, 0x0101 = active) | | + | | 0x74 | u16 | active (0x0000 = inactive, 0x0101 = active, 0x20 move in time stop) | |
| 0x76 | u16 | num_collided_obj | | | 0x76 | u16 | num_collided_obj | | ||
| 0x78 | struct object* | collided_obj_ptr1 (according to YE, pointer to object collided with) | | | 0x78 | struct object* | collided_obj_ptr1 (according to YE, pointer to object collided with) | | ||
Line 122: | Line 121: | ||
| 0x88 | u32 | | | | 0x88 | u32 | | | ||
| 0x8C | u32 | obj_flags | | | 0x8C | u32 | obj_flags | | ||
- | | 0x90 | u32 | | | + | | 0x90 | s16 | dialog response | |
- | | 0x94 | u32 | | | + | | 0x92 | s16 | dialog state | |
- | | 0x98 | u32 | | | + | | 0x94 | u32 | unused | |
+ | | 0x98 | u32 | unused | | ||
| 0x9C | u32 | collision_timer | | | 0x9C | u32 | collision_timer | | ||
| 0xA0 | float | x_pos | | | 0xA0 | float | x_pos | | ||
Line 141: | Line 141: | ||
| 0xD4 | u32 | y_rotation2 | | | 0xD4 | u32 | y_rotation2 | | ||
| 0xD8 | u32 | z_rotation2 | | | 0xD8 | u32 | z_rotation2 | | ||
- | | 0xDC | u32 | | | + | | 0xDC | u32 | Graph Y Offset | |
- | | 0xE0 | u32 | | | + | | 0xE0 | u32 | Active Particle Flags | |
| 0xE4 | float | gravity | | | 0xE4 | float | gravity | | ||
| 0xE8 | u32 | floor_height | | | 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 | | | 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 | | | + | | 0xF0 | u32 | used to switch case for geo layout 0x0E cmd with function 8029DB48 | |
| 0xF4 | u32 | obj type for some behaviors (ie, ice bully), for AMPS, radius of rotation | | | 0xF4 | u32 | obj type for some behaviors (ie, ice bully), for AMPS, radius of rotation | | ||
| 0xF8 | u32 | | | | 0xF8 | u32 | | | ||
Line 155: | Line 155: | ||
| 0x10C | u32 | | | | 0x10C | u32 | | | ||
| 0x110 | u32 | | | | 0x110 | u32 | | | ||
- | | 0x114 | u16 | | | + | | 0x114 | s32 | Moves Mario's pitch while ontop of the object | |
- | | 0x116 | s16 | Moves Mario in Z direction while ontop of the object | | + | | 0x118 | s32 | Spins Mario around while ontop of the object | |
- | | 0x118 | u16 | | | + | | 0x11C | s32 | Moves Mario's roll while ontop of the object | |
- | | 0x11A | s16 | Spins Mario around while ontop of the object | | + | | 0x120 | u32 | animation_list_ptr (set by 0x27 26 behavior command)| |
- | | 0x11C | u16 | | | + | | 0x124 | u32 | Held State | |
- | | 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 | | | 0x128 | float | min_wall_dist | | ||
| 0x12C | float | drag_coeff | | | 0x12C | float | drag_coeff | | ||
| 0x130 | u32 | interaction (collision_type) | | | 0x130 | u32 | interaction (collision_type) | | ||
- | | 0x134 | u32 | | | + | | 0x134 | u32 | interaction status | |
- | | 0x138 | u32 | | | + | | 0x138 | u32 | Parent relative X pos | |
- | | 0x13C | u32 | | | + | | 0x13C | u32 | Parent relative Y pos | |
- | | 0x140 | u32 | | | + | | 0x140 | u32 | Parent relative Z pos | |
| 0x144 | u32 | behav_param (sub_type) | | | 0x144 | u32 | behav_param (sub_type) | | ||
- | | 0x148 | u32 | | | + | | 0x148 | u32 | unused | |
| 0x14C | u32 | action | | | 0x14C | u32 | action | | ||
- | | 0x150 | u32 | resets when action changes | | + | | 0x150 | u32 | sub action (resets when action changes) | |
| 0x154 | u32 | timer (always incremented) | | | 0x154 | u32 | timer (always incremented) | | ||
| 0x158 | float | bounce | | | 0x158 | float | bounce | | ||
Line 181: | Line 178: | ||
| 0x168 | float | spawn_y | | | 0x168 | float | spawn_y | | ||
| 0x16C | float | spanw_z | | | 0x16C | float | spanw_z | | ||
- | | 0x170 | float | | | + | | 0x170 | float | friction | |
| 0x174 | float | buoyancy| | | 0x174 | float | buoyancy| | ||
- | | 0x178 | u32 | | | + | | 0x178 | u32 | sound state ID | |
| 0x17C | u32 | transparency | | | 0x17C | u32 | transparency | | ||
| 0x180 | u32 | damage_to_mario | | | 0x180 | u32 | damage_to_mario | | ||
| 0x184 | u32 | health | | | 0x184 | u32 | health | | ||
- | | 0x188 | u32 | behav_param2 (re-check) | | + | | 0x188 | u32 | behav_param | |
| 0x18C | u32 | previous_action | | | 0x18C | u32 | previous_action | | ||
- | | 0x190 | u32 | | | + | | 0x190 | u32 | Interaction Sub Type | |
| 0x194 | float | collision_distance | | | 0x194 | float | collision_distance | | ||
- | | 0x198 | u32 | | | + | | 0x198 | u32 | Num Loot Coins | |
| 0x19C | float | drawing_distance | | | 0x19C | float | drawing_distance | | ||
- | | 0x1A0 | u32 | | | + | | 0x1A0 | u32 | Room | |
- | | 0x1A4 | u32 | | | + | | 0x1A4 | u32 | Unused | |
| 0x1A8 | u32 | | | | 0x1A8 | u32 | | | ||
| 0x1AC | u32 | | | | 0x1AC | u32 | | | ||
| 0x1B0 | u32 | | | | 0x1B0 | u32 | | | ||
- | | 0x1B4 | u32 | | | + | | 0x1B4 | u32 | Wall Angle | |
- | | 0x1B8 | u32 | | | + | | 0x1B8 | s16 | Floor Type | |
- | | 0x1BC | u32 | | | + | | 0x1BA | s16 | Floor Room | |
- | | 0x1C0 | u32 | | | + | | 0x1BC | s32 | | |
- | | 0x1C4 | u32 | | | + | | 0x1C0 | u32 | Floor | |
- | | 0x1C8 | u32 | | | + | | 0x1C4 | s32 | Death Sound | |
- | | 0x1CC | u32 | script_entry_ptr | | + | | 0x1C8 | u32 | Unused | |
+ | | 0x1CC | u32 | Behav script_entry_ptr | | ||
| 0x1D0 | u32 | stack_index | | | 0x1D0 | u32 | stack_index | | ||
- | | 0x1D4 | u32 | stack | | + | | 0x1D4 | u32 | stack [8] | |
- | | 0x1D8 | u32 | | | + | | 0x1F4 | s16 | unk14 | |
- | | 0x1DC | u32 | | | + | | 0x1F6 | s16 | respawn info type | |
- | | 0x1E0 | u32 | | | + | |
- | | 0x1E4 | u32 | | | + | |
- | | 0x1E8 | u32 | | | + | |
- | | 0x1EC | u32 | | | + | |
- | | 0x1F0 | u32 | | | + | |
- | | 0x1F4 | u16 | | | + | |
- | | 0x1F6 | u16 | | | + | |
| 0x1F8 | float | col_cylinder_radius | | | 0x1F8 | float | col_cylinder_radius | | ||
| 0x1FC | float | col_cylinder_height | | | 0x1FC | float | col_cylinder_height | | ||
- | | 0x200 | float | | | + | | 0x200 | float | hurtbox radius | |
- | | 0x204 | float | | | + | | 0x204 | float | hurtbox height | |
- | | 0x208 | float | col_cylinder_vertical_offset | | + | | 0x208 | float | col_cylinder_downward_offset | |
- | | 0x20C | u32 | script_start_ptr | | + | | 0x20C | u32 | script_start_ptr (Behavior ID) | |
- | | 0x210 | u32 | | | + | | 0x210 | u32 | unused | |
- | | 0x214 | u32 | collide_obj_ptr | | + | | 0x214 | struct | *collide_obj_ptr(platform) | |
| 0x218 | u32 | collision_ptr | | | 0x218 | u32 | collision_ptr | | ||
- | | 0x21C | float | matrix[0][0] (uknown matrix) | | + | | 0x21C | float | matrix[0][0] (transform matrix) | |
| 0x220 | float | matrix[0][1] | | | 0x220 | float | matrix[0][1] | | ||
| 0x224 | float | matrix[0][2] | | | 0x224 | float | matrix[0][2] | | ||
Line 241: | Line 232: | ||
| 0x254 | float | matrix[3][2] | | | 0x254 | float | matrix[3][2] | | ||
| 0x258 | float | matrix[3][3] | | | 0x258 | float | matrix[3][3] | | ||
- | | 0x25C | u32 | behav_param_copy_ptr | | + | | 0x25C | u32 | respawn info (behav_param_copy_ptr) | |
===== Mario ===== | ===== Mario ===== | ||
Line 248: | Line 239: | ||
| 0x00 | u16 | status | | | 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) | | | 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 | | + | | 0x04 | u32 | flags (0x80000000 pushing against wall; 0x40000000 wallkicking; 0x400000 tripping ; 0x200000 kicking; 0x100000 punching; 0x80 teleporting; 0x20 hat in hand; 0x10 hat on head; 0x8 wing cap; 0x4 metal cap; 0x2 vanish cap; 0x1 should have cap)| |
| 0x08 | u32 | more flags? (0x01 when emitting smoke, 0x08 when emitting sparkles, 0x20 when underwater, 0x80 when near the top of water) | | | 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: [[super_mario_64:actions| Mario's Actions]]) | | | 0x0C | u32 | action (see: [[super_mario_64:actions| Mario's Actions]]) | | ||
Line 256: | Line 247: | ||
| 0x1A | 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?) | | | 0x1C | u16 | Front tilt (just visuals?) | | ||
- | | 0x1E | u32 | squish_timer | | + | | 0x1E | u16 | squish_timer | |
| 0x20 | float | analogTilt | | | 0x20 | float | analogTilt | | ||
| 0x24 | s16 | Yaw (Facing) rotation | | | 0x24 | s16 | Yaw (Facing) rotation | | ||
Line 262: | Line 253: | ||
| 0x28 | u8 | number of frames since the A button was pressed. (Up to 255) | | | 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) | | | 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. | | + | | 0x2A | 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. | |
- | | 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. | | + | | 0x2B | 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. | |
| 0x2C | s16 | Pitch rotation (only used when flying or swimming?) | | | 0x2C | s16 | Pitch rotation (only used when flying or swimming?) | | ||
| 0x2E | s16 | Yaw (Intended) rotation | | | 0x2E | s16 | Yaw (Intended) rotation | | ||
Line 310: | Line 301: | ||
| 0xBA | u16 | unused? | | | 0xBA | u16 | unused? | | ||
| 0xBC | float | highest y_pos achieved while gaining height | | | 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) | | + | | 0xC0 | float | y_pos offset (modified while in quicksand or cutscenes, otherwise 0.0f) | |
===== References ===== | ===== References ===== |