projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6470883
)
Loads more include and header fixes along with eol-style for some files
author
Mathnerd314
<man.is.allan@gmail.com>
Mon, 6 Oct 2008 02:19:19 +0000
(
02:19
+0000)
committer
Mathnerd314
<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
patch
|
blob
|
history
src/audio/dummy_sound_source.hpp
patch
|
blob
|
history
src/audio/openal_sound_source.cpp
patch
|
blob
|
history
src/audio/openal_sound_source.hpp
patch
|
blob
|
history
src/audio/sound_source.hpp
patch
|
blob
|
history
src/badguy/badguy.hpp
patch
|
blob
|
history
src/control/joystickkeyboardcontroller.cpp
patch
|
blob
|
history
src/control/joystickkeyboardcontroller.hpp
patch
|
blob
|
history
src/game_session.cpp
patch
|
blob
|
history
src/gui/button.cpp
patch
|
blob
|
history
src/gui/button.hpp
patch
|
blob
|
history
src/gui/mousecursor.cpp
patch
|
blob
|
history
src/gui/mousecursor.hpp
patch
|
blob
|
history
src/level.cpp
patch
|
blob
|
history
src/level.hpp
patch
|
blob
|
history
src/lisp/list_iterator.hpp
patch
|
blob
|
history
src/video/drawing_context.cpp
patch
|
blob
|
history
src/video/drawing_context.hpp
patch
|
blob
|
history
src/video/drawing_request.hpp
patch
|
blob
|
history
diff --git
a/src/audio/dummy_sound_source.cpp
b/src/audio/dummy_sound_source.cpp
index
1a9c274
..
40ccdfc
100644
(file)
--- a/
src/audio/dummy_sound_source.cpp
+++ b/
src/audio/dummy_sound_source.cpp
@@
-19,6
+19,7
@@
#include <config.h>
#include "dummy_sound_source.hpp"
#include <config.h>
#include "dummy_sound_source.hpp"
+#include "sound_source.hpp"
class DummySoundSource : public SoundSource
{
class DummySoundSource : public SoundSource
{
diff --git
a/src/audio/dummy_sound_source.hpp
b/src/audio/dummy_sound_source.hpp
index
458c1e8
..
9a17d61
100644
(file)
--- a/
src/audio/dummy_sound_source.hpp
+++ b/
src/audio/dummy_sound_source.hpp
@@
-19,7
+19,7
@@
#ifndef __DUMMY_SOUND_SOURCE_HPP__
#define __DUMMY_SOUND_SOURCE_HPP__
#ifndef __DUMMY_SOUND_SOURCE_HPP__
#define __DUMMY_SOUND_SOURCE_HPP__
-#include "sound_source.hpp"
+class SoundSource;
SoundSource* create_dummy_sound_source();
SoundSource* create_dummy_sound_source();
diff --git
a/src/audio/openal_sound_source.cpp
b/src/audio/openal_sound_source.cpp
index
252cc6e
..
eb674ef
100644
(file)
--- a/
src/audio/openal_sound_source.cpp
+++ b/
src/audio/openal_sound_source.cpp
@@
-20,6
+20,7
@@
#include "openal_sound_source.hpp"
#include "sound_manager.hpp"
#include "openal_sound_source.hpp"
#include "sound_manager.hpp"
+#include "math/vector.hpp"
OpenALSoundSource::OpenALSoundSource()
{
OpenALSoundSource::OpenALSoundSource()
{
diff --git
a/src/audio/openal_sound_source.hpp
b/src/audio/openal_sound_source.hpp
index
4b03ed6
..
0d989ed
100644
(file)
--- a/
src/audio/openal_sound_source.hpp
+++ b/
src/audio/openal_sound_source.hpp
@@
-25,7
+25,6
@@
#include <OpenAL/al.h>
#endif
#include <OpenAL/al.h>
#endif
-#include "math/vector.hpp"
#include "sound_source.hpp"
class OpenALSoundSource : public SoundSource
#include "sound_source.hpp"
class OpenALSoundSource : public SoundSource
diff --git
a/src/audio/sound_source.hpp
b/src/audio/sound_source.hpp
index
48c3f28
..
a735681
100644
(file)
--- a/
src/audio/sound_source.hpp
+++ b/
src/audio/sound_source.hpp
@@
-19,7
+19,7
@@
#ifndef __SOUND_SOURCE_H__
#define __SOUND_SOURCE_H__
#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
/**
* A sound source represents the source of audio output. You can place
diff --git
a/src/badguy/badguy.hpp
b/src/badguy/badguy.hpp
index
064d6c2
..
53ed624
100644
(file)
--- a/
src/badguy/badguy.hpp
+++ b/
src/badguy/badguy.hpp
@@
-27,11
+27,9
@@
#include "physic.hpp"
#include "object/player.hpp"
#include "serializable.hpp"
#include "physic.hpp"
#include "object/player.hpp"
#include "serializable.hpp"
-#include "resources.hpp"
#include "sector.hpp"
#include "direction.hpp"
#include "object_factory.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 "lisp/lisp.hpp"
#include "lisp/writer.hpp"
#include "video/drawing_context.hpp"
diff --git
a/src/control/joystickkeyboardcontroller.cpp
b/src/control/joystickkeyboardcontroller.cpp
index
e3bba1b
..
ee62b4a
100644
(file)
--- a/
src/control/joystickkeyboardcontroller.cpp
+++ b/
src/control/joystickkeyboardcontroller.cpp
@@
-20,11
+20,14
@@
#include <config.h>
#include <config.h>
-#include <sstream>
#include "joystickkeyboardcontroller.hpp"
#include "joystickkeyboardcontroller.hpp"
+
+#include <sstream>
+
#include "log.hpp"
#include "gui/menu.hpp"
#include "gettext.hpp"
#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"
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "game_session.hpp"
diff --git
a/src/control/joystickkeyboardcontroller.hpp
b/src/control/joystickkeyboardcontroller.hpp
index
cd85533
..
f989ea6
100644
(file)
--- a/
src/control/joystickkeyboardcontroller.hpp
+++ b/
src/control/joystickkeyboardcontroller.hpp
@@
-21,11
+21,17
@@
#define __JOYSTICKKEYBOARDCONTROLLER_H__
#include "controller.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 <SDL.h>
+
#include <string>
#include <map>
#include <string>
#include <map>
+#include <vector>
class Menu;
class Menu;
diff --git
a/src/game_session.cpp
b/src/game_session.cpp
index
45198c4
..
a5f0076
100644
(file)
--- a/
src/game_session.cpp
+++ b/
src/game_session.cpp
@@
-18,6
+18,8
@@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
// 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 <fstream>
#include <sstream>
#include <assert.h>
@@
-32,49
+34,32
@@
#include <SDL.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 "log.hpp"
-#include "console.hpp"
-#include "worldmap/worldmap.hpp"
+#include "main.hpp"
#include "mainloop.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 "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 "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 "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 "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,
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->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 != "") {
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;
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 = "";
}
newsector = "";
newspawnpoint = "";
}
diff --git
a/src/gui/button.cpp
b/src/gui/button.cpp
index
b41b1cb
..
6288665
100644
(file)
--- a/
src/gui/button.cpp
+++ b/
src/gui/button.cpp
@@
-19,14
+19,16
@@
#include <config.h>
#include <config.h>
+#include "button.hpp"
+
#include <SDL.h>
#include <iostream>
#include "main.hpp"
#include <SDL.h>
#include <iostream>
#include "main.hpp"
-#include "button.hpp"
#include "mousecursor.hpp"
#include "video/font.hpp"
#include "video/surface.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;
Font* Button::info_font = 0;
extern SDL_Surface* screen;
diff --git
a/src/gui/button.hpp
b/src/gui/button.hpp
index
b81f51d
..
6491873
100644
(file)
--- a/
src/gui/button.hpp
+++ b/
src/gui/button.hpp
@@
-23,11
+23,13
@@
#include <vector>
#include <string>
#include <vector>
#include <string>
+#include "SDL.h"
+
#include "math/vector.hpp"
#include "math/vector.hpp"
-#include "video/drawing_context.hpp"
class Surface;
class Surface;
-
+class DrawingContext;
+class Font;
class ButtonGroup;
enum {
class ButtonGroup;
enum {
diff --git
a/src/gui/mousecursor.cpp
b/src/gui/mousecursor.cpp
index
ba2da77
..
3a87321
100644
(file)
--- a/
src/gui/mousecursor.cpp
+++ b/
src/gui/mousecursor.cpp
@@
-19,11
+19,13
@@
#include <config.h>
#include <config.h>
+#include "gui/mousecursor.hpp"
+
#include <SDL_events.h>
#include <SDL_mouse.h>
#include <SDL_events.h>
#include <SDL_mouse.h>
+#include "video/surface.hpp"
#include "video/drawing_context.hpp"
#include "video/drawing_context.hpp"
-#include "gui/mousecursor.hpp"
#include "main.hpp"
MouseCursor* MouseCursor::current_ = 0;
#include "main.hpp"
MouseCursor* MouseCursor::current_ = 0;
diff --git
a/src/gui/mousecursor.hpp
b/src/gui/mousecursor.hpp
index
b3cb53b
..
797fe6c
100644
(file)
--- a/
src/gui/mousecursor.hpp
+++ b/
src/gui/mousecursor.hpp
@@
-22,7
+22,7
@@
#include <string>
#include <string>
-#include "video/surface.hpp"
+class Surface;
#define MC_STATES_NB 3
#define MC_STATES_NB 3
diff --git
a/src/level.cpp
b/src/level.cpp
index
78d4a1a
..
33c7c25
100644
(file)
--- a/
src/level.cpp
+++ b/
src/level.cpp
@@
-19,6
+19,8
@@
// 02111-1307, USA.
#include <config.h>
// 02111-1307, USA.
#include <config.h>
+#include "level.hpp"
+
#include <map>
#include <stdlib.h>
#include <stdio.h>
#include <map>
#include <stdlib.h>
#include <stdio.h>
@@
-34,19
+36,12
@@
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "lisp/writer.hpp"
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "lisp/writer.hpp"
-#include "level.hpp"
-#include "physic.hpp"
#include "sector.hpp"
#include "sector.hpp"
-#include "tile.hpp"
#include "tile_set.hpp"
#include "tile_manager.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 "object/coin.hpp"
#include "object/block.hpp"
+#include "trigger/secretarea_trigger.hpp"
using namespace std;
using namespace std;
@@
-266,3
+261,12
@@
Level::get_total_badguys()
total_badguys += (*i)->get_total_badguys();
return 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;
+}
diff --git
a/src/level.hpp
b/src/level.hpp
index
889f8f3
..
208b64a
100644
(file)
--- a/
src/level.hpp
+++ b/
src/level.hpp
@@
-23,14
+23,15
@@
#include <vector>
#include <string>
#include <vector>
#include <string>
+
#include "statistics.hpp"
#include "statistics.hpp"
-#include "sector.hpp"
namespace lisp {
class Lisp;
}
class TileSet;
namespace lisp {
class Lisp;
}
class TileSet;
+class Sector;
/**
* Represents a collection of Sectors running in a single GameSession.
/**
* Represents a collection of Sectors running in a single GameSession.
@@
-79,16
+80,7
@@
public:
int get_total_coins();
int get_total_badguys();
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);
private:
void load_old_format(const lisp::Lisp& reader);
diff --git
a/src/lisp/list_iterator.hpp
b/src/lisp/list_iterator.hpp
index
0cb5b54
..
bb9fe03
100644
(file)
--- a/
src/lisp/list_iterator.hpp
+++ b/
src/lisp/list_iterator.hpp
@@
-20,7
+20,9
@@
#ifndef __LISP_ITERATOR_H__
#define __LISP_ITERATOR_H__
#ifndef __LISP_ITERATOR_H__
#define __LISP_ITERATOR_H__
-#include "lisp/lisp.hpp"
+#include <string>
+
+#include "lisp.hpp"
namespace lisp
{
namespace lisp
{
diff --git
a/src/video/drawing_context.cpp
b/src/video/drawing_context.cpp
index
88e288b
..
613a3de
100644
(file)
--- a/
src/video/drawing_context.cpp
+++ b/
src/video/drawing_context.cpp
@@
-18,16
+18,8
@@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <config.h>
// 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_context.hpp"
+
#include "drawing_request.hpp"
#include "video_systems.hpp"
#include "renderer.hpp"
#include "drawing_request.hpp"
#include "video_systems.hpp"
#include "renderer.hpp"
diff --git
a/src/video/drawing_context.hpp
b/src/video/drawing_context.hpp
index
0e24d3a
..
5f392ef
100644
(file)
--- a/
src/video/drawing_context.hpp
+++ b/
src/video/drawing_context.hpp
@@
-25,19
+25,15
@@
#include <stdint.h>
#include <stdint.h>
-#include <SDL_video.h>
-
-#include "glutil.hpp"
#include "obstack/obstack.h"
#include "math/vector.hpp"
#include "math/rect.hpp"
#include "obstack/obstack.h"
#include "math/vector.hpp"
#include "math/rect.hpp"
-#include "drawing_request.hpp"
-#include "font.hpp"
#include "color.hpp"
#include "color.hpp"
+#include "font.hpp"
+#include "drawing_request.hpp"
class Surface;
class Texture;
class Surface;
class Texture;
-struct DrawingRequest;
class Renderer;
class Lightmap;
class Renderer;
class Lightmap;
diff --git
a/src/video/drawing_request.hpp
b/src/video/drawing_request.hpp
index
581438a
..
725a346
100644
(file)
--- a/
src/video/drawing_request.hpp
+++ b/
src/video/drawing_request.hpp
@@
-25,12
+25,10
@@
#include <stdint.h>
#include <stdint.h>
-#include <SDL_video.h>
-
#include "glutil.hpp"
#include "glutil.hpp"
-#include "math/vector.hpp"
#include "color.hpp"
#include "font.hpp"
#include "color.hpp"
#include "font.hpp"
+#include "math/vector.hpp"
class Surface;
class Surface;