#include <Tetris.h>
Inheritance diagram for Tetris:
Definition at line 354 of file Tetris.h.
Tetris::Tetris | ( | ) |
Definition at line 932 of file Tetris.cxx.
References TPad::Draw(), TButton::Draw(), fBoard, fCurrentPiece, TPad::fEditable, fKeyHandler, fLevel, fLinesRemoved, fNewGame, fNextPiece, fPause, fPiecesDropped, fQuit, fScore, fUpdateLevelTimer, gTetris, KeyHandler, kFALSE, PrintHelpInfo(), TAttFill::SetFillColor(), SetFixedSize(), TetrisBoard, TCanvas::Update(), and UpdateLevelTimer.
virtual Tetris::~Tetris | ( | ) | [inline, virtual] |
void Tetris::SetFixedSize | ( | ) | [protected] |
Definition at line 1000 of file Tetris.cxx.
References TCanvas::fCanvasImp, TCanvas::fCh, and TCanvas::fCw.
Referenced by Tetris().
void Tetris::CreateNewPiece | ( | ) | [protected] |
Definition at line 991 of file Tetris.cxx.
References fBoard, fCurrentPiece, fNextPiece, NextPiecePad::GetPiece(), TetrisPiece::GetType(), NextPiecePad::NewPiece(), and type.
Referenced by NewGame(), and TetrisBoard::PieceDropped().
void Tetris::UpdatePiecesDropped | ( | ) | [inline, protected] |
Definition at line 378 of file Tetris.h.
References fPiecesDropped.
Referenced by TetrisBoard::PieceDropped().
void Tetris::UpdateLinesRemoved | ( | ) | [inline, protected] |
Definition at line 379 of file Tetris.h.
References InfoPad::AddValue(), and fLinesRemoved.
Referenced by TetrisBoard::RemoveFullLines().
void Tetris::UpdateScore | ( | Int_t | add_value | ) | [inline, protected] |
Definition at line 380 of file Tetris.h.
References InfoPad::AddValue(), and fScore.
Referenced by TetrisBoard::PieceDropped().
void Tetris::UpdateLevel | ( | ) | [inline, protected] |
Definition at line 381 of file Tetris.h.
References InfoPad::AddValue(), fLevel, and GetLevel().
Referenced by UpdateLevelTimer::Notify().
void Tetris::PrintHelpInfo | ( | ) | [protected] |
void Tetris::MoveLeft | ( | ) | [protected, virtual] |
Definition at line 1063 of file Tetris.cxx.
References fCurrentPiece, IsGameOn(), IsPaused(), IsWaiting(), and CurrentPiece::MoveLeft().
Referenced by KeyHandler::HandleKey().
void Tetris::MoveRight | ( | ) | [protected, virtual] |
Definition at line 1071 of file Tetris.cxx.
References fCurrentPiece, IsGameOn(), IsPaused(), IsWaiting(), and CurrentPiece::MoveRight().
Referenced by KeyHandler::HandleKey().
void Tetris::DropDown | ( | ) | [protected, virtual] |
Definition at line 1079 of file Tetris.cxx.
References CurrentPiece::DropDown(), fCurrentPiece, IsGameOn(), IsPaused(), and IsWaiting().
Referenced by KeyHandler::HandleKey().
void Tetris::RotateRight | ( | ) | [protected, virtual] |
Definition at line 1087 of file Tetris.cxx.
References fCurrentPiece, IsGameOn(), IsPaused(), IsWaiting(), and CurrentPiece::RotateRight().
Referenced by KeyHandler::HandleKey().
void Tetris::RotateLeft | ( | ) | [protected, virtual] |
Definition at line 1095 of file Tetris.cxx.
References fCurrentPiece, IsGameOn(), IsPaused(), IsWaiting(), and CurrentPiece::RotateLeft().
Referenced by KeyHandler::HandleKey().
Int_t Tetris::GetLevel | ( | ) | [inline] |
Definition at line 394 of file Tetris.h.
References fLevel, and InfoPad::GetValue().
Referenced by TetrisBoard::PieceDropped(), CurrentPiece::SetSpeed(), and UpdateLevel().
Int_t Tetris::GetLinesRemoved | ( | ) | [inline] |
Int_t Tetris::GetPiecesDropped | ( | ) | [inline] |
Int_t Tetris::GetScore | ( | ) | [inline] |
Bool_t Tetris::IsGameOn | ( | ) | [inline] |
Definition at line 399 of file Tetris.h.
References fNewGame, and NewGameButton::IsPressed().
Referenced by Continue(), DropDown(), MoveLeft(), MoveRight(), NewGame(), UpdateLevelTimer::Notify(), TetrisBoard::PaintModified(), Pause(), RotateLeft(), and RotateRight().
Bool_t Tetris::IsPaused | ( | ) | [inline] |
Definition at line 400 of file Tetris.h.
References fPause, and PauseButton::IsPressed().
Referenced by DropDown(), MoveLeft(), MoveRight(), TetrisBoard::PaintModified(), RotateLeft(), and RotateRight().
Bool_t Tetris::IsWaiting | ( | ) | [inline] |
Definition at line 401 of file Tetris.h.
References kFALSE.
Referenced by DropDown(), MoveLeft(), MoveRight(), RotateLeft(), and RotateRight().
void Tetris::SetLevel | ( | int | level | ) |
Definition at line 1103 of file Tetris.cxx.
References fCurrentPiece, fLevel, CurrentPiece::SetSpeed(), and InfoPad::SetValue().
Referenced by NewGame().
void Tetris::Quit | ( | ) |
Definition at line 1007 of file Tetris.cxx.
References TCanvas::fCanvasImp, fKeyHandler, and StopGame().
Referenced by QuitButton::ExecuteEvent().
void Tetris::Pause | ( | ) |
Definition at line 1043 of file Tetris.cxx.
References fBoard, fCurrentPiece, fPause, TetrisBoard::Hide(), IsGameOn(), kTRUE, PauseButton::SetPressed(), and TTimer::Stop().
Referenced by PauseButton::ExecuteEvent().
void Tetris::Continue | ( | ) |
Definition at line 1053 of file Tetris.cxx.
References fBoard, fCurrentPiece, fPause, IsGameOn(), kFALSE, PauseButton::SetPressed(), TetrisBoard::Show(), and TTimer::Start().
Referenced by PauseButton::ExecuteEvent().
void Tetris::NewGame | ( | ) |
Definition at line 1016 of file Tetris.cxx.
References TetrisBoard::Clear(), CreateNewPiece(), fBoard, TCanvas::fCanvasImp, fLinesRemoved, fNewGame, fPiecesDropped, fScore, fUpdateLevelTimer, gVirtualX, IsGameOn(), kTRUE, InfoPad::Reset(), SetLevel(), NewGameButton::SetPressed(), TTimer::Start(), and StopGame().
Referenced by NewGameButton::ExecuteEvent().
void Tetris::StopGame | ( | ) |
Definition at line 1033 of file Tetris.cxx.
References fCurrentPiece, fNewGame, fPause, fUpdateLevelTimer, kFALSE, NewGameButton::SetPressed(), PauseButton::SetPressed(), and TTimer::Stop().
Referenced by CurrentPiece::CurrentPiece(), NewGame(), and Quit().
friend class KeyHandler [friend] |
friend class TetrisBoard [friend] |
friend class UpdateLevelTimer [friend] |
CurrentPiece* Tetris::fCurrentPiece [private] |
Definition at line 361 of file Tetris.h.
Referenced by Continue(), CreateNewPiece(), DropDown(), MoveLeft(), MoveRight(), TetrisBoard::PaintModified(), Pause(), RotateLeft(), RotateRight(), SetLevel(), StopGame(), and Tetris().
TetrisBoard* Tetris::fBoard [private] |
Definition at line 362 of file Tetris.h.
Referenced by Continue(), CreateNewPiece(), NewGame(), Pause(), and Tetris().
NextPiecePad* Tetris::fNextPiece [private] |
InfoPad* Tetris::fLinesRemoved [private] |
Definition at line 364 of file Tetris.h.
Referenced by GetLinesRemoved(), NewGame(), Tetris(), and UpdateLinesRemoved().
InfoPad* Tetris::fLevel [private] |
Definition at line 365 of file Tetris.h.
Referenced by GetLevel(), SetLevel(), Tetris(), and UpdateLevel().
InfoPad* Tetris::fScore [private] |
Definition at line 366 of file Tetris.h.
Referenced by GetScore(), NewGame(), Tetris(), and UpdateScore().
NewGameButton* Tetris::fNewGame [private] |
Definition at line 367 of file Tetris.h.
Referenced by IsGameOn(), NewGame(), StopGame(), and Tetris().
QuitButton* Tetris::fQuit [private] |
PauseButton* Tetris::fPause [private] |
Definition at line 369 of file Tetris.h.
Referenced by Continue(), IsPaused(), Pause(), StopGame(), and Tetris().
KeyHandler* Tetris::fKeyHandler [private] |
Int_t Tetris::fPiecesDropped [private] |
Definition at line 372 of file Tetris.h.
Referenced by GetPiecesDropped(), NewGame(), Tetris(), and UpdatePiecesDropped().
UpdateLevelTimer* Tetris::fUpdateLevelTimer [private] |