Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ui.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 * FILE: ui.h
00003 * AUTHOR: CAL
00004 * DATE: 30 April 1993
00005 * PURPOSE:
00006 *   Houses the user interface
00007 ***********************************************************************/
00008 
00009 #ifndef _UI_H
00010 #define _UI_H
00011 
00012 #include "players.h"
00013 #include "display.h"
00014 #include "mapwin.h"
00015 #include "keywin.h"
00016 #include "cpanel.h"
00017 #include "playrwin.h"
00018 #include "infowin.h"
00019 
00020 
00021 // Player colors
00022 const int PColor[6] ={LIGHTCYAN, WHITE, LIGHTGREEN, LIGHTBLUE,
00023           YELLOW, MAGENTA};
00024 
00025 
00026 const int ID_QUIT    = 0xFF;
00027 const int ID_SPY     = 0xFE;
00028 const int ID_REFRESH = 0xFD;
00029 const int ID_LEGAL   = 0xFC;
00030 
00031 class UserInterface
00032 {
00033   MapWindow    *mapwin;
00034   KeyWindow    *keywin;
00035   CPanelWindow *cpanel;
00036   PlayerWindow *playwin;
00037   InfoWindow   *infowin;
00038 
00039   void ShowSpyMoves (MoveList& moves);
00040   int ComputePossTokens (MoveList&, int dest);
00041 
00042 public:
00043   void FlashNodes (Player& p, MoveList& ml);
00044 
00045   void ShowAllPlayers (void);
00046   Move GetPlayerMove (Player&, MoveList&);
00047   void BeginTurn (Player&);
00048   void EndTurn (Player&, Move);
00049   void RevealSpy (Player& p, Move m);
00050   void SpyTurn (Move&, int);
00051   Move NoLegalMoves (Player& p);
00052   int TransPop(byte bv, int color);
00053 
00054 
00055   void InitScreen (void);
00056   void DrawScreen (void) { theDisplay.Draw (); }
00057   void EraseScreen (void) { theDisplay.Erase (); theDisplay.Clear (); }
00058   void Refresh (void) { EraseScreen(); DrawScreen (); }
00059 
00060   void DrawTitleScreen();
00061   int* UFWOOM (void);
00062   void Intro();
00063   void AboutButton(Display&);
00064   void AnnounceWin (Player&, int);
00065 };
00066 
00067 extern UserInterface UI;  // Global instance
00068 
00069 
00070 #endif

Generated on Sun Jul 6 23:07:16 2003 for Scotland Yard by doxygen1.2.15