Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/pickup/BaseItem.h

    r3196 r3370  
    5151            Daniel 'Huty' Haggenmueller
    5252    */
    53     class _OrxonoxExport BaseItem
    54 // tolua_end
    55         : public BaseObject
    56 // tolua_begin
     53    class _OrxonoxExport BaseItem : public BaseObject
    5754    {
    5855// tolua_end
  • code/trunk/src/orxonox/objects/pickup/PickupInventory.cc

    r3327 r3370  
    3737
    3838#include "core/ConsoleCommand.h"
     39#include "core/GUIManager.h"
    3940#include "core/input/InputManager.h"
    40 #include "gui/GUIManager.h"
    4141#include "objects/controllers/HumanController.h"
    4242#include "objects/worldentities/pawns/Pawn.h"
  • code/trunk/src/orxonox/objects/pickup/PickupInventory.h

    r3196 r3370  
    4343namespace orxonox
    4444{
    45 // tolua_end
    4645    /**
    4746        @brief Static class for the inventory GUI window.
    4847        @author Daniel 'Huty' Haggenmueller
    4948    */
    50 // tolua_begin
    5149    class _OrxonoxExport PickupInventory
    5250    {
  • code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc

    r3325 r3370  
    3737
    3838#include "core/CoreIncludes.h"
     39#include "core/GUIManager.h"     // HACK; see below
    3940#include "core/Template.h"
    4041#include "core/XMLPort.h"
    41 #include "gui/GUIManager.h"     // HACK; see below
    4242#include "objects/worldentities/pawns/Pawn.h"
    4343#include "PickupInventory.h"    // HACK; Only for hack, remove later
  • code/trunk/src/orxonox/objects/quest/QuestDescription.h

    r3196 r3370  
    5454        Damian 'Mozork' Frick
    5555    */
    56     class _OrxonoxExport QuestDescription
     56    class _OrxonoxExport QuestDescription : public BaseObject
     57    {
    5758// tolua_end
    58         : public BaseObject
    59     { // tolua_export
    6059        public:
    6160            QuestDescription(BaseObject* creator);
  • code/trunk/src/orxonox/objects/quest/QuestListener.cc

    r3280 r3370  
    8181    /**
    8282    @brief
    83         Makes all QuestListener in the list aware that a certain status change has occured and executes them if the status change affects them.
     83        Makes all QuestListener in the list aware that a certain status change has occurred and executes them if the status change affects them.
    8484    @param listeners
    8585        The list of QuestListeners that have to be made aware of the status change.
     
    182182        else
    183183        {
    184             COUT(1) << "An unforseen, never to happen, Error has occured. This is impossible!" << std::endl;
     184            COUT(1) << "An unforseen, never to happen, Error has occurred. This is impossible!" << std::endl;
    185185        return "";
    186186        }
  • code/trunk/src/orxonox/objects/quest/QuestManager.cc

    r3325 r3370  
    3636#include "util/Exception.h"
    3737#include "core/CoreIncludes.h"
    38 #include "gui/GUIManager.h"
    3938
    4039#include "objects/infos/PlayerInfo.h"
     
    4847{
    4948    //! Pointer to the current (and single) instance of this class.
    50     /*static*/ QuestManager* QuestManager::singletonRef_s = NULL;
     49    /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL;
    5150
    5251    /**
     
    5958    {
    6059        RegisterRootObject(QuestManager);
    61 
    62         assert(singletonRef_s == 0);
    63         singletonRef_s = this;
    6460    }
    6561
     
    7167    {
    7268
    73     }
    74 
    75     /**
    76     @brief
    77         Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.
    78     @return
    79         Returns a reference to the single instance of the Quest Manager.
    80     */
    81     /*static*/ QuestManager & QuestManager::getInstance()
    82     {
    83         assert(singletonRef_s);
    84         return *singletonRef_s;
    8569    }
    8670
     
    225209    QuestContainer* QuestManager::getQuestTree(std::string & name)
    226210    {
    227         GUIOverlay* gui = GUIManager::getInstance().getOverlay(name);
     211        GUIOverlay* gui = NULL;
     212        for (ObjectList<GUIOverlay>::iterator it = ObjectList<GUIOverlay>::begin(); it != ObjectList<GUIOverlay>::end(); ++it)
     213            if (it->getGUIName() == name)
     214                gui = *it;
    228215
    229216        PlayerInfo* player;
     
    321308        {
    322309            container->status = "";
    323             COUT(1) << "An error occured. A Quest of un-specified status wanted to be displayed." << std::endl;
     310            COUT(1) << "An error occurred. A Quest of un-specified status wanted to be displayed." << std::endl;
    324311        }
    325312       
  • code/trunk/src/orxonox/objects/quest/QuestManager.h

    r3196 r3370  
    4040#include <map>
    4141#include <string>
     42
     43#include "util/Singleton.h"
    4244#include "core/OrxonoxClass.h"
    4345
     
    7173        Damian 'Mozork' Frick
    7274    */
    73     class _OrxonoxExport QuestManager
    74 // tolua_end
    75         : public OrxonoxClass
    76 // tolua_begin
     75    class _OrxonoxExport QuestManager : public Singleton<QuestManager>, public orxonox::OrxonoxClass
    7776    {
    7877// tolua_end
     78            friend class Singleton<QuestManager>;
    7979        public:
    8080            QuestManager();
    8181            virtual ~QuestManager();
    8282
    83             static QuestManager& getInstance(); // tolua_export //!< Returns a reference to the single instance of the Quest Manager.
     83            //! Returns a reference to the single instance of the Quest Manager.
     84            static QuestManager& getInstance() { return Singleton<QuestManager>::getInstance(); } // tolua_export
    8485
    8586            bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager.
     
    9293
    9394        private:
    94             static QuestManager* singletonRef_s;
     95            static QuestManager* singletonPtr_s;
    9596
    9697            std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
Note: See TracChangeset for help on using the changeset viewer.