mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 05:54:05 +09:00
game item to load its own image if needed; common resource pool to assist that
This commit is contained in:
@@ -71,9 +71,6 @@ internal object ReadLayerData {
|
||||
retWorld.layerTerrainLowBits.data = terrainLayerLSB
|
||||
retWorld.layerWallLowBits.data = wallLayerLSB
|
||||
|
||||
if (wireLayer != null) {
|
||||
retWorld.layerWire.data = wireLayer
|
||||
}
|
||||
|
||||
retWorld.spawnX = spawnCoordXBytes.toLittleInt()
|
||||
retWorld.spawnY = spawnCoordYBytes.toLittleInt()
|
||||
|
||||
@@ -62,7 +62,6 @@ internal object WriteLayerData {
|
||||
outputStream.write(map.layerWall.data)
|
||||
outputStream.write(map.layerTerrainLowBits.data)
|
||||
outputStream.write(map.layerWallLowBits.data)
|
||||
outputStream.write(map.layerWire.data)
|
||||
|
||||
// replace savemeta with tempfile
|
||||
try {
|
||||
|
||||
@@ -113,10 +113,10 @@ internal object WriteLayerDataLzma {
|
||||
wb(PAYLOAD_FOOTER)
|
||||
|
||||
// WIRE payload
|
||||
wb(PAYLOAD_HEADER); wb("WIRE".toByteArray())
|
||||
/*wb(PAYLOAD_HEADER); wb("WIRE".toByteArray())
|
||||
wi48(world.width * world.height.toLong())
|
||||
Lzma.compress(ByteArrayInputStream(world.wireArray), outputStream)
|
||||
wb(PAYLOAD_FOOTER)
|
||||
wb(PAYLOAD_FOOTER)*/
|
||||
|
||||
// TdMG payload
|
||||
wb(PAYLOAD_HEADER); wb("TdMG".toByteArray())
|
||||
|
||||
@@ -123,12 +123,12 @@ internal object WriteLayerDataZip {
|
||||
wb(PAYLOAD_FOOTER)
|
||||
|
||||
// WIRE payload
|
||||
wb(PAYLOAD_HEADER); wb("WIRE".toByteArray())
|
||||
/*wb(PAYLOAD_HEADER); wb("WIRE".toByteArray())
|
||||
wi48(world.width * world.height.toLong())
|
||||
deflater = DeflaterOutputStream(outputStream, Deflater(Deflater.BEST_COMPRESSION, true), false)
|
||||
deflater.write(world.wireArray)
|
||||
deflater.flush(); deflater.finish()
|
||||
wb(PAYLOAD_FOOTER)
|
||||
wb(PAYLOAD_FOOTER)*/
|
||||
|
||||
// TdMG payload
|
||||
wb(PAYLOAD_HEADER); wb("TdMG".toByteArray())
|
||||
|
||||
Reference in New Issue
Block a user