worldmap Namespace Reference


Classes

class  LevelTile
class  SpawnPoint
class  SpecialTile
class  SpriteChange
class  Teleporter
class  Tux
class  WorldMap
 Screen that runs a WorldMap, which lets the player choose a Level. More...

Enumerations

enum  Direction {
  D_NONE, D_WEST, D_EAST, D_NORTH,
  D_SOUTH
}
enum  {
  BOTH_WAYS, NORTH_SOUTH_WAY, SOUTH_NORTH_WAY, EAST_WEST_WAY,
  WEST_EAST_WAY
}

Functions

Direction reverse_dir (Direction direction)
std::string direction_to_string (Direction direction)
Direction string_to_direction (const std::string &directory)

Variables

static const float TUXSPEED = 200
static const float map_message_TIME = 2.8f


Enumeration Type Documentation

anonymous enum

Enumerator:
BOTH_WAYS 
NORTH_SOUTH_WAY 
SOUTH_NORTH_WAY 
EAST_WEST_WAY 
WEST_EAST_WAY 

Definition at line 54 of file worldmap.hpp.

00054      {
00055   BOTH_WAYS,
00056   NORTH_SOUTH_WAY,
00057   SOUTH_NORTH_WAY,
00058   EAST_WEST_WAY,
00059   WEST_EAST_WAY
00060 };

enum worldmap::Direction

Enumerator:
D_NONE 
D_WEST 
D_EAST 
D_NORTH 
D_SOUTH 

Definition at line 24 of file direction.hpp.


Function Documentation

std::string worldmap::direction_to_string ( Direction  direction  ) 

Definition at line 42 of file direction.cpp.

References D_EAST, D_NORTH, D_SOUTH, and D_WEST.

Referenced by worldmap::WorldMap::save_state().

00043 {
00044   switch(direction)
00045   {
00046     case D_WEST:
00047       return "west";
00048     case D_EAST:
00049       return "east";
00050     case D_NORTH:
00051       return "north";
00052     case D_SOUTH:
00053       return "south";
00054     default:
00055       return "none";
00056   }
00057 }

Direction worldmap::reverse_dir ( Direction  direction  ) 

Definition at line 23 of file direction.cpp.

References D_EAST, D_NONE, D_NORTH, D_SOUTH, and D_WEST.

Referenced by worldmap::Tux::tryContinueWalking(), and worldmap::Tux::tryStartWalking().

00024 {
00025   switch(direction)
00026   {
00027     case D_WEST:
00028       return D_EAST;
00029     case D_EAST:
00030       return D_WEST;
00031     case D_NORTH:
00032       return D_SOUTH;
00033     case D_SOUTH:
00034       return D_NORTH;
00035     case D_NONE:
00036       return D_NONE;
00037   }
00038   return D_NONE;
00039 }

Direction worldmap::string_to_direction ( const std::string &  directory  ) 

Definition at line 60 of file direction.cpp.

References D_EAST, D_NONE, D_NORTH, D_SOUTH, D_WEST, and log_warning.

Referenced by worldmap::WorldMap::load_state(), and worldmap::SpawnPoint::SpawnPoint().

00061 {
00062   if (directory == "west")
00063     return D_WEST;
00064   else if (directory == "east")
00065     return D_EAST;
00066   else if (directory == "north")
00067     return D_NORTH;
00068   else if (directory == "south")
00069     return D_SOUTH;
00070   else if (directory == "none")
00071     return D_NONE;
00072   else {
00073     log_warning << "unknown direction: \"" << directory << "\"" << std::endl;
00074     return D_NONE;
00075   }
00076 }


Variable Documentation

const float worldmap::map_message_TIME = 2.8f [static]

Definition at line 31 of file tux.cpp.

Referenced by worldmap::Tux::tryContinueWalking().

const float worldmap::TUXSPEED = 200 [static]

Definition at line 30 of file tux.cpp.

Referenced by worldmap::Tux::tryContinueWalking().


Generated on Mon Jun 9 03:38:41 2014 for SuperTux by  doxygen 1.5.1