-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlh.cs
98 lines (94 loc) · 3.63 KB
/
Flh.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
using System.Collections.Generic;
namespace Kaitai
{
public partial class Flh : KaitaiStruct
{
public static Flh FromFile(string fileName)
{
return new Flh(new KaitaiStream(fileName));
}
public Flh(KaitaiStream p__io, KaitaiStruct p__parent = null, Flh p__root = null) : base(p__io)
{
m_parent = p__parent;
m_root = p__root ?? this;
_read();
}
private void _read()
{
_lw1 = m_io.ReadU4le();
_framecount = m_io.ReadU2le();
_maxwidth = m_io.ReadU2le();
_maxheight = m_io.ReadU2le();
_padding = m_io.ReadU2le();
_frames = new List<Anim>();
for (var i = 0; i < Framecount; i++)
{
_frames.Add(new Anim(m_io, this, m_root));
}
}
public partial class Anim : KaitaiStruct
{
public static Anim FromFile(string fileName)
{
return new Anim(new KaitaiStream(fileName));
}
public Anim(KaitaiStream p__io, Flh p__parent = null, Flh p__root = null) : base(p__io)
{
m_parent = p__parent;
m_root = p__root;
_read();
}
private void _read()
{
_x1 = m_io.ReadU2le();
_y1 = m_io.ReadU2le();
_x2 = m_io.ReadU2le();
_y2 = m_io.ReadU2le();
_zero = m_io.ReadU4le();
_f = m_io.ReadU4le();
_name = System.Text.Encoding.GetEncoding("UTF-8").GetString(m_io.ReadBytes(16));
_flags = m_io.ReadU4le();
_offset = m_io.ReadU4le();
}
private ushort _x1;
private ushort _y1;
private ushort _x2;
private ushort _y2;
private uint _zero;
private uint _f;
private string _name;
private uint _flags;
private uint _offset;
private Flh m_root;
private Flh m_parent;
public ushort X1 { get { return _x1; } }
public ushort Y1 { get { return _y1; } }
public ushort X2 { get { return _x2; } }
public ushort Y2 { get { return _y2; } }
public uint Zero { get { return _zero; } }
public uint F { get { return _f; } }
public string Name { get { return _name; } }
public uint Flags { get { return _flags; } }
public uint Offset { get { return _offset; } }
public Flh M_Root { get { return m_root; } }
public Flh M_Parent { get { return m_parent; } }
}
private uint _lw1;
private ushort _framecount;
private ushort _maxwidth;
private ushort _maxheight;
private ushort _padding;
private List<Anim> _frames;
private Flh m_root;
private KaitaiStruct m_parent;
public uint Lw1 { get { return _lw1; } }
public ushort Framecount { get { return _framecount; } }
public ushort Maxwidth { get { return _maxwidth; } }
public ushort Maxheight { get { return _maxheight; } }
public ushort Padding { get { return _padding; } }
public List<Anim> Frames { get { return _frames; } }
public Flh M_Root { get { return m_root; } }
public KaitaiStruct M_Parent { get { return m_parent; } }
}
}