#include <playrwin.h>
Inheritance diagram for PlayerWindow:

Public Methods | |
| PlayerWindow (void) | |
| void | Draw (void) |
| Message | Dispatch (Message &) |
| void | Update (Player &, int) |
| void | Clear () |
Private Methods | |
| void | DrawInfo (void) |
Private Attributes | |
| char * | Name |
| int | Tokens [NTokenTypes] |
| int | RoundNum |
| int | Address |
|
|
Definition at line 16 of file playrwin.c. References Address, Window::BkColor, Window::BorderColor, Bus, Window::ClientD, Window::CliX1, Window::CliX2, Window::CliY1, Window::CliY2, ScrnObj::Drawn, False, Name, PlayerWinTitle, PlayerWinXDim, PlayerWinYDim, RoundNum, Subway, Taxi, Window::Title, Window::TitleColor, Window::TitleD, Tokens, Window::TX1, Window::TX2, Window::TY1, Window::TY2, Window::XDim, and Window::YDim.
00017 {
00018 XDim = PlayerWinXDim; YDim = PlayerWinYDim;
00019 CliX1 = CliY1 = CliX2 = CliY2 = 0;
00020 TX1 = TY1 = TX2 = TY2 = 0;
00021 BorderColor = RED;
00022 BkColor = LIGHTGRAY;
00023 TitleColor = WHITE;
00024 Title = new char [strlen (PlayerWinTitle)];
00025 assert (Title != 0);
00026 strcpy (Title, PlayerWinTitle);
00027 ClientD = TitleD = NULL;
00028 Drawn = False;
00029 Name = "Welcome to Scotland Yard";
00030 Tokens[Bus] = 0;
00031 Tokens[Taxi] = 0;
00032 Tokens[Subway] = 0;
00033 RoundNum = 0;
00034 Address = 0;
00035 }
|
|
|
Definition at line 34 of file playrwin.h. References Viewport::Clear(), Window::Client(), and Display::Erase(). Referenced by Update().
|
|
|
Reimplemented from Window. Definition at line 30 of file playrwin.h.
00030 { return NullMsg; }
|
|
|
Reimplemented from Window. Definition at line 77 of file playrwin.c. References Viewport::Clear(), Window::ClientD, ScrnObj::Disp, Viewport::Done(), Display::Draw(), Window::DrawBorder(), DrawInfo(), ScrnObj::Drawn, Window::DrawTitle(), Viewport::FastDraw(), Window::PrepScreen(), and True.
|
|
|
Definition at line 38 of file playrwin.c. References Address, Bus, Window::ClientD, Invalid, Name, Viewport::OutTextXY(), RoundNum, Viewport::SetColor(), Viewport::SetTextJustify(), Viewport::SetTextStyle(), Subway, Taxi, and Tokens. Referenced by Draw(), and Update().
00039 {
00040 char AddressBuf[21], buffer[80];
00041 char bus[20], taxi[20], subway[20], round[20];
00042
00043 ClientD->SetColor (BLACK);
00044 ClientD->SetTextStyle (GOTHIC_FONT, HORIZ_DIR, 1);
00045 ClientD->SetTextJustify (LEFT_TEXT, TOP_TEXT);
00046 ClientD->OutTextXY (5, 5, Name);
00047 ClientD->SetTextStyle (DEFAULT_FONT, HORIZ_DIR, 1);
00048
00049 if ((strcmp (Name, "Welcome to Scotland Yard")) == 0)
00050 {ClientD->OutTextXY (5, 40, "Written by THE MAD HAMSTERS");}
00051 else
00052 if (Tokens[Bus]!=Invalid) {
00053 sprintf (bus, "Bus %d", Tokens[Bus]);
00054 ClientD->OutTextXY (5, 40, bus);
00055 sprintf (taxi, "Taxi %d", Tokens[Taxi]);
00056 ClientD->OutTextXY (65, 40, taxi);
00057 sprintf (subway, "Subway %d", Tokens[Subway]);
00058 ClientD->OutTextXY (133, 40, subway);
00059 sprintf (round, "Round: %d", RoundNum+1);
00060 ClientD->OutTextXY (133, 5, round);
00061
00062 if(theMap.get_name(Address)) {
00063 sprintf(buffer, "%-20s", theMap.get_name(Address));
00064 ClientD->OutTextXY (5, 30, buffer);
00065 }
00066 }
00067 else
00068 {
00069 ClientD->OutTextXY (5,40, "says, 'Bloody Wanker'!!");
00070 sprintf (round, "Round: %d", RoundNum+1);
00071 ClientD->OutTextXY (133, 5, round);
00072 }
00073
00074 }
|
|
||||||||||||
|
Definition at line 96 of file playrwin.c. References Address, Bus, Clear(), DrawInfo(), Player::GetName(), Player::GetPosition(), Name, Player::NumTokens(), RoundNum, Subway, Taxi, and Tokens. Referenced by UserInterface::BeginTurn().
|
|
|
Definition at line 23 of file playrwin.h. Referenced by DrawInfo(), PlayerWindow(), and Update(). |
|
|
Definition at line 22 of file playrwin.h. Referenced by DrawInfo(), PlayerWindow(), and Update(). |
|
|
Definition at line 23 of file playrwin.h. Referenced by DrawInfo(), PlayerWindow(), and Update(). |
|
|
Definition at line 23 of file playrwin.h. Referenced by DrawInfo(), PlayerWindow(), and Update(). |
1.2.15