Loads more include and header fixes along with eol-style for some files
authorMathnerd314 <man.is.allan@gmail.com>
Mon, 6 Oct 2008 02:19:19 +0000 (02:19 +0000)
committerMathnerd314 <man.is.allan@gmail.com>
Mon, 6 Oct 2008 02:19:19 +0000 (02:19 +0000)
SVN-Revision: 5795

19 files changed:
src/audio/dummy_sound_source.cpp
src/audio/dummy_sound_source.hpp
src/audio/openal_sound_source.cpp
src/audio/openal_sound_source.hpp
src/audio/sound_source.hpp
src/badguy/badguy.hpp
src/control/joystickkeyboardcontroller.cpp
src/control/joystickkeyboardcontroller.hpp
src/game_session.cpp
src/gui/button.cpp
src/gui/button.hpp
src/gui/mousecursor.cpp
src/gui/mousecursor.hpp
src/level.cpp
src/level.hpp
src/lisp/list_iterator.hpp
src/video/drawing_context.cpp
src/video/drawing_context.hpp
src/video/drawing_request.hpp

index 1a9c274..40ccdfc 100644 (file)
@@ -19,6 +19,7 @@
 #include <config.h>
 
 #include "dummy_sound_source.hpp"
+#include "sound_source.hpp"
 
 class DummySoundSource : public SoundSource
 {
index 458c1e8..9a17d61 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef __DUMMY_SOUND_SOURCE_HPP__
 #define __DUMMY_SOUND_SOURCE_HPP__
 
-#include "sound_source.hpp"
+class SoundSource;
 
 SoundSource* create_dummy_sound_source();
 
index 252cc6e..eb674ef 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "openal_sound_source.hpp"
 #include "sound_manager.hpp"
+#include "math/vector.hpp"
 
 OpenALSoundSource::OpenALSoundSource()
 {
index 4b03ed6..0d989ed 100644 (file)
@@ -25,7 +25,6 @@
 #include <OpenAL/al.h>
 #endif
 
-#include "math/vector.hpp"
 #include "sound_source.hpp"
 
 class OpenALSoundSource : public SoundSource
index 48c3f28..a735681 100644 (file)
@@ -19,7 +19,7 @@
 #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
index 064d6c2..53ed624 100644 (file)
 #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"
index e3bba1b..ee62b4a 100644 (file)
 
 #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"
index cd85533..f989ea6 100644 (file)
 #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;
 
index 45198c4..a5f0076 100644 (file)
@@ -18,6 +18,8 @@
 //  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,
@@ -129,7 +114,7 @@ GameSession::restart_level()
   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 != "") {
@@ -477,6 +462,9 @@ GameSession::update(float elapsed_time)
     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 = "";
   }
index b41b1cb..6288665 100644 (file)
 
 #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;
index b81f51d..6491873 100644 (file)
 #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 {
index ba2da77..3a87321 100644 (file)
 
 #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;
index b3cb53b..797fe6c 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <string>
 
-#include "video/surface.hpp"
+class Surface;
 
 #define MC_STATES_NB 3
 
index 78d4a1a..33c7c25 100644 (file)
@@ -19,6 +19,8 @@
 //  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;
 
@@ -266,3 +261,12 @@ Level::get_total_badguys()
     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;
+}
index 889f8f3..208b64a 100644 (file)
 
 #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.
@@ -79,16 +80,7 @@ public:
 
   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);
index 0cb5b54..bb9fe03 100644 (file)
@@ -20,7 +20,9 @@
 #ifndef __LISP_ITERATOR_H__
 #define __LISP_ITERATOR_H__
 
-#include "lisp/lisp.hpp"
+#include <string>
+
+#include "lisp.hpp"
 
 namespace lisp
 {
index 88e288b..613a3de 100644 (file)
 //  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"
index 0e24d3a..5f392ef 100644 (file)
 
 #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;
 
index 581438a..725a346 100644 (file)
 
 #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;