Sound support + better cursor input handling
[numtypysics.git] / Game.h
blob8beb7798c400d2ed2b35c62e37e71b64e14a1769
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 #define MAX_ROPE_PARTS 50
24 class Widget;
25 class Canvas;
27 struct GameControl
29 GameControl() : m_quit(false),
30 m_edit( false ),
31 m_refresh( true ),
32 m_fade(false),
33 m_colour( 2 ),
34 m_strokeFixed( false ),
35 m_strokeSleep( false ),
36 m_strokeDecor( false ),
37 m_level(0)
39 virtual ~GameControl() {}
40 virtual bool save( const char *file=NULL ) { return false; }
41 virtual bool send() { return false; }
42 virtual bool load( const char* file ) { return false; }
43 virtual void gotoLevel( int l, bool replay=false ) {}
44 Levels& levels() { return *m_levels; }
45 virtual bool renderScene( Canvas& c, int level ) =0;
46 bool m_quit;
47 bool m_edit;
48 bool m_refresh;
49 bool m_fade;
50 int m_colour;
51 bool m_strokeFixed;
52 bool m_strokeSleep;
53 bool m_strokeDecor;
54 Levels*m_levels;
55 int m_level;
59 Widget * createGameLayer( Levels* levels, int width, int height, bool fullscreen );
63 #endif //GAME_H