summaryrefslogtreecommitdiffstats
path: root/klickety/piece.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /klickety/piece.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klickety/piece.h')
-rw-r--r--klickety/piece.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/klickety/piece.h b/klickety/piece.h
new file mode 100644
index 00000000..b7d192f0
--- /dev/null
+++ b/klickety/piece.h
@@ -0,0 +1,42 @@
+#ifndef KL_PIECE_H
+#define KL_PIECE_H
+
+#include "base/piece.h"
+
+
+class KLPieceInfo : public GPieceInfo
+{
+ public:
+ KLPieceInfo() {}
+
+ virtual uint nbBlocks() const { return 0; }
+ virtual uint nbTypes() const { return NB_BLOCK_TYPES; }
+ virtual uint nbForms() const { return 0; }
+
+ virtual const int *i(uint, uint) const { return 0; }
+ virtual const int *j(uint, uint) const { return 0; }
+ virtual uint value(uint, uint) const { return 0; }
+ virtual uint form(uint) const { return 0; }
+ virtual uint nbConfigurations(uint) const { return 0; }
+
+ virtual uint nbNormalBlockTypes() const { return NB_BLOCK_TYPES; }
+ virtual uint nbGarbageBlockTypes() const { return 0; }
+ virtual uint nbBlockModes() const { return 1+4+6+4+1; }
+
+ virtual uint nbColors() const { return NB_BLOCK_TYPES; }
+ virtual QString colorLabel(uint i) const;
+ virtual QColor defaultColor(uint i) const;
+
+ protected:
+ void draw(QPixmap *, uint blockType, uint blockMode,
+ bool lighted) const;
+
+ private:
+ static const uint NB_BLOCK_TYPES = 5;
+ static const char *DEFAULT_COLORS[NB_BLOCK_TYPES];
+};
+
+#endif
+
+
+