mirror of
https://gitlab.com/2009scape/tools/2009scape-map-viewer.git
synced 2026-08-22 10:55:26 -06:00
mucho refactoring
This commit is contained in:
parent
86b4bd0582
commit
548622e2c0
11 changed files with 537 additions and 473 deletions
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue