SMB3-Foundry icon indicating copy to clipboard operation
SMB3-Foundry copied to clipboard

Map Editor pointers not working?

Open Doublebass1985 opened this issue 4 years ago • 1 comments

apparently when you save a level ex(2-2) to (1-1) and save it will not load 2-2, but it will just load the default level 1-1.

Doublebass1985 avatar Jan 29 '21 04:01 Doublebass1985

When saving a M3L file to the ROM, the object and enemy data is simply written to the location, that is selected with the level selector. This only works, if the M3L level has the same object set as the one, that is supposed to be replaced, because the object set is necessary to find the level from the object set.

This means, if we overwrite an overworld level, then we also need to update the data of the overworld, where the object set for this level is stored.

Additionally, we would have to go through every known level header, because it is possible, that other levels jump to it and the object set of the level is, again, stored in the object header, because it is used to find the level in the ROM.

So saving a M3L level to a ROM is more complicated than first thought. For now I will simply disable overwriting levels with different object sets, but this is certainly something that is able to and should be fixed.

mchlnix avatar Feb 07 '21 16:02 mchlnix

Saving M3Ls to ROM was overhauled and should be working.

mchlnix avatar Nov 19 '22 13:11 mchlnix