-
Notifications
You must be signed in to change notification settings - Fork 8
Transports
The transport data in the level file tells the game how to move mario after going down a pipe, through a door, etc
header -- first two bytes, number of transports in the room. transports are not 0xff terminated. crazy that it's two bytes, will one room ever have more than 255 transports?? so it's possible the second byte actually means something else
from there, each transport is ten bytes
byte | meaning |
---|---|
0 | source Y (note this is backwards from all other info out there, but verified this is correct!) |
1 | source X |
2 | dest room number |
3 | an unknown byte |
4 | dest Y (similarly backwards as source y/x) |
5 | dest X |
6 | center screen Y (also backwards) |
7 | center screen X |
8 | entrance type (see below) |
9 | exit type (see below) |
In general, Y comes before X, all previous docs had this the other way around.
I'm not convinced this is necessarily about "centering", but it does influence which tiles get visually filled in on the map once exiting the warp.
locks on doors are done with the sprite 0 y x ce
. Just place them on top of a door. The player must unlock the lock with a key before the door can be used.
value | entrance |
---|---|
0 | door |
1 | horizontal or up into a pipe |
2 | down into a pipe |
3 | horizontal or up into a pipe |
Sometimes Nintendo uses 3, but from what I can tell, it is identical to 1. It is possible only the bottom two bits are consulted
value | exit |
---|---|
0 | fall down |
1 | up from pipe |
2 | fall down |
3 | horizontal exit pipe traveling right |
4 | horizontal exit pipe traveling left |
you can kinda get this to work, but not in a great way it seems. It does seem the game is aware of what Mario exited from. Going from pipe to door can be made to work reasonably well with the fall down exit, but door to pipe so far looks glitched. Maybe it's possible?