New levels, re-structuring for testing
[numtypysics.git] / Game.h
bloba45e7a601f3bf6d6ea4a936ea3e6bc594bca7b96
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.
17 #ifndef GAME_H
18 #define GAME_H
20 #include "Levels.h"
22 class Widget;
23 class Canvas;
25 struct GameControl
27 GameControl() : m_quit(false),
28 m_edit( false ),
29 m_refresh( true ),
30 m_fade(false),
31 m_colour( 2 ),
32 m_strokeFixed( false ),
33 m_strokeSleep( false ),
34 m_strokeDecor( false ),
35 m_level(0)
37 virtual ~GameControl() {}
38 virtual bool save( const char *file=NULL ) { return false; }
39 virtual bool send() { return false; }
40 virtual bool load( const char* file ) { return false; }
41 virtual void gotoLevel( int l, bool replay=false ) {}
42 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;
57 Widget * createGameLayer( Levels* levels, int width, int height, bool fullscreen );
61 #endif //GAME_H