This only used to work because grid updates via tile effect wavy did
not set the update flag, so the grid didn't update itself afterward,
resetting the prev. written walues
Unfortunatelx maps were designed with this bug present,
and now tile rotation on parallax layers is wrong for flipped tiles.
This also affected background fish swarms and anything that
was on a parallax layer and flipped horizontally.
Need to fix maps next...
See also: commit 76ba2b1211
In the map XML file, also <Level ...> attribs of the same name.
Some old maps had those, but either the maps were unused,
or the respective graphics never visible.
Long/thin rectangular nodes were not handled correctly,
because it would only check the nearest waterbubble node
for overlap, not all on the map.
+ Lua func: isUnderWater(x, y, radius)
- fix typo that broke repeat-scale loading
- fix broken tile effects loading
- fix randomly shuffled world map tiles (as textures were loaded in a random order)
- reload tileset on editor reload (because we want to edit textures duh)
Apparently this was planned, but never worked.
Also removed watch() canQuit parameter because during watch(),
input is disabled.
Moved the quitting logic to DSQ::run() and added the canQuit param there.
Game still didn't get the ACTION_ESC for some reason so an extra check for
a raw Esc keypress seems like a good solution.
Game scripts calling watch() and watchForVoice() never used the canQuit
parameter (presumably because it was broken?) so i've felt it's an ok
thing to take it out completely.
Textures used to be unloaded as soon as they were unreferenced.
The TextureMgr cache keeps an active reference to prevent load-unload-load
cycles so it only unloads things when explicitly asked.
This does require some more peak VRAM during map/tileset transitions
especially, since old textures are unloaded only after the next map
has been loaded, but the shortened load times should be worth it.
Major code/logic cleanups + it has a multithreaded batch mode now.
The VFS code doesn't like multiple threads at all,
so for now there's a big lock in front of where it matters.
Changed precacher, map/tileset, and worldmap loading to batched mode.
Still TODO:
- fix broken mod preview images
- reloading resources on debug key
- make mod recache entirely unnecessary
- actually drop resources when no longer needed