Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 7:15:14 AM (14 years ago)
Author:
rgrieder
Message:

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
Location:
code/trunk/src/orxonox
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/CMakeLists.txt

    r7648 r8351  
    6868    OrxonoxPrecompiledHeaders.h
    6969  LINK_LIBRARIES
    70     ${Boost_FILESYSTEM_LIBRARY}
    71     ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
    72     ${Boost_THREAD_LIBRARY}
    73     ${Boost_DATE_TIME_LIBRARY} # Thread dependency
    7470    ${OGRE_LIBRARY}
     71    ${CEGUI}
     72    ${LUA5.1_LIBRARY}
     73    ${CEGUI_TOLUA_LIBRARY}
    7574    ${OPENAL_LIBRARY}
    7675    ${ALUT_LIBRARY}
     76    ${OGG_LIBRARY}
     77    ${VORBIS_LIBRARY}
    7778    ${VORBISFILE_LIBRARY}
    78     ${VORBIS_LIBRARY}
    79     ${OGG_LIBRARY}
    8079    tinyxml_orxonox
    81     tolua_orxonox
    8280    bullet_orxonox
    8381    util
     
    8583    network
    8684    tools
    87   SOURCE_FILES ${ORXONOX_SRC_FILES}
     85  SOURCE_FILES
     86    ${ORXONOX_SRC_FILES}
    8887)
  • code/trunk/src/orxonox/MoodManager.cc

    r7284 r8351  
    5656            COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;
    5757        }
     58       
     59        // @TODO
     60        // Creating a vector of the available moods to enable easy mood selection by Lua/CEGUI       
    5861    }
    5962
  • code/trunk/src/orxonox/OrxonoxPrereqs.h

    r8178 r8351  
    5353#    endif
    5454#  endif
    55 #elif defined ( ORXONOX_GCC_VISIBILITY )
     55#  define _OrxonoxPrivate
     56#elif defined (ORXONOX_GCC_VISIBILITY)
    5657#  define _OrxonoxExport  __attribute__ ((visibility("default")))
     58#  define _OrxonoxPrivate __attribute__ ((visibility("hidden")))
    5759#else
    5860#  define _OrxonoxExport
     61#  define _OrxonoxPrivate
    5962#endif
    6063
  • code/trunk/src/orxonox/PawnManager.cc

    r5929 r8351  
    2929#include "PawnManager.h"
    3030
     31#include "util/ScopedSingletonManager.h"
    3132#include "core/CoreIncludes.h"
    3233#include "worldentities/pawns/Pawn.h"
     
    3435namespace orxonox
    3536{
    36     PawnManager* PawnManager::singletonPtr_s = 0;
     37    ManageScopedSingleton(PawnManager, ScopeID::Root, false);
    3738
    3839    PawnManager::PawnManager()
     
    4344    PawnManager::~PawnManager()
    4445    {
     46        // Be sure to delete all the pawns
     47        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); )
     48            (it++)->destroy();
    4549    }
    4650
    47     void PawnManager::touch()
     51    void PawnManager::preUpdate(const Clock& time)
    4852    {
    49         if (!PawnManager::singletonPtr_s)
    50             new PawnManager();
    51     }
    52 
    53     void PawnManager::tick(float dt)
    54     {
    55         unsigned int count = 0;
    56         for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++count)
     53        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); )
    5754        {
    5855            if (!it->isAlive())
     
    6158                ++it;
    6259        }
    63 
    64         if (count == 0)
    65             this->destroy();
    6660    }
    6761}
  • code/trunk/src/orxonox/PawnManager.h

    r5781 r8351  
    3737namespace orxonox
    3838{
    39     class _OrxonoxExport PawnManager : protected Singleton<PawnManager>, public Tickable
     39    class _OrxonoxExport PawnManager : public Singleton<PawnManager>, public Tickable
    4040    {
    4141            friend class Singleton<PawnManager>;
    4242        public:
    43             static void touch();
     43            PawnManager();
     44            virtual ~PawnManager();
    4445
    45             virtual void tick(float dt);
     46            virtual void preUpdate(const Clock& time);
    4647
    4748        private:
    48             PawnManager();
    49             virtual ~PawnManager();
    5049
    5150            static PawnManager* singletonPtr_s;
  • code/trunk/src/orxonox/controllers/ArtificialController.cc

    r7801 r8351  
    847847                Vector3 distanceCurrent = this->targetPosition_ - this->getControllableEntity()->getPosition();
    848848                Vector3 distanceNew = it->getPosition() - this->getControllableEntity()->getPosition();
    849                 if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / (2 * math::pi))
    850                         < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * math::pi)) + rnd(-250, 250))
     849                if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / math::twoPi)
     850                        < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / math::twoPi) + rnd(-250, 250))
    851851                {
    852852                    this->target_ = (*it);
  • code/trunk/src/orxonox/controllers/NewHumanController.cc

    r8316 r8351  
    544544            if (distance > 0.04f && distance <= 0.59f * arrowsSize_ / 2.0f )
    545545            {
    546                 this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
     546                this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / math::twoPi * 360.0f));
    547547                this->arrowsOverlay1_->show();
    548548            }
    549549            else if (distance > 0.59f * arrowsSize_ / 2.0f && distance <= 0.77f * arrowsSize_ / 2.0f )
    550550            {
    551                 this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
     551                this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / math::twoPi * 360.0f));
    552552                this->arrowsOverlay2_->show();
    553553            }
    554554            else if (distance > 0.77f * arrowsSize_ / 2.0f && distance <= arrowsSize_ / 2.0f)
    555555            {
    556                 this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
     556                this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / math::twoPi * 360.0f));
    557557                this->arrowsOverlay3_->show();
    558558            }
    559559            else if (distance > arrowsSize_ / 2.0f)
    560560            {
    561                 this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
     561                this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / math::twoPi * 360.0f));
    562562                this->arrowsOverlay4_->show();
    563563            }
  • code/trunk/src/orxonox/gametypes/LastTeamStanding.cc

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/gametypes/LastTeamStanding.h

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/graphics/BlinkingBillboard.cc

    r7163 r8351  
    7979        if (this->isActive())
    8080        {
    81             this->time_ += dt;
     81            // Wrap around to avoid loosing floating point precision
     82            this->time_ = std::fmod(this->time_ + dt, 1.0f / this->frequency_);
     83            float value = sin((math::twoPi * this->time_ + this->phase_.valueRadians()) * this->frequency_);
    8284            if (this->bQuadratic_)
    83                 this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
     85                this->setScale(this->amplitude_ * square(value));
    8486            else
    85                 this->setScale(this->amplitude_ * static_cast<float>(fabs(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
     87                this->setScale(this->amplitude_ * std::abs(value));
    8688        }
    8789    }
  • code/trunk/src/orxonox/graphics/BlinkingBillboard.h

    r7163 r8351  
    7575            Degree phase_;
    7676            bool bQuadratic_;
    77             long double time_;
     77            float time_;
    7878    };
    7979}
  • code/trunk/src/orxonox/interfaces/PickupCarrier.cc

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/interfaces/PickupListener.cc

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/interfaces/PickupListener.h

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc

    r8309 r8351  
    284284            angle = -angle;
    285285        angle -= math::pi * static_cast<int>(angle / (math::pi));
    286         if (angle > math::pi * 0.5)
     286        if (angle > math::pi_2)
    287287            angle = math::pi - angle;
    288288
  • code/trunk/src/orxonox/sound/AmbientSound.cc

    r8079 r8351  
    4242
    4343        // Ambient sounds always fade in
    44         this->setVolume(0);
     44        this->setVolume(0.0f);
    4545    }
    4646
  • code/trunk/src/orxonox/sound/SoundBuffer.cc

    r6502 r8351  
    3030#include "SoundBuffer.h"
    3131
    32 #include <AL/alut.h>
     32#include <alut.h>
    3333#include <vorbis/vorbisfile.h>
    3434
  • code/trunk/src/orxonox/sound/SoundManager.cc

    r7858 r8351  
    3131#include "SoundManager.h"
    3232
    33 #include <AL/alut.h>
    3433#include <utility>
     34#include <alut.h>
    3535#include <loki/ScopeGuard.h>
    3636
     
    7373        this->bDestructorCalled_ = false;
    7474
     75        // Clear error messages (might be problematic on some systems)
     76        alGetError();
     77        alutGetError();
     78
    7579        // See whether we even want to load
    7680        bool bDisableSound_ = false;
     
    7882        if (bDisableSound_)
    7983            ThrowException(InitialisationAborted, "Sound: Not loading at all");
    80 
    8184        if (!alutInitWithoutContext(NULL, NULL))
    8285            ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
     
    107110        this->device_ = alcOpenDevice(NULL);
    108111        if (this->device_ == NULL)
    109         {
    110             COUT(1) << "Sound: Could not open sound device. Have you installed OpenAL?" << std::endl;
    111 #ifdef ORXONOX_PLATFORM_WINDOWS
    112             COUT(1) << "Sound: Just getting the DLL with the dependencies is not enough for Windows (esp. Windows 7)!" << std::endl;
    113 #endif
    114112            ThrowException(InitialisationFailed, "Sound Error: Could not open sound device.");
    115         }
    116113        Loki::ScopeGuard closeDeviceGuard = Loki::MakeGuard(&alcCloseDevice, this->device_);
    117114
     
    327324        ALenum error = alGetError();
    328325        if (error == AL_INVALID_VALUE)
     326            // @TODO: Follow this constantly appearing, nerve-racking warning
    329327            COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;
    330328    }
  • code/trunk/src/orxonox/sound/SoundManager.h

    r7858 r8351  
    7272        // tolua_begin
    7373        static SoundManager& getInstance() { return Singleton<SoundManager>::getInstance(); }
     74        static bool exists() { return Singleton<SoundManager>::exists(); }
    7475
    7576        std::string getDeviceName(unsigned int index) const
  • code/trunk/src/orxonox/sound/WorldSound.cc

    r7284 r8351  
    3030#include "WorldSound.h"
    3131
    32 #include <AL/alut.h>
     32#include <alut.h>
     33
    3334#include "util/Math.h"
    3435#include "core/CoreIncludes.h"
  • code/trunk/src/orxonox/worldentities/pawns/Pawn.cc

    r8329 r8351  
    3636#include "network/NetworkFunction.h"
    3737
    38 #include "PawnManager.h"
    3938#include "infos/PlayerInfo.h"
    4039#include "controllers/Controller.h"
     
    5958        RegisterObject(Pawn);
    6059
    61         PawnManager::touch();
    6260        this->bAlive_ = true;
    6361        this->bReload_ = false;
Note: See TracChangeset for help on using the changeset viewer.