A few fixes to build on Windows

pull/51/head
Alexander "Ace" Olofsson 11 years ago
parent 51652047d0
commit 22a5f7198f

@ -5,8 +5,9 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#ifndef _WIN32
#include <libunshield.h> #include <libunshield.h>
#endif
class UnshieldThread : public QThread class UnshieldThread : public QThread
{ {
@ -33,7 +34,9 @@ class UnshieldThread : public QThread
private: private:
void extract_cab(const boost::filesystem::path& cab, const boost::filesystem::path& output_dir, bool extract_ini = false); void extract_cab(const boost::filesystem::path& cab, const boost::filesystem::path& output_dir, bool extract_ini = false);
#ifndef _WIN32
bool extract_file(Unshield* unshield, boost::filesystem::path output_dir, const char* prefix, int index); bool extract_file(Unshield* unshield, boost::filesystem::path output_dir, const char* prefix, int index);
#endif
boost::filesystem::path mMorrowindPath; boost::filesystem::path mMorrowindPath;
boost::filesystem::path mTribunalPath; boost::filesystem::path mTribunalPath;

@ -6,9 +6,11 @@
#include "ref.hpp" #include "ref.hpp"
#include "cell.hpp" #include "cell.hpp"
/*
CSMWorld::RefCollection::RefCollection (Collection<Cell>& cells) CSMWorld::RefCollection::RefCollection (Collection<Cell>& cells)
: mCells (cells), mNextId (0) : mCells (cells), mNextId (0)
{} {}
*/
void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool base) void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool base)
{ {

@ -17,7 +17,9 @@ namespace CSMWorld
public: public:
RefCollection (Collection<Cell>& cells); RefCollection (Collection<Cell>& cells)
: mCells (cells), mNextId (0)
{}
void load (ESM::ESMReader& reader, int cellIndex, bool base); void load (ESM::ESMReader& reader, int cellIndex, bool base);
///< Load a sequence of references. ///< Load a sequence of references.

@ -1,12 +1,12 @@
#include "lights.hpp" #include "lights.hpp"
#include <OgreLight.h> #include <OgreLight.h>
#include <OgreMath.h>
namespace OEngine { namespace OEngine {
namespace Render { namespace Render {
/*
LightFunction::LightFunction(LightType type) LightFunction::LightFunction(LightType type)
: ControllerFunction<Ogre::Real>(true) : ControllerFunction<Ogre::Real>(true)
, mType(type) , mType(type)
@ -14,7 +14,7 @@ LightFunction::LightFunction(LightType type)
, mDirection(1.0f) , mDirection(1.0f)
{ {
} }
*/
Ogre::Real LightFunction::pulseAmplitude(Ogre::Real time) Ogre::Real LightFunction::pulseAmplitude(Ogre::Real time)
{ {
return std::sin(time); return std::sin(time);
@ -97,13 +97,13 @@ Ogre::Real LightFunction::calculate(Ogre::Real value)
return brightness; return brightness;
} }
/*
LightValue::LightValue(Ogre::Light *light, const Ogre::ColourValue &color) LightValue::LightValue(Ogre::Light *light, const Ogre::ColourValue &color)
: mTarget(light) : mTarget(light)
, mColor(color) , mColor(color)
{ {
} }
*/
Ogre::Real LightValue::getValue() const Ogre::Real LightValue::getValue() const
{ {
return 0.0f; return 0.0f;

@ -3,6 +3,7 @@
#include <OgreController.h> #include <OgreController.h>
#include <OgreColourValue.h> #include <OgreColourValue.h>
#include <OgreMath.h>
/* /*
* Controller classes to handle pulsing and flicker lights * Controller classes to handle pulsing and flicker lights
@ -30,7 +31,13 @@ namespace Render {
static Ogre::Real flickerFrequency(Ogre::Real phase); static Ogre::Real flickerFrequency(Ogre::Real phase);
public: public:
LightFunction(LightType type); LightFunction(LightType type)
: ControllerFunction<Ogre::Real>(true)
, mType(type)
, mPhase(Ogre::Math::RangeRandom(-500.0f, +500.0f))
, mDirection(1.0f)
{
}
virtual Ogre::Real calculate(Ogre::Real value); virtual Ogre::Real calculate(Ogre::Real value);
}; };
@ -40,7 +47,11 @@ namespace Render {
Ogre::ColourValue mColor; Ogre::ColourValue mColor;
public: public:
LightValue(Ogre::Light *light, const Ogre::ColourValue &color); LightValue(Ogre::Light *light, const Ogre::ColourValue &color)
: mTarget(light)
, mColor(color)
{
}
virtual Ogre::Real getValue() const; virtual Ogre::Real getValue() const;
virtual void setValue(Ogre::Real value); virtual void setValue(Ogre::Real value);

Loading…
Cancel
Save