25
|
1 |
#ifndef GRAPHICS_HH
|
|
2 |
#define GRAPHICS_HH
|
|
3 |
|
|
4 |
// XXX: forward-declare for Engine
|
|
5 |
class Graphics;
|
|
6 |
|
|
7 |
#include "GameState.hh"
|
|
8 |
#include "Engine.hh"
|
|
9 |
|
|
10 |
#include <ClanLib/core.h>
|
|
11 |
#include <ClanLib/gl.h>
|
|
12 |
#include <ClanLib/display.h>
|
|
13 |
|
35
|
14 |
const std::string GRAPHICS_WINDOW_TITLE = "Kisna Glista";
|
|
15 |
const uint32_t GRAPHICS_RESOLUTION_WIDTH = 800;
|
|
16 |
const uint32_t GRAPHICS_RESOLUTION_HEIGHT = 600;
|
|
17 |
const uint16_t GRAPHICS_UPDATE_INTERVAL_MS = 20;
|
25
|
18 |
|
|
19 |
class Graphics {
|
41
|
20 |
private:
|
|
21 |
Engine &engine;
|
|
22 |
GameState &state;
|
25
|
23 |
|
41
|
24 |
CL_SlotContainer slots;
|
25
|
25 |
|
41
|
26 |
CL_Timer update_timer;
|
|
27 |
|
|
28 |
CL_DisplayWindow win;
|
|
29 |
CL_InputDevice &keyboard;
|
|
30 |
|
|
31 |
CL_Surface terrain;
|
|
32 |
|
|
33 |
public:
|
|
34 |
Graphics (Engine &engine, GameState &state);
|
|
35 |
|
|
36 |
private:
|
|
37 |
void check_input (void);
|
|
38 |
void do_redraw (void);
|
|
39 |
|
|
40 |
void on_update (void);
|
|
41 |
|
25
|
42 |
};
|
|
43 |
|
|
44 |
#endif /* GRAPHICS_HH */
|