Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2009, 8:20:07 PM (15 years ago)
Author:
rgrieder
Message:

Merged core5 branch back to the trunk.
Key features include clean level unloading and an extended XML event system.

Two important notes:
Delete your keybindings.ini files! * or you will still get parser errors when loading the key bindings.
Delete build_dir/lib/modules/libgamestates.module! * or orxonox won't start.
Best thing to do is to delete the build folder ;)

Location:
code/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/questsystem/QuestEffectBeacon.cc

    r5781 r5929  
    7575        XMLPortObject(QuestEffectBeacon, QuestEffect, "effects", addEffect, getEffect, xmlelement, mode);
    7676
     77        XMLPortEventState(QuestEffectBeacon, PlayerTrigger, "execute", execute, xmlelement, mode);
     78
    7779        COUT(3) << "New QuestEffectBeacon created." << std::endl;
    7880    }
    7981
    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);
    8987    }
    9088
  • code/trunk/src/modules/questsystem/QuestEffectBeacon.h

    r5781 r5929  
    8686
    8787            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);
    9089
    9190            bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
  • code/trunk/src/modules/questsystem/QuestGUI.cc

    r5781 r5929  
    7979       
    8080        if(this->root_ != NULL)
    81             delete this->root_;
     81            this->root_->destroy();
    8282    }
    8383
     
    146146            COUT(3) << "Clearing Node '" << *str << "' ..." << std::endl;
    147147            delete str;
    148             delete node;
     148            node->destroy();
    149149        }
    150150        this->nodes_.clear();
  • code/trunk/src/modules/questsystem/QuestManager.cc

    r5781 r5929  
    4141#include "core/ConsoleCommand.h"
    4242#include "core/LuaState.h"
     43#include "core/ScopedSingletonManager.h"
    4344#include "infos/PlayerInfo.h"
    4445#include "overlays/GUIOverlay.h"
     
    5657    //! Pointer to the current (and single) instance of this class.
    5758    /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL;
     59    ManageScopedSingleton(QuestManager, ScopeID::Root, false);
    5860
    5961    /**
     
    7678        for(std::map<PlayerInfo*, QuestGUI*>::iterator it = this->questGUIs_.begin(); it != this->questGUIs_.end(); it++)
    7779        {
    78             delete (*it).second;
     80            (*it).second->destroy();
    7981        }
    8082        this->questGUIs_.clear();
  • code/trunk/src/modules/questsystem/QuestManager.h

    r5781 r5929  
    4242#include <string>
    4343
    44 #include "util/ScopedSingleton.h"
     44#include "util/Singleton.h"
    4545#include "core/OrxonoxClass.h"
    4646
     
    5050namespace orxonox
    5151{
    52 
    53     typedef ScopedSingleton<QuestManager, ScopeID::GSLevel> ScopedSingletonQuestManagerGSLevel; // workaround for tolua
    54 
    5552    /**
    5653    @brief
     
    6057        Damian 'Mozork' Frick
    6158    */
    62     class _QuestsystemExport QuestManager : public ScopedSingletonQuestManagerGSLevel, public orxonox::OrxonoxClass
    63     {
     59    class _QuestsystemExport QuestManager
    6460// tolua_end
     61        : public Singleton<QuestManager>, public orxonox::OrxonoxClass
     62    { // tolua_export
    6563
    66             friend class ScopedSingleton<QuestManager, ScopeID::GSLevel>;
     64            friend class Singleton<QuestManager>;
    6765            friend class QuestGUI;
    6866
     
    7270
    7371            //! Returns a reference to the single instance of the Quest Manager.
    74             static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::GSLevel>::getInstance(); } // tolua_export
     72            static QuestManager& getInstance() { return Singleton<QuestManager>::getInstance(); } // tolua_export
    7573
    7674            //! Retreive the main window for the GUI.
  • code/trunk/src/modules/questsystem/QuestsystemPrecompiledHeaders.h

    r5781 r5929  
    5151#include <OgreColourValue.h> // 16
    5252
    53 #include <tinyxml/ticpp.h>        // 14
    54 #include "util/ScopedSingleton.h" // 13
     53#include <tinyxml/ticpp.h>   // 14
     54#include "util/Singleton.h" // 13
    5555
    5656///////////////////////////////////////////
  • code/trunk/src/modules/questsystem/QuestsystemPrereqs.h

    r5781 r5929  
    2828
    2929/**
    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
    3233*/
    3334
     
    3637
    3738#include "OrxonoxConfig.h"
    38 
    3939#include "OrxonoxPrereqs.h"
    4040
     
    4242// Shared library settings
    4343//-----------------------------------------------------------------------
     44
    4445#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
    4546#  ifdef QUESTSYSTEM_SHARED_BUILD
     
    7677    class QuestEffect;
    7778    class QuestEffectBeacon;
     79    class QuestGUI;
    7880    class QuestGUINode;
    79     class QuestGUI;
    8081    class QuestHint;
    8182    class QuestItem;
     
    8384    class QuestManager;
    8485    class QuestNotification;
    85     class Rewardable;
    8686
     87    // notifications
    8788    class Notification;
    88     class NotificationListener;
    8989    class NotificationManager;
    9090    class NotificationOverlay;
  • code/trunk/src/modules/questsystem/notifications/NotificationManager.cc

    r5781 r5929  
    3737
    3838#include "core/CoreIncludes.h"
     39#include "core/ScopedSingletonManager.h"
    3940#include "Notification.h"
    4041#include "interfaces/NotificationListener.h"
     
    4748
    4849    NotificationManager* NotificationManager::singletonPtr_s = NULL;
     50    ManageScopedSingleton(NotificationManager, ScopeID::Root, false);
    4951
    5052    /**
  • code/trunk/src/modules/questsystem/notifications/NotificationManager.h

    r5781 r5929  
    4141#include <string>
    4242
    43 #include "util/ScopedSingleton.h"
     43#include "util/Singleton.h"
    4444#include "core/OrxonoxClass.h"
    4545
    4646namespace orxonox
    4747{
    48 
    4948    /**
    5049    @brief
     
    5453        Damian 'Mozork' Frick
    5554    */
    56     class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::GSLevel>, public OrxonoxClass
     55    class _QuestsystemExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
    5756    {
    58             friend class ScopedSingleton<NotificationManager, ScopeID::GSLevel>;
     57            friend class Singleton<NotificationManager>;
    5958        public:
    6059            NotificationManager();
  • code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc

    r5781 r5929  
    426426        this->containers_.erase(container);
    427427        this->overlays_.erase(container->notification);
    428         delete container->overlay;
     428        container->overlay->destroy();
    429429        delete container;
    430430        this->size_= this->size_-1;
Note: See TracChangeset for help on using the changeset viewer.