User Tools

Site Tools


super:technical_information:data_structures

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
super:technical_information:data_structures [2019/07/07 14:25] – [Enemy population] p.jboysuper:technical_information:data_structures [2024/03/22 16:09] (current) – [Door header] p.jboy
Line 10: Line 10:
   |  |  |  |  |  |  |  |   ____________ CRE bitset   |  |  |  |  |  |  |  |   ____________ CRE bitset
   |  |  |  |  |  |  |  |  |   _________ Door list pointer   |  |  |  |  |  |  |  |  |   _________ Door list pointer
-  |  |  |  |  |  |  |  |  |  |     ____ Event header list+  |  |  |  |  |  |  |  |  |  |     ____ State conditions list
   |  |  |  |  |  |  |  |  |  |    |   |  |  |  |  |  |  |  |  |  |    |
   |  |  |  |  |  |  |  |  |  |    |   |  |  |  |  |  |  |  |  |  |    |
Line 18: Line 18:
 They are variable length (due to the event header list) with ''E5E6'' as a terminator. They are variable length (due to the event header list) with ''E5E6'' as a terminator.
  
-The **event header list** defines conditions to load alternative state headers, they are checked //in order// and the first event header whose check passes is to determine the state header to load. +The **state conditions list** defines conditions to load alternative state headers, they are checked //in order// and the first state condition whose check passes determines the state header to load. 
-Due to this, event headers must be specified in backwards chronological order.+Due to this, state conditions must be specified in backwards chronological order.
  
 <hidden **Area indices**> <hidden **Area indices**>
Line 36: Line 36:
   * The **room index** is almost unused, aside from some specific checks to do with atmospheric graphics in some areas.   * The **room index** is almost unused, aside from some specific checks to do with atmospheric graphics in some areas.
   * The **room width** may not exceed 15 due to the way block collision calculations are implemented   * The **room width** may not exceed 15 due to the way block collision calculations are implemented
-  * **Room width** * **room height** may not exceed 0x50 due to memory constraints +  * **Room width** * **room height** may not exceed 50 due to memory constraints 
-  * The **up scroller** defines the threshold Y position that Samus needs to exceed (relative to the screen) for the screen to start scolling downwards when the camera is at the top of the room +  * The **up scroller** defines the threshold Y position that Samus needs to exceed (relative to the screen) for the screen to start scrolling downwards when the camera is at the top of the room 
-  * The **down scroller** defines the threshold Y position that Samus needs to exceed (relative to the screen) for the screen to start scolling upwards when the camera is at the bottom of the room+  * The **down scroller** defines the threshold Y position that Samus needs to exceed (relative to the screen) for the screen to start scrolling upwards when the camera is at the bottom of the room
   * The **CRE bitset** defines some flags that affect how the CRE is loaded during door transitions:   * The **CRE bitset** defines some flags that affect how the CRE is loaded during door transitions:
  
Line 45: Line 45:
 | 4 | Load extra large tileset | | 4 | Load extra large tileset |
  
-===== Event header list ===== +===== State conditions list ===== 
-   ______________ Event condition +   ______________ State condition 
-  |     _________ Event condition parameters+  |     _________ State condition parameters
   |    |      ___ State header pointer   |    |      ___ State header pointer
   |    |     |   |    |     |
-  eeee [...] ssss ; First event header +  eeee [...] ssss ; First state condition 
-  eeee [...] ssss ; Second event header +  eeee [...] ssss ; Second state condition 
-  [...]           ; Other event headers +  [...]           ; Other state conditions 
-  E5E6            ; Default event header (terminator)+  E5E6            ; Default state condition (terminator)
  
-**Events conditions** are two-byte pointers to code in bank $8F that may have parameters depending on the event in question+**State conditions** are two-byte pointers to code in bank $8F that may have parameters. 
-If the check defined in the **event conditions** is passed, the **state header pointer** in that event header is used to load the room. +If the check defined in the **state conditions** is passed, the **state header pointer** in that state condition header is used to load the room. 
-The only exception is event condition $E5E6, the default event, which doesn't have a **state header pointer** (the default state header simply follows this event header instead).+The only exception is state condition $E5E6, the default, which doesn't have a **state header pointer** (the default state header simply follows this state condition header instead).
  
-<hidden List of events used in Super Metroid>+<hidden List of state conditions used in Super Metroid>
 ^ Condition ^ Parameters ^ Description ^ ^ Condition ^ Parameters ^ Description ^
 | $E5E6 | | Default | | $E5E6 | | Default |
Line 106: Line 106:
    _________________ First door pointer (door BTS 0)    _________________ First door pointer (door BTS 0)
   |     ____________ Second door pointer (door BTS 1)   |     ____________ Second door pointer (door BTS 1)
-  |    |     _______ Other door pointerd (door BTS 2+)+  |    |     _______ Other door pointers (door BTS 2+)
   |    |    |   |    |    |
   aaaa bbbb [...]   aaaa bbbb [...]
Line 119: Line 119:
    _____________________________ Destination room header pointer (bank $8F)    _____________________________ Destination room header pointer (bank $8F)
   |     ________________________ Elevator properties   |     ________________________ Elevator properties
-  |    |   _____________________ Orientation +  |    |   _____________________ Direction 
-  |    |  |   __________________ X position low byte +  |    |  |   __________________ Doorcap X position in blocks 
-  |    |  |  |   _______________ Y position low byte +  |    |  |  |   _______________ Doorcap Y position in blocks 
-  |    |  |  |  |   ____________ X position high byte +  |    |  |  |  |   ____________ X screen 
-  |    |  |  |  |  |   _________ Y position high byte+  |    |  |  |  |  |   _________ Y screen
   |    |  |  |  |  |  |   ______ Distance from door to spawn Samus   |    |  |  |  |  |  |   ______ Distance from door to spawn Samus
   |    |  |  |  |  |  |  |     _ Custom door ASM to execute (bank $8F)   |    |  |  |  |  |  |  |     _ Custom door ASM to execute (bank $8F)
Line 137: Line 137:
 | 0x80 | Door is an elevator | | 0x80 | Door is an elevator |
 | 0x40 | Switch map to new area | | 0x40 | Switch map to new area |
-| 0x0i | Marks elevator index i as used |+| 0x0i | Marks elevator index i as used (for debug mode) |
  
 The **orientation** values are as follows: The **orientation** values are as follows:
Line 316: Line 316:
 | ::: | ::: | 2 || Air only. Air spike (10h damage) | | ::: | ::: | 2 || Air only. Air spike (10h damage) |
 | ::: | ::: | 3 || Solid only. Draygon's broken turret (10h damage) | | ::: | ::: | 3 || Solid only. Draygon's broken turret (10h damage) |
 +| ::: | ::: | Eh || Solid only. X-rayable block (used in Blue Brinstar boulder room) |
 | ::: | ::: | Fh || Solid only. Enemy breakable block (used in Shaktool's room) | | ::: | ::: | Fh || Solid only. Enemy breakable block (used in Shaktool's room) |
 | 3 / Bh | Special | 0 || 1x1 respawning crumble block | | 3 / Bh | Special | 0 || 1x1 respawning crumble block |
Line 346: Line 347:
 | ::: | ::: | ::: | 82h | Respawning speed block, slower crumble animation | | ::: | ::: | ::: | 82h | Respawning speed block, slower crumble animation |
 | ::: | ::: | ::: | 83h | Speed block, slower crumble animation | | ::: | ::: | ::: | 83h | Speed block, slower crumble animation |
-| ::: | ::: | ::: | 84h | Respawning speed block (used by dechora pit) |+| ::: | ::: | ::: | 84h | Respawning speed block (used by dachora pit) |
 | ::: | ::: | ::: | 85h | Speed boost block | | ::: | ::: | ::: | 85h | Speed boost block |
 | ::: | ::: | Norfair | 83h | Lower Norfair chozo hand trigger | | ::: | ::: | Norfair | 83h | Lower Norfair chozo hand trigger |
Line 375: Line 376:
 | ::: | ::: | 9 || Power bomb block | | ::: | ::: | 9 || Power bomb block |
 | ::: | ::: | Ah || Respawning super missile block | | ::: | ::: | Ah || Respawning super missile block |
-| ::: | ::: | Bh || Super missile block  |+| ::: | ::: | Bh || Super missile block 
 +| ::: | ::: | Ch || Fake super missile block (solid block but shows super missile block when x-rayed) | 
 +| ::: | ::: | Dh || Fake super missile block | 
 +| ::: | ::: | Eh || Fake super missile block | 
 +| ::: | ::: | Fh || Fake super missile block |
 | ::: | ::: | 10h || Gate blocks | | ::: | ::: | 10h || Gate blocks |
 | ::: | ::: | 40h || Blue door facing left | | ::: | ::: | 40h || Blue door facing left |
Line 392: Line 397:
 | ::: | ::: | 4Dh || Right orange gate trigger | | ::: | ::: | 4Dh || Right orange gate trigger |
 | ::: | ::: | 4Fh || Critters escape block | | ::: | ::: | 4Fh || Critters escape block |
 +| Eh | Grapple block | 0 || Generic grapple block |
 +| ::: | ::: | 1 || Respawning crumbling grapple block |
 +| ::: | ::: | 2 || Non-respawning crumbling grapple block |
 +| ::: | ::: | 80h+ || Grapple-through block |
 </hidden> </hidden>
    
Line 473: Line 482:
   |     _______________________________ X position   |     _______________________________ X position
   |    |     __________________________ Y position   |    |     __________________________ Y position
-  |    |    |     _____________________ Initialisation parameter (orientation in SMILE)+  |    |    |     _____________________ Initialisation parameter (orientation in old SMILE, tilemaps in SMILE RF)
   |    |    |    |     ________________ Properties (special in SMILE)   |    |    |    |     ________________ Properties (special in SMILE)
-  |    |    |    |    |     ___________ Extra properties (special graphics bitset in SMILE)+  |    |    |    |    |     ___________ Extra properties (special GFX bitset in SMILE, graphics in SMILE RF)
   |    |    |    |    |    |     ______ General purpose parameter (speed in SMILE)   |    |    |    |    |    |     ______ General purpose parameter (speed in SMILE)
-  |    |    |    |    |    |    |     _ General purpose parameter (speed2 in SMILE)+  |    |    |    |    |    |    |     _ General purpose parameter (speed 2 in SMILE)
   |    |    |    |    |    |    |    |   |    |    |    |    |    |    |    |
   iiii xxxx yyyy oooo pppp gggg aaaa bbbb ; First enemy   iiii xxxx yyyy oooo pppp gggg aaaa bbbb ; First enemy
super/technical_information/data_structures.1562509510.txt.gz · Last modified: 2019/07/07 14:25 by p.jboy