game item to load its own image if needed; common resource pool to assist that

This commit is contained in:
minjaesong
2019-03-10 17:46:48 +09:00
parent d895da9e96
commit 833d8814a7
21 changed files with 197 additions and 66 deletions

View File

@@ -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()

View File

@@ -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 {

View File

@@ -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())

View File

@@ -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())