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 [2017/08/27 06:38] danebouchie Added to Mario struct (Data from STROOP) |
super_mario_64:structs [2018/06/28 14:03] (current) deivore [Collision Triangle] |
||
---|---|---|---|
Line 1: | Line 1: | ||
========== Structs ========== | ========== Structs ========== | ||
---- | ---- | ||
+ | ===== Water Box ===== | ||
+ | ^ Offset ^ Type ^ Description ^ | ||
+ | | 0x00 | s16 | id, links to collision| | ||
+ | | 0x02 | s16 | _0x02;| | ||
+ | | 0x04 | u32 | quad_seg_ptr to Water Box Quad data| | ||
+ | ===== Water Box Quad ===== | ||
+ | ^ 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 | | ||
===== Collision Triangle ===== | ===== Collision Triangle ===== | ||
^ Offset ^ Type ^ Description ^ | ^ Offset ^ Type ^ Description ^ | ||
| 0x00 | u16 | collision_type | | | 0x00 | u16 | collision_type | | ||
- | | 0x02 | u16 | | | + | | 0x02 | u8 | flowing speed LUT value (0x00=metal cap water, 0x02=castle grounds water) | |
+ | | 0x03 | u8 | flowing direction | | ||
| 0x04 | u8 | flag | | | 0x04 | u8 | flag | | ||
| 0x05 | u8 | | | | 0x05 | u8 | | | ||
Line 75: | Line 100: | ||
| 0x36 | s16 | music_param | | | 0x36 | s16 | music_param | | ||
| 0x38 | s16 | music_param2 (title screen,etc) | | | 0x38 | s16 | music_param2 (title screen,etc) | | ||
- | | 0x3A | u16 | | | + | | 0x3A | u16 | unused (padding) | |
===== Object ===== | ===== Object ===== | ||
Line 86: | Line 111: | ||
| 0x10 | u32 | graph_child | | | 0x10 | u32 | graph_child | | ||
| 0x14 | u32 | geo_layout_ptr | | | 0x14 | u32 | geo_layout_ptr | | ||
- | | 0x18 | u32 | | | + | | 0x18 | u16 | | |
- | | 0x1C | u32 | | | + | | 0x1A | u16 | x_rotation2 | |
- | | 0x20 | float | | | + | | 0x1C | u16 | y_rotation2 | |
- | | 0x24 | float | | | + | | 0x1E | u16 | z_rotation2 | |
- | | 0x28 | float | | | + | | 0x20 | float | x_pos2 | |
+ | | 0x24 | float | y_pos2 | | ||
+ | | 0x28 | float | z_pos2 | | ||
| 0x2C | float | x_scaling | | | 0x2C | float | x_scaling | | ||
| 0x30 | float | y_scaling | | | 0x30 | float | y_scaling | | ||
| 0x34 | float | z_scaling | | | 0x34 | float | z_scaling | | ||
- | | 0x38 | u16 | | | + | | 0x38 | u16 | (animation related?) | |
- | | 0x3A | u16 | | | + | | 0x3A | u16 | (animation related?) | |
- | | 0x3C | u32 | current animation | | + | | 0x3C | struct animation_data* | animation_data_ptr | |
- | | 0x40 | u16 | anim_current_frame | | + | | 0x40 | u16 | animation_frame | |
| 0x42 | u16 | anim_timer | | | 0x42 | u16 | anim_timer | | ||
| 0x44 | u16 | anim_current_frame_copy | | | 0x44 | u16 | anim_current_frame_copy | | ||
- | | 0x46 | u16 | | | + | | 0x46 | u16 | animation_increment | |
| 0x48 | u32 | | | | 0x48 | u32 | | | ||
| 0x4C | u32 | | | | 0x4C | u32 | | | ||
- | | 0x50 | u32 | matrix_ptr | | + | | 0x50 | struct matrix* | transform_matrix_ptr (4x4 affine) | |
| 0x54 | float | | | | 0x54 | float | | | ||
| 0x58 | float | | | | 0x58 | float | | | ||
| 0x5C | float | | | | 0x5C | float | | | ||
- | | 0x60 | struct object* | next_object_ptr (re-check this) | | + | | 0x60 | struct object* | next_object_ptr | |
- | | 0x64 | u32 | | | + | | 0x64 | struct object* | prev_object_ptr | |
- | | 0x68 | struct object* | next_object_ptr2 (re-check this (child_obj)) | | + | | 0x68 | struct object* | parent_object_ptr | |
| 0x6C | u32 | | | | 0x6C | u32 | | | ||
| 0x70 | u32 | | | | 0x70 | u32 | | | ||
| 0x74 | u16 | active (0x0000 = inactive, 0x0101 = active) | | | 0x74 | u16 | active (0x0000 = inactive, 0x0101 = active) | | ||
- | | 0x76 | u16 | | | + | | 0x76 | u16 | num_collided_obj | |
- | | 0x78 | struct object* | collided_obj_ptr (according to YE, pointer to object collided with) | | + | | 0x78 | struct object* | collided_obj_ptr1 (according to YE, pointer to object collided with) | |
- | | 0x7C | u32 | | | + | | 0x7C | struct object* | collided_obj_ptr2 | |
- | | 0x80 | u32 | | | + | | 0x80 | struct object* | collided_obj_ptr3 | |
- | | 0x84 | u32 | | | + | | 0x84 | struct object* | collided_obj_ptr4 | |
| 0x88 | u32 | | | | 0x88 | u32 | | | ||
| 0x8C | u32 | obj_flags | | | 0x8C | u32 | obj_flags | | ||
Line 123: | Line 150: | ||
| 0x94 | u32 | | | | 0x94 | u32 | | | ||
| 0x98 | u32 | | | | 0x98 | u32 | | | ||
- | | 0x9C | u32 | | | + | | 0x9C | u32 | collision_timer | |
| 0xA0 | float | x_pos | | | 0xA0 | float | x_pos | | ||
| 0xA4 | float | y_pos | | | 0xA4 | float | y_pos | | ||
Line 130: | Line 157: | ||
| 0xB0 | float | y_speed | | | 0xB0 | float | y_speed | | ||
| 0xB4 | float | z_speed | | | 0xB4 | float | z_speed | | ||
- | | 0xB8 | float | speed | | + | | 0xB8 | float | h_speed | |
| 0xBC | u32 | | | | 0xBC | u32 | | | ||
| 0xC0 | u32 | | | | 0xC0 | u32 | | | ||
Line 141: | Line 168: | ||
| 0xDC | u32 | | | | 0xDC | u32 | | | ||
| 0xE0 | u32 | | | | 0xE0 | u32 | | | ||
- | | 0xE4 | float | gravity related? | | + | | 0xE4 | float | gravity | |
- | | 0xE8 | u32 | | | + | | 0xE8 | u32 | floor_height | |
- | | 0xEC | u32 | | | + | | 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 | | | ||
| 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 | | ||
Line 159: | Line 186: | ||
| 0x11C | u16 | | | | 0x11C | u16 | | | ||
| 0x11E | s16 | Moves Mario in X direction while ontop of the object | | | 0x11E | s16 | Moves Mario in X direction while ontop of the object | | ||
- | | 0x120 | u32 | animation_ptr (set by 0x27 26 behavior command) entry for animation?| | + | | 0x120 | u32 | animation_list_ptr (set by 0x27 26 behavior command) entry for animation?| |
| 0x124 | u32 | in some behaviors, action related? | | | 0x124 | u32 | in some behaviors, action related? | | ||
- | | 0x128 | float | | | + | | 0x128 | float | min_wall_dist | |
- | | 0x12C | float | | | + | | 0x12C | float | drag_coeff | |
- | | 0x130 | u32 | interaction | | + | | 0x130 | u32 | interaction (collision_type) | |
| 0x134 | u32 | | | | 0x134 | u32 | | | ||
| 0x138 | u32 | | | | 0x138 | u32 | | | ||
| 0x13C | u32 | | | | 0x13C | u32 | | | ||
| 0x140 | u32 | | | | 0x140 | u32 | | | ||
- | | 0x144 | u32 | behav_param | | + | | 0x144 | u32 | behav_param (sub_type) | |
| 0x148 | u32 | | | | 0x148 | u32 | | | ||
- | | 0x14C | u32 | | | + | | 0x14C | u32 | action | |
| 0x150 | u32 | resets when action changes | | | 0x150 | u32 | resets when action changes | | ||
| 0x154 | u32 | timer (always incremented) | | | 0x154 | u32 | timer (always incremented) | | ||
- | | 0x158 | float | | | + | | 0x158 | float | bounce | |
| 0x15C | float | distance_from_mario | | | 0x15C | float | distance_from_mario | | ||
- | | 0x160 | u32 | | | + | | 0x160 | u32 | angle_to_mario | |
- | | 0x164 | float | | | + | | 0x164 | float | spawn_x (or "home") | |
- | | 0x168 | float | | | + | | 0x168 | float | spawn_y | |
- | | 0x16C | float | | | + | | 0x16C | float | spanw_z | |
| 0x170 | float | | | | 0x170 | float | | | ||
- | | 0x174 | float | | | + | | 0x174 | float | buoyancy| |
| 0x178 | u32 | | | | 0x178 | u32 | | | ||
| 0x17C | u32 | transparency | | | 0x17C | u32 | transparency | | ||
Line 202: | Line 229: | ||
| 0x1C4 | u32 | | | | 0x1C4 | u32 | | | ||
| 0x1C8 | u32 | | | | 0x1C8 | u32 | | | ||
- | | 0x1CC | u32 | script_ptr | | + | | 0x1CC | u32 | script_entry_ptr | |
| 0x1D0 | u32 | stack_index | | | 0x1D0 | u32 | stack_index | | ||
| 0x1D4 | u32 | stack | | | 0x1D4 | u32 | stack | | ||
Line 214: | Line 241: | ||
| 0x1F4 | u16 | | | | 0x1F4 | u16 | | | ||
| 0x1F6 | u16 | | | | 0x1F6 | u16 | | | ||
- | | 0x1F8 | float | col_sphere_x | | + | | 0x1F8 | float | col_cylinder_radius | |
- | | 0x1FC | float | col_sphere_y | | + | | 0x1FC | float | col_cylinder_height | |
| 0x200 | float | | | | 0x200 | float | | | ||
| 0x204 | float | | | | 0x204 | float | | | ||
- | | 0x208 | float | | | + | | 0x208 | float | col_cylinder_vertical_offset | |
- | | 0x20C | u32 | behavior_script_entry | | + | | 0x20C | u32 | script_start_ptr | |
| 0x210 | u32 | | | | 0x210 | u32 | | | ||
| 0x214 | u32 | collide_obj_ptr | | | 0x214 | u32 | collide_obj_ptr | | ||
| 0x218 | u32 | collision_ptr | | | 0x218 | u32 | collision_ptr | | ||
- | | 0x21C | u32 | | | + | | 0x21C | float | matrix[0][0] (uknown matrix) | |
- | | 0x220 | u32 | | | + | | 0x220 | float | matrix[0][1] | |
- | | 0x224 | u32 | | | + | | 0x224 | float | matrix[0][2] | |
- | | 0x228 | u32 | | | + | | 0x228 | float | matrix[0][3] | |
- | | 0x22C | u32 | | | + | | 0x22C | float | matrix[1][0] | |
- | | 0x230 | u32 | | | + | | 0x230 | float | matrix[1][1] | |
- | | 0x234 | u32 | | | + | | 0x234 | float | matrix[1][2] | |
- | | 0x238 | u32 | | | + | | 0x238 | float | matrix[1][3] | |
- | | 0x23C | u32 | | | + | | 0x23C | float | matrix[2][0] | |
- | | 0x240 | u32 | | | + | | 0x240 | float | matrix[2][1] | |
- | | 0x244 | u32 | | | + | | 0x244 | float | matrix[2][2] | |
- | | 0x248 | u32 | | | + | | 0x248 | float | matrix[2][3] | |
- | | 0x24C | u32 | | | + | | 0x24C | float | matrix[3][0] | |
- | | 0x250 | u32 | | | + | | 0x250 | float | matrix[3][1] | |
- | | 0x254 | u32 | | | + | | 0x254 | float | matrix[3][2] | |
- | | 0x258 | u32 | | | + | | 0x258 | float | matrix[3][3] | |
| 0x25C | u32 | behav_param_copy_ptr | | | 0x25C | u32 | behav_param_copy_ptr | | ||
Line 253: | Line 280: | ||
| 0x18 | u16 | action variable (different uses based on Mario->0x0C) | | | 0x18 | u16 | action variable (different uses based on Mario->0x0C) | | ||
| 0x1A | u16 | action variable (different uses based on Mario->0x0C) | | | 0x1A | u16 | action variable (different uses based on Mario->0x0C) | | ||
- | | 0x1C | u16 | | | + | | 0x1C | u16 | Front tilt (just visuals?) | |
| 0x1E | u32 | squish_timer | | | 0x1E | u32 | squish_timer | | ||
| 0x20 | float | analogTilt | | | 0x20 | float | analogTilt | | ||
| 0x24 | s16 | Yaw (Facing) rotation | | | 0x24 | s16 | Yaw (Facing) rotation | | ||
| 0x26 | s16 | hitstun | | | 0x26 | s16 | hitstun | | ||
- | | 0x28 | u32 | | | + | | 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?) | | | 0x2C | s16 | Pitch rotation (only used when flying or swimming?) | | ||
| 0x2E | s16 | Yaw (Intended) rotation | | | 0x2E | s16 | Yaw (Intended) rotation | | ||
| 0x30 | s16 | Roll rotation | | | 0x30 | s16 | Roll rotation | | ||
| 0x32 | s16 | Flying Pull Back | | | 0x32 | s16 | Flying Pull Back | | ||
- | | 0x34 | s16 | Roll rotation (only used when flying or swimming?) | | + | | 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 | | | | 0x36 | u16 | | | ||
- | | 0x38 | u32 | | | + | | 0x38 | u32 | Sliding angle| |
| 0x3C | float | x_pos | | | 0x3C | float | x_pos | | ||
| 0x40 | float | y_pos | | | 0x40 | float | y_pos | | ||
Line 285: | Line 315: | ||
| 0x7C | struct object* | pointer to object being carried by Mario | | | 0x7C | struct object* | pointer to object being carried by Mario | | ||
| 0x80 | struct object* | pointer to last object Mario interacted with (all objects?) | | | 0x80 | struct object* | pointer to last object Mario interacted with (all objects?) | | ||
- | | 0x84 | u32 | | | + | | 0x84 | struct object* | pointer to the koopa shell object when Mario is riding on top of it. | |
| 0x88 | struct object* | Mario object | | | 0x88 | struct object* | Mario object | | ||
- | | 0x8C | u32 | | | + | | 0x8C | u32* | ptr to 0x8033B4B0 | |
| 0x90 | struct LevelArea* | current level area info | | | 0x90 | struct LevelArea* | current level area info | | ||
| 0x94 | struct camera* | Camera | | | 0x94 | struct camera* | Camera | | ||
Line 310: | Line 340: | ||
* https://sites.google.com/site/kazemario64/home/structs | * https://sites.google.com/site/kazemario64/home/structs | ||
* https://www.dropbox.com/s/oyo4em3hsuvh1dl/mario.py | * https://www.dropbox.com/s/oyo4em3hsuvh1dl/mario.py | ||
- | * https://github.com/SM64-STROOP/STROOP/tree/Development/Source/SM64%20Diagnostic/Config | + | * https://github.com/SM64-STROOP/STROOP/tree/Development/STROOP/Config |