mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(SgxFormat): fixed GRX interpreter.
This commit is contained in:
parent
0e8a3ea417
commit
203cb64a03
@ -308,17 +308,22 @@ namespace GameRes.Formats.UMeSoft
|
||||
var info = base.ReadMetaData (stream) as GrxMetaData;
|
||||
if (null == info)
|
||||
return null;
|
||||
if (info.AlphaOffset > 0)
|
||||
info.AlphaOffset += offset;
|
||||
return new SgxMetaData { GrxOffset = offset, GrxInfo = info };
|
||||
return new SgxMetaData
|
||||
{
|
||||
Width = info.Width,
|
||||
Height = info.Height,
|
||||
BPP = info.BPP,
|
||||
GrxOffset = offset,
|
||||
GrxInfo = info
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public override ImageData Read (Stream stream, ImageMetaData info)
|
||||
{
|
||||
var meta = (SgxMetaData)info;
|
||||
stream.Position = meta.GrxOffset;
|
||||
return base.Read (stream, meta.GrxInfo);
|
||||
using (var grx = new StreamRegion (stream, meta.GrxOffset, true))
|
||||
return base.Read (grx, meta.GrxInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user