mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 01:54:04 +09:00
savegame format upd?
This commit is contained in:
@@ -18,6 +18,13 @@ import kotlin.math.roundToInt
|
|||||||
internal class RNGPool() {
|
internal class RNGPool() {
|
||||||
private val RNG = HQRNG()
|
private val RNG = HQRNG()
|
||||||
private val used = SortedArrayList<Int>()
|
private val used = SortedArrayList<Int>()
|
||||||
|
|
||||||
|
init {
|
||||||
|
for (i in 0 until 32767) {
|
||||||
|
used.add(i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun next(): Int {
|
fun next(): Int {
|
||||||
var n = RNG.nextLong().ushr(32).toInt()
|
var n = RNG.nextLong().ushr(32).toInt()
|
||||||
while (used.contains(n)) {
|
while (used.contains(n)) {
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ Files contained the TerranVirtualDisk is as follows:
|
|||||||
Has fixed Entry ID of 32763
|
Has fixed Entry ID of 32763
|
||||||
world[n] -- Layer Data (TEMD); [n] is a serial number of the world (starts at 1)
|
world[n] -- Layer Data (TEMD); [n] is a serial number of the world (starts at 1)
|
||||||
Has fixed Entry ID of [n]
|
Has fixed Entry ID of [n]
|
||||||
(any random number in Hex ACTORID_MIN..FFFFFFFF) -- Serialised Entity Information (including Player)
|
(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)
|
(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)
|
(51621D) -- The Debug Player (Serialised Entity Information), Entry ID is random
|
||||||
load_order.txt -- LoadOrder.csv (NOT zipped)
|
load_order.txt -- LoadOrder.csv (NOT zipped)
|
||||||
Has fixed Entry ID of 32767
|
Has fixed Entry ID of 32767
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Ord Hex Description
|
|||||||
Payload "TERR" -- world terrain data in Uint16
|
Payload "TERR" -- world terrain data in Uint16
|
||||||
Uncompressed size will be 2x of (width * height)
|
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)
|
Uncompressed size will be 2x of (width * height)
|
||||||
|
|
||||||
Payload "TdMG" -- world terrain damage data, array of: (Int48 tileAddress, Float32 damage)
|
Payload "TdMG" -- world terrain damage data, array of: (Int48 tileAddress, Float32 damage)
|
||||||
|
|||||||
Reference in New Issue
Block a user