more pictogrammes

Former-commit-id: 670df70bbed466e56034dbdd33d7a1da31cd88d7
Former-commit-id: 2b106753155be6080d4651acca1981f10d614421
This commit is contained in:
Song Minjae
2016-08-25 21:46:01 +09:00
parent fa5e95a89d
commit 720df532aa
50 changed files with 589 additions and 265 deletions

View File

@@ -0,0 +1,38 @@
package net.torvald.serialise
/**
* Created by minjaesong on 16-08-24.
*/
object ReadGameMapData {
fun InputStream.readRelative(b: ByteArray, off: Int, len: Int): Int {
if (b == null) {
throw NullPointerException()
} else if (off < 0 || len < 0 || len > b.size) {
throw IndexOutOfBoundsException()
} else if (len == 0) {
return 0
}
var c = read()
if (c == -1) {
return -1
}
b[0] = c.toByte()
var i = 1
try {
while (i < len) {
c = read()
if (c == -1) {
break
}
b[i] = c.toByte()
i++
}
} catch (ee: IOException) {
}
return i
}
}

View File

@@ -1,6 +1,6 @@
package net.torvald.serialise
import net.torvald.terrarum.mapgenerator.MapGenerator
import net.torvald.terrarum.mapgenerator.WorldGenerator
import net.torvald.terrarum.mapgenerator.RoguelikeRandomiser
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.itemproperties.ItemPropCodex
@@ -29,7 +29,7 @@ object WriteMeta {
val BYTE_NULL: Byte = 0
val terraseed: Long = MapGenerator.SEED
val terraseed: Long = WorldGenerator.SEED
val rogueseed: Long = RoguelikeRandomiser.seed
/**