User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
super_mario_64:structs [2017/08/27 07:37]
danebouchie Added to Object struct (data from mario.py)
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 111: Line 136:
 | 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* | child_object_ptr ​|+| 0x68 | struct object* | parent_object_ptr ​|
 | 0x6C | u32 |  | | 0x6C | u32 |  |
 | 0x70 | u32 |  | | 0x70 | u32 |  |
Line 255: 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 287: 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 | u32ptr 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 312: 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