-// $Id: worldmap.cpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $
+// $Id$
//
// SuperTux - A Jump'n Run
// Copyright (C) 2004 Ingo Ruhnke <grumbel@gmx.de>
float offset;
bool moving;
+ bool ghost_mode;
+
void stop();
- bool canWalk(const Tile* tile, Direction dir); /**< check if we can leave "tile" in direction "dir" */
+ bool canWalk(int tile_data, Direction dir); /**< check if we can leave a tile (with given "tile_data") in direction "dir" */
void updateInputDirection(); /**< if controller was pressed, update input_direction */
void tryStartWalking(); /**< try starting to walk in input_direction */
void tryContinueWalking(float elapsed_time); /**< try to continue walking in current direction */
-public:
+public:
Tux(WorldMap* worldmap_);
~Tux();
-
+
+ void setup(); /**< called prior to first update */
void draw(DrawingContext& context);
void update(float elapsed_time);
void set_direction(Direction dir);
+ void set_ghost_mode(bool enabled);
+ bool get_ghost_mode();
+
bool is_moving() const { return moving; }
Vector get_pos();
- Vector get_tile_pos() const { return tile_pos; }
- void set_tile_pos(Vector p) { tile_pos = p; }
+ Vector get_tile_pos() const { return tile_pos; }
+ void set_tile_pos(Vector p) { tile_pos = p; }
};
}
#endif
-