mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(ags): green background by default.
This commit is contained in:
parent
da05891157
commit
df15daebf0
@ -147,10 +147,9 @@ namespace GameRes.Formats.Ags
|
||||
}
|
||||
}
|
||||
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||
CgMetaData info = null;
|
||||
try
|
||||
{
|
||||
info = Cg.ReadMetaData (input) as CgMetaData;
|
||||
var info = Cg.ReadMetaData (input) as CgMetaData;
|
||||
if (null == info)
|
||||
throw new InvalidFormatException();
|
||||
return new CgFormat.Reader (input, info, key_frame);
|
||||
|
@ -129,7 +129,7 @@ namespace GameRes.Formats.Ags
|
||||
m_top = info.OffsetY;
|
||||
m_right = info.Right == 0 ? m_width : info.Right;
|
||||
m_bottom = info.Bottom == 0 ? m_height : info.Bottom;
|
||||
m_output = base_image ?? new byte[3*m_width*m_height];
|
||||
m_output = base_image ?? CreateBackground();
|
||||
m_input = file;
|
||||
Info = info;
|
||||
ShiftTable = InitShiftTable();
|
||||
@ -159,6 +159,14 @@ namespace GameRes.Formats.Ags
|
||||
return table;
|
||||
}
|
||||
|
||||
private byte[] CreateBackground ()
|
||||
{
|
||||
var bg = new byte[3*m_width*m_height];
|
||||
for (int i = 1; i < bg.Length; i += 3)
|
||||
bg[i] = 0xFF;
|
||||
return bg;
|
||||
}
|
||||
|
||||
public void Unpack ()
|
||||
{
|
||||
if (0 != (m_type & 0x10))
|
||||
|
Loading…
x
Reference in New Issue
Block a user