mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(IafFormat): image variation.
This commit is contained in:
parent
40c7cbfe6a
commit
983d49346e
@ -52,42 +52,48 @@ namespace GameRes.Formats.Triangle
|
|||||||
var header = new byte[0x14];
|
var header = new byte[0x14];
|
||||||
if (12 != stream.Read (header, 0, 12))
|
if (12 != stream.Read (header, 0, 12))
|
||||||
return null;
|
return null;
|
||||||
int data_offset;
|
|
||||||
int packed_size0 = LittleEndian.ToInt32 (header, 0);
|
int packed_size0 = LittleEndian.ToInt32 (header, 0);
|
||||||
int packed_size1 = LittleEndian.ToInt32 (header, 1);
|
int packed_size1 = LittleEndian.ToInt32 (header, 1);
|
||||||
int x, y, packed_size, unpacked_size;
|
int data_offset, packed_size, unpacked_pos;
|
||||||
|
int tail_size = 0;
|
||||||
if (5+packed_size1+0x14 == stream.Length)
|
if (5+packed_size1+0x14 == stream.Length)
|
||||||
{
|
{
|
||||||
packed_size = packed_size1;
|
packed_size = packed_size1;
|
||||||
data_offset = 5;
|
data_offset = 5;
|
||||||
stream.Seek (-0x14, SeekOrigin.End);
|
tail_size = 0x14;
|
||||||
if (0x14 != stream.Read (header, 0, 0x14))
|
unpacked_pos = 0x10;
|
||||||
return null;
|
}
|
||||||
x = LittleEndian.ToInt32 (header, 0);
|
else if (5+packed_size1+0xC == stream.Length)
|
||||||
y = LittleEndian.ToInt32 (header, 4);
|
{
|
||||||
unpacked_size = LittleEndian.ToInt32 (header, 0x10);
|
packed_size = packed_size1;
|
||||||
|
data_offset = 5;
|
||||||
|
tail_size = 12;
|
||||||
|
unpacked_pos = 8;
|
||||||
}
|
}
|
||||||
else if (4+packed_size0+0xC == stream.Length)
|
else if (4+packed_size0+0xC == stream.Length)
|
||||||
{
|
{
|
||||||
packed_size = packed_size0;
|
packed_size = packed_size0;
|
||||||
data_offset = 4;
|
data_offset = 4;
|
||||||
stream.Seek (-12, SeekOrigin.End);
|
tail_size = 12;
|
||||||
if (12 != stream.Read (header, 0, 12))
|
unpacked_pos = 8;
|
||||||
return null;
|
|
||||||
x = LittleEndian.ToInt32 (header, 0);
|
|
||||||
y = LittleEndian.ToInt32 (header, 4);
|
|
||||||
unpacked_size = LittleEndian.ToInt32 (header, 8);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
packed_size = (int)stream.Length-12;
|
packed_size = (int)stream.Length-12;
|
||||||
data_offset = 12;
|
data_offset = 12;
|
||||||
x = LittleEndian.ToInt32 (header, 0);
|
unpacked_pos = 8;
|
||||||
y = LittleEndian.ToInt32 (header, 4);
|
|
||||||
unpacked_size = LittleEndian.ToInt32 (header, 8);
|
|
||||||
}
|
}
|
||||||
|
if (tail_size > 0)
|
||||||
|
{
|
||||||
|
stream.Seek (-tail_size, SeekOrigin.End);
|
||||||
|
if (tail_size != stream.Read (header, 0, tail_size))
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
int x = LittleEndian.ToInt32 (header, 0);
|
||||||
|
int y = LittleEndian.ToInt32 (header, 4);
|
||||||
if (Math.Abs (x) > 4096 || Math.Abs (y) > 4096)
|
if (Math.Abs (x) > 4096 || Math.Abs (y) > 4096)
|
||||||
return null;
|
return null;
|
||||||
|
int unpacked_size = LittleEndian.ToInt32 (header, unpacked_pos);
|
||||||
int pack_type = (unpacked_size >> 30) & 3;
|
int pack_type = (unpacked_size >> 30) & 3;
|
||||||
if (3 == pack_type)
|
if (3 == pack_type)
|
||||||
return null;
|
return null;
|
||||||
|
@ -512,6 +512,7 @@ Zettai Joshi Ryouiki!<br/>
|
|||||||
<tr class="odd"><td>*.eri<br/>*.mio</td><td><tt>Entis\x1a</tt></td><td>No</td></tr>
|
<tr class="odd"><td>*.eri<br/>*.mio</td><td><tt>Entis\x1a</tt></td><td>No</td></tr>
|
||||||
<tr><td>*.saf</td><td>-</td><td>No</td><td>Lune</td><td>Rinkan Gakuen</td></tr>
|
<tr><td>*.saf</td><td>-</td><td>No</td><td>Lune</td><td>Rinkan Gakuen</td></tr>
|
||||||
<tr class="odd"><td>*.arc+*.ari</td><td><tt>WFL1</tt></td><td>No</td><td rowspan="2">KaGuYa</td><td rowspan="2">
|
<tr class="odd"><td>*.arc+*.ari</td><td><tt>WFL1</tt></td><td>No</td><td rowspan="2">KaGuYa</td><td rowspan="2">
|
||||||
|
Bishoku<br/>
|
||||||
Dungeon Crusaderz ~Tales of Demon Eater~<br/>
|
Dungeon Crusaderz ~Tales of Demon Eater~<br/>
|
||||||
Dungeon Crusaderz 2 ~Eigou no Rakudo~<br/>
|
Dungeon Crusaderz 2 ~Eigou no Rakudo~<br/>
|
||||||
Inkou Haden Amatsu ~Hakudaku no Juin~<br/>
|
Inkou Haden Amatsu ~Hakudaku no Juin~<br/>
|
||||||
@ -643,6 +644,7 @@ Zettai★Maou ~Boku no Mune-kyun Gakuen Saga~<br/>
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>*.sud</td><td>-</td><td>No</td><td rowspan="3">Triangle</td><td rowspan="3">
|
<tr><td>*.sud</td><td>-</td><td>No</td><td rowspan="3">Triangle</td><td rowspan="3">
|
||||||
Kourin Tenshi En Ciel Rena<br/>
|
Kourin Tenshi En Ciel Rena<br/>
|
||||||
|
Mahou Senshi Princess Tear<br/>
|
||||||
Mahou Senshi Sweet Knights ~Heroine Ryoujoku Shirei~<br/>
|
Mahou Senshi Sweet Knights ~Heroine Ryoujoku Shirei~<br/>
|
||||||
Mamagoto<br/>
|
Mamagoto<br/>
|
||||||
Monster Park ~Bakemono ni Miirareshi Hime~<br/>
|
Monster Park ~Bakemono ni Miirareshi Hime~<br/>
|
||||||
@ -843,6 +845,7 @@ Verdia Gensoukyoku<br/>
|
|||||||
Wondering Repair!<br/>
|
Wondering Repair!<br/>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>*.pac</td><td>-</td><td>No</td><td>Tmr-Hiro ADV System</td><td>
|
<tr><td>*.pac</td><td>-</td><td>No</td><td>Tmr-Hiro ADV System</td><td>
|
||||||
|
Dennou Shinpan Kisaragi Sanjikan<br/>
|
||||||
Gokkun Athlete! Kyonyuu Medalist no Oshaburi Kyouka Gasshuku<br/>
|
Gokkun Athlete! Kyonyuu Medalist no Oshaburi Kyouka Gasshuku<br/>
|
||||||
Hitozuma Sakunyuu Hyakkaten<br/>
|
Hitozuma Sakunyuu Hyakkaten<br/>
|
||||||
Mai Miko Moe<br/>
|
Mai Miko Moe<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user