GPL-2+
© 2004-2005 Jared Luxenberg; © 2004-2005 Justin Lokey; © 2004-2005 Korina Loumidi; © 2004-2005 Keith Bare
debian/copyright
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
#ifndef _CTETRISGAME_ |
| 2 |
#define _CTETRISGAME_ |
| 3 |
|
| 4 |
#include "oodle.h" |
| 5 |
#include "CPlayingField.h" |
| 6 |
#include "CTetrisTheme.h" |
| 7 |
#include "CBlockSet.h" |
| 8 |
|
| 9 |
class CTetrisGame : public CSDLGame |
| 10 |
{ |
| 11 |
public: |
| 12 |
CTetrisGame(int screenX, int screenY, int bitDepth, bool fullscreen, CTetrisTheme *theme, const list<CVector> &fieldOffsets); |
| 13 |
CTetrisGame(int screenX, int screenY, int bitDepth, bool fullscreen, const string &title = ""); |
| 14 |
~CTetrisGame(); |
| 15 |
|
| 16 |
void setTheme(CTetrisTheme* t, const list<CVector> &fieldOffsets); |
| 17 |
CSprite* addSprite(CVector velocity, CVector pos, const string &filename, CImgLoader::GraphicFileType fileType); |
| 18 |
CSprite* addSprite(CSprite* sprite); |
| 19 |
//CBlock* addBlock( |
| 20 |
enum State |
| 21 |
{ |
| 22 |
Splash, |
| 23 |
Loading, |
| 24 |
Win, |
| 25 |
SinglePlayer, |
| 26 |
SinglePlayerPuzzle, |
| 27 |
TwoPlayerHumanVsHuman, |
| 28 |
TwoPlayerHumanVsComp |
| 29 |
}; |
| 30 |
|
| 31 |
protected: |
| 32 |
bool gameLoop(bool infinite = true); |
| 33 |
|
| 34 |
private: |
| 35 |
void animateSprites(); |
| 36 |
void handleEvent(const SDL_Event &e); |
| 37 |
void handleKeypress(const SDL_KeyboardEvent &e); |
| 38 |
void handleMouseMotion(const SDL_MouseMotionEvent &e); |
| 39 |
void handleMouseButton(const SDL_MouseButtonEvent &e); |
| 40 |
|
| 41 |
vector<CPlayingField*> fields; |
| 42 |
list<CSprite*> sprites; |
| 43 |
CTetrisTheme* theme; |
| 44 |
// /CSoundSystem sound; |
| 45 |
CSurface *splash; |
| 46 |
State state; |
| 47 |
bool done; |
| 48 |
CVector mouseloc; |
| 49 |
}; |
| 50 |
|
| 51 |
#endif |