author | Tero Marttila <terom@fixme.fi> |
Sat, 17 Jan 2009 01:22:47 +0200 | |
changeset 404 | 7058ee22ee39 |
parent 394 | 82def222fe7d |
child 408 | e6cfc44266af |
permissions | -rw-r--r-- |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
1 |
#ifndef GRAPHICS_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
2 |
#define GRAPHICS_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
3 |
|
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
4 |
#include "GraphicsPointer.hh" |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
5 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
6 |
#include "GameState.hh" |
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
7 |
#include "Input.hh" |
205 | 8 |
#include "Timer.hh" |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
9 |
#include "Engine.hh" |
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
235
diff
changeset
|
10 |
#include "Config.hh" |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
11 |
|
393
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
12 |
#include "GameMessageView.hh" |
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
13 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
14 |
#include <ClanLib/core.h> |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
15 |
#include <ClanLib/gl.h> |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
16 |
#include <ClanLib/display.h> |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
17 |
|
283
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
275
diff
changeset
|
18 |
/** |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
275
diff
changeset
|
19 |
* This handles drawing the GameState with an appropriate camera view each frame, loading fonts, and currently, |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
275
diff
changeset
|
20 |
* handling the input from Input to GameState. |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
275
diff
changeset
|
21 |
*/ |
393
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
22 |
class Graphics : public GameStateEventHandler, public CL_DisplayWindow { |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
23 |
private: |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
24 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
25 |
* Our engine reference |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
26 |
*/ |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
27 |
Engine &engine; |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
28 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
29 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
30 |
* GameState we are associated with |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
31 |
*/ |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
32 |
GameState &state; |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
33 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
34 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
35 |
* Current window resolution |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
36 |
*/ |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
37 |
PixelCoordinate resolution; |
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
235
diff
changeset
|
38 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
39 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
40 |
* Target resolution in fullscreen/windowed mode |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
41 |
*/ |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
42 |
PixelCoordinate fullscreen_resolution, window_resolution; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
43 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
44 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
45 |
* ClanLib signal slots |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
46 |
*/ |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
47 |
CL_SlotContainer slots; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
48 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
49 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
50 |
* Our timer that drives redraws |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
51 |
*/ |
205 | 52 |
Timer update_timer; |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
53 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
54 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
55 |
* Our input handler for GUI and Player input |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
56 |
*/ |
235 | 57 |
Input input; |
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
58 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
59 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
60 |
* Current GUI input state |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
61 |
*/ |
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
62 |
GuiInput flags; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
63 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
64 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
65 |
* A basic font |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
66 |
*/ |
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
67 |
CL_Font simple_font; |
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
68 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
69 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
70 |
* View components |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
71 |
*/ |
393
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
72 |
GameMessageView message_view; |
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
73 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
74 |
public: |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
75 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
76 |
* |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
77 |
*/ |
389
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
78 |
Graphics (Engine &engine, GameState &state, PixelCoordinate resolution, bool fullscreen); |
392
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
79 |
|
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
80 |
/** |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
81 |
* Returns a CL_Font that can be used for drawing text |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
82 |
*/ |
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
205
diff
changeset
|
83 |
CL_Font& getSimpleFont (void) { return simple_font; } |
392
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
84 |
|
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
85 |
/** |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
86 |
* Returns a vector of CL_DisplayModes that lists possible display modes to use for fullscreen mode. |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
87 |
*/ |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
88 |
static const std::vector<CL_DisplayMode> & getDisplayModes (void); |
389
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
89 |
|
392
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
90 |
/** |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
91 |
* Returns the "best" CL_DisplayMode to use for fullscreen mode. |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
92 |
* |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
93 |
* Currently, this just means the largest resolution. |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
94 |
*/ |
6c4dc68360eb
remove unused graphics_default, and default to the highest resolution available in fullscreen mode
Tero Marttila <terom@fixme.fi>
parents:
389
diff
changeset
|
95 |
static const CL_DisplayMode getBestMode (void); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
96 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
97 |
private: |
389
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
98 |
/** |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
99 |
* Shift back and forth between fullscreen and windowed mode, retaining resolutions |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
100 |
*/ |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
101 |
void toggle_fullscreen (void); |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
102 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
103 |
/** |
389
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
104 |
* Reads current input events from Input and applies them, using LocalPlayer::handleInput and |
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
105 |
* Graphics::handle_input. |
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
106 |
*/ |
311
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
283
diff
changeset
|
107 |
void check_input (void); |
389
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
108 |
|
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
109 |
/** |
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
110 |
* Handles GuiInput flags read from Input. |
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
111 |
*/ |
e74c1820fbd2
implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents:
315
diff
changeset
|
112 |
void handle_input (GuiInput flags); |
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
113 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
114 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
115 |
* Redraws entire screen |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
116 |
*/ |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
117 |
void do_redraw (void); |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
118 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
119 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
120 |
* Handles input and redraws screen |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
121 |
*/ |
205 | 122 |
void on_update (TimeMS tick_length); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
123 |
|
394
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
124 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
125 |
* Draws status view |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
126 |
*/ |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
127 |
void draw_player_info (CL_GraphicContext *gc, Player *p); |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
128 |
|
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
129 |
/** |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
130 |
* Handles window resize. This just updates resolution |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
131 |
*/ |
82def222fe7d
try and implement resize in a sane way, but changeing from windowed mode to fullscreen mode is now kind of weird
Tero Marttila <terom@fixme.fi>
parents:
393
diff
changeset
|
132 |
void on_window_resize (int new_x, int new_y); |
393
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
133 |
|
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
134 |
protected: |
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
135 |
/* GameStateEventHandler */ |
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
136 |
virtual void on_player_joined (Player *p); |
5dd4d782cf3a
a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents:
392
diff
changeset
|
137 |
virtual void on_player_left (Player *p); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
138 |
}; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
139 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
140 |
#endif /* GRAPHICS_HH */ |