1 #pragma once
2 
3 #include "snoutlib/glfwapp.h"
4 #include "snoutlib/settings.h"
5 #include "snoutlib/loadingscreen.h"
6 #include "snoutlib/timer.h"
7 #include "snoutlib/misc.h"
8 #include "snoutlib/mfont.h"
9 #include "snoutlib/menu.h"
10 #include "snoutlib/staticmesh.h"
11 #include "snoutlib/gldefs.h"
12 #include "snoutlib/particles.h"
13 
14 #include "pe_smoke.h"
15 #include "pe_bubbles.h"
16 
17 #include "resources.h"
18 
19 #include "gamemenu.h"
20 #include "layout.h"
21 #include "background.h"
22 #include "boat.h"
23 #include "pboat.h"
24 #include "credits.h"
25 #include "hiscore.h"
26 #include "torpedo.h"
27 #include "game.h"
28 
29 class App {
30 	Glfwapp *m_ctx;
31 	FPScounter *m_fpscounter;
32 
33 	Background *m_background;
34 	Credits *m_credits;
35 
36 public:
37 	GameMenu *m_gamemenu;
38 	HiScore *m_hiscore;
39 
40 private:
41 	void init_settings(void);
42   void gl_check(void);
43 
44 	static void mousebuttoncb_wrapper(int button, int action);
45 	void mousebutton_cb(int button,int action);
46 
47 	static void mouseposcb_wrapper(int x, int y);
48 	void mousepos_cb(int x,int y);
49 
50 	static void mousewheelcb_wrapper(int pos);
51 	void mousewheel_cb(int pos);
52 
53 	static void keycb_wrapper(int key, int action);
54 	void keyboard_cb(int key,int action);
55 
56 	static void charcb_wrapper(int ch, int action);
57 	void character_cb(int ch,int action);
58 public:
59 
60 	App(void);
61 	~App();
62 	void display_version(void);
63 	void run_inner_loop(void);
64 	void run(void);
65 };
66