This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
super_mario_64:level_commands [2017/06/23 10:19] 127.0.0.1 external edit |
super_mario_64:level_commands [2025/10/18 21:21] (current) |
||
|---|---|---|---|
| Line 314: | Line 314: | ||
| ---- | ---- | ||
| - | ==== 1C: ?? ==== | + | ==== 1C: Level & Memory Cleanup ==== |
| - | Always follows 0x12 command. Used near end of level layout. | + | |
| ''1C 04 00 00'' | ''1C 04 00 00'' | ||
| + | |||
| + | * Frees data in pool allocated from level script | ||
| + | * Cleanups level related stuff (level objects, pointers, etc) | ||
| + | * Cleanups geometry layout data | ||
| + | * Cleanups all 8 area structs | ||
| + | |||
| + | More detailed notes can be found here: [[https://pastebin.com/raw/GjDsJYqq]] | ||
| ---- | ---- | ||
| Line 328: | Line 334: | ||
| ---- | ---- | ||
| - | ==== 1E: ?? ==== | + | ==== 1E: Allocate Level Data From Pool ==== |
| - | Command used near the end of level layout. Maybe builds level collision? | + | |
| + | Allocates data from the pool and reset a couple variables | ||
| ''1E 04 00 00'' | ''1E 04 00 00'' | ||
| + | |||
| + | * Reallocates memory for the geometry layout node system. | ||
| + | * Allocates 0xDAC0 bytes and stores pointer to 0x8038EE98. Not sure what this is, but it is related to collision. | ||
| + | * Allocates memory for collision data. Vanilla SM64 allocates enough space for only 2,300 collision triangles. Newer versions of Skelux's SM64 editor allocate enough space for 32,767 triangles. | ||
| + | * Sets halfword at address 0x8036125C to 0. (0x8036125C seems to be just a flag that is set when Mario enters into area #2 of any level) | ||
| + | * Sets byte at address 0x803613FE to 0. (0x803613FE seems to be a read-only byte that tells you how many red coins Mario has collected so far) | ||
| + | |||
| + | More detailed notes can be found here: [[https://pastebin.com/raw/XkCfkFyT]] | ||
| ---- | ---- | ||
| Line 402: | Line 417: | ||
| Places a 3D object in the level. | Places a 3D object in the level. | ||
| - | ''24 18 [<color purple>AA</color>] [<color darkgray>ID</color>] [<color darkred>XX XX</color>] [<color darkgreen>YY YY</color>] [<color darkblue>ZZ ZZ</color>] [<color red>RX RX</color>] [<color green>RY RY</color>] [<color blue>RZ RZ</color>] [<color goldenrod>B1 B1</color>] [<color brown>B2 B2</color>] [<color darkcyan>BS BS BS BS</color>]'' | + | ''24 18 [<color purple>AA</color>] [<color darkgray>ID</color>] [<color darkred>XX XX</color>] [<color darkgreen>YY YY</color>] [<color darkblue>ZZ ZZ</color>] [<color red>RX RX</color>] [<color green>RY RY</color>] [<color blue>RZ RZ</color>] [<color goldenrod>BB BB BB BB</color>] [<color darkcyan>BS BS BS BS</color>]'' |
| | <color purple>AA</color> | Act mask in which this object will appear in | | | <color purple>AA</color> | Act mask in which this object will appear in | | ||
| Line 412: | Line 427: | ||
| | <color green>RY</color> | Rotation across Y axis in degrees (s16) | | | <color green>RY</color> | Rotation across Y axis in degrees (s16) | | ||
| | <color blue>RZ</color> | Rotation across Z axis in degrees (s16) | | | <color blue>RZ</color> | Rotation across Z axis in degrees (s16) | | ||
| - | | <color goldenrod>B1</color> | Behavior parameter 1 (object->0x144)| | + | | <color goldenrod>BB</color> | Behavior parameters for the object. The entire word gets stored at Object→0x188, while only the second byte gets stored at Object→0x144.| |
| - | | <color brown>B2</color> | Behavior parameter 2 (object->0x188) | | + | |
| | <color darkcyan>BS</color> | RAM segment address for behavior script | | | <color darkcyan>BS</color> | RAM segment address for behavior script | | ||