summaryrefslogtreecommitdiff
path: root/lyt/materials/material.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-08 04:53:53 +0200
committerTreeki <treeki@gmail.com>2010-10-08 04:53:53 +0200
commitd74825ae7be1cee0cfd625a79289e9494fcda661 (patch)
treef3b9a19c76734802697a6d053e24dab4a4708f38 /lyt/materials/material.cpp
parente813d6ede6bed1e69d749bb32529d657a9d96173 (diff)
downloadLayoutStudio-d74825ae7be1cee0cfd625a79289e9494fcda661.tar.gz
LayoutStudio-d74825ae7be1cee0cfd625a79289e9494fcda661.zip
added a short-term todo list to the readme, and some more material code. three structs left! hopefully I'll have materials done tomorrow :D
Diffstat (limited to 'lyt/materials/material.cpp')
-rw-r--r--lyt/materials/material.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/lyt/materials/material.cpp b/lyt/materials/material.cpp
index eee9c65..1c89ae8 100644
--- a/lyt/materials/material.cpp
+++ b/lyt/materials/material.cpp
@@ -31,6 +31,8 @@ LYTLayout &LYTMaterial::layout() const {
void LYTMaterial::dumpToDebug() {
qDebug() << "LYTMaterial" << name << "@" << (void*)this;
+ // todo: move dumpToDebug calls for the various Material structs out of
+ // LYTMaterial::read...() and put them here, since it makes more sense
}
@@ -75,7 +77,7 @@ void LYTMaterial::readFromDataStream(QDataStream &in) {
}
// ChanCtrl
- /*if (resourceNum.hasChanCtrl()) {
+ if (resourceNum.hasChanCtrl()) {
this->hasChanCtrl = true;
this->readChanCtrl(in);
} else {
@@ -112,7 +114,7 @@ void LYTMaterial::readFromDataStream(QDataStream &in) {
this->readIndirectStage(in);
}
- // TevStage
+ /*// TevStage
tevStages.clear();
for (int i = 0; i < resourceNum.getTevStageNum(); i++) {
@@ -155,3 +157,29 @@ void LYTMaterial::readTexCoordGen(QDataStream &in) {
this->texCoordGens.last().readFromDataStream(in);
this->texCoordGens.last().dumpToDebug();
}
+
+void LYTMaterial::readChanCtrl(QDataStream &in) {
+ this->chanCtrl.readFromDataStream(in);
+ this->chanCtrl.dumpToDebug();
+}
+
+void LYTMaterial::readMatCol(QDataStream &in) {
+ ReadRGBA8Color(this->matCol, in);
+}
+
+void LYTMaterial::readTevSwapTable(QDataStream &in) {
+ this->tevSwapTable.readFromDataStream(in);
+ this->tevSwapTable.dumpToDebug();
+}
+
+void LYTMaterial::readIndTexSRT(QDataStream &in) {
+ this->indTexSRTs.append(LYTTexSRT());
+ this->indTexSRTs.last().readFromDataStream(in);
+ this->indTexSRTs.last().dumpToDebug();
+}
+
+void LYTMaterial::readIndirectStage(QDataStream &in) {
+ this->indTexStages.append(LYTIndirectStage());
+ this->indTexStages.last().readFromDataStream(in);
+ this->indTexStages.last().dumpToDebug();
+}