summaryrefslogtreecommitdiff
path: root/wii/texpalette.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-03 05:16:52 +0200
committerTreeki <treeki@gmail.com>2012-08-03 05:16:52 +0200
commit7a183cfa367db01413c001306741d06e1826d077 (patch)
treee50e2e222ddf924e4d868e79ed87a0ced85d01e1 /wii/texpalette.h
parentebcc95da4c26369511caa90d89c5ed06e1e4853a (diff)
downloadLayoutStudio-7a183cfa367db01413c001306741d06e1826d077.tar.gz
LayoutStudio-7a183cfa367db01413c001306741d06e1826d077.zip
might as well push all this. a massive amount of changes
Diffstat (limited to 'wii/texpalette.h')
-rw-r--r--wii/texpalette.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/wii/texpalette.h b/wii/texpalette.h
new file mode 100644
index 0000000..ff6a4bd
--- /dev/null
+++ b/wii/texpalette.h
@@ -0,0 +1,37 @@
+#ifndef WIITEXPALETTE_H
+#define WIITEXPALETTE_H
+
+#include "common.h"
+#include "gx.h"
+#include <QImage>
+
+class WiiTPLTexture {
+public:
+ // TODO: palette stuff
+
+ QImage image;
+ GX::TextureFormat format;
+
+ GX::WrapType wrapS, wrapT;
+
+ GX::TextureFilter minFilter, magFilter;
+
+ float lodBias;
+ bool edgeLODEnable;
+ quint8 minLOD, maxLOD;
+};
+
+class WiiTexPalette {
+public:
+ WiiTexPalette();
+ WiiTexPalette(QDataStream &stream);
+
+ void writeToDataStream(QDataStream &out) const;
+
+ QVector<WiiTPLTexture> textures;
+
+private:
+ void readTexture(QDataStream &in, int textureOffs, int paletteOffs, WiiTPLTexture &tex);
+};
+
+#endif // WIITEXPALETTE_H