#include <vector>
#include <string>
-#include <SDL_mixer.h>
+#include "musicref.h"
namespace WorldMapNS {
int y;
};
-struct Tile
+class Tile
{
+public:
+ Tile();
+ ~Tile();
+
Surface* sprite;
// Directions in which Tux is allowed to walk from this tile
private:
typedef std::vector<Tile*> Tiles;
Tiles tiles;
- static TileManager* instance_ ;
- TileManager();
public:
- static TileManager* instance() { return instance_ ? instance_ : instance_ = new TileManager(); }
+ TileManager();
+ ~TileManager();
- void load();
Tile* get(int i);
};
void stop();
public:
Tux(WorldMap* worldmap_);
+ ~Tux();
void draw(const Point& offset);
void update(float delta);
int width;
int height;
+ TileManager* tile_manager;
+
public:
struct Level
{
typedef std::vector<Level> Levels;
Levels levels;
- Mix_Music* song;
+ MusicRef song;
Direction input_direction;
bool enter_level;