Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 793 lines (679 sloc) 20.426 kb
67470e4 @christopho Add the GPL license
authored
1 /*
ab75b13 @christopho Update the website name
authored
2 * Copyright (C) 2006-2012 Christopho, Solarus - http://www.solarus-games.org
67470e4 @christopho Add the GPL license
authored
3 *
d9c7509 @christopho Separating engine and quest
authored
4 * Solarus is free software; you can redistribute it and/or modify
67470e4 @christopho Add the GPL license
authored
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
d9c7509 @christopho Separating engine and quest
authored
9 * Solarus is distributed in the hope that it will be useful,
67470e4 @christopho Add the GPL license
authored
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
835f287 @christopho Still renaming files
authored
17 #include "Game.h"
e80675f @christopho Rename Solarus to MainLoop
authored
18 #include "MainLoop.h"
d09e472 @christopho Remove useless includes in the header files
authored
19 #include "Map.h"
38e517c @christopho Add a savegame system
authored
20 #include "Savegame.h"
d38fe42 @christopho Creating a class to store what happens when the players presses the a…
authored
21 #include "KeysEffect.h"
702728c @christopho Simplify the tile animation system (no more TileAnimationManager clas…
authored
22 #include "Equipment.h"
fc7951c @christopho Start the dialog box and the messages
authored
23 #include "DialogBox.h"
0496c8d @christopho Move enums into classes to improve the code
authored
24 #include "Treasure.h"
ac101b3 @christopho Starting the dungeon properties management
authored
25 #include "Dungeon.h"
589458f @christopho Still working on the game over sequence
authored
26 #include "GameoverSequence.h"
93a909d @christopho Encapsulate SDL events
authored
27 #include "DebugKeys.h"
3c3cfbb @christopho Starting to implement scriptable menus
authored
28 #include "CustomScreen.h"
933f5de @christopho Adding a game:on_finished() callback (work in progress).
authored
29 #include "lua/LuaContext.h"
7c521e0 @christopho Still encapsulating SDL
authored
30 #include "hud/HUD.h"
0990aeb @christopho Starting the pause menu
authored
31 #include "menus/PauseMenu.h"
1a5e683 @christopho Rename Link into Hero
authored
32 #include "entities/Hero.h"
7c521e0 @christopho Still encapsulating SDL
authored
33 #include "lowlevel/Color.h"
25ad142 @christopho Still encapsulating SDL
authored
34 #include "lowlevel/Surface.h"
bb62853 @christopho Fix outside minimap
authored
35 #include "lowlevel/IniFile.h"
97e22be @christopho Replace the DIE macro by better code
authored
36 #include "lowlevel/Debug.h"
7016086 @christopho Replace more pointers by references.
authored
37 #include "lowlevel/StringConcat.h"
a23b15a @christopho Finish to simplify the sound and music system.
authored
38 #include "lowlevel/Music.h"
97e22be @christopho Replace the DIE macro by better code
authored
39 #include <sstream>
75c26ff @christopho Map and tileset management
authored
40
6467215 @christopho Rename info.dat into quest.dat and extend its content
authored
41 Rectangle Game::outside_world_size(0, 0, 0, 0); // loaded from quest.dat
d91c506 @christopho Starting the map submenu
authored
42
c095424 @christopho Simplify the code, rename some classes, remove classes ExtensibleTile…
authored
43 /**
4009605 @christopho Improving documentation
authored
44 * @brief Creates a game.
c0f09ce @christopho Pass the root object to the constructor of screens (again)
authored
45 * @param main_loop The Solarus root object.
14ea434 @christopho Fix a memory leak with savegames.
authored
46 * @param savegame The saved data of this game. Will be deleted in the
47 * destructor unless someone is still using it (the refcount info is used).
c095424 @christopho Simplify the code, rename some classes, remove classes ExtensibleTile…
authored
48 */
4345e7e @christopho Remove useless copy operation of savegames.
authored
49 Game::Game(MainLoop& main_loop, Savegame* savegame):
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
50
c0f09ce @christopho Pass the root object to the constructor of screens (again)
authored
51 Screen(main_loop),
5a16884 @christopho Replace some pointers by references.
authored
52 savegame(savegame),
53 pause_key_available(true),
54 pause_menu(NULL),
931e0cf @christopho Finish class Treasure. Detect savegames with obsolete format.
authored
55 gameover_sequence(NULL),
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
56 resetting(false),
5a16884 @christopho Replace some pointers by references.
authored
57 restarting(false),
58 keys_effect(NULL),
59 current_map(NULL),
60 next_map(NULL),
61 previous_map_surface(NULL),
62 transition_style(Transition::IMMEDIATE),
63 transition(NULL),
64 dungeon(NULL),
abe52c4 @christopho Rename crystal switch to crystal
authored
65 crystal_state(false),
5a16884 @christopho Replace some pointers by references.
authored
66 hud(NULL),
67 hud_enabled(true),
68 dialog_box(NULL) {
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
69
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
70 // notify objects
14ea434 @christopho Fix a memory leak with savegames.
authored
71 get_savegame().increment_refcount();
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
72 get_savegame().set_game(this);
df09002 @christopho Debugging scripted menus
authored
73 get_main_loop().get_debug_keys().set_game(this);
77bffb4 @christopho Use the correct pointer for the context of timers.
authored
74 get_lua_context().set_current_game(this);
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
75
5a16884 @christopho Replace some pointers by references.
authored
76 // initialize members
77 controls = new GameControls(*this);
78 dialog_box = new DialogBox(*this);
1a5e683 @christopho Rename Link into Hero
authored
79 hero = new Hero(get_equipment());
3ccb69e @christopho Don't destroy the hero is Lua has still a reference to it.
authored
80 hero->increment_refcount();
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
81 keys_effect = new KeysEffect();
5a16884 @christopho Replace some pointers by references.
authored
82 hud = new HUD(*this);
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
83
84 // launch the starting map
4345e7e @christopho Remove useless copy operation of savegames.
authored
85 set_current_map(get_savegame().get_integer(Savegame::STARTING_MAP),
86 "", Transition::FADE);
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
87 }
88
89 /**
4009605 @christopho Improving documentation
authored
90 * @brief Destroys the game.
38e517c @christopho Add a savegame system
authored
91 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
92 Game::~Game() {
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
93
14ea434 @christopho Fix a memory leak with savegames.
authored
94 savegame->decrement_refcount();
95 if (savegame->get_refcount() == 0) {
96 // No one is using the savegame anymore (especially not Lua).
97 delete savegame;
4345e7e @christopho Remove useless copy operation of savegames.
authored
98 }
b74f2b1 @christopho Handle the refcount of Lua maps.
authored
99
100 current_map->unload();
101 current_map->decrement_refcount();
102 if (current_map->get_refcount() == 0) {
103 delete current_map;
104 }
105
a23b15a @christopho Finish to simplify the sound and music system.
authored
106 Music::play(Music::none);
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
107
589458f @christopho Still working on the game over sequence
authored
108 delete transition;
109 delete dialog_box;
110 delete pause_menu;
111 delete dungeon;
112 delete gameover_sequence;
d38fe42 @christopho Creating a class to store what happens when the players presses the a…
authored
113 delete keys_effect;
cf77535 @christopho Starting the hud
authored
114 delete hud;
3ccb69e @christopho Don't destroy the hero is Lua has still a reference to it.
authored
115 hero->decrement_refcount();
116 if (hero->get_refcount() == 0) {
117 delete hero;
118 }
d137fc1 @christopho Options and quest status submenus
authored
119 delete controls;
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
120
4d92b87 @christopho Implement a scrolling transition between two maps
authored
121 if (previous_map_surface != NULL) {
7c521e0 @christopho Still encapsulating SDL
authored
122 delete previous_map_surface;
4d92b87 @christopho Implement a scrolling transition between two maps
authored
123 }
38e517c @christopho Add a savegame system
authored
124 }
125
126 /**
933f5de @christopho Adding a game:on_finished() callback (work in progress).
authored
127 * @brief Starts this screen.
128 */
129 void Game::start() {
130 get_lua_context().game_on_started(*this);
131 }
132
133 /**
134 * @brief Ends this screen.
135 */
136 void Game::stop() {
137 get_lua_context().game_on_finished(*this);
138 }
139
140 /**
4009605 @christopho Improving documentation
authored
141 * @brief Returns the hero.
1a5e683 @christopho Rename Link into Hero
authored
142 * @return the hero
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
143 */
a4ce4ff @christopho Implement the new version of classes Script, GameScript and MapScript.
authored
144 Hero& Game::get_hero() {
145 return *hero;
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
146 }
66dbf35 @christopho Improving the transition system
authored
147
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
148 /**
4009605 @christopho Improving documentation
authored
149 * @brief Returns the coordinates of the hero on the current map.
150 *
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
151 * The coordinates returned are the coordinates of the hero's origin point on the map.
4009605 @christopho Improving documentation
authored
152 * The width and height are not used.
153 *
016c466 @christopho Move some enumerations to separate files to avoid unnecessary header …
authored
154 * @return the position of the hero
155 */
5a16884 @christopho Replace some pointers by references.
authored
156 const Rectangle& Game::get_hero_xy() {
f6c7002 @christopho Fix bugs
authored
157
158 static Rectangle xy;
159 xy = hero->get_xy();
160 return xy;
016c466 @christopho Move some enumerations to separate files to avoid unnecessary header …
authored
161 }
162
163 /**
4009605 @christopho Improving documentation
authored
164 * @brief Returns the game controls for the keyboard and the joypad.
293f1b0 @christopho Options submenu
authored
165 * @return the game controls
166 */
5a16884 @christopho Replace some pointers by references.
authored
167 GameControls& Game::get_controls() {
168 return *controls;
293f1b0 @christopho Options submenu
authored
169 }
170
171 /**
4009605 @christopho Improving documentation
authored
172 * @brief Returns the current effect of the main keys (action, sword, pause, etc.).
0990aeb @christopho Starting the pause menu
authored
173 * @return the current effect of the main keys
174 */
5a16884 @christopho Replace some pointers by references.
authored
175 KeysEffect& Game::get_keys_effect() {
176 return *keys_effect;
0990aeb @christopho Starting the pause menu
authored
177 }
178
179 /**
4009605 @christopho Improving documentation
authored
180 * @brief Returns the saved data associated to this game.
f0fe024 @christopho Inventory menu
authored
181 * @return the saved data
182 */
5a16884 @christopho Replace some pointers by references.
authored
183 Savegame& Game::get_savegame() {
4345e7e @christopho Remove useless copy operation of savegames.
authored
184 return *savegame;
f0fe024 @christopho Inventory menu
authored
185 }
186
187 /**
4009605 @christopho Improving documentation
authored
188 * @brief Returns the equipment of the player.
189 *
5a16884 @christopho Replace some pointers by references.
authored
190 * It is equivalent to get_savegame().get_equipment().
4009605 @christopho Improving documentation
authored
191 *
f0fe024 @christopho Inventory menu
authored
192 * @return the equipment
193 */
5a16884 @christopho Replace some pointers by references.
authored
194 Equipment& Game::get_equipment() {
4345e7e @christopho Remove useless copy operation of savegames.
authored
195 return get_savegame().get_equipment();
f0fe024 @christopho Inventory menu
authored
196 }
197
198 /**
4009605 @christopho Improving documentation
authored
199 * @brief This function is called when a low-level input event occurs during the game.
2960d2c @christopho Encapsulating SDL events
authored
200 * @param event the event to handle
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
201 */
49b6d34 @christopho Lua: add an API to handle keyboard and joypad inputs
authored
202 void Game::notify_input(InputEvent &event) {
66dbf35 @christopho Improving the transition system
authored
203
2960d2c @christopho Encapsulating SDL events
authored
204 // the GameControl object will transform the low-level input event into
205 // a high-level game control event (i.e. a call to key_pressed() or key_released()).
49b6d34 @christopho Lua: add an API to handle keyboard and joypad inputs
authored
206 controls->notify_input(event);
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
207 }
75c26ff @christopho Map and tileset management
authored
208
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
209 /**
4009605 @christopho Improving documentation
authored
210 * @brief This function is called when a game key is pressed.
953666d @christopho Finish the game over sequence. Save the player's position.
authored
211 * @param key a key
212 */
93ce12e @christopho Rename Controls into GameControls
authored
213 void Game::key_pressed(GameControls::GameKey key) {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
214
933f5de @christopho Adding a game:on_finished() callback (work in progress).
authored
215 if (!is_suspended()) {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
216
93ce12e @christopho Rename Controls into GameControls
authored
217 if (key == GameControls::PAUSE) {
355a363 @christopho Do not allow to pause the game when the player has no more life
authored
218 if (can_pause()) {
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
219 set_paused(true);
220 }
953666d @christopho Finish the game over sequence. Save the player's position.
authored
221 }
222 else {
355a363 @christopho Do not allow to pause the game when the player has no more life
authored
223 // when the game is not suspended, all other keys apply to the hero
953666d @christopho Finish the game over sequence. Save the player's position.
authored
224 hero->key_pressed(key);
225 }
226 }
227
228 // is a message being shown?
d8d33ad @christopho Starting to update the engine to the new dialog semantics
authored
229 else if (is_showing_dialog()) {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
230 dialog_box->key_pressed(key);
231 }
232
233 // is the game paused?
234 else if (is_paused()) {
235 pause_menu->key_pressed(key);
236 }
237
238 // is the game over sequence shown?
239 else if (is_showing_gameover()) {
240 gameover_sequence->key_pressed(key);
241 }
242 }
243
244 /**
4009605 @christopho Improving documentation
authored
245 * @brief This function is called when a game key is released.
953666d @christopho Finish the game over sequence. Save the player's position.
authored
246 * @param key a key
247 */
93ce12e @christopho Rename Controls into GameControls
authored
248 void Game::key_released(GameControls::GameKey key) {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
249
250 if (!is_suspended()) {
251 // if the game is not suspended, the keys apply to the hero
252 hero->key_released(key);
253 }
254 }
255
256 /**
4009605 @christopho Improving documentation
authored
257 * @brief Updates the game elements.
258 *
259 * Updates the map, the equipment, the HUD, etc.
0990aeb @christopho Starting the pause menu
authored
260 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
261 void Game::update() {
0990aeb @christopho Starting the pause menu
authored
262
263 // update the transitions between maps
264 update_transitions();
265
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
266 if (resetting || restarting) {
7a5abdf @christopho Fix a map unloading bug
authored
267 return; // the game may have just been reset
268 }
269
84aa914 @christopho Start the intro
authored
270 // update the map
0990aeb @christopho Starting the pause menu
authored
271 current_map->update();
272
8e22245 @christopho Lua game: implement events update, on_pre_display, on_post_display.
authored
273 // call game:on_update() in Lua
274 get_lua_context().game_on_update(*this);
275
0990aeb @christopho Starting the pause menu
authored
276 // update the equipment and HUD
5a16884 @christopho Replace some pointers by references.
authored
277 get_equipment().update();
19131ad @christopho Sword
authored
278 update_keys_effect();
24de3bc @christopho Don't play the danger sound when the HUD is disabled
authored
279 if (hud_enabled) {
280 hud->update();
281 }
dc5fd78 @christopho Improve dialog box code
authored
282 dialog_box->update();
0990aeb @christopho Starting the pause menu
authored
283
f0fe024 @christopho Inventory menu
authored
284 // update the pause menu (if the game is paused)
285 if (is_paused()) {
286 pause_menu->update();
287 }
288
589458f @christopho Still working on the game over sequence
authored
289 // update the game over sequence (if any)
290 if (is_showing_gameover()) {
d1c6feb @christopho Working on the game over sequence. Fix bugs. Rename some functions.
authored
291 update_gameover_sequence();
589458f @christopho Still working on the game over sequence
authored
292 }
0990aeb @christopho Starting the pause menu
authored
293 }
294
295 /**
4009605 @christopho Improving documentation
authored
296 * @brief Handles the transitions.
297 *
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
298 * This functions changes the map when needed and plays the
299 * transitions between the two maps. This function is called
0990aeb @christopho Starting the pause menu
authored
300 * by the update() function.
b1e71b6 @christopho Maps
authored
301 * Note that the two maps can actually be the same.
4df2c1f @christopho Implement the fade in/out transition in the game
authored
302 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
303 void Game::update_transitions() {
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
304
fb6b6f6 @christopho Improve transition API
authored
305 if (transition != NULL) {
306 transition->update();
307 }
308
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
309 // if the map has just changed, close the current map if any and play an out transition
16d1ecd @christopho Fix a few bugs
authored
310 if (next_map != NULL && transition == NULL) { // the map has changed (i.e. set_current_map has been called)
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
311
312 if (current_map == NULL) { // special case: no map was playing, so we don't have any out transition to do
e33642a @christopho Parse the dungeons file
authored
313 load_dungeon();
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
314 current_map = next_map;
315 next_map = NULL;
316 }
317 else { // normal case: stop the control and play an out transition before leaving the current map
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
318 transition = Transition::create(transition_style, Transition::OUT, this);
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
319 transition->start();
320 }
321 }
322
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
323 Rectangle previous_map_location = current_map->get_location();
324
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
325 // if a transition was playing and has just been finished
9abf9a4 @christopho Improve selection menu code
authored
326 if (transition != NULL && transition->is_finished()) {
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
327
b1e71b6 @christopho Maps
authored
328 Transition::Direction transition_direction = transition->get_direction();
4d92b87 @christopho Implement a scrolling transition between two maps
authored
329 bool needs_previous_surface = transition->needs_previous_surface();
b1e71b6 @christopho Maps
authored
330 delete transition;
331 transition = NULL;
332
df09002 @christopho Debugging scripted menus
authored
333 MainLoop& main_loop = get_main_loop();
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
334 if (resetting) {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
335 current_map->unload();
c16aeeb @christopho Add sol.main.reset()
authored
336 main_loop.set_resetting();
953666d @christopho Finish the game over sequence. Save the player's position.
authored
337 }
338 else if (restarting) {
7a5abdf @christopho Fix a map unloading bug
authored
339 current_map->unload();
e80675f @christopho Rename Solarus to MainLoop
authored
340 main_loop.get_debug_keys().set_game(NULL);
c0f09ce @christopho Pass the root object to the constructor of screens (again)
authored
341 main_loop.set_next_screen(new Game(main_loop, savegame));
4345e7e @christopho Remove useless copy operation of savegames.
authored
342 savegame = NULL; // The new game is the owner.
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
343 }
b1e71b6 @christopho Maps
authored
344 else if (transition_direction == Transition::OUT) {
75dcca7 @christopho Finish the X and V icons. Fix a tileset issue.
authored
345
b1e71b6 @christopho Maps
authored
346 if (next_map == current_map) {
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
347 // same map
8e717d2 @christopho Simplify entity class names.
authored
348 hero->place_on_destination(*current_map, previous_map_location);
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
349 transition = Transition::create(transition_style, Transition::IN, this);
350 transition->start();
351 next_map = NULL;
b1e71b6 @christopho Maps
authored
352 }
353 else {
354
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
355 // change the map
356 current_map->leave();
357
6470a9d @christopho Save the location for a transition between the inside world and a dun…
authored
358 // special treatments for a transition between two different worlds
359 // (e.g. outside world to a dungeon)
360 if (next_map->get_world_number() != current_map->get_world_number()) {
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
361
abe52c4 @christopho Rename crystal switch to crystal
authored
362 // reset the crystal blocks
363 crystal_state = false;
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
364
365 // save the location
4345e7e @christopho Remove useless copy operation of savegames.
authored
366 get_savegame().set_integer(Savegame::STARTING_MAP, next_map->get_id());
8e717d2 @christopho Simplify entity class names.
authored
367 get_savegame().set_string(Savegame::STARTING_POINT, next_map->get_destination_name());
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
368 }
369
370 // before closing the map, draw it on a backup surface for transition effects
371 // that want to display both maps at the same time
372 if (needs_previous_surface) {
2807457 @christopho Rename GAME_WIDTH to SCREEN_WIDTH and GAME_HEIGHT to SCREEN_HEIGHT.
authored
373 previous_map_surface = new Surface(SOLARUS_SCREEN_WIDTH, SOLARUS_SCREEN_HEIGHT);
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
374 current_map->draw();
375 current_map->get_visible_surface().draw(*previous_map_surface);
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
376 }
377
378 // set the next map
379 load_dungeon();
380 current_map->unload();
b74f2b1 @christopho Handle the refcount of Lua maps.
authored
381 current_map->decrement_refcount();
382 if (current_map->get_refcount() == 0) {
383 delete current_map;
384 }
385
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
386 current_map = next_map;
387 next_map = NULL;
b1e71b6 @christopho Maps
authored
388 }
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
389 }
4d92b87 @christopho Implement a scrolling transition between two maps
authored
390 else {
a04a9ef @christopho Rewriting hero classes : HeroSprites and the interface of Hero are done.
authored
391 current_map->notify_opening_transition_finished();
4d92b87 @christopho Implement a scrolling transition between two maps
authored
392
393 if (previous_map_surface != NULL) {
c33e923 @christopho Writing such a fixme and not fixing it immediately was criminal.
authored
394 delete previous_map_surface;
395 previous_map_surface = NULL;
4d92b87 @christopho Implement a scrolling transition between two maps
authored
396 }
397 }
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
398 }
399
400 // if a map has just been set as the current map, start it and play the in transition
401 if (!current_map->is_started()) {
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
402 transition = Transition::create(transition_style, Transition::IN, this);
4d92b87 @christopho Implement a scrolling transition between two maps
authored
403
404 if (previous_map_surface != NULL) {
405 // some transition effects need to display both maps simultaneously
406 transition->set_previous_surface(previous_map_surface);
407 }
408
8e717d2 @christopho Simplify entity class names.
authored
409 hero->place_on_destination(*current_map, previous_map_location);
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
410 transition->start();
7016086 @christopho Replace more pointers by references.
authored
411 current_map->start();
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
412 }
413 }
414
415 /**
19131ad @christopho Sword
authored
416 * @brief Makes sure the keys effects are coherent with the hero's equipment and abilities.
417 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
418 void Game::update_keys_effect() {
19131ad @christopho Sword
authored
419
420 // when the game is paused or a dialog box is shown, the sword key is not the usual one
d8d33ad @christopho Starting to update the engine to the new dialog semantics
authored
421 if (is_paused() || is_showing_dialog()) {
19131ad @christopho Sword
authored
422 return; // if the game is interrupted for some other reason (e.g. a transition), let the normal sword icon
423 }
424
425 // make sure the sword key is coherent with having a sword
5a16884 @christopho Replace some pointers by references.
authored
426 if (get_equipment().has_ability("sword")
19131ad @christopho Sword
authored
427 && keys_effect->get_sword_key_effect() != KeysEffect::SWORD_KEY_SWORD) {
428
429 keys_effect->set_sword_key_effect(KeysEffect::SWORD_KEY_SWORD);
430 }
5a16884 @christopho Replace some pointers by references.
authored
431 else if (!get_equipment().has_ability("sword")
19131ad @christopho Sword
authored
432 && keys_effect->get_sword_key_effect() == KeysEffect::SWORD_KEY_SWORD) {
433
434 keys_effect->set_sword_key_effect(KeysEffect::SWORD_KEY_NONE);
435 }
436 }
437
438 /**
4009605 @christopho Improving documentation
authored
439 * @brief Updates the game over sequence.
440 *
d1c6feb @christopho Working on the game over sequence. Fix bugs. Rename some functions.
authored
441 * This function is called repeatedly while the game over sequence is shown.
442 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
443 void Game::update_gameover_sequence() {
d1c6feb @christopho Working on the game over sequence. Fix bugs. Rename some functions.
authored
444
445 if (!gameover_sequence->is_finished()) {
446 gameover_sequence->update();
447 }
448 else {
449 delete gameover_sequence;
450 gameover_sequence = NULL;
451 }
452 }
453
454 /**
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
455 * @brief Draws the game.
456 * @param dst_surface The surface where the game will be drawn.
45a5cf6 @christopho Clean the code of the transitions between two maps.
authored
457 */
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
458 void Game::draw(Surface& dst_surface) {
4df2c1f @christopho Implement the fade in/out transition in the game
authored
459
db0300f @christopho Lua: use "draw" everywhere in the API (no more "display").
authored
460 get_lua_context().game_on_pre_draw(*this, dst_surface);
8e22245 @christopho Lua game: implement events update, on_pre_display, on_post_display.
authored
461
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
462 // draw the map
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
463 if (current_map->is_loaded()) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
464 current_map->draw();
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
465 if (transition != NULL) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
466 transition->draw(current_map->get_visible_surface());
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
467 }
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
468 current_map->get_visible_surface().draw(dst_surface);
4df2c1f @christopho Implement the fade in/out transition in the game
authored
469
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
470 // draw the pause screen if any
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
471 if (is_paused()) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
472 pause_menu->draw(dst_surface);
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
473 }
fc7951c @christopho Start the dialog box and the messages
authored
474
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
475 // draw the game over sequence if any
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
476 else if (is_showing_gameover()) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
477 gameover_sequence->draw(dst_surface);
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
478 }
589458f @christopho Still working on the game over sequence
authored
479
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
480 // draw the hud
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
481 if (hud_enabled) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
482 hud->draw(dst_surface);
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
483 }
4df2c1f @christopho Implement the fade in/out transition in the game
authored
484
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
485 // draw the dialog box if any
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
486 if (is_showing_dialog()) {
3e7f9b6 @christopho Refactorying: rename display to draw also in C++.
authored
487 dialog_box->draw(dst_surface);
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
488 }
fc7951c @christopho Start the dialog box and the messages
authored
489 }
8e22245 @christopho Lua game: implement events update, on_pre_display, on_post_display.
authored
490
db0300f @christopho Lua: use "draw" everywhere in the API (no more "display").
authored
491 get_lua_context().game_on_post_draw(*this, dst_surface);
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
492 }
fc7951c @christopho Start the dialog box and the messages
authored
493
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
494 /**
5a16884 @christopho Replace some pointers by references.
authored
495 * @brief Returns whether there is a current map in this game.
496 *
497 * This function always returns true except when the game is being created
498 * and no map is loaded yet.
499 *
500 * @return true if there is a map
501 */
502 bool Game::has_current_map() {
503 return current_map != NULL;
504 }
505
506 /**
4009605 @christopho Improving documentation
authored
507 * @brief Returns the current map.
c440ecb @christopho Class Game is now a subclass of Screen and there is only one SDL loop…
authored
508 * @return the current map
509 */
5a16884 @christopho Replace some pointers by references.
authored
510 Map& Game::get_current_map() {
511 return *current_map;
4df2c1f @christopho Implement the fade in/out transition in the game
authored
512 }
513
514 /**
4009605 @christopho Improving documentation
authored
515 * @brief Changes the current map.
516 *
1a5e683 @christopho Rename Link into Hero
authored
517 * Call this function when you want the hero to go to another map.
4009605 @christopho Improving documentation
authored
518 *
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
519 * @param map_id id of the map to launch
8e717d2 @christopho Simplify entity class names.
authored
520 * @param destination_name name of the destination point of the map you want to use,
953666d @christopho Finish the game over sequence. Save the player's position.
authored
521 * or en ampty string to pick the destination point saved
0496c8d @christopho Move enums into classes to improve the code
authored
522 * @param transition_style type of transition between the two maps
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
523 */
8e717d2 @christopho Simplify entity class names.
authored
524 void Game::set_current_map(MapId map_id, const std::string &destination_name,
19131ad @christopho Sword
authored
525 Transition::Style transition_style) {
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
526
9081eac @christopho Find a bug
authored
527 // stop the hero's movement
528 hero->reset_movement();
529
b3093c4 @christopho Don't reload the map when using a teletransporter to the same map
authored
530 // prepare the next map
531 if (current_map == NULL || map_id != current_map->get_id()) {
532 // another map
533 next_map = new Map(map_id);
b666122 @christopho Simplify a lot the reference counting system.
authored
534 next_map->increment_refcount();
b3093c4 @christopho Don't reload the map when using a teletransporter to the same map
authored
535 next_map->load(*this);
536 next_map->check_suspended();
537 }
538 else {
539 // same map
540 next_map = current_map;
541 }
19131ad @christopho Sword
authored
542
52a9749 @christopho Fix bugs
authored
543 if (current_map != NULL) {
544 current_map->check_suspended();
e07c0eb @christopho Working on the entrances and the exits
authored
545 }
546
953666d @christopho Finish the game over sequence. Save the player's position.
authored
547 // initialize the destination point, from the specified name or from the savegame
8e717d2 @christopho Simplify entity class names.
authored
548 if (destination_name == "") {
549 next_map->set_destination(get_savegame().get_string(Savegame::STARTING_POINT));
953666d @christopho Finish the game over sequence. Save the player's position.
authored
550 }
551 else {
8e717d2 @christopho Simplify entity class names.
authored
552 next_map->set_destination(destination_name);
953666d @christopho Finish the game over sequence. Save the player's position.
authored
553 }
0496c8d @christopho Move enums into classes to improve the code
authored
554 this->transition_style = transition_style;
5431d23 @christopho Implement the teleportation between two maps (not well yet)
authored
555 }
556
557 /**
4009605 @christopho Improving documentation
authored
558 * @brief Returns the size of the oustide world in pixels.
6e1d676 @christopho Implement crystal switches and blue/orange blocks in the engine
authored
559 * @return the size of the oustide world
560 */
5a16884 @christopho Replace some pointers by references.
authored
561 const Rectangle& Game::get_outside_world_size() {
bb62853 @christopho Fix outside minimap
authored
562
563 if (outside_world_size.get_width() == 0) {
564 // first time: read the information
6467215 @christopho Rename info.dat into quest.dat and extend its content
authored
565 IniFile ini("quest.dat", IniFile::READ);
bb62853 @christopho Fix outside minimap
authored
566 ini.set_group("info");
567 int width = ini.get_integer_value("outside_world_width", 0);
568 int height = ini.get_integer_value("outside_world_height", 0);
e68f89b @christopho Rename Debug::assert() to Debug::check_assertion() to avoid conflicts
authored
569 Debug::check_assertion(width > 0 && height > 0, "Missing outside world size in file quest.dat");
bb62853 @christopho Fix outside minimap
authored
570 outside_world_size.set_size(width, height);
571 }
7c521e0 @christopho Still encapsulating SDL
authored
572 return outside_world_size;
6e1d676 @christopho Implement crystal switches and blue/orange blocks in the engine
authored
573 }
574
575 /**
4009605 @christopho Improving documentation
authored
576 * @brief Returns whether the current map belongs to a dungeon.
33c7658 @christopho Finish displaying the floor in the hud
authored
577 * @return true if the current map is in a dungeon
578 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
579 bool Game::is_in_dungeon() {
5a16884 @christopho Replace some pointers by references.
authored
580 return has_current_map() && get_current_map().is_in_dungeon();
33c7658 @christopho Finish displaying the floor in the hud
authored
581 }
d91c506 @christopho Starting the map submenu
authored
582
33c7658 @christopho Finish displaying the floor in the hud
authored
583 /**
4009605 @christopho Improving documentation
authored
584 * @brief Returns the dungeon where the current map is.
585 *
586 * Returns NULL if we are not in a dungeon.
587 *
33c7658 @christopho Finish displaying the floor in the hud
authored
588 * @return the current dungeon
589 */
5a16884 @christopho Replace some pointers by references.
authored
590 Dungeon& Game::get_current_dungeon() {
591 return *dungeon;
33c7658 @christopho Finish displaying the floor in the hud
authored
592 }
593
594 /**
abe52c4 @christopho Rename crystal switch to crystal
authored
595 * @brief Returns the state of the crystal blocks.
4009605 @christopho Improving documentation
authored
596 *
597 * Returns false if the orange blocks are lowered or true if the blue blocks are lowered.
598 *
abe52c4 @christopho Rename crystal switch to crystal
authored
599 * @return the state of the crystals or this world
d91c506 @christopho Starting the map submenu
authored
600 */
abe52c4 @christopho Rename crystal switch to crystal
authored
601 bool Game::get_crystal_state() {
602 return crystal_state;
6e1d676 @christopho Implement crystal switches and blue/orange blocks in the engine
authored
603 }
604
605 /**
abe52c4 @christopho Rename crystal switch to crystal
authored
606 * @brief Changes the state of the crystal blocks.
6e1d676 @christopho Implement crystal switches and blue/orange blocks in the engine
authored
607 */
abe52c4 @christopho Rename crystal switch to crystal
authored
608 void Game::change_crystal_state() {
609 crystal_state = !crystal_state;
d91c506 @christopho Starting the map submenu
authored
610 }
611
612 /**
4009605 @christopho Improving documentation
authored
613 * @brief Returns whether the game is paused.
e11caa7 @christopho Simplify and improve Link's animation, movements and actions. Suspend…
authored
614 * @return true if the game is paused
615 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
616 bool Game::is_paused() {
0990aeb @christopho Starting the pause menu
authored
617 return pause_menu != NULL;
e11caa7 @christopho Simplify and improve Link's animation, movements and actions. Suspend…
authored
618 }
619
620 /**
4009605 @christopho Improving documentation
authored
621 * @brief Returns whether we are playing a transition between two maps.
d8df414 @christopho Fix transition when starting the first map
authored
622 * @return true if there is a transition
623 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
624 bool Game::is_playing_transition() {
d8df414 @christopho Fix transition when starting the first map
authored
625 return transition != NULL || next_map != NULL;
626 }
627
628 /**
4009605 @christopho Improving documentation
authored
629 * @brief Returns whether the game is suspended.
630 *
e11caa7 @christopho Simplify and improve Link's animation, movements and actions. Suspend…
authored
631 * This is true in the following cases:
632 * - the game is paused,
4009605 @christopho Improving documentation
authored
633 * - a dialog a being dispayed,
634 * - a transition between two maps is playing,
635 * - the game over sequence is active,
636 * - the camera is moving.
637 *
e11caa7 @christopho Simplify and improve Link's animation, movements and actions. Suspend…
authored
638 * @return true if the game is suspended
66dbf35 @christopho Improving the transition system
authored
639 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
640 bool Game::is_suspended() {
4212826 @christopho Fix resetting the game and fix Map segfaults when unloaded.
authored
641
642 return current_map == NULL
643 || is_paused()
644 || is_showing_dialog()
645 || is_playing_transition()
646 || is_showing_gameover()
647 || !current_map->is_camera_fixed_on_hero();
e11caa7 @christopho Simplify and improve Link's animation, movements and actions. Suspend…
authored
648 }
560f174 @christopho Add the sword icon
authored
649
650 /**
d8d33ad @christopho Starting to update the engine to the new dialog semantics
authored
651 * @brief Returns whether we are showing a dialog box.
652 * @return true if a dialog box is being shown
38310c1 @christopho Improve code
authored
653 */
d8d33ad @christopho Starting to update the engine to the new dialog semantics
authored
654 bool Game::is_showing_dialog() {
dc5fd78 @christopho Improve dialog box code
authored
655 return dialog_box->is_enabled();
38310c1 @christopho Improve code
authored
656 }
657
658 /**
5a16884 @christopho Replace some pointers by references.
authored
659 * @brief Returns the dialog box manager.
660 * @return the dialog box manager
38310c1 @christopho Improve code
authored
661 */
5a16884 @christopho Replace some pointers by references.
authored
662 DialogBox& Game::get_dialog_box() {
663 return *dialog_box;
38310c1 @christopho Improve code
authored
664 }
665
666 /**
4009605 @christopho Improving documentation
authored
667 * @brief Sets whether the HUD is currently displayed.
84aa914 @christopho Start the intro
authored
668 * @param hud_enabled true to make the HUD displayed
669 */
670 void Game::set_hud_enabled(bool hud_enabled) {
671 this->hud_enabled = hud_enabled;
672 }
673
674 /**
355a363 @christopho Do not allow to pause the game when the player has no more life
authored
675 * @brief Returns whether the player is currently allowed to pause the game.
676 *
677 * He can pause the game if the pause key is enabled
678 * and if his life is greater than zero.
679 *
ba6054d @christopho Merge modifications from branches/demo up to r1177
authored
680 * @return true if the player is currently allowed to pause the game
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
681 */
5a16884 @christopho Replace some pointers by references.
authored
682 bool Game::can_pause() {
683 return is_pause_key_available() // see if the map currently allows the pause key
684 && get_equipment().get_life() > 0; // don't allow to pause the game if the gameover sequence is about to start
685 }
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
686
687 /**
355a363 @christopho Do not allow to pause the game when the player has no more life
authored
688 * @brief Returns whether the pause key is available.
689 *
690 * Even when the pause key is available, the player may still
691 * be unauthorized to pause the game, depending on the result of can_pause().
692 *
693 * @return true if the pause key is available
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
694 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
695 bool Game::is_pause_key_available() {
355a363 @christopho Do not allow to pause the game when the player has no more life
authored
696 return pause_key_available;
697 }
698
699 /**
700 * @brief Sets whether the pause key menu is available.
701 *
702 * Even when the pause key is available, the player may still
703 * be unauthorized to pause the game, depending on the result of can_pause().
704 *
705 * @param pause_key_available true to make the pause key available
706 */
707 void Game::set_pause_key_available(bool pause_key_available) {
708
709 this->pause_key_available = pause_key_available;
710 keys_effect->set_pause_key_enabled(pause_key_available);
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
711 }
712
713 /**
4009605 @christopho Improving documentation
authored
714 * @brief Pauses or resumes the game.
3acf7f3 @christopho Fix doxygen comments
authored
715 * @param paused true to pause the game, false to resume it.
63e283e @christopho Add an image with the icon of each item for the message box
authored
716 */
717 void Game::set_paused(bool paused) {
0990aeb @christopho Starting the pause menu
authored
718
719 if (paused != is_paused()) {
720
721 if (paused) {
5a16884 @christopho Replace some pointers by references.
authored
722 pause_menu = new PauseMenu(*this);
0990aeb @christopho Starting the pause menu
authored
723 }
724 else {
725 delete pause_menu;
726 pause_menu = NULL;
727 }
728 }
729 }
730
731 /**
4009605 @christopho Improving documentation
authored
732 * @brief Loads the dungeon data for the current map.
733 *
e33642a @christopho Parse the dungeons file
authored
734 * This function is called when the map changes.
735 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
736 void Game::load_dungeon() {
e33642a @christopho Parse the dungeons file
authored
737
738 if (current_map == NULL || next_map->get_world_number() != current_map->get_world_number()) {
739
740 if (current_map != NULL && current_map->is_in_dungeon()) {
741 delete dungeon;
742 dungeon = NULL;
743 }
744
745 if (next_map->is_in_dungeon()) {
746 dungeon = new Dungeon(next_map->get_world_number());
747 }
748 }
749 }
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
750
751 /**
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
752 * @brief Ends the game and goes back to the initial screen.
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
753 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
754 void Game::reset() {
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
755
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
756 transition = Transition::create(Transition::FADE, Transition::OUT, this);
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
757 transition->start();
b052d1a @christopho Implement game:start() (starting or restarting a game)
authored
758 resetting = true;
26f347b @christopho Improve the save dialog box. Add a cursor in the quest status submenu…
authored
759 }
589458f @christopho Still working on the game over sequence
authored
760
761 /**
4009605 @christopho Improving documentation
authored
762 * @brief Restarts the game with the current savegame state.
953666d @christopho Finish the game over sequence. Save the player's position.
authored
763 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
764 void Game::restart() {
953666d @christopho Finish the game over sequence. Save the player's position.
authored
765
ea6d8dd @christopho Removing global variable ZSDX::zsdx
authored
766 transition = Transition::create(Transition::FADE, Transition::OUT, this);
953666d @christopho Finish the game over sequence. Save the player's position.
authored
767 transition->start();
768 restarting = true;
769 }
770
771 /**
4009605 @christopho Improving documentation
authored
772 * @brief Launches the gameover sequence.
589458f @christopho Still working on the game over sequence
authored
773 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
774 void Game::start_gameover_sequence() {
5a16884 @christopho Replace some pointers by references.
authored
775 gameover_sequence = new GameoverSequence(*this, hero->get_animation_direction());
589458f @christopho Still working on the game over sequence
authored
776 }
777
778 /**
4009605 @christopho Improving documentation
authored
779 * @brief Returns whether the gameover sequence is being shown.
589458f @christopho Still working on the game over sequence
authored
780 * @return true if the gameover sequence is being shown
781 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
782 bool Game::is_showing_gameover() {
589458f @christopho Still working on the game over sequence
authored
783 return gameover_sequence != NULL;
784 }
016c466 @christopho Move some enumerations to separate files to avoid unnecessary header …
authored
785
786 /**
4009605 @christopho Improving documentation
authored
787 * @brief This function is called when the hero was dead but saved by a fairy.
016c466 @christopho Move some enumerations to separate files to avoid unnecessary header …
authored
788 */
01c23e2 @christopho Replace f(void) by f() in function declarations (f(void) has no meani…
authored
789 void Game::get_back_from_death() {
016c466 @christopho Move some enumerations to separate files to avoid unnecessary header …
authored
790 hero->get_back_from_death();
791 }
7996c18 @christopho Let the scripts allow to pause the game. Use PhysFS only in class Fil…
authored
792
Something went wrong with that request. Please try again.