savegame format upd?

This commit is contained in:
minjaesong
2021-02-12 14:14:09 +09:00
parent 46b56b8fd0
commit 6e63ab7fdc
3 changed files with 11 additions and 4 deletions

View File

@@ -18,6 +18,13 @@ import kotlin.math.roundToInt
internal class RNGPool() {
private val RNG = HQRNG()
private val used = SortedArrayList<Int>()
init {
for (i in 0 until 32767) {
used.add(i)
}
}
fun next(): Int {
var n = RNG.nextLong().ushr(32).toInt()
while (used.contains(n)) {

View File

@@ -14,9 +14,9 @@ Files contained the TerranVirtualDisk is as follows:
Has fixed Entry ID of 32763
world[n] -- Layer Data (TEMD); [n] is a serial number of the world (starts at 1)
Has fixed Entry ID of [n]
(any random number in Hex ACTORID_MIN..FFFFFFFF) -- Serialised Entity Information (including Player)
(PLAYER_REF_ID in Hex -- 91A7E2) -- Player Character Information (Serialised--JSON'd--Entity Information)
(51621D) -- The Debug Player (Serialised Entity Information)
(any random number in Hex ACTORID_MIN..FFFFFFFF) -- Serialised Entity Information (including Player), Entry ID is random
(PLAYER_REF_ID in Hex -- 91A7E2) -- Player Character Information (Serialised--JSON'd--Entity Information), Entry ID is random
(51621D) -- The Debug Player (Serialised Entity Information), Entry ID is random
load_order.txt -- LoadOrder.csv (NOT zipped)
Has fixed Entry ID of 32767

View File

@@ -53,7 +53,7 @@ Ord Hex Description
Payload "TERR" -- world terrain data in Uint16
Uncompressed size will be 2x of (width * height)
Payload "WALL" -- world walls data in Unit16
Payload "WALL" -- world walls data in Uint16
Uncompressed size will be 2x of (width * height)
Payload "TdMG" -- world terrain damage data, array of: (Int48 tileAddress, Float32 damage)