summaryrefslogtreecommitdiff
path: root/lyt/materials/material.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
committerTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
commitebcc95da4c26369511caa90d89c5ed06e1e4853a (patch)
tree6ed445f0204a6e6615088d135c4b29c4309077a4 /lyt/materials/material.h
parentfdf8cfec2b795393d7ee901abaf747575067068b (diff)
downloadLayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.tar.gz
LayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.zip
brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs)
Diffstat (limited to 'lyt/materials/material.h')
-rw-r--r--lyt/materials/material.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/lyt/materials/material.h b/lyt/materials/material.h
index d605244..a42a9d8 100644
--- a/lyt/materials/material.h
+++ b/lyt/materials/material.h
@@ -43,19 +43,19 @@ public:
LYTMaterialResourceNum() : m_value(0) { }
LYTMaterialResourceNum(int initValue) : m_value(initValue) { }
- quint32 value() { return m_value; }
-
- int getTexMapNum() { return BitExtract(m_value, 4, 28); }
- int getTexSRTNum() { return BitExtract(m_value, 4, 24); }
- int getTexCoordGenNum() { return BitExtract(m_value, 4, 20); }
- bool hasChanCtrl() { return BitExtract(m_value, 1, 6); }
- bool hasMatCol() { return BitExtract(m_value, 1, 4); }
- bool hasTevSwapTable() { return BitExtract(m_value, 1, 19); }
- bool hasAlphaCompare() { return BitExtract(m_value, 1, 8); }
- bool hasBlendMode() { return BitExtract(m_value, 1, 7); }
- int getIndTexSRTNum() { return BitExtract(m_value, 2, 17); }
- int getIndTexStageNum() { return BitExtract(m_value, 3, 14); }
- int getTevStageNum() { return BitExtract(m_value, 5, 9); }
+ quint32 value() const { return m_value; }
+
+ int getTexMapNum() const { return BitExtract(m_value, 4, 28); }
+ int getTexSRTNum() const { return BitExtract(m_value, 4, 24); }
+ int getTexCoordGenNum() const { return BitExtract(m_value, 4, 20); }
+ bool hasChanCtrl() const { return BitExtract(m_value, 1, 6); }
+ bool hasMatCol() const { return BitExtract(m_value, 1, 4); }
+ bool hasTevSwapTable() const { return BitExtract(m_value, 1, 19); }
+ bool hasAlphaCompare() const { return BitExtract(m_value, 1, 8); }
+ bool hasBlendMode() const { return BitExtract(m_value, 1, 7); }
+ int getIndTexSRTNum() const { return BitExtract(m_value, 2, 17); }
+ int getIndTexStageNum() const { return BitExtract(m_value, 3, 14); }
+ int getTevStageNum() const { return BitExtract(m_value, 5, 9); }
void setTexMapNum(int v) { m_value = BitInsert(m_value, v, 4, 28); }
void setTexSRTNum(int v) { m_value = BitInsert(m_value, v, 4, 24); }
@@ -83,10 +83,10 @@ public:
~LYTMaterial();
- void writeToDataStream(QDataStream &out);
+ void writeToDataStream(QDataStream &out) const;
void readFromDataStream(QDataStream &in);
- void dumpToDebug();
+ void dumpToDebug() const;
LYTLayout &layout() const;