1 /*
2  * This file is part of NumptyPhysics
3  * Copyright (C) 2008 Tim Edmonds
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 3 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  */
16 
17 #ifndef GAME_H
18 #define GAME_H
19 
20 #include "Levels.h"
21 
22 class Canvas;
23 
24 struct GameControl
25 {
GameControlGameControl26   GameControl() : m_quit(false),
27 		 m_edit( false ),
28 		 m_refresh( true ),
29                  m_fade(false),
30 		 m_colour( 2 ),
31 		 m_strokeFixed( false ),
32 		 m_strokeSleep( false ),
33 		 m_strokeDecor( false ),
34 		 m_levels(),
35                  m_level(0)
36   {}
~GameControlGameControl37   virtual ~GameControl() {}
38   virtual bool save( const char *file=NULL ) { return false; }
sendGameControl39   virtual bool send() { return false; }
loadGameControl40   virtual bool load( const char* file ) { return false; }
41   virtual void gotoLevel( int l, bool replay=false ) {}
levelsGameControl42   Levels& levels() { return m_levels; }
43   virtual bool  renderScene( Canvas& c, int level ) =0;
44   bool  m_quit;
45   bool  m_edit;
46   bool  m_refresh;
47   bool  m_fade;
48   int   m_colour;
49   bool  m_strokeFixed;
50   bool  m_strokeSleep;
51   bool  m_strokeDecor;
52   Levels m_levels;
53   int    m_level;
54 };
55 
56 
57 #endif //GAME_H
58