The land encoder passed word counts as byte counts to the stream
write, so every diamond row was truncated to half its length and
saved land tiles were unreadable.
A zero run length or a short read at the end of the data left the
row decoder spinning forever, and runs that overshot the row width
wrote past the image buffer. The decode buffer is now freed on
errors as well.
The write path always computed legacy offsets and sizes while the
loader detected and used the High Seas layout, so any tile edit on a
High Seas tiledata.mul shifted records and corrupted the file.
The static RLE encoder read 16-bit pixels from the 32-bit working
image with a 16-bit stride, garbling every pixel and testing a green
channel bit as the visibility flag. The land encoder shifted every
diamond row to a constant or double-stride column. Both matched the
decoder on load and produced scrambled art on save. Also frees the
conversion image on the early exit paths.
- Fixed lightmanager to draw in the correct color
- Fixed TMapBlock and TStaticBlock to correctly initialize itself as "unchanged"
- Cleanup in the server project
- Reverted TStaticItem.UpdatePriorities
- Fixed vdtTiles' HintCanvas to use the desired font when drawing
- Fixed UpdateFilter to no longer call ForceUpdateCurrentTile
- Several code cleanups
- Fixed ghost tile creation to handle random height
- Changed UpdateSelection to only process the selection changes if necessary
- Changed TMapCell.GhostZ to be readable (necessary for simplier increase with random altitude)
- Added TTileDataFlags set
- Changed TTiledata.Flags to use the TTileDataFlags set
- Added hue highlighting to TfrmMain
- Added TTextureManager.GetStaticMaterial to handle tiledata and hues
- Removed old code from TfrmMain.Render
- Bumped version to 0.4.5
- Moved TVirtualTile to UWorldItem
- Added TVirtualTile handling to CompareWorldItems
- Added priorities to the virtual tiles
- Removed now obsolete UListSort.pas
- Removed GameResourceManager dependency from TStatics
- Moved TSeperatedStaticBlock to the according ULandscape units
- Cleanup some unnecessary <> nil checks
- Added access (CanBeWritten) tracking to TStaticItem
- Moved TLandscape.UpdateStaticsPriorities to TStaticItem.UpdatePriorities
- Moved ULandscape.CompareWorldItems to UWorldItem
- Renamed TSeperatedStaticBlock.RefreshList to RebuildList
- Changed TStaticBlock.Sort to use CompareWorldItems and TList.Sort
- Some code style changes