mucho refactoring

This commit is contained in:
ceikry 2021-11-03 09:17:06 -05:00
parent 86b4bd0582
commit 548622e2c0
11 changed files with 537 additions and 473 deletions

View file

@ -8,6 +8,7 @@ import java.nio.ByteBuffer
class MapTileDecoder {
fun readLoop(definition: MapDefinition, buffer: ByteBuffer): ByteArray {
for (plane in 0 until 4) {
for (localX in 0 until 64) {
for (localY in 0 until 64) {
@ -37,7 +38,7 @@ class MapTileDecoder {
}
}
if (height != 0 || attrOpcode != 0 || overlayPath != 0 || overlayRotation != 0 || overlayId != 0 || settings != 0 || underlayId != 0) {
definition.setTile(localX, localY, plane, MapTile(height, attrOpcode, overlayId, overlayPath, overlayRotation, settings, underlayId))
definition.setTile(localX, localY, plane, MapTile(height, attrOpcode, if(overlayId == 42) 0 else overlayId, overlayPath, overlayRotation, settings, underlayId))
}
}
}