Skip to content

Commit c263863

Browse files
committed
Rename unk3 to unk2
1 parent cdbefab commit c263863

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

factoria/src/list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ fn format_entry_long(cmd: &Command, archive_number: Option<u8>, e: &Entry, cells
188188

189189
cells.push(Cell::right(e.unk1.to_string()));
190190

191-
if e.unk3 == e.size {
191+
if e.unk2 == e.size {
192192
cells.push(Cell::right("-".into()));
193193
} else {
194-
cells.push(Cell::right(format_size2(cmd, e.unk3)));
194+
cells.push(Cell::right(format_size2(cmd, e.unk2)));
195195
}
196196

197197
if e.reserved_size == e.size {

factoria/src/remove.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn remove(cmd: &Command, dir: &mut [DirEntry], dat: &mut [u8], file: &str) -> ey
6565
name,
6666
unk1: 0,
6767
size: 0,
68-
unk3: 0,
68+
unk2: 0,
6969
reserved_size: 0,
7070
timestamp: 0,
7171
offset: ent.offset,

themelios-archive/src/dirdat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub struct DirEntry {
9393
pub size: usize,
9494
/// Unknown. In many cases it is equal to `size`, but not always.
9595
/// In other cases it is a power of two that is often fairly consistent with adjacent files, but is wholly uncorrelated with any file sizes.
96-
pub unk3: usize,
96+
pub unk2: usize,
9797
/// Usually equal to `size`, but in SC/dt31 it is bigger. The difference is filled with null bytes.
9898
pub reserved_size: usize,
9999
/// A unix timestamp, presumably when the file was last edited. Timezone is unknown.
@@ -118,7 +118,7 @@ pub fn read_dir(data: &[u8]) -> Result<Vec<DirEntry>, gospel::read::Error> {
118118
name: Name(f.array::<12>()?),
119119
unk1: f.u32()?,
120120
size: f.u32()? as usize,
121-
unk3: f.u32()? as usize,
121+
unk2: f.u32()? as usize,
122122
reserved_size: f.u32()? as usize,
123123
timestamp: f.u32()?,
124124
offset: f.u32()? as usize,
@@ -138,7 +138,7 @@ pub fn write_dir(entries: &[DirEntry]) -> Vec<u8> {
138138
f.array::<12>(e.name.0);
139139
f.u32(e.unk1);
140140
f.u32(e.size as u32);
141-
f.u32(e.unk3 as u32);
141+
f.u32(e.unk2 as u32);
142142
f.u32(e.reserved_size as u32);
143143
f.u32(e.timestamp);
144144
f.u32(e.offset as u32);

0 commit comments

Comments
 (0)