summaryrefslogtreecommitdiff
path: root/lyt/animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'lyt/animation.h')
-rw-r--r--lyt/animation.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/lyt/animation.h b/lyt/animation.h
new file mode 100644
index 0000000..efd626a
--- /dev/null
+++ b/lyt/animation.h
@@ -0,0 +1,68 @@
+#ifndef LYTANIMATION_H
+#define LYTANIMATION_H
+
+#include <QString>
+#include <QVector>
+#include <QList>
+#include <QStringList>
+
+struct LYTAnimGroupInfo {
+ QString name;
+ quint8 unusedFlag;
+};
+
+struct LYTAnimStepKey {
+ float frame;
+ quint16 value;
+};
+
+struct LYTAnimHermiteKey {
+ float frame, value, slope;
+};
+
+struct LYTAnimEntry {
+ quint8 id, target, curveType;
+ QVector<LYTAnimHermiteKey> keys;
+ QVector<LYTAnimStepKey> stepKeys;
+};
+
+struct LYTAnimPiece {
+ enum Type {
+ PaneAnim = 0,
+ TexSRTAnim,
+ VisAnim,
+ VtxClrAnim,
+ MatClrAnim,
+ TexPatAnim,
+ IndTexSRTAnim
+ };
+
+ Type type;
+ QList<LYTAnimEntry> entries;
+};
+
+struct LYTAnimBlock {
+ QString name;
+ bool isMaterial;
+ QList<LYTAnimPiece> pieces;
+};
+
+class LYTAnimation {
+public:
+ LYTAnimation(QByteArray data);
+ ~LYTAnimation();
+
+ QString name;
+ quint16 sourceTagNumber;
+ quint16 sourceStartFrame, sourceEndFrame;
+ bool recursiveBind;
+
+ QList<LYTAnimGroupInfo> groups;
+
+ quint16 frameSize;
+ bool loop;
+ QStringList importedFiles;
+ QList<LYTAnimBlock> blocks;
+};
+
+#endif // LYTANIMATION_H