mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14: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;
|
var info = base.ReadMetaData (stream) as GrxMetaData;
|
||||||
if (null == info)
|
if (null == info)
|
||||||
return null;
|
return null;
|
||||||
if (info.AlphaOffset > 0)
|
return new SgxMetaData
|
||||||
info.AlphaOffset += offset;
|
{
|
||||||
return new SgxMetaData { GrxOffset = offset, GrxInfo = info };
|
Width = info.Width,
|
||||||
|
Height = info.Height,
|
||||||
|
BPP = info.BPP,
|
||||||
|
GrxOffset = offset,
|
||||||
|
GrxInfo = info
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ImageData Read (Stream stream, ImageMetaData info)
|
public override ImageData Read (Stream stream, ImageMetaData info)
|
||||||
{
|
{
|
||||||
var meta = (SgxMetaData)info;
|
var meta = (SgxMetaData)info;
|
||||||
stream.Position = meta.GrxOffset;
|
using (var grx = new StreamRegion (stream, meta.GrxOffset, true))
|
||||||
return base.Read (stream, meta.GrxInfo);
|
return base.Read (grx, meta.GrxInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user