User Tools

Site Tools


kirby64_the_crystal_shards:level_settings_blocks

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
Next revision Both sides next revision
kirby64_the_crystal_shards:level_settings_blocks [2020/02/26 14:08]
jesusyoshi54 Added a lot of sections and made structs valid C
kirby64_the_crystal_shards:level_settings_blocks [2020/03/05 18:29]
jesusyoshi54 [Camera&Kirby Nodes]
Line 55: Line 55:
 /*0x0*/ u16        Vertex[3]; /*0x0*/ u16        Vertex[3];
 /*0x6*/ u16    ​Polygon_Number;​ /*0x6*/ u16    ​Polygon_Number;​
-/*0x8*/ u16        ​Collision_Type_1; //(1 forward norm, 2 back norm, 4 no shadow, 8 non solid/warp related?)+/*0x8*/ u16        ​Solidty_Type; //(1 forward norm, 2 back norm, 4 no shadow, 8 non solid)
 /*0xA*/ u16    ​Destructable_Group_Index;​ /*0xA*/ u16    ​Destructable_Group_Index;​
 /*0xC*/ u16    ​Break_Particle;​ //(seen in DEDEDE hammer break) /*0xC*/ u16    ​Break_Particle;​ //(seen in DEDEDE hammer break)
 /*0xE*/ u16    ​Halt_Movement;​ //warp related? Maybe dest (kirby cant move while on top of this if 1) /*0xE*/ u16    ​Halt_Movement;​ //warp related? Maybe dest (kirby cant move while on top of this if 1)
 /​*0x10*/​ s16  ​  ​Col_Param1;​ //Amount to move kirby while on certain col types or Break Condition /​*0x10*/​ s16  ​  ​Col_Param1;​ //Amount to move kirby while on certain col types or Break Condition
-/​*0x12*/​ u16  ​  Collision_Type_2; //see col type list+/​*0x12*/​ u16  ​  Collision_Type; //see col type list
 }; };
 </​code>​ </​code>​
-The following is a list of Collision_Type_2 ​values known.+The following is a list of Collision_Type ​values known.
   * 0x1 - wall ladder   * 0x1 - wall ladder
   * 0x2 - rope   * 0x2 - rope
Line 210: Line 210:
 /​*0x0*/ ​   u32    Num_Path_Nodes;​ /​*0x0*/ ​   u32    Num_Path_Nodes;​
 /​*0x4*/ ​   struct Path_Node_Header ​  ​(*Path_Node_Header)[];​ /​*0x4*/ ​   struct Path_Node_Header ​  ​(*Path_Node_Header)[];​
-/​*0x8*/ ​   u8     ​*Unk_Bytes;​ +/​*0x8*/ ​   u8     (*Unk_Bytes)[]
-/​*0xC*/ ​   f32    *Unk_Floats;​+/​*0xC*/ ​   f32    ​(*Unk_Floats)[];
 }; };
 </​code>​ </​code>​
Line 228: Line 228:
 /​*0x8*/​  ​  ​struct Node_Connecters ​    ​(*Node_Connections)[];​ /​*0x8*/​  ​  ​struct Node_Connecters ​    ​(*Node_Connections)[];​
 /​*0xC*/​  ​  ​u16 Num_Connections;​ /​*0xC*/​  ​  ​u16 Num_Connections;​
-/​*0xE*/​  ​  u16 unk;+/​*0xE*/​  ​  u16 Self_Connected;
 }; };
 </​code>​ </​code>​
Line 255: Line 255:
 /​*0x0C*/ ​   f32    Inverse_H_Speed;​ /​*0x0C*/ ​   f32    Inverse_H_Speed;​
 /​*0x10*/ ​   f32    (*Boundary_Matrix)[];​ /​*0x10*/ ​   f32    (*Boundary_Matrix)[];​
-/​*0x14*/ ​   f32    *Unk;+/​*0x14*/ ​   f32    ​(*Unk)[][5];
 }; };
 </​code>​ </​code>​
  
-The unknown section is almost always null. All that is known is that it follows the boundary matrix and is 4 sets if 5 floats.+The unknown section is almost always null. All that is known is that it follows the boundary matrix and is an areay of 5 floats, with length of Num_Node_Sections-1.
  
 ==== Camera&​Kirby Nodes ==== ==== Camera&​Kirby Nodes ====
Line 265: Line 265:
 These nodes tell the game how to move the camera with respect to the path nodes. These nodes tell the game how to move the camera with respect to the path nodes.
 There are settings for kirby'​s graphics (possibly lots of other things aswell) as he progresses through the level, as well as camera movement. There are settings for kirby'​s graphics (possibly lots of other things aswell) as he progresses through the level, as well as camera movement.
 +
 +Thr flag in 0xE of Kirby_Node determines if 0x10 or 0x4 is read. A value of 0x10 reads unused3, and a value of 0x1 reads the warp.
 +
 +The unused3 and unused4 code is read by the game, but seems to do nothing. Its possibly code that was removed after a beta.
 +Opt_1 and opt_2 are used only in 5-5-1.
  
 <code c> <code c>
 struct Kirby_Node struct Kirby_Node
 { {
-/*0x00*/ u32     unk;+/*0x00*/ u8      Node_Number;​ 
 +/​*0x01*/ ​       u8      Padding;
 /​*0x02*/ ​       u16     unk2; /​*0x02*/ ​       u16     unk2;
-/*0x04*/ u32 unk3;+/*0x04*/ struct Level    Warps;
 /​*0x08*/​ u8 unused;​ /​*0x08*/​ u8 unused;​
 /​*0x09*/​ u8 Shade_Left;​ /​*0x09*/​ u8 Shade_Left;​
 /​*0x0A*/​ u8 Shade_Center;​ /​*0x0A*/​ u8 Shade_Center;​
 /​*0x0B*/​ u8 Shade_Right;​ /​*0x0B*/​ u8 Shade_Right;​
-/​*0x0C*/​ u16 unk4;+/​*0x0C*/​ u16 unused2;
 /​*0x0E*/​ u16 Unkflag;​ /​*0x0E*/​ u16 Unkflag;​
-/*0x10*/ u32     ​opt_1+/*0x10*/ s16     ​unused3; 
-/*0x14*/ u32     ​opt_2+/​*0x12*/ ​       s16     ​unused4
-/*0x18*/ u32     ​opt_3+/*0x14*/ f32     ​opt_1
-/​*0x1C*/​ u32 ​    opt_4+/*0x18*/ f32     ​opt_2
-/​*0x20*/ ​   struct Camera_Node ​   Camera;+/​*0x1C*/​ u32 ​    unused5
 +/​*0x20*/ ​       struct Camera_Node ​   Camera;
 }; };
 </​code>​ </​code>​
kirby64_the_crystal_shards/level_settings_blocks.txt · Last modified: 2021/04/09 18:18 by someone2639