mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +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);
|
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||||
CgMetaData info = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
info = Cg.ReadMetaData (input) as CgMetaData;
|
var info = Cg.ReadMetaData (input) as CgMetaData;
|
||||||
if (null == info)
|
if (null == info)
|
||||||
throw new InvalidFormatException();
|
throw new InvalidFormatException();
|
||||||
return new CgFormat.Reader (input, info, key_frame);
|
return new CgFormat.Reader (input, info, key_frame);
|
||||||
|
@ -129,7 +129,7 @@ namespace GameRes.Formats.Ags
|
|||||||
m_top = info.OffsetY;
|
m_top = info.OffsetY;
|
||||||
m_right = info.Right == 0 ? m_width : info.Right;
|
m_right = info.Right == 0 ? m_width : info.Right;
|
||||||
m_bottom = info.Bottom == 0 ? m_height : info.Bottom;
|
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;
|
m_input = file;
|
||||||
Info = info;
|
Info = info;
|
||||||
ShiftTable = InitShiftTable();
|
ShiftTable = InitShiftTable();
|
||||||
@ -159,6 +159,14 @@ namespace GameRes.Formats.Ags
|
|||||||
return table;
|
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 ()
|
public void Unpack ()
|
||||||
{
|
{
|
||||||
if (0 != (m_type & 0x10))
|
if (0 != (m_type & 0x10))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user