diff options
author | Ole Daniel Evensen <ole_daniel_evensen@hotmail.com> | 2010-11-16 23:02:37 +0100 |
---|---|---|
committer | Ole Daniel Evensen <ole_daniel_evensen@hotmail.com> | 2010-11-16 23:02:37 +0100 |
commit | b76c24eba4fdede389e52d7e542e07fdef07c3bc (patch) | |
tree | 5abe3cd58ab3206352ed3e9f77559beed3e16ff4 | |
parent | ff3f2c3d619479072780fa8311077ac2d35996e1 (diff) |
Some commenting for debug. Changed tile-class. Created basic drawHand in table.
-rw-r--r-- | common/tile.cpp | 5 | ||||
-rw-r--r-- | common/tile.h | 11 |
2 files changed, 6 insertions, 10 deletions
diff --git a/common/tile.cpp b/common/tile.cpp index f5e1ee4..6164fcc 100644 --- a/common/tile.cpp +++ b/common/tile.cpp @@ -4,11 +4,12 @@ Tile::Tile() { } -Tile::Tile(Tile::Type t, Tile::Flags f) : type(t), flags(f) { +Tile::Tile(Tile::Type t, bool re, bool ro) : type(t), red(re), rotated(ro){ } Tile::Tile(uint16_t w) { type = Type(w & 0x00ff); - flags = Flags(w >> 8); + red = (w >> 8); + rotated = (w >> 9); } diff --git a/common/tile.h b/common/tile.h index 6a57da3..7094306 100644 --- a/common/tile.h +++ b/common/tile.h @@ -49,17 +49,12 @@ class Tile { Hatsu }; - enum Flags { - None = 0x00, - Rotated = 0x01, - Red = 0x02 - }; - Type type; - Flags flags; + bool red; + bool rotated; Tile(); - Tile(Type t, Flags f = None); + Tile(Type t, bool re = false, bool ro = false); Tile(uint16_t w); }; |