Changeset 5929 for code/trunk/src/modules/questsystem
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/modules/questsystem/QuestEffectBeacon.cc
r5781 r5929 75 75 XMLPortObject(QuestEffectBeacon, QuestEffect, "effects", addEffect, getEffect, xmlelement, mode); 76 76 77 XMLPortEventState(QuestEffectBeacon, PlayerTrigger, "execute", execute, xmlelement, mode); 78 77 79 COUT(3) << "New QuestEffectBeacon created." << std::endl; 78 80 } 79 81 80 /** 81 @brief 82 Processes an event for this QuestEffectBeacon. 83 */ 84 void QuestEffectBeacon::processEvent(Event& event) 85 { 86 SUPER(QuestEffectBeacon, processEvent, event); 87 88 ORXONOX_SET_SUBCLASS_EVENT(QuestEffectBeacon, "execute", execute, event, PlayerTrigger); 82 void QuestEffectBeacon::XMLEventPort(Element& xmlelement, XMLPort::Mode mode) 83 { 84 SUPER(QuestEffectBeacon, XMLEventPort, xmlelement, mode); 85 86 XMLPortEventState(QuestEffectBeacon, PlayerTrigger, "execute", execute, xmlelement, mode); 89 87 } 90 88 -
code/trunk/src/modules/questsystem/QuestEffectBeacon.h
r5781 r5929 86 86 87 87 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML. 88 89 virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon. 88 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 90 89 91 90 bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon. -
code/trunk/src/modules/questsystem/QuestGUI.cc
r5781 r5929 79 79 80 80 if(this->root_ != NULL) 81 delete this->root_;81 this->root_->destroy(); 82 82 } 83 83 … … 146 146 COUT(3) << "Clearing Node '" << *str << "' ..." << std::endl; 147 147 delete str; 148 delete node;148 node->destroy(); 149 149 } 150 150 this->nodes_.clear(); -
code/trunk/src/modules/questsystem/QuestManager.cc
r5781 r5929 41 41 #include "core/ConsoleCommand.h" 42 42 #include "core/LuaState.h" 43 #include "core/ScopedSingletonManager.h" 43 44 #include "infos/PlayerInfo.h" 44 45 #include "overlays/GUIOverlay.h" … … 56 57 //! Pointer to the current (and single) instance of this class. 57 58 /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL; 59 ManageScopedSingleton(QuestManager, ScopeID::Root, false); 58 60 59 61 /** … … 76 78 for(std::map<PlayerInfo*, QuestGUI*>::iterator it = this->questGUIs_.begin(); it != this->questGUIs_.end(); it++) 77 79 { 78 delete (*it).second;80 (*it).second->destroy(); 79 81 } 80 82 this->questGUIs_.clear(); -
code/trunk/src/modules/questsystem/QuestManager.h
r5781 r5929 42 42 #include <string> 43 43 44 #include "util/S copedSingleton.h"44 #include "util/Singleton.h" 45 45 #include "core/OrxonoxClass.h" 46 46 … … 50 50 namespace orxonox 51 51 { 52 53 typedef ScopedSingleton<QuestManager, ScopeID::GSLevel> ScopedSingletonQuestManagerGSLevel; // workaround for tolua54 55 52 /** 56 53 @brief … … 60 57 Damian 'Mozork' Frick 61 58 */ 62 class _QuestsystemExport QuestManager : public ScopedSingletonQuestManagerGSLevel, public orxonox::OrxonoxClass 63 { 59 class _QuestsystemExport QuestManager 64 60 // tolua_end 61 : public Singleton<QuestManager>, public orxonox::OrxonoxClass 62 { // tolua_export 65 63 66 friend class S copedSingleton<QuestManager, ScopeID::GSLevel>;64 friend class Singleton<QuestManager>; 67 65 friend class QuestGUI; 68 66 … … 72 70 73 71 //! Returns a reference to the single instance of the Quest Manager. 74 static QuestManager& getInstance() { return S copedSingleton<QuestManager, ScopeID::GSLevel>::getInstance(); } // tolua_export72 static QuestManager& getInstance() { return Singleton<QuestManager>::getInstance(); } // tolua_export 75 73 76 74 //! Retreive the main window for the GUI. -
code/trunk/src/modules/questsystem/QuestsystemPrecompiledHeaders.h
r5781 r5929 51 51 #include <OgreColourValue.h> // 16 52 52 53 #include <tinyxml/ticpp.h> 54 #include "util/S copedSingleton.h"// 1353 #include <tinyxml/ticpp.h> // 14 54 #include "util/Singleton.h" // 13 55 55 56 56 /////////////////////////////////////////// -
code/trunk/src/modules/questsystem/QuestsystemPrereqs.h
r5781 r5929 28 28 29 29 /** 30 @file 31 @brief Contains all the necessary forward declarations for all classes and structs. 30 @file 31 @brief 32 Shared library macros, enums, constants and forward declarations for the questsystem module 32 33 */ 33 34 … … 36 37 37 38 #include "OrxonoxConfig.h" 38 39 39 #include "OrxonoxPrereqs.h" 40 40 … … 42 42 // Shared library settings 43 43 //----------------------------------------------------------------------- 44 44 45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD) 45 46 # ifdef QUESTSYSTEM_SHARED_BUILD … … 76 77 class QuestEffect; 77 78 class QuestEffectBeacon; 79 class QuestGUI; 78 80 class QuestGUINode; 79 class QuestGUI;80 81 class QuestHint; 81 82 class QuestItem; … … 83 84 class QuestManager; 84 85 class QuestNotification; 85 class Rewardable;86 86 87 // notifications 87 88 class Notification; 88 class NotificationListener;89 89 class NotificationManager; 90 90 class NotificationOverlay; -
code/trunk/src/modules/questsystem/notifications/NotificationManager.cc
r5781 r5929 37 37 38 38 #include "core/CoreIncludes.h" 39 #include "core/ScopedSingletonManager.h" 39 40 #include "Notification.h" 40 41 #include "interfaces/NotificationListener.h" … … 47 48 48 49 NotificationManager* NotificationManager::singletonPtr_s = NULL; 50 ManageScopedSingleton(NotificationManager, ScopeID::Root, false); 49 51 50 52 /** -
code/trunk/src/modules/questsystem/notifications/NotificationManager.h
r5781 r5929 41 41 #include <string> 42 42 43 #include "util/S copedSingleton.h"43 #include "util/Singleton.h" 44 44 #include "core/OrxonoxClass.h" 45 45 46 46 namespace orxonox 47 47 { 48 49 48 /** 50 49 @brief … … 54 53 Damian 'Mozork' Frick 55 54 */ 56 class _QuestsystemExport NotificationManager : public S copedSingleton<NotificationManager, ScopeID::GSLevel>, public OrxonoxClass55 class _QuestsystemExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass 57 56 { 58 friend class S copedSingleton<NotificationManager, ScopeID::GSLevel>;57 friend class Singleton<NotificationManager>; 59 58 public: 60 59 NotificationManager(); -
code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc
r5781 r5929 426 426 this->containers_.erase(container); 427 427 this->overlays_.erase(container->notification); 428 delete container->overlay;428 container->overlay->destroy(); 429 429 delete container; 430 430 this->size_= this->size_-1;
Note: See TracChangeset
for help on using the changeset viewer.