X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsector.h;h=c2a8f3c474c952f8792123b0847176c026ac4645;hb=c62a9b627722f6371877c4dcbc218c60edb58559;hp=464a64f9cb4cda772df6e9220b8fc49eeae774c5;hpb=626ab69641b179048b9d0fc528cd1626886fe9db;p=supertux.git diff --git a/src/sector.h b/src/sector.h index 464a64f9c..c2a8f3c47 100644 --- a/src/sector.h +++ b/src/sector.h @@ -16,7 +16,6 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - #ifndef SUPERTUX_SECTOR_H #define SUPERTUX_SECTOR_H @@ -28,18 +27,14 @@ #include "audio/musicref.h" #include "video/drawing_context.h" -using namespace SuperTux; - -namespace SuperTux { -class GameObject; -class Sprite; -class Rectangle; -} namespace lisp { class Lisp; class Writer; } +class Rect; +class Sprite; +class GameObject; class Player; class Camera; class TileMap; @@ -53,6 +48,11 @@ public: Vector pos; }; +enum MusicType { + LEVEL_MUSIC, + HERRING_MUSIC +}; + /** This class holds a sector (a part of a level) and all the game objects * (badguys, player, background, tilemap, ...) */ @@ -86,10 +86,10 @@ public: { return name; } /// tests if a given rectangle is inside the sector - bool inside(const Rectangle& rectangle) const; + bool inside(const Rect& rectangle) const; - void play_music(int musictype); - int get_music_type(); + void play_music(MusicType musictype); + MusicType get_music_type(); /** Checks for all possible collisions. And calls the collision_handlers, which the collision_objects provide for this @@ -121,7 +121,6 @@ private: std::string name; MusicRef level_song; - MusicRef level_song_fast; public: std::string song_title; @@ -141,15 +140,15 @@ public: // TODO make this private again typedef std::vector SpawnPoints; SpawnPoints spawnpoints; - Rectangle get_active_region(); + Rect get_active_region(); private: void fix_old_tiles(); /// container for newly created objects, they'll be added in Sector::action GameObjects gameobjects_new; - - int currentmusic; + + MusicType currentmusic; CollisionGrid* grid; };