Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 1:42:17 AM (16 years ago)
Author:
rgrieder
Message:
  • updated msvc files
  • Fixed build by including util/Integer.h in NetworkPrereqs.h instead of util/Math.h
  • Fixed issue with a this pointer used in the base class c'tor initialisation
  • Fixed build under windows: INFINITE seems to be a macro, defined in winbase.h. Constant was somewhere in the quest files.
  • Fixed build: Only integral types can have header-file value when declared as static const. Float is not supported by the standard.
  • Fixed a potential bug in Planet.cc: "if (cond) doOne; doTwo" —> missing brances (indentation was correct, so I assume there have to be brances)
  • Corrected lots of indentation problems with tabs/spaces mix.
  • Changed all "@file Blubb.h" to "@file": Doxygen then assumes the actual filename. This gives more flexibility.
Location:
code/branches/presentation/src/orxonox/objects/quest
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/quest/AddQuest.cc

    r2420 r2435  
    2828
    2929/**
    30     @file AddQuest.cc
     30    @file
    3131    @brief Implementation of the AddQuest class.
    3232*/
     
    4444#include "Quest.h"
    4545
    46 namespace orxonox {
    47 
     46namespace orxonox
     47{
    4848    CreateFactory(AddQuest);
    4949
  • code/branches/presentation/src/orxonox/objects/quest/AddQuest.h

    r2420 r2435  
    2828
    2929/**
    30     @file AddQuest.h
     30    @file
    3131    @brief Definition of the AddQuest class.
    3232*/
     
    4242#include "ChangeQuestStatus.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/AddQuestHint.cc

    r2420 r2435  
    2828
    2929/**
    30     @file AddQuestHint.cc
     30    @file
    3131    @brief Implementation of the AddQuestHint class.
    3232*/
     
    4343#include "QuestHint.h"
    4444
    45 namespace orxonox {
    46 
     45namespace orxonox
     46{
    4747    CreateFactory(AddQuestHint);
    4848
  • code/branches/presentation/src/orxonox/objects/quest/AddQuestHint.h

    r2420 r2435  
    2828
    2929/**
    30     @file AddQuestHint.h
     30    @file
    3131    @brief Definition of the AddQuestHint class.
    3232*/
     
    4141#include "QuestEffect.h"
    4242
    43 namespace orxonox {
    44 
     43namespace orxonox
     44{
    4545    /**
    4646    @brief
  • code/branches/presentation/src/orxonox/objects/quest/AddReward.cc

    r2420 r2435  
    2828
    2929/**
    30     @file AddReward.cc
     30    @file
    3131    @brief Implementation of the AddReward class.
    3232*/
     
    4040#include "Rewardable.h"
    4141
    42 namespace orxonox {
    43 
     42namespace orxonox
     43{
    4444    CreateFactory(AddReward);
    4545
  • code/branches/presentation/src/orxonox/objects/quest/AddReward.h

    r2420 r2435  
    2828
    2929/**
    30     @file AddReward.h
     30    @file
    3131    @brief Definition of the AddReward class.
    3232*/
     
    4242#include "QuestEffect.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/ChangeQuestStatus.cc

    r2420 r2435  
    2828
    2929/**
    30     @file ChangeQuestStatus.cc
     30    @file
    3131    @brief Implementation of the ChangeQuestStatus class.
    3232*/
     
    3939#include "QuestItem.h"
    4040
    41 namespace orxonox {
    42 
     41namespace orxonox
     42{
    4343    /**
    4444    @brief
  • code/branches/presentation/src/orxonox/objects/quest/ChangeQuestStatus.h

    r2420 r2435  
    2828
    2929/**
    30     @file ChangeQuestStatus.h
     30    @file
    3131    @brief Definition of the ChangeQuestStatus class.
    3232*/
     
    4242#include "QuestEffect.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/CompleteQuest.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file CompleteQuest.cc
     30    @file
    3131    @brief Implementation of the CompleteQuest class.
    3232*/
     
    4242#include "Quest.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    CreateFactory(CompleteQuest);
    4747
  • code/branches/presentation/src/orxonox/objects/quest/CompleteQuest.h

    r2420 r2435  
    2828
    2929/**
    30     @file CompleteQuest.h
     30    @file
    3131    @brief Definition of the CompleteQuest class.
    3232*/
     
    4242#include "ChangeQuestStatus.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/FailQuest.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file FailQuest.cc
     30    @file
    3131    @brief Implementation of the FailQuest class.
    3232*/
     
    4242#include "Quest.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    CreateFactory(FailQuest);
    4747
  • code/branches/presentation/src/orxonox/objects/quest/FailQuest.h

    r2420 r2435  
    2828
    2929/**
    30     @file FailQuest.h
     30    @file
    3131    @brief Definition of the FailQuest class.
    3232*/
     
    4242#include "ChangeQuestStatus.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/GlobalQuest.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file GlobalQuest.cc
     30    @file
    3131    @brief Implementation of the GlobalQuest class.
    3232*/
     
    4242#include "QuestEffect.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    CreateFactory(GlobalQuest);
    4747
  • code/branches/presentation/src/orxonox/objects/quest/GlobalQuest.h

    r2420 r2435  
    2828 
    2929/**
    30     @file GlobalQuest.h
     30    @file
    3131    @brief Definition of the GlobalQuest class.
    3232*/
     
    4343#include "Quest.h"
    4444
    45 namespace orxonox {
    46 
     45namespace orxonox
     46{
    4747    /**
    4848    @brief
  • code/branches/presentation/src/orxonox/objects/quest/LocalQuest.cc

    r2420 r2435  
    2828
    2929/**
    30     @file LocalQuest.cc
     30    @file
    3131    @brief Implementation of the LocalQuest class.
    3232*/
     
    4242#include "QuestEffect.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    CreateFactory(LocalQuest);
    4747
  • code/branches/presentation/src/orxonox/objects/quest/LocalQuest.h

    r2420 r2435  
    2828 
    2929/**
    30     @file LocalQuest.h
     30    @file
    3131    @brief Definition of the LocalQuest class.
    3232*/
     
    4343#include "Quest.h"
    4444
    45 namespace orxonox {
    46 
     45namespace orxonox
     46{
    4747    /**
    4848    @brief
  • code/branches/presentation/src/orxonox/objects/quest/Quest.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file Quest.cc
     30    @file
    3131    @brief Implementation of the Quest class.
    3232*/
     
    4444#include "QuestListener.h"
    4545
    46 namespace orxonox {
    47 
     46namespace orxonox
     47{
    4848    /**
    4949    @brief
  • code/branches/presentation/src/orxonox/objects/quest/Quest.h

    r2420 r2435  
    2828 
    2929/**
    30     @file Quest.h
     30    @file
    3131    @brief Definition of the Quest class.
    3232        The Quest is the parent class of LocalQuest and GlobalQuest.
     
    4545#include "QuestItem.h"
    4646
    47 namespace questStatus
     47namespace orxonox
    4848{
     49    namespace questStatus
     50    {
    4951
    50     //!Different states of a Quest.
    51     enum Enum
    52     {
    53         inactive,
    54         active,
    55         failed,
    56         completed
    57     };
     52        //!Different states of a Quest.
     53        enum Enum
     54        {
     55            inactive,
     56            active,
     57            failed,
     58            completed
     59        };
    5860
    59 }
    60 
    61 namespace orxonox {
     61    }
    6262
    6363    /**
  • code/branches/presentation/src/orxonox/objects/quest/QuestDescription.cc

    r2420 r2435  
    2828
    2929/**
    30     @file QuestDescription.cc
     30    @file
    3131    @brief Implementation of the QuestDescription class.
    3232*/
     
    3939#include "orxonox/overlays/notifications/Notification.h"
    4040
    41 namespace orxonox {
    42 
     41namespace orxonox
     42{
    4343    CreateFactory(QuestDescription);
    4444
     
    128128        }
    129129       
    130         Notification* notification = new Notification(message, title, 30);
     130        Notification* notification = new Notification(0, message, title, 30);
    131131        notification->send();
    132132        return true;
  • code/branches/presentation/src/orxonox/objects/quest/QuestDescription.h

    r2420 r2435  
    2828
    2929/**
    30     @file QuestDescription.h
     30    @file
    3131    @brief Definition of the QuestDescription class.
    3232*/
     
    4242#include "core/XMLPort.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
     
    5555        Damian 'Mozork' Frick
    5656    */
    57     class _OrxonoxExport QuestDescription : public BaseObject {
    58 
     57    class _OrxonoxExport QuestDescription : public BaseObject
     58    {
    5959        public:
    6060            QuestDescription(BaseObject* creator);
  • code/branches/presentation/src/orxonox/objects/quest/QuestEffect.cc

    r2420 r2435  
    2828
    2929/**
    30     @file QuestEffect.cc
     30    @file
    3131    @brief Implementation of the QuestEffect class.
    3232*/
     
    3939#include "orxonox/objects/infos/PlayerInfo.h"
    4040
    41 namespace orxonox {
    42 
     41namespace orxonox
     42{
    4343    /**
    4444    @brief
  • code/branches/presentation/src/orxonox/objects/quest/QuestEffect.h

    r2420 r2435  
    2828 
    2929/**
    30     @file QuestEffect.h
     30    @file
    3131    @brief Definition of the QuestEffect class.
    3232*/
     
    4141#include "core/BaseObject.h"
    4242
    43 namespace orxonox {
    44 
     43namespace orxonox
     44{
    4545    /**
    4646    @brief
  • code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r2385 r2435  
    2828
    2929/**
    30     @file QuestEffectBeacon.cc
     30    @file
    3131    @brief Implementation of the QuestEffectBeacon class.
    3232*/
     
    4545#include "QuestEffect.h"
    4646
    47 namespace orxonox {
    48 
     47namespace orxonox
     48{
    4949    CreateFactory(QuestEffectBeacon);
    5050
     
    5858       
    5959        this->status_ = QuestEffectBeaconStatus::active;
    60         this->times_ = INFINITE;
     60        this->times_ = INFINITE_TIME;
    6161    }
    6262
     
    186186            return false;
    187187        }
    188         if(this->getTimes() == INFINITE) //!< If times is infinity the QuestEffectBeacon can be executed an infinite number fo times.
     188        if(this->getTimes() == INFINITE_TIME) //!< If times is infinity the QuestEffectBeacon can be executed an infinite number fo times.
    189189        {
    190190            return true;
     
    212212    bool QuestEffectBeacon::setTimes(const int & n)
    213213    {
    214         if(n < 0 && n != INFINITE)
     214        if(n < 0 && n != INFINITE_TIME)
    215215        {
    216216            return false;
  • code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.h

    r2385 r2435  
    2828
    2929/**
    30     @file QuestEffectBeacon.h
     30    @file
    3131    @brief Definition of the QuestEffectBeacon class.
    3232*/
     
    3939#include "orxonox/objects/worldentities/PositionableEntity.h"
    4040
    41 namespace QuestEffectBeaconStatus
     41namespace orxonox
    4242{
     43    namespace QuestEffectBeaconStatus
     44    {
    4345
    44     //! The status of the beacon, can be either active or inactive.
    45     enum Enum
    46     {
    47         inactive,
    48         active
    49     };
     46        //! The status of the beacon, can be either active or inactive.
     47        enum Enum
     48        {
     49            inactive,
     50            active
     51        };
    5052
    51 }
    52 
    53 namespace orxonox {
     53    }
    5454
    5555    /**
     
    112112   
    113113        private:
    114             static const int INFINITE = -1; //!< Constant to avoid using magic numbers.
     114            static const int INFINITE_TIME = -1; //!< Constant to avoid using magic numbers.
    115115           
    116116            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
  • code/branches/presentation/src/orxonox/objects/quest/QuestHint.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file QuestHint.cc
     30    @file
    3131    @brief Implementation of the QuestHint class.
    3232*/
     
    4343#include "Quest.h"
    4444
    45 namespace orxonox {
    46 
     45namespace orxonox
     46{
    4747    CreateFactory(QuestHint);
    4848
  • code/branches/presentation/src/orxonox/objects/quest/QuestHint.h

    r2420 r2435  
    2828 
    2929/**
    30     @file QuestHint.h
     30    @file
    3131    @brief Definition of the QuestHint class.
    3232*/
     
    4343#include "QuestItem.h"
    4444
    45 namespace questHintStatus
    46 {
    47 
    48     //! The state of the hint.
    49     enum Enum
    50     {
    51         inactive,
    52         active
    53     };
    54 
    55 }
    56 
    5745namespace orxonox
    5846{
     47    namespace questHintStatus
     48    {
     49
     50        //! The state of the hint.
     51        enum Enum
     52        {
     53            inactive,
     54            active
     55        };
     56
     57    }
    5958
    6059    /**
  • code/branches/presentation/src/orxonox/objects/quest/QuestItem.cc

    r2420 r2435  
    2828 
    2929/**
    30     @file QuestItem.cc
     30    @file
    3131    @brief Implementation of the QuestItem class.
    3232*/
     
    3939#include "QuestDescription.h"
    4040
    41 namespace orxonox {
    42 
     41namespace orxonox
     42{
    4343    /**
    4444    @brief
  • code/branches/presentation/src/orxonox/objects/quest/QuestItem.h

    r2420 r2435  
    2828 
    2929/**
    30     @file QuestItem.h
     30    @file
    3131    @brief Definition of the QuestItem class.
    3232        The QuestItem is the parent class of Quest and QuestHint.
     
    4444#include "core/XMLPort.h"
    4545
    46 namespace orxonox {
    47 
    48 
     46namespace orxonox
     47{
    4948    /**
    5049    @brief
  • code/branches/presentation/src/orxonox/objects/quest/QuestListener.cc

    r2385 r2435  
    2828
    2929/**
    30     @file QuestListener.cc
     30    @file
    3131    @brief Implementation of the QuestListener class.
    3232*/
     
    4242#include "QuestManager.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    CreateFactory(QuestListener);
    4747
     
    152152        {
    153153            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
    154             this->mode_ = questListenerMode::all;
    155             return false;
     154        this->mode_ = questListenerMode::all;
     155        return false;
    156156        }
    157157       
     
    186186        {
    187187            COUT(1) << "An unforseen, never to happen, Error has occured. This is impossible!" << std::endl;
    188             return "";
     188        return "";
    189189        }
    190190    }
  • code/branches/presentation/src/orxonox/objects/quest/QuestListener.h

    r2385 r2435  
    2828
    2929/**
    30     @file QuestListener.h
     30    @file
    3131    @brief Definition of the QuestListener class.
    3232*/
     
    4444#include "Quest.h"
    4545
    46 namespace questListenerMode
     46namespace orxonox
    4747{
     48    namespace questListenerMode
     49    {
    4850
    49     //! The mode of the QuestListener.
    50     enum Enum
    51     {
    52         all,
    53         start,
    54         fail,
    55         complete
    56     };
     51        //! The mode of the QuestListener.
     52        enum Enum
     53        {
     54            all,
     55            start,
     56            fail,
     57            complete
     58        };
    5759
    58 }
    59 
    60 namespace orxonox {
     60    }
    6161
    6262    /**
     
    7575        </BaseObject>
    7676    @author
    77         Damian 'Mozork' Frick
     77    Damian 'Mozork' Frick
    7878    */
    7979    class _OrxonoxExport QuestListener : public BaseObject
    8080    {
    81         public:
    82             QuestListener(BaseObject* creator);
    83             virtual ~QuestListener();
    84            
    85             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
    86            
    87             static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
    88            
    89             bool setQuestId(const std::string & id); //!< Sets the questId of the Quest the QuestListener reacts to.
    90             bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
    91            
    92             const std::string getMode(void); //!< Get the mode of the QuestListener.
    93            
    94             /**
    95             @brief Get the questId of the Quest the QuestListener reacts to.
    96             @return Returns the questId of the Quest the QuestListener reacts to.
    97             */
    98             inline const std::string & getQuestId(void)
     81    public:
     82        QuestListener(BaseObject* creator);
     83        virtual ~QuestListener();
     84       
     85        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
     86       
     87        static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
     88       
     89        bool setQuestId(const std::string & id); //!< Sets the questId of the Quest the QuestListener reacts to.
     90        bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
     91       
     92        const std::string getMode(void); //!< Get the mode of the QuestListener.
     93       
     94        /**
     95        @brief Get the questId of the Quest the QuestListener reacts to.
     96        @return Returns the questId of the Quest the QuestListener reacts to.
     97        */
     98        inline const std::string & getQuestId(void)
    9999                { return this->quest_->getId(); }
    100            
    101             bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
    102            
    103         private:
    104             questListenerMode::Enum mode_; //!< The mode of the QuestListener.
    105             Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
     100       
     101        bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
     102       
     103    private:
     104        questListenerMode::Enum mode_; //!< The mode of the QuestListener.
     105        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
    106106   
    107107    };
  • code/branches/presentation/src/orxonox/objects/quest/QuestManager.cc

    r2420 r2435  
    2828
    2929/**
    30     @file QuestManager.cc
     30    @file
    3131    @brief Implementation of the QuestManager class.
    3232*/
     
    4141#include "QuestHint.h"
    4242
    43 namespace orxonox {
    44 
     43namespace orxonox
     44{
    4545    //! All Quests registered by their id's.
    4646    std::map<std::string, Quest*> QuestManager::questMap_s;
  • code/branches/presentation/src/orxonox/objects/quest/QuestManager.h

    r2420 r2435  
    2828
    2929/**
    30     @file QuestManager.h
     30    @file
    3131    @brief Definition of the QuestManager class.
    3232*/
     
    4242#include "core/BaseObject.h"
    4343
    44 namespace orxonox {
    45 
     44namespace orxonox
     45{
    4646    /**
    4747    @brief
  • code/branches/presentation/src/orxonox/objects/quest/Rewardable.cc

    r2420 r2435  
    2828
    2929/**
    30     @file Rewardable.cc
     30    @file
    3131    @brief Implementation of the Rewardable class.
    3232*/
     
    3737#include "core/CoreIncludes.h"
    3838
    39 namespace orxonox {
    40 
     39namespace orxonox
     40{
    4141    /**
    4242    @brief
  • code/branches/presentation/src/orxonox/objects/quest/Rewardable.h

    r2420 r2435  
    2828
    2929/**
    30     @file Rewardable.h
     30    @file
    3131    @brief Definition of the Rewardable class.
    3232*/
     
    3939#include "core/BaseObject.h"
    4040
    41 namespace orxonox {
    42 
     41namespace orxonox
     42{
    4343    /**
    4444    @brief
     
    5151    class _OrxonoxExport Rewardable : public BaseObject
    5252    {
    53 
    5453        public:
    5554            Rewardable(BaseObject* creator);
Note: See TracChangeset for help on using the changeset viewer.