mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(ElgFormat): set input position in Reader constructor.
This commit is contained in:
parent
6b28055bd8
commit
41808ce7a5
@ -26,7 +26,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.Composition;
|
using System.ComponentModel.Composition;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using GameRes.Utility;
|
using GameRes.Utility;
|
||||||
@ -102,7 +101,6 @@ namespace GameRes.Formats.Lucifen
|
|||||||
public override ImageData Read (IBinaryStream file, ImageMetaData info)
|
public override ImageData Read (IBinaryStream file, ImageMetaData info)
|
||||||
{
|
{
|
||||||
var meta = (ElgMetaData)info;
|
var meta = (ElgMetaData)info;
|
||||||
file.Position = meta.HeaderSize;
|
|
||||||
using (var reader = new Reader (file, meta))
|
using (var reader = new Reader (file, meta))
|
||||||
{
|
{
|
||||||
reader.Unpack();
|
reader.Unpack();
|
||||||
@ -131,6 +129,7 @@ namespace GameRes.Formats.Lucifen
|
|||||||
m_type = info.Type;
|
m_type = info.Type;
|
||||||
m_output = new byte[m_width*m_height*m_bpp/8];
|
m_output = new byte[m_width*m_height*m_bpp/8];
|
||||||
m_input = stream;
|
m_input = stream;
|
||||||
|
m_input.Position = info.HeaderSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unpack ()
|
public void Unpack ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user