as someone who's tinkered with 1.3 maps quite a bit, i like this! but chucking this in Ti2 without any other lua running yields this:
as well as that, this renders over the vanilla pause menu. it also doesn't animate things when paused. that can be overcome by updating frames in onDraw.
as for your costume bugs, Graphics.sprites.player[player.character].img can be used in place of Graphics.loadImage(Misc.resolveGraphicsFile("player-"..tostring(player.character)..".png")). though you will need to update that to account for character/costume changes. you can do this in onDraw for that:
Code: Select all
-- make playerSprite just " local playerSprite" at the top then do this in onDraw
if not (playerSprite == Graphics.sprites.player[player.character].img) then
playerSprite = Graphics.sprites.player[player.character].img
as for peach and toads' overworld rendering issues, you can find how that's handled in source here
for an idea of how to handle that (if you can understand it anyhow)
on the switches, 0x00B2BFD8 is the animation array for 1.3 levels (gotten from map3d.lua in data/scripts). which makes sense, given that the level gets a "pressed" frame after you've beaten it.
all in all, i like where this is going. keep up the good work!