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
kirby64_the_crystal_shards:level_settings_blocks [2020/06/07 20:53]
jesusyoshi54 [Normal Groups]
kirby64_the_crystal_shards:level_settings_blocks [2020/09/15 11:30] (current)
jesusyoshi54 [Collision Header]
Line 87: Line 87:
 Together the normals should solve the plane equation (see:​[[http://​mathworld.wolfram.com/​Plane.html|link]]). Together the normals should solve the plane equation (see:​[[http://​mathworld.wolfram.com/​Plane.html|link]]).
  
-The list of normals always starts with (-1,​-2,​-3,​-4) ​and is used to refer to walls, only solid collision has its normals listed.+The list of normals always starts with (-1,​-2,​-3,​-4).
 Redundant normals are not repeated, but are just referenced multiple times (e.g. two triangles with norm Y==1 and offset==0 share their normal). Redundant normals are not repeated, but are just referenced multiple times (e.g. two triangles with norm Y==1 and offset==0 share their normal).
  
Line 106: Line 106:
 Each triangle group represents one polygon index (0x6 in tri struct). The groups are defined by setting the msb at the last triangle in that group. This means any coplanar, connected N-gon will be a single polygon group. Each triangle group represents one polygon index (0x6 in tri struct). The groups are defined by setting the msb at the last triangle in that group. This means any coplanar, connected N-gon will be a single polygon group.
  
-There should be an equal amount of items in the triangle list and triangle group list. +There should be an equal amount of items in the triangle list and triangle group list, but there may be repeats based on how the normal groups are split
 +Triangles within groups are sorted by Y values.
 ==== Normal Groups ==== ==== Normal Groups ====
  
 The normal groups are a binary space partition tree of the level normals and corresponding triangles associated with those normals. Each normal group represents a node in the tree, and has a right and left child based on whether the ensemble of triangles is in front or behind the parent node. The normal groups are a binary space partition tree of the level normals and corresponding triangles associated with those normals. Each normal group represents a node in the tree, and has a right and left child based on whether the ensemble of triangles is in front or behind the parent node.
  
-The first index of the normal group is (-1,​-2,​-3,​-4), ​the search through ​the tree starts at the last member ​in the array, ​indices of zero refer to leaf nodes.+If a triangle group intersects a normal, then the group is split and the normal is repeated in both the left and right children. If that group shares a condition such as being breakable, then the entire group is repeated ​in the left and right branches. 
 + 
 +Child indices of zero refer to leaf nodes, the tree start is defined in the collision header.
  
 <code c> <code c>
Line 136: Line 138:
 /​*0x0*/ ​ u16  Num_Dynamic_Geo_Group_Members;​ //Number of connected triangles /​*0x0*/ ​ u16  Num_Dynamic_Geo_Group_Members;​ //Number of connected triangles
 /​*0x2*/ ​ u16  Index_To_Dynamic_Geo_Group;​ //(0x30 in col header) /​*0x2*/ ​ u16  Index_To_Dynamic_Geo_Group;​ //(0x30 in col header)
-/​*0x4*/ ​ u16  ​Unk_Index; //Gets stored ​to unk struct+/​*0x4*/ ​ u16  ​Layout_Number; //Linked display geometry ​to also remove
 }; };
 </​code>​ </​code>​
Line 204: Line 206:
 /​*0x20*/ ​  ​u16 ​      ​(*Triangle_Norm_Cells)[][2];​ /​*0x20*/ ​  ​u16 ​      ​(*Triangle_Norm_Cells)[][2];​
 /​*0x24*/ ​  ​u32 ​      ​Len_Triangle_Norm_Cells;​ /​*0x24*/ ​  ​u32 ​      ​Len_Triangle_Norm_Cells;​
-/​*0x28*/ ​  ​u32 ​      Num_Floor_Norms; //Should be tri norm cells minus 1+/​*0x28*/ ​  ​u32 ​      Norm_Cell_BSP_Root; //Always last member
 /​*0x2C*/ ​  ​struct DynGeo_List ​    ​(*Destructable_Groups)[];​ /​*0x2C*/ ​  ​struct DynGeo_List ​    ​(*Destructable_Groups)[];​
 /​*0x30*/ ​  ​u16 ​      ​(*Destructable Indices)[]; /​*0x30*/ ​  ​u16 ​      ​(*Destructable Indices)[];
Line 314: Line 316:
 </​code>​ </​code>​
  
 +For any of the camera values, 9999 can be used to disable reading that value. For a pair, -9999 is used in the first member and 9999 in the second member to disable them.
 +
 +Certain values are only used if the bool enables them. For example a focus pos is only used if that axis is locked.
 +
 +The bounds variables basically set limits on how far the camera moves before panning to face kirby instead of scrolling.
 <code c> <code c>
 struct Camera_Node struct Camera_Node
 { {
-/​*0x00*/ ​  u16    Camera_Type;+/​*0x00*/ ​  u8     ​Profile_View/* Set position to be in line with kirbys side*/ 
 +/​*0x01*/ ​  ​u8 ​    Pad; /*Unused*/
 /​*0x02*/ ​  ​u8 ​    ​Lock_X_pos;​ /​*0x02*/ ​  ​u8 ​    ​Lock_X_pos;​
 /​*0x03*/ ​  ​u8 ​    ​Lock_Y_pos;​ /​*0x03*/ ​  ​u8 ​    ​Lock_Y_pos;​
 /​*0x04*/ ​  ​u8 ​    ​Lock_Z_pos;​ /​*0x04*/ ​  ​u8 ​    ​Lock_Z_pos;​
 /​*0x05*/ ​  ​u8 ​    ​unused;​ /​*0x05*/ ​  ​u8 ​    ​unused;​
-/​*0x06*/ ​  ​u8 ​    unk1+/​*0x06*/ ​  ​u8 ​    DisableCamPhi
-/​*0x07*/ ​  ​u8 ​    unk2+/​*0x07*/ ​  ​u8 ​    DisableCamPhiDown
-/​*0x08*/ ​  ​u8 ​    Follow_X_Angle+/​*0x08*/ ​  ​u8 ​    EnableCamTheta
-/​*0x09*/ ​  ​u8 ​    unk4+/​*0x09*/ ​  ​u8 ​    pad2
-/​*0x0A*/ ​  u8     unk5;+/​*0x0A*/ ​  u16    pad3;
 /​*0x0C*/ ​  ​f32 ​   X_Focus_Pos;​ /​*0x0C*/ ​  ​f32 ​   X_Focus_Pos;​
 /​*0x10*/ ​  ​f32 ​   Y_Focus_Pos;​ /​*0x10*/ ​  ​f32 ​   Y_Focus_Pos;​
-/​*0x14*/ ​  ​f32 ​   ​Flag//usually 9999+/​*0x14*/ ​  ​f32 ​   ​Z_Focus_Pos;
 /​*0x18*/ ​  ​f32 ​   Near_Clip_Plane;​ /​*0x18*/ ​  ​f32 ​   Near_Clip_Plane;​
 /​*0x1C*/ ​  ​f32 ​   Far_Clip_Plane;​ /​*0x1C*/ ​  ​f32 ​   Far_Clip_Plane;​
-/​*0x20*/ ​  ​f32[2] ​Cam_Y_Pos+/​*0x20*/ ​  ​f32[2] ​CamRadiusScale
-/​*0x28*/ ​  ​f32[2] ​Cam_X_Pos+/​*0x28*/ ​  ​f32[2] ​CamTheta
-/​*0x30*/ ​  ​f32[2] ​Cam_Z_Pos;+/​*0x30*/ ​  ​f32[2] ​CamRadius;
 /​*0x38*/ ​  ​f32[2] FOV_Pair; /​*0x38*/ ​  ​f32[2] FOV_Pair;
-/​*0x40*/ ​  ​f32[2] ​Lateral_Y_Pos+/​*0x40*/ ​  ​f32[2] ​CamPhi
-/​*0x48*/ ​  ​f32 ​   ​Unk6;​ +/​*0x48*/ ​  f32[2] Cam_X_LockBounds
-/​*0x4C*/ ​  ​f32 ​   Cam_X_Offset_Locked+/​*0x50*/ ​  f32[2] Cam_Y_LockBounds
-/​*0x50*/ ​  ​f32 ​   ​Unk7;​ +/​*0x58*/ ​  ​f32[2] ​Cam_Z_LockBounds
-/​*0x54*/ ​  ​f32 ​   Cam_Y_Pos_Locked+/​*0x60*/ ​  f32[2] Cam_Yaw_LockBounds
-/​*0x58*/ ​  ​f32[2] ​Flag2//mostly a 9999 pair +/​*0x68*/ ​  f32[2] Cam_Pitch_LockBounds;
-/​*0x60*/ ​  ​f32 ​   ​Focus_Y_Above//while 0x6 is true +
-/​*0x64*/ ​  ​f32 ​   Focus_Y_Below;​ //while 0x6 is true +
-/​*0x68*/ ​  ​f32 ​   ​Focus_X_Left//while 0x6 is true +
-/​*0x6C*/ ​  ​f32 ​   Focus_X_Right;​ //while 0x6 is true+
 }; };
 </​code>​ </​code>​
kirby64_the_crystal_shards/level_settings_blocks.1591563216.txt.gz · Last modified: 2020/06/07 20:53 by jesusyoshi54