summaryrefslogtreecommitdiff
path: root/extractor/gnd_format.gd
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/gnd_format.gd')
-rw-r--r--extractor/gnd_format.gd6
1 files changed, 5 insertions, 1 deletions
diff --git a/extractor/gnd_format.gd b/extractor/gnd_format.gd
index faad9ae..c49bce6 100644
--- a/extractor/gnd_format.gd
+++ b/extractor/gnd_format.gd
@@ -91,7 +91,7 @@ static func from_bytes(bytes: ByteStream) -> GNDFormat:
gnd_format.texture_paths = []
for _n in gnd_format.texture_count:
gnd_format.texture_paths.append(
- bytes.get_string_from_ascii(gnd_format.texture_path_length)
+ bytes.get_string_from_ro(gnd_format.texture_path_length)
)
gnd_format.light_map_slice_count = bytes.decode_s32()
@@ -162,6 +162,10 @@ func convert(data_path: String) -> GridMap:
var cubes := get_cubes()
+ var cache := {}
+ # TODO: use texture_index and surface uvs as key
+ # TODO: for deduplication of cell items (as long as other sides aren't accounted for..)
+
for x in width:
for y in height:
var cube = cubes[x + y * width]