I can now export maps! :D
Produces -
#map
$name=1.txt
$mapWidth=5
$mapHeight=5
$tileWidth=64
$tileHeight=64
#tilesheets
%tilesheet=tileset1.bmp
%rect=64,0,64,64
%rep=1
%rect=64,64,64,64
%rep=2
%rect=192,0,64,64
%rep=3
#tiles
%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%2%0%0%0%2%0
#collision
I found a couple more annoying bugs due to bad design, namely the deletion of stuff that’s being used currently on the map. Basically, if you create a tilesheet and use the tiles on the map, then go back to edit the tilesheet and delete some tiles… *poof* the application crashes.
This is again because the map itself has pointers to tile types which can’t be destroyed without first nulling all the pointers which point to it. Which is easy enough to do, just something I should have thought of before.
Oh, and another oddity – mouse events which happen outside the bounds of the map (ie, too far right) should be ignored, not mis-parsed into tile clicks. Which is even easier to fix; can’t believe I forgot to add that in…
Mushu trips over his own stupid.
4 comments