diff options
author | Thomas Günther <tom@toms-cafe.de> | 2007-09-22 01:01:10 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2007-09-22 01:01:10 +0200 |
commit | 135a8c9447ca19c4d609373b228bd096a2ae2ab8 (patch) | |
tree | 1f24e7f3d0d4531d1a5bd705b89c40e7c3c29d33 /game.h | |
parent | b39a6bf3e7add336dbb127394e8c611ec1d29cd6 (diff) | |
download | vdr-plugin-spider-135a8c9447ca19c4d609373b228bd096a2ae2ab8.tar.gz vdr-plugin-spider-135a8c9447ca19c4d609373b228bd096a2ae2ab8.tar.bz2 |
Added namespaces
Diffstat (limited to 'game.h')
-rw-r--r-- | game.h | 106 |
1 files changed, 56 insertions, 50 deletions
@@ -17,81 +17,87 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * $Id: game.h 87 2007-06-22 22:37:36Z tom $ + * $Id: game.h 95 2007-09-21 23:01:10Z tom $ */ #ifndef VDR_SPIDER_GAME_H #define VDR_SPIDER_GAME_H #include "spider.h" -class SpiderSetup; -class Deck; -class Tableau; -class Card; -class Bitmap; +namespace Spider { class Deck; class Tableau; class Card; } #include <vdr/config.h> #include <vdr/osdbase.h> #include <vdr/osd.h> -/** --- class SpiderGame --------------------------------------------------- **/ - -class SpiderGame : public cOsdObject +namespace SpiderPlugin { -private: - const SpiderSetup& setup; - const char* confdir; - int width, height; - int xPos, yPos; - int xDist, yDist; - cOsd* osd; - Bitmap* info; - const char* infoText; - Deck* deck; - Tableau* tableau; - unsigned int currentPile; - enum { cursorOnPile, selectedPile, cursorOnPack, gameOver } status; + class SetupData; + class Bitmap; + + + //--- class SpiderPlugin::Game ----------------------------------------------- + + /** Main menu of the plugin */ + class Game : public cOsdObject + { + const SetupData& setup; + const char* confdir; + int width, height; + int xPos, yPos; + int xDist, yDist; + cOsd* osd; + Bitmap* info; + const char* infoText; + Spider::Deck* deck; + Spider::Tableau* tableau; + unsigned int currentPile; + enum { cursorOnPile, selectedPile, cursorOnPack, gameOver } status; + + public: + + /** Constructor */ + Game(const SetupData& setup, const char* confdir); - /** Start a new game */ - void start(); + /** Destructor */ + virtual ~Game(); - /** Paint all pieces of the game */ - void paint(); + /** Display the game on the OSD */ + virtual void Show(); - /** Paint the cursor onto a card */ - void paintCursor(int x, int y); + /** Process user events */ + virtual eOSState ProcessKey(eKeys key); - /** Paint the pack */ - void paintPack(); + private: - /** Paint a final heap */ - void paintFinal(unsigned int f); + /** Start a new game */ + void start(); - /** Paint a pile */ - void paintPile(unsigned int p); + /** Paint all pieces of the game */ + void paint(); - /** Paint an empty card frame */ - void paintFrame(int x, int y); + /** Paint the cursor onto a card */ + void paintCursor(int x, int y); - /** Paint a card back */ - void paintBack(int x, int y); + /** Paint the pack */ + void paintPack(); - /** Paint a card */ - void paintCard(int x, int y, const Card& card); + /** Paint a final heap */ + void paintFinal(unsigned int f); -public: + /** Paint a pile */ + void paintPile(unsigned int p); - /** Constructor */ - SpiderGame(const SpiderSetup& setup, const char* confdir); + /** Paint an empty card frame */ + void paintFrame(int x, int y); - /** Destructor */ - virtual ~SpiderGame(); + /** Paint a card back */ + void paintBack(int x, int y); - /** Display the game on the OSD */ - virtual void Show(); + /** Paint a card */ + void paintCard(int x, int y, const Spider::Card& card); + }; - /** Process user events */ - virtual eOSState ProcessKey(eKeys key); -}; +} // namespace SpiderPlugin #endif // VDR_SPIDER_GAME_H |