Fix some background pgd not works

This commit is contained in:
2025-09-19 12:38:45 +08:00
parent 73ee2107f5
commit c4deb47716
2 changed files with 5 additions and 4 deletions

View File

@@ -14,11 +14,11 @@ pub struct PgdGeHeader {
pub offset_y: u32,
pub width: u32,
pub height: u32,
// untested
pub canvas_width: u32,
// untested
pub canvas_height: u32,
pub mode: u32,
pub mode: u16,
// Some background image has this (0xF)
pub _unk: u16,
}
impl PgdGeHeader {
@@ -47,7 +47,7 @@ pub struct PgdReader<T: Read + Seek> {
width: u32,
height: u32,
bpp: u8,
method: u32,
method: u16,
format: Option<ImageColorType>,
}

View File

@@ -69,6 +69,7 @@ impl ScriptBuilder for PgdGeBuilder {
canvas_width: data.width,
canvas_height: data.height,
mode: 3,
_unk: 0,
};
writer.write_all(b"GE \0")?;
header.pack(&mut writer, false, Encoding::Utf8)?;