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/11/30 23:10] david Added info on command 0x1E |
super_mario_64:level_commands [2017/12/03 14:10] (current) david Added info on command 0x1C |
||
---|---|---|---|
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 330: | Line 336: | ||
==== 1E: Allocate Level Data From Pool ==== | ==== 1E: Allocate Level Data From Pool ==== | ||
+ | Allocates data from the pool and reset a couple variables | ||
''1E 04 00 00'' | ''1E 04 00 00'' | ||
- | |||
- | * Command 0x1E is used to : | ||
* Reallocates memory for the geometry layout node system. | * 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 0xDAC0 bytes and stores pointer to 0x8038EE98. Not sure what this is, but it is related to collision. | ||
Line 340: | Line 345: | ||
* 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 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) | * 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]] | ||
---- | ---- |