Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7339 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Apr 19, 2006, 2:11:14 AM (18 years ago)
Author:
bensch
Message:

some nice fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r7338 r7339  
    128128 * @returns true on success, false otherwise
    129129 */
    130 bool Playable::setPlayMode(Playable::Playmode playmode)
     130bool Playable::setPlaymode(Playable::Playmode playmode)
    131131{
    132132  if (!this->playmodeSupported(playmode))
     
    302302
    303303/**
    304  * remove an event to the event list this Playable can capture.
     304 * @brief remove an event to the event list this Playable can capture.
    305305 * @param event the event to unregister.
    306306 */
     
    431431  return flags!=oldFlags;
    432432}
     433
     434
     435Playable::Playmode Playable::stringToPlaymode(const std::string& playmode)
     436{
     437  if (playmode == "Vertical")
     438    return Playable::Vertical;
     439  if (playmode == "Horizontal")
     440    return Playable::Horizontal;
     441  if (playmode == "FromBehind")
     442    return Playable::FromBehind;
     443  if (playmode == "Full3D")
     444    return Playable::Full3D;
     445
     446  return Playable::Full3D;
     447}
     448
     449const char* Playable::playmodeToString(Playable::Playmode playmode)
     450{
     451  switch(playmode)
     452  {
     453    case Playable::Vertical:
     454      return "Vertical";
     455    case Playable::Horizontal:
     456      return "Horizontal";
     457    case Playable::FromBehind:
     458      return "FromBehind";
     459    case Playable::Full3D:
     460      return "Full3D";
     461
     462    default:
     463      return "Full3D";
     464  }
     465
     466}
Note: See TracChangeset for help on using the changeset viewer.