While experimenting with translating some "Zelda - Link From The Past" tiles into pico, I noticed that a lot of sprites save memory by mirroring the left half to the right one.
While the API allows drawing sprites mirrored along the x-axis, the map editor only permits one tile direction.
Would it be possible to add the ability to mirror sprites to the map editor as well?
One way to do it would be to add a bit to every map cell. If you partition sprite memory in half (one half for sprites that are map tiles, one half for others) then you could paint wrong-half sprites on the map to indicate the corresponding right-half sprite should be drawn, but flipped.
Another way to do it, if the proportion of flipped tiles are much smaller than the proportion of non-flipped tiles, is to have an exceptions table, something like:
Regardless, you probably end up doing your own map drawing, instead of map(), something like this:
for i=0,16 do for j=0,16 do local m = mget(i,j) spr(m,i*8,j*8,1,1,flipped(m,i,j)) end end
[Please log in to post a comment]