User Tools

Site Tools


kirby64_the_crystal_shards:levels

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:levels [2020/01/29 14:43]
jesusyoshi54 [Levels]
kirby64_the_crystal_shards:levels [2021/01/08 00:42] (current)
someone2639 [Level List] updated struct and added a list of defines
Line 1: Line 1:
 ====== Levels ====== ====== Levels ======
 Each level loads a struct of areas using function 0x800F78E4. Each level loads a struct of areas using function 0x800F78E4.
-The game uses this structure to find the pointer to the current area in the main stage table.+The game uses this structure to find the pointer to the current area in the main stage table. Its located at 0x800be500. 
 + 
 +Note: when used to select levels its bytes, but its stored in ram as words.
 <code C> <code C>
-Level struct ​(800be500):+struct ​Level
 { {
-/​*0X0*/ ​U32    WORLD +/​*0X0*/ ​u8    World; 
-/*0X4*/ U32    LEVEL +/*0X1*/ u8    Level; 
-/*0X8*/ U32    AREA +/*0X2*/ u8    Area; 
-/*0XC*/ U32    WARP/​DIRECTION +/*0X3*/ u8    NodeNum; 
-}+};
 </​code>​ </​code>​
 The pointer to the main stage table is gotten by using this formula: The pointer to the main stage table is gotten by using this formula:
Line 32: Line 34:
   /*0x10*/ u32   ​biAreaSetup; ​     // Bank-index of area stup block    /*0x10*/ u32   ​biAreaSetup; ​     // Bank-index of area stup block 
   /*0x14*/ u16   Death Camera; ​    // Determines how far the camera follows kirby when falling into void/death   /*0x14*/ u16   Death Camera; ​    // Determines how far the camera follows kirby when falling into void/death
-  /*0x16*/ u16   unk16           // Cutscene related?+  /*0x16*/ u16   levelType       // See the next table
   /*0x18*/ u32   ​biDustSettings; ​  // Bank-index of Dust particle settings   /*0x18*/ u32   ​biDustSettings; ​  // Bank-index of Dust particle settings
   /*0x1C*/ u32   ​biDustImg; ​       // Bank-index of Dust particle image   /*0x1C*/ u32   ​biDustImg; ​       // Bank-index of Dust particle image
Line 38: Line 40:
 }; };
 </​code>​ </​code>​
 +
 +The `levelType` field can be one of these values:
 +^Value ​      ^ Description ​         ^
 +|  0  | "​Normal"​ gameplay |
 +|  1  | DDD/​Adeleine Boss (1-2-6,​1-3-9) |
 +|  2  | End of World Boss |
 +|  3  | End of stage (carpet with prizes) |
 +|  4  | Ride water on log/Log Flume(3-2-4) |
 +|  5  | Ride sled(5-1-3) |
 +|  6  | Minecart stage (4-2-2) |
 +|  7  | unused |
 +|  8  | Ride DDD (4-4-3,​2-2-6,​5-4-3) |
 +|  9  | 0-2 Boss (7-1-3) |
 +|  10  | MiniBoss (enlarged enemy) |
 +
  
 ---- ----
Line 45: Line 62:
  
 The Table that has these locations is located at 0x7A1E8 in the ROM and 0x800d1f98 in RAM The Table that has these locations is located at 0x7A1E8 in the ROM and 0x800d1f98 in RAM
-== RAM ADDRESS ​== +== LEVEL LOCATION TABLE== 
-  +^Stage^RAM Address^ROM Address^ 
-  * World 1-10x800D01A4 World 1-20x800D027C World 1-30x800D039C World 1-40x800D0528 World 1-5: 0x +1-1 0x800D01A4 ​| 0x783F4 |  
-  * World 2-10x800D0570 World 2-20x800D066C World 2-30x800D078C World 2-40x800D08F4 World 2-50x800D0A5C +1-2 0x800D027C ​| 0x784CC |  
-  * World 3-10x800D0AA4 World 3-20x800D0BC4 World 3-30x800D0CE4 World 3-40x800D0E28 World 3-50x800D0F48 +1-3 0x800D039C ​| 0x785EC |  
-  * World 4-10x800D0F90 World 4-20x800D10B0 World 4-30x800D11F4 World 4-40x800D12F0 World 4-50x800D1434 +1-4 0x800D0528 ​| 0x78778 |  
-  * World 5-10x800D147C World 5-20x800D159C World 5-30x800D16BC World 5-40x800D1824 World 5-50x800D1968 +2-1 0x800D0570 ​| 0x787C0 |  
-  * World 6-10x800D19B0 World 6-20x800D1A64 World 6-30x800D1B84 World 6-40x800D1D58 World 6-5: 0x +2-2 0x800D066C ​| 0x788BC |  
-  * World 7-10x800D1DA0 World 7-20x800D1E30 World 7-30x800D1E9C World 7-40x800D1EE4 World 7-5: 0x +2-3 0x800D078C ​| 0x789DC |  
-== ROM ADDRESS == +2-4 0x800D08F4 ​| 0x78B44 |  
-  +2-5 0x800D0A5C ​| 0x78CAC |  
-  * World 1-1: 0x783F4 World 1-2: 0x784CC World 1-3: 0x785EC World 1-4: 0x78778 World 1-5: 0x +3-1 0x800D0AA4 ​| 0x78CF4 |  
-  * World 2-1: 0x787C0 World 2-2: 0x788BC World 2-3: 0x789DC World 2-4: 0x78B44 World 2-5: 0x78CAC +3-2 0x800D0BC4 ​| 0x78E14 |  
-  * World 3-1: 0x78CF4 World 3-2: 0x78E14 World 3-3: 0x78F34 World 3-4: 0x79078 World 3-5: 0x79198 +3-3 0x800D0CE4 ​| 0x78F34 |  
-  * World 4-1: 0x791E0 World 4-2: 0x79300 World 4-3: 0x79444 World 4-4: 0x79540 World 4-5: 0x79684 +3-4 0x800D0E28 ​| 0x79078 |  
-  * World 5-1: 0x796CC World 5-2: 0x797EC World 5-3: 0x7990C World 5-4: 0x79A74 World 5-5: 0x79BB8 +3-5 0x800D0F48 ​| 0x79198 |  
-  * World 6-1: 0x79C00 World 6-2: 0x79CB4 World 6-3: 0x79DD4 World 6-4: 0x79FA8 World 6-5: 0x +4-1 0x800D0F90 ​| 0x791E0 |  
-  * World 7-1: 0x79FF0 World 7-2: 0x7A080 World 7-3: 0x7A0EC World 7-4: 0x7A134 World 7-5: 0x +4-2 0x800D10B0 ​| 0x79300 |  
 +4-3 0x800D11F4 ​| 0x79444 |  
 +4-4 0x800D12F0 ​| 0x79540 |  
 +4-5 0x800D1434 ​| 0x79684 |  
 +5-1 0x800D147C ​| 0x796CC |  
 +5-2 0x800D159C ​| 0x797EC |  
 +5-3 0x800D16BC ​| 0x7990C |  
 +5-4 0x800D1824 ​| 0x79A74 |  
 +5-5 0x800D1968 ​| 0x79BB8 |  
 +6-1 0x800D19B0 ​| 0x79C00 |  
 +6-2 0x800D1A64 ​| 0x79CB4 |  
 +6-3 0x800D1B84 ​| 0x79DD4 |  
 +6-4 0x800D1D58 ​| 0x79FA8 |  
 +7-1 0x800D1DA0 ​| 0x79FF0 |  
 +7-2 0x800D1E30 ​| 0x7A080 |  
 +7-3 0x800D1E9C ​| 0x7A0EC |  
 +7-4 0x800D1EE4 ​0x7A134 ​
 ===== See also ===== ===== See also =====
   * [[kirby64_the_crystal_shards:​file_systems]]]   * [[kirby64_the_crystal_shards:​file_systems]]]
   * [[kirby64_the_crystal_shards:​geometry_blocks]]]   * [[kirby64_the_crystal_shards:​geometry_blocks]]]
  
kirby64_the_crystal_shards/levels.1580309011.txt.gz · Last modified: 2020/01/29 14:43 by jesusyoshi54