#include <config.h>
#include "dummy_sound_source.hpp"
+#include "sound_source.hpp"
class DummySoundSource : public SoundSource
{
#ifndef __DUMMY_SOUND_SOURCE_HPP__
#define __DUMMY_SOUND_SOURCE_HPP__
-#include "sound_source.hpp"
+class SoundSource;
SoundSource* create_dummy_sound_source();
#include "openal_sound_source.hpp"
#include "sound_manager.hpp"
+#include "math/vector.hpp"
OpenALSoundSource::OpenALSoundSource()
{
#include <OpenAL/al.h>
#endif
-#include "math/vector.hpp"
#include "sound_source.hpp"
class OpenALSoundSource : public SoundSource
#ifndef __SOUND_SOURCE_H__
#define __SOUND_SOURCE_H__
-#include "math/vector.hpp"
+class Vector;
/**
* A sound source represents the source of audio output. You can place
#include "physic.hpp"
#include "object/player.hpp"
#include "serializable.hpp"
-#include "resources.hpp"
#include "sector.hpp"
#include "direction.hpp"
#include "object_factory.hpp"
-#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#include "lisp/writer.hpp"
#include "video/drawing_context.hpp"
#include <config.h>
-#include <sstream>
#include "joystickkeyboardcontroller.hpp"
+
+#include <sstream>
+
#include "log.hpp"
#include "gui/menu.hpp"
#include "gettext.hpp"
+#include "lisp/writer.hpp"
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "game_session.hpp"
#define __JOYSTICKKEYBOARDCONTROLLER_H__
#include "controller.hpp"
-#include "lisp/lisp.hpp"
-#include "lisp/writer.hpp"
+
+namespace lisp {
+class Writer;
+class Lisp;
+}
+
#include <SDL.h>
+
#include <string>
#include <map>
+#include <vector>
class Menu;
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
+#include "game_session.hpp"
+
#include <fstream>
#include <sstream>
#include <assert.h>
#include <SDL.h>
-#include "game_session.hpp"
+#include "file_system.hpp"
+#include "gameconfig.hpp"
+#include "gettext.hpp"
+#include "level.hpp"
+#include "levelintro.hpp"
#include "log.hpp"
-#include "console.hpp"
-#include "worldmap/worldmap.hpp"
+#include "main.hpp"
#include "mainloop.hpp"
-#include "audio/sound_manager.hpp"
-#include "gui/menu.hpp"
-#include "sector.hpp"
-#include "level.hpp"
-#include "tile.hpp"
#include "player_status.hpp"
-#include "object/particlesystem.hpp"
-#include "object/background.hpp"
-#include "object/gradient.hpp"
-#include "object/tilemap.hpp"
-#include "object/camera.hpp"
-#include "object/player.hpp"
-#include "object/level_time.hpp"
-#include "lisp/lisp.hpp"
-#include "lisp/parser.hpp"
-#include "resources.hpp"
+#include "options_menu.hpp"
+#include "random_generator.hpp"
+#include "sector.hpp"
#include "statistics.hpp"
#include "timer.hpp"
-#include "options_menu.hpp"
-#include "textscroller.hpp"
+#include "audio/sound_manager.hpp"
#include "control/codecontroller.hpp"
#include "control/joystickkeyboardcontroller.hpp"
-#include "main.hpp"
-#include "file_system.hpp"
-#include "gameconfig.hpp"
-#include "gettext.hpp"
-#include "console.hpp"
-#include "flip_level_transformer.hpp"
-#include "trigger/secretarea_trigger.hpp"
-#include "trigger/sequence_trigger.hpp"
-#include "random_generator.hpp"
-#include "scripting/squirrel_util.hpp"
-#include "object/endsequence_walkright.hpp"
-#include "object/endsequence_walkleft.hpp"
+#include "gui/menu.hpp"
+#include "object/camera.hpp"
#include "object/endsequence_fireworks.hpp"
-#include "direction.hpp"
-#include "scripting/time_scheduler.hpp"
-#include "levelintro.hpp"
+#include "object/endsequence_walkleft.hpp"
+#include "object/endsequence_walkright.hpp"
+#include "object/level_time.hpp"
+#include "object/player.hpp"
+#include "scripting/squirrel_util.hpp"
+#include "worldmap/worldmap.hpp"
enum GameMenuIDs {
MNID_CONTINUE,
level->load(levelfile);
level->stats.total_coins = level->get_total_coins();
level->stats.total_badguys = level->get_total_badguys();
- level->stats.total_secrets = level->get_total_count<SecretAreaTrigger>();
+ level->stats.total_secrets = level->get_total_secrets();
level->stats.reset();
if(reset_sector != "") {
sector->activate(newspawnpoint);
sector->play_music(LEVEL_MUSIC);
currentsector = sector;
+ //Keep persistent across sectors
+ if(edit_mode)
+ currentsector->get_players()[0]->set_edit_mode(edit_mode);
newsector = "";
newspawnpoint = "";
}
#include <config.h>
+#include "button.hpp"
+
#include <SDL.h>
#include <iostream>
#include "main.hpp"
-#include "button.hpp"
#include "mousecursor.hpp"
#include "video/font.hpp"
#include "video/surface.hpp"
+#include "video/drawing_context.hpp"
Font* Button::info_font = 0;
extern SDL_Surface* screen;
#include <vector>
#include <string>
+#include "SDL.h"
+
#include "math/vector.hpp"
-#include "video/drawing_context.hpp"
class Surface;
-
+class DrawingContext;
+class Font;
class ButtonGroup;
enum {
#include <config.h>
+#include "gui/mousecursor.hpp"
+
#include <SDL_events.h>
#include <SDL_mouse.h>
+#include "video/surface.hpp"
#include "video/drawing_context.hpp"
-#include "gui/mousecursor.hpp"
#include "main.hpp"
MouseCursor* MouseCursor::current_ = 0;
#include <string>
-#include "video/surface.hpp"
+class Surface;
#define MC_STATES_NB 3
// 02111-1307, USA.
#include <config.h>
+#include "level.hpp"
+
#include <map>
#include <stdlib.h>
#include <stdio.h>
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "lisp/writer.hpp"
-#include "level.hpp"
-#include "physic.hpp"
#include "sector.hpp"
-#include "tile.hpp"
#include "tile_set.hpp"
#include "tile_manager.hpp"
-#include "resources.hpp"
-#include "file_system.hpp"
-#include "object/gameobjs.hpp"
-#include "object/camera.hpp"
-#include "object/tilemap.hpp"
#include "object/coin.hpp"
#include "object/block.hpp"
+#include "trigger/secretarea_trigger.hpp"
using namespace std;
total_badguys += (*i)->get_total_badguys();
return total_badguys;
}
+
+int
+Level::get_total_secrets()
+{
+ int total_secrets = 0;
+ for(Sectors::iterator i = sectors.begin(); i != sectors.end(); ++i)
+ total_secrets += (*i)->get_total_count<SecretAreaTrigger>();
+ return total_secrets;
+}
#include <vector>
#include <string>
+
#include "statistics.hpp"
-#include "sector.hpp"
namespace lisp {
class Lisp;
}
class TileSet;
+class Sector;
/**
* Represents a collection of Sectors running in a single GameSession.
int get_total_coins();
int get_total_badguys();
-
- /** Get total number of GameObjects of given type */
- template<class T> int get_total_count()
- {
- int total = 0;
- for(Sectors::iterator i = sectors.begin(); i != sectors.end(); ++i) {
- total += (*i)->get_total_count<T>();
- }
- return total;
- }
+ int get_total_secrets();
private:
void load_old_format(const lisp::Lisp& reader);
#ifndef __LISP_ITERATOR_H__
#define __LISP_ITERATOR_H__
-#include "lisp/lisp.hpp"
+#include <string>
+
+#include "lisp.hpp"
namespace lisp
{
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
-#include <functional>
-#include <algorithm>
-#include <cassert>
-#include <iostream>
-#include <SDL_image.h>
-#include <sstream>
-#include <iomanip>
-#include <physfs.h>
-
#include "drawing_context.hpp"
+
#include "drawing_request.hpp"
#include "video_systems.hpp"
#include "renderer.hpp"
#include <stdint.h>
-#include <SDL_video.h>
-
-#include "glutil.hpp"
#include "obstack/obstack.h"
#include "math/vector.hpp"
#include "math/rect.hpp"
-#include "drawing_request.hpp"
-#include "font.hpp"
#include "color.hpp"
+#include "font.hpp"
+#include "drawing_request.hpp"
class Surface;
class Texture;
-struct DrawingRequest;
class Renderer;
class Lightmap;
#include <stdint.h>
-#include <SDL_video.h>
-
#include "glutil.hpp"
-#include "math/vector.hpp"
#include "color.hpp"
#include "font.hpp"
+#include "math/vector.hpp"
class Surface;