diff options
Diffstat (limited to 'lyt/materials/material.h')
-rw-r--r-- | lyt/materials/material.h | 30 |
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; |