2 Commits

Author SHA1 Message Date
Ishotihadus 2b07a718f7 Bump version to 3.9.11 2023-05-16 11:37:00 +09:00
Ishotihadus 59345b5d83 Fix Unity 2021 2023-05-16 11:09:15 +09:00
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -59,7 +59,7 @@ module Mikunyan
@unity_version = br.cstr
@generator_version = br.cstr
@format < 6 ? load_unity_raw(br) : load_unity_fs(br)
@format == 6 || @signature == 'UnityFS' ? load_unity_fs(br, @signature) : load_unity_raw(br)
end
# @param [Mikunyan::BinaryReader] br
@@ -86,18 +86,22 @@ module Mikunyan
end
# @param [Mikunyan::BinaryReader] br
def load_unity_fs(br)
def load_unity_fs(br, signature)
file_size = br.i64u
ci_block_size = br.i32u
ui_block_size = br.i32u
flags = br.i32u
br.adv(1) unless signature == 'UnityFS'
br.align(16) if @format >= 7
head_bin = flags & 0x80 == 0 ? br.read(ci_block_size) : br.read_abs(ci_block_size, file_size - ci_block_size)
head = BinaryReader.new(uncompress(head_bin, ui_block_size, flags))
@guid = head.read(16)
br.align(16) unless flags & 0x200 == 0
block_count = head.i32u
raw_data = Array.new(block_count) do
u_size = head.i32u
+1 -1
View File
@@ -2,5 +2,5 @@
module Mikunyan
# version string
VERSION = '3.9.10'
VERSION = '3.9.11'
end