Changeset 3370 for code/trunk/src/orxonox/objects/quest
- Timestamp:
- Jul 30, 2009, 2:10:44 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource (added) merged: 3328,3336-3340,3342-3350,3352-3366
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/quest/QuestDescription.h
r3196 r3370 54 54 Damian 'Mozork' Frick 55 55 */ 56 class _OrxonoxExport QuestDescription 56 class _OrxonoxExport QuestDescription : public BaseObject 57 { 57 58 // tolua_end 58 : public BaseObject59 { // tolua_export60 59 public: 61 60 QuestDescription(BaseObject* creator); -
code/trunk/src/orxonox/objects/quest/QuestListener.cc
r3280 r3370 81 81 /** 82 82 @brief 83 Makes all QuestListener in the list aware that a certain status change has occur ed 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. 84 84 @param listeners 85 85 The list of QuestListeners that have to be made aware of the status change. … … 182 182 else 183 183 { 184 COUT(1) << "An unforseen, never to happen, Error has occur ed. This is impossible!" << std::endl;184 COUT(1) << "An unforseen, never to happen, Error has occurred. This is impossible!" << std::endl; 185 185 return ""; 186 186 } -
code/trunk/src/orxonox/objects/quest/QuestManager.cc
r3325 r3370 36 36 #include "util/Exception.h" 37 37 #include "core/CoreIncludes.h" 38 #include "gui/GUIManager.h"39 38 40 39 #include "objects/infos/PlayerInfo.h" … … 48 47 { 49 48 //! Pointer to the current (and single) instance of this class. 50 /*static*/ QuestManager* QuestManager::singleton Ref_s = NULL;49 /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL; 51 50 52 51 /** … … 59 58 { 60 59 RegisterRootObject(QuestManager); 61 62 assert(singletonRef_s == 0);63 singletonRef_s = this;64 60 } 65 61 … … 71 67 { 72 68 73 }74 75 /**76 @brief77 Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.78 @return79 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;85 69 } 86 70 … … 225 209 QuestContainer* QuestManager::getQuestTree(std::string & name) 226 210 { 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; 228 215 229 216 PlayerInfo* player; … … 321 308 { 322 309 container->status = ""; 323 COUT(1) << "An error occur ed. 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; 324 311 } 325 312 -
code/trunk/src/orxonox/objects/quest/QuestManager.h
r3196 r3370 40 40 #include <map> 41 41 #include <string> 42 43 #include "util/Singleton.h" 42 44 #include "core/OrxonoxClass.h" 43 45 … … 71 73 Damian 'Mozork' Frick 72 74 */ 73 class _OrxonoxExport QuestManager 74 // tolua_end 75 : public OrxonoxClass 76 // tolua_begin 75 class _OrxonoxExport QuestManager : public Singleton<QuestManager>, public orxonox::OrxonoxClass 77 76 { 78 77 // tolua_end 78 friend class Singleton<QuestManager>; 79 79 public: 80 80 QuestManager(); 81 81 virtual ~QuestManager(); 82 82 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 84 85 85 86 bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager. … … 92 93 93 94 private: 94 static QuestManager* singleton Ref_s;95 static QuestManager* singletonPtr_s; 95 96 96 97 std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
Note: See TracChangeset
for help on using the changeset viewer.