mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-07-08 01:31:53 +08:00
Fix some background pgd not works
This commit is contained in:
@@ -14,11 +14,11 @@ pub struct PgdGeHeader {
|
|||||||
pub offset_y: u32,
|
pub offset_y: u32,
|
||||||
pub width: u32,
|
pub width: u32,
|
||||||
pub height: u32,
|
pub height: u32,
|
||||||
// untested
|
|
||||||
pub canvas_width: u32,
|
pub canvas_width: u32,
|
||||||
// untested
|
|
||||||
pub canvas_height: u32,
|
pub canvas_height: u32,
|
||||||
pub mode: u32,
|
pub mode: u16,
|
||||||
|
// Some background image has this (0xF)
|
||||||
|
pub _unk: u16,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PgdGeHeader {
|
impl PgdGeHeader {
|
||||||
@@ -47,7 +47,7 @@ pub struct PgdReader<T: Read + Seek> {
|
|||||||
width: u32,
|
width: u32,
|
||||||
height: u32,
|
height: u32,
|
||||||
bpp: u8,
|
bpp: u8,
|
||||||
method: u32,
|
method: u16,
|
||||||
format: Option<ImageColorType>,
|
format: Option<ImageColorType>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ impl ScriptBuilder for PgdGeBuilder {
|
|||||||
canvas_width: data.width,
|
canvas_width: data.width,
|
||||||
canvas_height: data.height,
|
canvas_height: data.height,
|
||||||
mode: 3,
|
mode: 3,
|
||||||
|
_unk: 0,
|
||||||
};
|
};
|
||||||
writer.write_all(b"GE \0")?;
|
writer.write_all(b"GE \0")?;
|
||||||
header.pack(&mut writer, false, Encoding::Utf8)?;
|
header.pack(&mut writer, false, Encoding::Utf8)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user