Changed: #878 Fix typos in comments/code
This commit is contained in:
parent
356801b090
commit
aebd540041
150 changed files with 1322 additions and 1331 deletions
|
@ -69,7 +69,7 @@ struct IOcclusionQuery;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/// A Graphic Mode descriptor.
|
/// A Graphic Mode descriptor.
|
||||||
struct GfxMode
|
struct GfxMode
|
||||||
{
|
{
|
||||||
|
@ -94,17 +94,17 @@ struct GfxMode
|
||||||
GfxMode(uint16 w, uint16 h, uint8 d, bool windowed = true, bool offscreen = false, uint frequency = 0, sint8 aa = -1);
|
GfxMode(uint16 w, uint16 h, uint8 d, bool windowed = true, bool offscreen = false, uint frequency = 0, sint8 aa = -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
// Exceptions.
|
// Exceptions.
|
||||||
struct EBadDisplay : public NLMISC::Exception
|
struct EBadDisplay : public NLMISC::Exception
|
||||||
{
|
{
|
||||||
EBadDisplay(const std::string &reason) : Exception(reason) { }
|
EBadDisplay(const std::string &reason) : Exception(reason) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
typedef void (*emptyProc)(void);
|
typedef void (*emptyProc)(void);
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
// *** IMPORTANT ********************
|
// *** IMPORTANT ********************
|
||||||
// *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL
|
// *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL
|
||||||
// **********************************
|
// **********************************
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* Startup initialisation.
|
* Startup initialisation.
|
||||||
* \author Cyril Corvazier
|
* \author Cyril Corvazier
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* ULandscape Implementation
|
* ULandscape Implementation
|
||||||
* \author Lionel Berenguier
|
* \author Lionel Berenguier
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
// the pass that is applied on particles
|
// the pass that is applied on particles
|
||||||
enum TPass { Anim, SolidRender, BlendRender, ToolRender };
|
enum TPass { Anim, SolidRender, BlendRender, ToolRender };
|
||||||
public:
|
public:
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Object
|
///\name Object
|
||||||
//@{
|
//@{
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
// CParticleSystem *clone(CPSCopyHelper *ch = NULL) ;
|
// CParticleSystem *clone(CPSCopyHelper *ch = NULL) ;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Sharing system
|
///\name Sharing system
|
||||||
//@{
|
//@{
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
bool isSharingEnabled() const { return _Sharing; }
|
bool isSharingEnabled() const { return _Sharing; }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Driver setup
|
///\name Driver setup
|
||||||
//@{
|
//@{
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
/// return the driver that will be used for rendering
|
/// return the driver that will be used for rendering
|
||||||
IDriver *getDriver(void) { return _Driver; }
|
IDriver *getDriver(void) { return _Driver; }
|
||||||
//@}
|
//@}
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Scene setup
|
///\name Scene setup
|
||||||
//@{
|
//@{
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
CScene *getScene() const { return _Scene; }
|
CScene *getScene() const { return _Scene; }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Position of the system
|
///\name Position of the system
|
||||||
//@{
|
//@{
|
||||||
|
@ -209,7 +209,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Execution of the system
|
///\name Execution of the system
|
||||||
//@{
|
//@{
|
||||||
|
@ -228,7 +228,7 @@ public:
|
||||||
/// used for benchs. must be reset by the user
|
/// used for benchs. must be reset by the user
|
||||||
static uint32 NbParticlesDrawn;
|
static uint32 NbParticlesDrawn;
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
/**\name Process attachment. Most process are located : set of objects of the same type that have a position
|
/**\name Process attachment. Most process are located : set of objects of the same type that have a position
|
||||||
* in space
|
* in space
|
||||||
|
@ -287,7 +287,7 @@ public:
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Date / Time
|
///\name Date / Time
|
||||||
//@{
|
//@{
|
||||||
|
@ -309,7 +309,7 @@ public:
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
/**\name User parameters. They may be or not used by the system. Their meaning is defined during the construction
|
/**\name User parameters. They may be or not used by the system. Their meaning is defined during the construction
|
||||||
* of the system
|
* of the system
|
||||||
|
@ -377,7 +377,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Edition methods : provides some tools for an external editor
|
///\name Edition methods : provides some tools for an external editor
|
||||||
// @{
|
// @{
|
||||||
|
@ -430,7 +430,7 @@ public:
|
||||||
/// Get the name of the system.
|
/// Get the name of the system.
|
||||||
std::string getName(void) const { return _Name; }
|
std::string getName(void) const { return _Name; }
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Transparency / opacity
|
///\name Transparency / opacity
|
||||||
// @{
|
// @{
|
||||||
|
@ -441,7 +441,7 @@ public:
|
||||||
bool hasTransparentObjects(void) const;
|
bool hasTransparentObjects(void) const;
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Lighting
|
///\name Lighting
|
||||||
// @{
|
// @{
|
||||||
|
@ -449,7 +449,7 @@ public:
|
||||||
bool hasLightableObjects() const;
|
bool hasLightableObjects() const;
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Integration parameters
|
///\name Integration parameters
|
||||||
// @{
|
// @{
|
||||||
|
@ -546,7 +546,7 @@ public:
|
||||||
|
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
/**\name LOD managment. LOD, when used can be performed in 2 ways :
|
/**\name LOD managment. LOD, when used can be performed in 2 ways :
|
||||||
* - Hand tuned LOD (for emission, color, size : this uses LOD as an input for attribute makers).
|
* - Hand tuned LOD (for emission, color, size : this uses LOD as an input for attribute makers).
|
||||||
|
@ -680,7 +680,7 @@ public:
|
||||||
NLMISC::CRGBA getLightingColor() const { return _LightingColor; }
|
NLMISC::CRGBA getLightingColor() const { return _LightingColor; }
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
// \name Load balancing
|
// \name Load balancing
|
||||||
// @{
|
// @{
|
||||||
|
@ -702,7 +702,7 @@ public:
|
||||||
void enableLoadBalancing(bool enabled = true);
|
void enableLoadBalancing(bool enabled = true);
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Bounding box managment
|
///\name Bounding box managment
|
||||||
// @{
|
// @{
|
||||||
|
@ -741,7 +741,7 @@ public:
|
||||||
void getLastComputedBBox(NLMISC::CAABBox &dest) { dest = _PreComputedBBox; }
|
void getLastComputedBBox(NLMISC::CAABBox &dest) { dest = _PreComputedBBox; }
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
|
|
||||||
///\name Invalidity flags (no direct effect, just indications for a third party, a model holding the system for example)
|
///\name Invalidity flags (no direct effect, just indications for a third party, a model holding the system for example)
|
||||||
// @{
|
// @{
|
||||||
|
@ -929,7 +929,7 @@ public:
|
||||||
|
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
///\name sound managment
|
///\name sound managment
|
||||||
// @{
|
// @{
|
||||||
/// register a Sound server to this system. All systems share the same sound server.
|
/// register a Sound server to this system. All systems share the same sound server.
|
||||||
|
@ -950,7 +950,7 @@ public:
|
||||||
|
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
///\name external access to locatedBindable. PRIVATE PART (to avoid the use of friend)
|
///\name external access to locatedBindable. PRIVATE PART (to avoid the use of friend)
|
||||||
// @{
|
// @{
|
||||||
/** register a locatedBindable, and allow it to be referenced by the given ID
|
/** register a locatedBindable, and allow it to be referenced by the given ID
|
||||||
|
@ -963,7 +963,7 @@ public:
|
||||||
void unregisterLocatedBindableExternID(CPSLocatedBindable *lb);
|
void unregisterLocatedBindableExternID(CPSLocatedBindable *lb);
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
///\name external access to locatedBindable. PUBLIC PART
|
///\name external access to locatedBindable. PUBLIC PART
|
||||||
// @{
|
// @{
|
||||||
/// return the number the number of located bindable bound with this ID
|
/// return the number the number of located bindable bound with this ID
|
||||||
|
@ -983,7 +983,7 @@ public:
|
||||||
void getIDs(std::vector<uint32> &dest) const;
|
void getIDs(std::vector<uint32> &dest) const;
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
///\name Misc. options / functions
|
///\name Misc. options / functions
|
||||||
// @{
|
// @{
|
||||||
/** When using an emitter, it is allowed to have a period of '0'. This special value means that the emitter
|
/** When using an emitter, it is allowed to have a period of '0'. This special value means that the emitter
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* A Primitive counter.
|
* A Primitive counter.
|
||||||
* \author Lionel Berenguier
|
* \author Lionel Berenguier
|
||||||
|
|
|
@ -107,13 +107,13 @@ inline NLMISC::CRGBA PSBinOpSubtract(NLMISC::CRGBA t1, NLMISC::CRGBA t2)
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CPSAttribMakerBinOp specializations to return the correct min/max value //
|
// CPSAttribMakerBinOp specializations to return the correct min/max value //
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//*************************************************************************************************************
|
// *************************************************************************************************************
|
||||||
/** template specialization implementations
|
/** template specialization implementations
|
||||||
* They're useful to get the correct min / max values depending on the type
|
* They're useful to get the correct min / max values depending on the type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline uint32 CPSAttribMakerBinOp<uint32>::getMinValue(void) const
|
inline uint32 CPSAttribMakerBinOp<uint32>::getMinValue(void) const
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ inline uint32 CPSAttribMakerBinOp<uint32>::getMinValue(void) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline uint32 CPSAttribMakerBinOp<uint32>::getMaxValue(void) const
|
inline uint32 CPSAttribMakerBinOp<uint32>::getMaxValue(void) const
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@ inline uint32 CPSAttribMakerBinOp<uint32>::getMaxValue(void) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline sint32 CPSAttribMakerBinOp<sint32>::getMinValue(void) const
|
inline sint32 CPSAttribMakerBinOp<sint32>::getMinValue(void) const
|
||||||
{
|
{
|
||||||
|
@ -190,7 +190,7 @@ inline sint32 CPSAttribMakerBinOp<sint32>::getMinValue(void) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline sint32 CPSAttribMakerBinOp<sint32>::getMaxValue(void) const
|
inline sint32 CPSAttribMakerBinOp<sint32>::getMaxValue(void) const
|
||||||
{
|
{
|
||||||
|
@ -217,7 +217,7 @@ inline sint32 CPSAttribMakerBinOp<sint32>::getMaxValue(void) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline float CPSAttribMakerBinOp<float>::getMinValue(void) const
|
inline float CPSAttribMakerBinOp<float>::getMinValue(void) const
|
||||||
{
|
{
|
||||||
|
@ -244,7 +244,7 @@ inline float CPSAttribMakerBinOp<float>::getMinValue(void) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
template <>
|
template <>
|
||||||
inline float CPSAttribMakerBinOp<float>::getMaxValue(void) const
|
inline float CPSAttribMakerBinOp<float>::getMaxValue(void) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -700,9 +700,9 @@ public:
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -953,9 +953,9 @@ inline bool operator<(const CPSLocatedBindable &lhs, const CPSLocatedBindable &r
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
//******************************************************************************************
|
// ******************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
/** This class is a located bindable that can focus on several target
|
/** This class is a located bindable that can focus on several target
|
||||||
|
@ -1030,7 +1030,7 @@ protected:
|
||||||
// INLINES //
|
// INLINES //
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
inline const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CPSLocated *A,const CPSLocated *B)
|
inline const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CPSLocated *A,const CPSLocated *B)
|
||||||
{
|
{
|
||||||
nlassert(A);
|
nlassert(A);
|
||||||
|
@ -1041,7 +1041,7 @@ inline const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CPSLocated *
|
||||||
return getConversionMatrix(*ps, A->getMatrixMode(), B->getMatrixMode());
|
return getConversionMatrix(*ps, A->getMatrixMode(), B->getMatrixMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
inline TAnimationTime CPSLocated::getAgeInSeconds(uint elementIndex) const
|
inline TAnimationTime CPSLocated::getAgeInSeconds(uint elementIndex) const
|
||||||
{
|
{
|
||||||
nlassert(elementIndex < _Size);
|
nlassert(elementIndex < _Size);
|
||||||
|
@ -1050,14 +1050,14 @@ inline TAnimationTime CPSLocated::getAgeInSeconds(uint elementIndex) const
|
||||||
return _Time[elementIndex] * _InitialLife;
|
return _Time[elementIndex] * _InitialLife;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
inline void CPSLocated::computeParametricPos(float date, uint indexInLocated, NLMISC::CVector &dest) const
|
inline void CPSLocated::computeParametricPos(float date, uint indexInLocated, NLMISC::CVector &dest) const
|
||||||
{
|
{
|
||||||
integrateSingle(date, 1.f, 1, indexInLocated, &dest);
|
integrateSingle(date, 1.f, 1, indexInLocated, &dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
inline const NLMISC::CMatrix &CPSLocatedBindable::getLocalToWorldMatrix() const
|
inline const NLMISC::CMatrix &CPSLocatedBindable::getLocalToWorldMatrix() const
|
||||||
{
|
{
|
||||||
nlassert(_Owner);
|
nlassert(_Owner);
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* This global function register all Serialisable Polymorphic 3D classes.
|
* This global function register all Serialisable Polymorphic 3D classes.
|
||||||
* \author Lionel Berenguier
|
* \author Lionel Berenguier
|
||||||
|
|
|
@ -39,7 +39,7 @@ using NLMISC::CBitmap;
|
||||||
class IDriver;
|
class IDriver;
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
||||||
// List typedef.
|
// List typedef.
|
||||||
class ITextureDrvInfos;
|
class ITextureDrvInfos;
|
||||||
|
@ -89,7 +89,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* Interface for textures
|
* Interface for textures
|
||||||
*
|
*
|
||||||
|
@ -405,7 +405,7 @@ public:
|
||||||
// get the texture category
|
// get the texture category
|
||||||
CTextureCategory *getTextureCategory() const {return _TextureCategory;}
|
CTextureCategory *getTextureCategory() const {return _TextureCategory;}
|
||||||
|
|
||||||
//****************************
|
// ****************************
|
||||||
// Private part.
|
// Private part.
|
||||||
protected:
|
protected:
|
||||||
// Derived texture should set it to true when they are updated.
|
// Derived texture should set it to true when they are updated.
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* CTextureCube
|
* CTextureCube
|
||||||
* \author Matthieu Besson
|
* \author Matthieu Besson
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* CTextureFile
|
* CTextureFile
|
||||||
* \author Stephane Coutelas
|
* \author Stephane Coutelas
|
||||||
|
|
|
@ -28,7 +28,7 @@ class CFontGenerator;
|
||||||
#define TEXTUREFONT_NBCATEGORY 5 // Config 1
|
#define TEXTUREFONT_NBCATEGORY 5 // Config 1
|
||||||
//#define TEXTUREFONT_NBCATEGORY 4
|
//#define TEXTUREFONT_NBCATEGORY 4
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* CTextureFont
|
* CTextureFont
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* CTextureMem
|
* CTextureMem
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -66,7 +66,7 @@ class UWaterEnvMap;
|
||||||
|
|
||||||
typedef void (*emptyProc)(void);
|
typedef void (*emptyProc)(void);
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/// Monitor color properties
|
/// Monitor color properties
|
||||||
struct CMonitorColorProperties
|
struct CMonitorColorProperties
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@ class UPointLight;
|
||||||
class UWaterEnvMap;
|
class UWaterEnvMap;
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
// useful callback for createInstanceGroupAndAddToSceneAsync
|
// useful callback for createInstanceGroupAndAddToSceneAsync
|
||||||
class IAsyncLoadCallback
|
class IAsyncLoadCallback
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/**
|
/**
|
||||||
* Game Interface for Scene.
|
* Game Interface for Scene.
|
||||||
* A UScene create instances, camera lights etc... Those objects are not sharable through different scenes. You
|
* A UScene create instances, camera lights etc... Those objects are not sharable through different scenes. You
|
||||||
|
|
|
@ -61,7 +61,7 @@ private:
|
||||||
// IMPLEMENTATION //
|
// IMPLEMENTATION //
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CHistoric<T>::push(const T &value)
|
inline void CHistoric<T>::push(const T &value)
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ inline void CHistoric<T>::push(const T &value)
|
||||||
_Historic.push_back(value);
|
_Historic.push_back(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CHistoric<T>::pop()
|
inline void CHistoric<T>::pop()
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ inline void CHistoric<T>::pop()
|
||||||
_Historic.pop_back();
|
_Historic.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CHistoric<T>::setMaxSize(uint maxSize)
|
inline void CHistoric<T>::setMaxSize(uint maxSize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
/** IPC Utility class to enable easy window-window communication
|
/** IPC Utility class to enable easy window-window communication
|
||||||
*
|
*
|
||||||
* This enable 2-ways non blocking communication between 2 windows on the same machine (windows
|
* This enable 2-ways non blocking communication between 2 windows on the same machine (windows
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
uint getReceiveQueueSize() const;
|
uint getReceiveQueueSize() const;
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
private:
|
private:
|
||||||
struct CMsg
|
struct CMsg
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void checkRange(const uint8 *min, const uint8 *max, const uint8 *start, u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckVertexBuffer(const CVertexBuffer &vb, const uint8 *ptr)
|
void nlCheckVertexBuffer(const CVertexBuffer &vb, const uint8 *ptr)
|
||||||
{
|
{
|
||||||
CVertexBufferRead vba;
|
CVertexBufferRead vba;
|
||||||
|
@ -39,49 +39,49 @@ void nlCheckVertexBuffer(const CVertexBuffer &vb, const uint8 *ptr)
|
||||||
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vb.getNumVertices() * vb.getVertexSize(), ptr, 0, vb.getName());
|
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vb.getNumVertices() * vb.getVertexSize(), ptr, 0, vb.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckVBA(CVertexBufferRead &vba, const uint8 *ptr)
|
void nlCheckVBA(CVertexBufferRead &vba, const uint8 *ptr)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptr, 0, vba.getParent()->getName());
|
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptr, 0, vba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckVBA(CVertexBufferReadWrite &vba, const uint8 *ptr)
|
void nlCheckVBA(CVertexBufferReadWrite &vba, const uint8 *ptr)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptr, 0, vba.getParent()->getName());
|
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptr, 0, vba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckVBARange(CVertexBufferRead &vba, const uint8 *ptStart, uint length)
|
void nlCheckVBARange(CVertexBufferRead &vba, const uint8 *ptStart, uint length)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptStart, length, vba.getParent()->getName());
|
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptStart, length, vba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckVBARange(CVertexBufferReadWrite &vba, const uint8 *ptStart, uint length)
|
void nlCheckVBARange(CVertexBufferReadWrite &vba, const uint8 *ptStart, uint length)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptStart, length, vba.getParent()->getName());
|
checkRange((uint8 *) vba.getVertexCoordPointer(), (uint8 *) vba.getVertexCoordPointer() + vba.getParent()->getNumVertices() * vba.getParent()->getVertexSize(), ptStart, length, vba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckIBARange(CIndexBufferReadWrite &iba, const uint8 *ptStart, uint length)
|
void nlCheckIBARange(CIndexBufferReadWrite &iba, const uint8 *ptStart, uint length)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, length, iba.getParent()->getName());
|
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, length, iba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckIBARange(CIndexBufferRead &iba, const uint8 *ptStart, uint length)
|
void nlCheckIBARange(CIndexBufferRead &iba, const uint8 *ptStart, uint length)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, length, iba.getParent()->getName());
|
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, length, iba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckIBA(CIndexBufferReadWrite &iba, const uint8 *ptStart)
|
void nlCheckIBA(CIndexBufferReadWrite &iba, const uint8 *ptStart)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************
|
// ************************************************************************************
|
||||||
void nlCheckIBA(CIndexBufferRead &iba, const uint8 *ptStart)
|
void nlCheckIBA(CIndexBufferRead &iba, const uint8 *ptStart)
|
||||||
{
|
{
|
||||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
||||||
|
|
|
@ -179,12 +179,8 @@ void CDriverGLStates::forceDefaults(uint nbStages)
|
||||||
// Cull order
|
// Cull order
|
||||||
_CullMode = CCW;
|
_CullMode = CCW;
|
||||||
glCullFace(GL_BACK);
|
glCullFace(GL_BACK);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDriverGLStates::enableBlend(uint enable)
|
void CDriverGLStates::enableBlend(uint enable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ CVertexBuffer CFlareModel::_OcclusionQueryVB;
|
||||||
using NLMISC::CVector;
|
using NLMISC::CVector;
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
CFlareModel::CFlareModel()
|
CFlareModel::CFlareModel()
|
||||||
{
|
{
|
||||||
std::fill(_Intensity, _Intensity + MaxNumContext, 0.f);
|
std::fill(_Intensity, _Intensity + MaxNumContext, 0.f);
|
||||||
|
@ -56,7 +56,7 @@ CFlareModel::CFlareModel()
|
||||||
Next = NULL;
|
Next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::resetOcclusionQuerries()
|
void CFlareModel::resetOcclusionQuerries()
|
||||||
{
|
{
|
||||||
for(uint k = 0; k < MaxNumContext; ++k)
|
for(uint k = 0; k < MaxNumContext; ++k)
|
||||||
|
@ -69,7 +69,7 @@ void CFlareModel::resetOcclusionQuerries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
CFlareModel::~CFlareModel()
|
CFlareModel::~CFlareModel()
|
||||||
{
|
{
|
||||||
// if driver hasn't changed, delete all querries
|
// if driver hasn't changed, delete all querries
|
||||||
|
@ -92,7 +92,7 @@ CFlareModel::~CFlareModel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::registerBasic()
|
void CFlareModel::registerBasic()
|
||||||
{
|
{
|
||||||
// register the model
|
// register the model
|
||||||
|
@ -117,7 +117,7 @@ static inline void vbWrite(uint8 *&dest, float uCoord, float vCoord)
|
||||||
dest += 2 * sizeof(float);
|
dest += 2 * sizeof(float);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::traverseRender()
|
void CFlareModel::traverseRender()
|
||||||
{
|
{
|
||||||
CRenderTrav &renderTrav = getOwnerScene()->getRenderTrav();
|
CRenderTrav &renderTrav = getOwnerScene()->getRenderTrav();
|
||||||
|
@ -540,7 +540,7 @@ void CFlareModel::traverseRender()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::initStatics()
|
void CFlareModel::initStatics()
|
||||||
{
|
{
|
||||||
if (!_OcclusionQuerySettuped)
|
if (!_OcclusionQuerySettuped)
|
||||||
|
@ -560,7 +560,7 @@ void CFlareModel::initStatics()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
|
@ -571,13 +571,13 @@ void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::updateOcclusionQueryEnd(IDriver *drv)
|
void CFlareModel::updateOcclusionQueryEnd(IDriver *drv)
|
||||||
{
|
{
|
||||||
drv->setColorMask(true, true, true, true);
|
drv->setColorMask(true, true, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::updateOcclusionQuery(IDriver *drv)
|
void CFlareModel::updateOcclusionQuery(IDriver *drv)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
|
@ -604,7 +604,7 @@ void CFlareModel::updateOcclusionQuery(IDriver *drv)
|
||||||
oq->end();
|
oq->end();
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::renderOcclusionMeshPrimitives(CMesh &mesh, IDriver &drv)
|
void CFlareModel::renderOcclusionMeshPrimitives(CMesh &mesh, IDriver &drv)
|
||||||
{
|
{
|
||||||
uint numMatrixBlock = mesh.getNbMatrixBlock();
|
uint numMatrixBlock = mesh.getNbMatrixBlock();
|
||||||
|
@ -620,7 +620,7 @@ void CFlareModel::renderOcclusionMeshPrimitives(CMesh &mesh, IDriver &drv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::setupOcclusionMeshMatrix(IDriver &drv, CScene &scene) const
|
void CFlareModel::setupOcclusionMeshMatrix(IDriver &drv, CScene &scene) const
|
||||||
{
|
{
|
||||||
nlassert(Shape);
|
nlassert(Shape);
|
||||||
|
@ -638,7 +638,7 @@ void CFlareModel::setupOcclusionMeshMatrix(IDriver &drv, CScene &scene) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
||||||
{
|
{
|
||||||
nlassert(_Scene);
|
nlassert(_Scene);
|
||||||
|
@ -676,7 +676,7 @@ void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
||||||
drv.setColorMask(true, true, true, true); // restore pixel writes
|
drv.setColorMask(true, true, true, true); // restore pixel writes
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************
|
// ********************************************************************************************************************
|
||||||
void CFlareModel::renderOcclusionTestMesh(IDriver &drv)
|
void CFlareModel::renderOcclusionTestMesh(IDriver &drv)
|
||||||
{
|
{
|
||||||
nlassert(_Scene);
|
nlassert(_Scene);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
CFlareShape::CFlareShape() : _Color(NLMISC::CRGBA::White),
|
CFlareShape::CFlareShape() : _Color(NLMISC::CRGBA::White),
|
||||||
_DazzleColor(NLMISC::CRGBA::Black),
|
_DazzleColor(NLMISC::CRGBA::Black),
|
||||||
_SizeDisappear(0.f),
|
_SizeDisappear(0.f),
|
||||||
|
@ -59,7 +59,7 @@ CFlareShape::CFlareShape() : _Color(NLMISC::CRGBA::White),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CFlareShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CFlareShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
// Version 4 : - added occlusion test mesh, size reduction, angle modification when object is occluded
|
// Version 4 : - added occlusion test mesh, size reduction, angle modification when object is occluded
|
||||||
|
@ -112,7 +112,7 @@ void CFlareShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
CTransformShape *CFlareShape::createInstance(CScene &scene)
|
CTransformShape *CFlareShape::createInstance(CScene &scene)
|
||||||
{
|
{
|
||||||
CFlareModel *fm = NLMISC::safe_cast<CFlareModel *>(scene.createModel(FlareModelClassId) );
|
CFlareModel *fm = NLMISC::safe_cast<CFlareModel *>(scene.createModel(FlareModelClassId) );
|
||||||
|
@ -123,7 +123,7 @@ CTransformShape *CFlareShape::createInstance(CScene &scene)
|
||||||
return fm;
|
return fm;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
float CFlareShape::getNumTriangles (float distance)
|
float CFlareShape::getNumTriangles (float distance)
|
||||||
{
|
{
|
||||||
float count = 0;
|
float count = 0;
|
||||||
|
@ -134,7 +134,7 @@ float CFlareShape::getNumTriangles (float distance)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
bool CFlareShape::clip(const std::vector<CPlane> &pyramid, const CMatrix &worldMatrix)
|
bool CFlareShape::clip(const std::vector<CPlane> &pyramid, const CMatrix &worldMatrix)
|
||||||
{
|
{
|
||||||
// compute flare pos in world basis :
|
// compute flare pos in world basis :
|
||||||
|
@ -150,7 +150,7 @@ bool CFlareShape::clip(const std::vector<CPlane> &pyramid, const CMatrix &wor
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
|
void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
|
||||||
{
|
{
|
||||||
// the flare himself is a point
|
// the flare himself is a point
|
||||||
|
@ -158,7 +158,7 @@ void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
|
||||||
bbox.setHalfSize(CVector::Null);
|
bbox.setHalfSize(CVector::Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CFlareShape::flushTextures (IDriver &driver, uint selectedTexture)
|
void CFlareShape::flushTextures (IDriver &driver, uint selectedTexture)
|
||||||
{
|
{
|
||||||
// Flush each texture
|
// Flush each texture
|
||||||
|
@ -175,7 +175,7 @@ void CFlareShape::flushTextures (IDriver &driver, uint selectedTexture)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CFlareShape::setOcclusionTestMeshName(const std::string &shapeName)
|
void CFlareShape::setOcclusionTestMeshName(const std::string &shapeName)
|
||||||
{
|
{
|
||||||
if (shapeName == _OcclusionTestMeshName) return;
|
if (shapeName == _OcclusionTestMeshName) return;
|
||||||
|
@ -184,7 +184,7 @@ void CFlareShape::setOcclusionTestMeshName(const std::string &shapeName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
CMesh *CFlareShape::getOcclusionTestMesh(CShapeBank &sb)
|
CMesh *CFlareShape::getOcclusionTestMesh(CShapeBank &sb)
|
||||||
{
|
{
|
||||||
if (_OcclusionTestMesh) return _OcclusionTestMesh;
|
if (_OcclusionTestMesh) return _OcclusionTestMesh;
|
||||||
|
|
|
@ -48,20 +48,20 @@ CLandscapeUser::~CLandscapeUser()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setZonePath(const std::string &zonePath)
|
void CLandscapeUser::setZonePath(const std::string &zonePath)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_ZoneManager.setZonePath(zonePath);
|
_ZoneManager.setZonePath(zonePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::invalidateAllTiles()
|
void CLandscapeUser::invalidateAllTiles()
|
||||||
{
|
{
|
||||||
_Landscape->Landscape.invalidateAllTiles();
|
_Landscape->Landscape.invalidateAllTiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::loadBankFiles(const std::string &tileBankFile, const std::string &farBankFile)
|
void CLandscapeUser::loadBankFiles(const std::string &tileBankFile, const std::string &farBankFile)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
|
@ -89,7 +89,7 @@ void CLandscapeUser::loadBankFiles(const std::string &tileBankFile, const std::s
|
||||||
farbankFile.close();
|
farbankFile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
||||||
void CLandscapeUser::flushTiles (NLMISC::IProgressCallback &progress)
|
void CLandscapeUser::flushTiles (NLMISC::IProgressCallback &progress)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ void CLandscapeUser::flushTiles (NLMISC::IProgressCallback &progress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
||||||
void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius, std::vector<std::string> &zonesAdded)
|
void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius, std::vector<std::string> &zonesAdded)
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius, std::v
|
||||||
_Landscape->Landscape.checkBinds();
|
_Landscape->Landscape.checkBinds();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::refreshAllZonesAround(const CVector &pos, float radius, std::vector<std::string> &zonesAdded, std::vector<std::string> &zonesRemoved,
|
void CLandscapeUser::refreshAllZonesAround(const CVector &pos, float radius, std::vector<std::string> &zonesAdded, std::vector<std::string> &zonesRemoved,
|
||||||
NLMISC::IProgressCallback &progress, const std::vector<uint16> *validZoneIds)
|
NLMISC::IProgressCallback &progress, const std::vector<uint16> *validZoneIds)
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,7 @@ void CLandscapeUser::getAllZoneLoaded(std::vector<std::string> &zoneLoaded) cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius)
|
void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius)
|
||||||
{
|
{
|
||||||
std::vector<std::string> dummy;
|
std::vector<std::string> dummy;
|
||||||
|
@ -249,7 +249,7 @@ void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius)
|
void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
|
@ -257,7 +257,7 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius)
|
||||||
std::string dummy1, dummy2;
|
std::string dummy1, dummy2;
|
||||||
refreshZonesAround(pos, radius, dummy1, dummy2);
|
refreshZonesAround(pos, radius, dummy1, dummy2);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::string &zoneAdded, std::string &zoneRemoved, const std::vector<uint16> *validZoneIds)
|
void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::string &zoneAdded, std::string &zoneRemoved, const std::vector<uint16> *validZoneIds)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
|
@ -307,7 +307,7 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::s
|
||||||
_ZoneManager.checkZonesAround((uint)pos.x, (uint)(-pos.y), (uint)radius, validZoneIds);
|
_ZoneManager.checkZonesAround((uint)pos.x, (uint)(-pos.y), (uint)radius, validZoneIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::removeAllZones()
|
void CLandscapeUser::removeAllZones()
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
|
@ -349,7 +349,7 @@ void CLandscapeUser::removeAllZones()
|
||||||
_ZoneManager.clear();
|
_ZoneManager.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply)
|
void CLandscapeUser::setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -358,37 +358,37 @@ void CLandscapeUser::setupStaticLight (const CRGBA &diffuse, const CRGBA &ambian
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setThreshold (float thre)
|
void CLandscapeUser::setThreshold (float thre)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setThreshold(thre);
|
_Landscape->Landscape.setThreshold(thre);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
float CLandscapeUser::getThreshold () const
|
float CLandscapeUser::getThreshold () const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->Landscape.getThreshold();
|
return _Landscape->Landscape.getThreshold();
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setTileNear (float tileNear)
|
void CLandscapeUser::setTileNear (float tileNear)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setTileNear(tileNear);
|
_Landscape->Landscape.setTileNear(tileNear);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
float CLandscapeUser::getTileNear () const
|
float CLandscapeUser::getTileNear () const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->Landscape.getTileNear();
|
return _Landscape->Landscape.getTileNear();
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setTileMaxSubdivision (uint tileDiv)
|
void CLandscapeUser::setTileMaxSubdivision (uint tileDiv)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setTileMaxSubdivision(tileDiv);
|
_Landscape->Landscape.setTileMaxSubdivision(tileDiv);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
uint CLandscapeUser::getTileMaxSubdivision ()
|
uint CLandscapeUser::getTileMaxSubdivision ()
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -396,7 +396,7 @@ uint CLandscapeUser::getTileMaxSubdivision ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
std::string CLandscapeUser::getZoneName(const CVector &pos)
|
std::string CLandscapeUser::getZoneName(const CVector &pos)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -404,14 +404,14 @@ std::string CLandscapeUser::getZoneName(const CVector &pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CVector CLandscapeUser::getHeightFieldDeltaZ(float x, float y) const
|
CVector CLandscapeUser::getHeightFieldDeltaZ(float x, float y) const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->Landscape.getHeightFieldDeltaZ(x,y);
|
return _Landscape->Landscape.getHeightFieldDeltaZ(x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setHeightField(const CHeightMap &hf)
|
void CLandscapeUser::setHeightField(const CHeightMap &hf)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -419,35 +419,35 @@ void CLandscapeUser::setHeightField(const CHeightMap &hf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::enableVegetable(bool enable)
|
void CLandscapeUser::enableVegetable(bool enable)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.enableVegetable(enable);
|
_Landscape->Landscape.enableVegetable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::loadVegetableTexture(const std::string &textureFileName)
|
void CLandscapeUser::loadVegetableTexture(const std::string &textureFileName)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
_Landscape->Landscape.loadVegetableTexture(textureFileName);
|
_Landscape->Landscape.loadVegetableTexture(textureFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setupVegetableLighting(const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight)
|
void CLandscapeUser::setupVegetableLighting(const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setupVegetableLighting(ambient, diffuse, directionalLight);
|
_Landscape->Landscape.setupVegetableLighting(ambient, diffuse, directionalLight);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setVegetableWind(const CVector &windDir, float windFreq, float windPower, float windBendMin)
|
void CLandscapeUser::setVegetableWind(const CVector &windDir, float windFreq, float windPower, float windBendMin)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setVegetableWind(windDir, windFreq, windPower, windBendMin);
|
_Landscape->Landscape.setVegetableWind(windDir, windFreq, windPower, windBendMin);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setVegetableUpdateLightingFrequency(float freq)
|
void CLandscapeUser::setVegetableUpdateLightingFrequency(float freq)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -455,7 +455,7 @@ void CLandscapeUser::setVegetableUpdateLightingFrequency(float freq)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setUpdateLightingFrequency(float freq)
|
void CLandscapeUser::setUpdateLightingFrequency(float freq)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
|
@ -463,57 +463,57 @@ void CLandscapeUser::setUpdateLightingFrequency(float freq)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::enableAdditive (bool enable)
|
void CLandscapeUser::enableAdditive (bool enable)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->enableAdditive(enable);
|
_Landscape->enableAdditive(enable);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
bool CLandscapeUser::isAdditiveEnabled () const
|
bool CLandscapeUser::isAdditiveEnabled () const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->isAdditive ();
|
return _Landscape->isAdditive ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setPointLightDiffuseMaterial(CRGBA diffuse)
|
void CLandscapeUser::setPointLightDiffuseMaterial(CRGBA diffuse)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setPointLightDiffuseMaterial(diffuse);
|
_Landscape->Landscape.setPointLightDiffuseMaterial(diffuse);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CRGBA CLandscapeUser::getPointLightDiffuseMaterial () const
|
CRGBA CLandscapeUser::getPointLightDiffuseMaterial () const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->Landscape.getPointLightDiffuseMaterial();
|
return _Landscape->Landscape.getPointLightDiffuseMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::setDLMGlobalVegetableColor(CRGBA gvc)
|
void CLandscapeUser::setDLMGlobalVegetableColor(CRGBA gvc)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
_Landscape->Landscape.setDLMGlobalVegetableColor(gvc);
|
_Landscape->Landscape.setDLMGlobalVegetableColor(gvc);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CRGBA CLandscapeUser::getDLMGlobalVegetableColor() const
|
CRGBA CLandscapeUser::getDLMGlobalVegetableColor() const
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_UI_LANDSCAPE;
|
NL3D_HAUTO_UI_LANDSCAPE;
|
||||||
return _Landscape->Landscape.getDLMGlobalVegetableColor();
|
return _Landscape->Landscape.getDLMGlobalVegetableColor();
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::updateLightingAll()
|
void CLandscapeUser::updateLightingAll()
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||||
_Landscape->Landscape.updateLightingAll();
|
_Landscape->Landscape.updateLightingAll();
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::postfixTileFilename (const char *postfix)
|
void CLandscapeUser::postfixTileFilename (const char *postfix)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||||
_Landscape->Landscape.TileBank.postfixTileFilename (postfix);
|
_Landscape->Landscape.TileBank.postfixTileFilename (postfix);
|
||||||
}
|
}
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CLandscapeUser::postfixTileVegetableDesc (const char *postfix)
|
void CLandscapeUser::postfixTileVegetableDesc (const char *postfix)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||||
|
|
|
@ -2429,7 +2429,7 @@ void CMesh::CMeshBuild::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
//************************************
|
// ************************************
|
||||||
CMesh::CMeshBuild::CMeshBuild()
|
CMesh::CMeshBuild::CMeshBuild()
|
||||||
{
|
{
|
||||||
for (uint k = 0; k < CVertexBuffer::MaxStage; ++k)
|
for (uint k = 0; k < CVertexBuffer::MaxStage; ++k)
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
||||||
{
|
{
|
||||||
_ZoneGrid.clear();
|
_ZoneGrid.clear();
|
||||||
|
@ -77,7 +77,7 @@ void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
||||||
_RaytraceCounter = ~0;
|
_RaytraceCounter = ~0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
bool CPackedWorld::raytrace(const NLMISC::CVector &start, const NLMISC::CVector &end, CVector &inter, std::vector<NLMISC::CTriangle> *testedTriangles /*= NULL*/, NLMISC::CVector *normal)
|
bool CPackedWorld::raytrace(const NLMISC::CVector &start, const NLMISC::CVector &end, CVector &inter, std::vector<NLMISC::CTriangle> *testedTriangles /*= NULL*/, NLMISC::CVector *normal)
|
||||||
{
|
{
|
||||||
if (_ZoneGrid.empty()) return false;
|
if (_ZoneGrid.empty()) return false;
|
||||||
|
@ -138,7 +138,7 @@ bool CPackedWorld::raytrace(const NLMISC::CVector &start, const NLMISC::CVector
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
||||||
{
|
{
|
||||||
zones.clear();
|
zones.clear();
|
||||||
|
@ -148,7 +148,7 @@ void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialVersion(1);
|
f.serialVersion(1);
|
||||||
|
@ -156,7 +156,7 @@ void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serialCont(ZoneNames);
|
f.serialCont(ZoneNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CPackedWorld::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPackedWorld::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
serialZoneNames(f);
|
serialZoneNames(f);
|
||||||
|
@ -166,7 +166,7 @@ void CPackedWorld::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(_ZoneMinY);
|
f.serial(_ZoneMinY);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CPackedWorld::select(const NLMISC::CPolygon2D &poly, std::vector<NLMISC::CTriangle> &selectedTriangles) const
|
void CPackedWorld::select(const NLMISC::CPolygon2D &poly, std::vector<NLMISC::CTriangle> &selectedTriangles) const
|
||||||
{
|
{
|
||||||
selectedTriangles.clear();
|
selectedTriangles.clear();
|
||||||
|
|
|
@ -23,7 +23,7 @@ uint PSEnterLeaveDepth = 0;
|
||||||
uint PSEnterLeaveMaxDepth = 1;
|
uint PSEnterLeaveMaxDepth = 1;
|
||||||
std::string PSCurrName;
|
std::string PSCurrName;
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
CPSEnterLeave::CPSEnterLeave(const char *name)
|
CPSEnterLeave::CPSEnterLeave(const char *name)
|
||||||
{
|
{
|
||||||
++ PSEnterLeaveDepth;
|
++ PSEnterLeaveDepth;
|
||||||
|
@ -35,7 +35,7 @@ CPSEnterLeave::CPSEnterLeave(const char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
CPSEnterLeave::~CPSEnterLeave()
|
CPSEnterLeave::~CPSEnterLeave()
|
||||||
{
|
{
|
||||||
if (PSEnterLeaveDepth <= PSEnterLeaveMaxDepth)
|
if (PSEnterLeaveDepth <= PSEnterLeaveMaxDepth)
|
||||||
|
@ -54,7 +54,7 @@ namespace NL3D {
|
||||||
// CParticleSystemProcess implementation //
|
// CParticleSystemProcess implementation //
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CParticleSystemProcess::setOwner(CParticleSystem *ps)
|
void CParticleSystemProcess::setOwner(CParticleSystem *ps)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_setOwner)
|
NL_PS_FUNC(CParticleSystemProcess_setOwner)
|
||||||
|
@ -69,14 +69,14 @@ void CParticleSystemProcess::setOwner(CParticleSystem *ps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
uint CParticleSystemProcess::getUserMatrixUsageCount() const
|
uint CParticleSystemProcess::getUserMatrixUsageCount() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_getUserMatrixUsageCount)
|
NL_PS_FUNC(CParticleSystemProcess_getUserMatrixUsageCount)
|
||||||
return _MatrixMode == PSUserMatrix;
|
return _MatrixMode == PSUserMatrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CParticleSystemProcess::setMatrixMode(TPSMatrixMode matrixMode)
|
void CParticleSystemProcess::setMatrixMode(TPSMatrixMode matrixMode)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_setMatrixMode)
|
NL_PS_FUNC(CParticleSystemProcess_setMatrixMode)
|
||||||
|
@ -90,7 +90,7 @@ void CParticleSystemProcess::setMatrixMode(TPSMatrixMode matrixMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
CFontGenerator *CParticleSystemProcess::getFontGenerator(void)
|
CFontGenerator *CParticleSystemProcess::getFontGenerator(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
||||||
|
@ -98,7 +98,7 @@ CFontGenerator *CParticleSystemProcess::getFontGenerator(void)
|
||||||
return _Owner->getFontGenerator();
|
return _Owner->getFontGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
const CFontGenerator *CParticleSystemProcess::getFontGenerator(void) const
|
const CFontGenerator *CParticleSystemProcess::getFontGenerator(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
||||||
|
@ -106,7 +106,7 @@ const CFontGenerator *CParticleSystemProcess::getFontGenerator(void) const
|
||||||
return _Owner->getFontGenerator();
|
return _Owner->getFontGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
CFontManager *CParticleSystemProcess::getFontManager(void)
|
CFontManager *CParticleSystemProcess::getFontManager(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
||||||
|
@ -114,7 +114,7 @@ CFontManager *CParticleSystemProcess::getFontManager(void)
|
||||||
return _Owner->getFontManager();
|
return _Owner->getFontManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
const CFontManager *CParticleSystemProcess::getFontManager(void) const
|
const CFontManager *CParticleSystemProcess::getFontManager(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
||||||
|
@ -124,7 +124,7 @@ const CFontManager *CParticleSystemProcess::getFontManager(void) const
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CParticleSystemProcess::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CParticleSystemProcess::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CParticleSystemProcess_serial)
|
NL_PS_FUNC(CParticleSystemProcess_serial)
|
||||||
|
|
|
@ -2293,7 +2293,7 @@ CTileElement *CPatch::getTileElement(const CUV &uv)
|
||||||
return &(Tiles[ts+tt*OrderS]);
|
return &(Tiles[ts+tt*OrderS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
uint32 CPatch::countNumTriFar0() const
|
uint32 CPatch::countNumTriFar0() const
|
||||||
{
|
{
|
||||||
uint32 numIndex = MasterBlock.Far0FaceVector ? *MasterBlock.Far0FaceVector : 0;
|
uint32 numIndex = MasterBlock.Far0FaceVector ? *MasterBlock.Far0FaceVector : 0;
|
||||||
|
@ -2311,7 +2311,7 @@ uint32 CPatch::countNumTriFar0() const
|
||||||
return numIndex;
|
return numIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
uint32 CPatch::countNumTriFar1() const
|
uint32 CPatch::countNumTriFar1() const
|
||||||
{
|
{
|
||||||
uint32 numIndex = MasterBlock.Far1FaceVector ? *MasterBlock.Far1FaceVector : 0;
|
uint32 numIndex = MasterBlock.Far1FaceVector ? *MasterBlock.Far1FaceVector : 0;
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<uint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSAttribMakerMemory<uint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<uint32>::serial(f);
|
CPSAttribMakerMemoryBase<uint32>::serial(f);
|
||||||
|
@ -39,7 +39,7 @@ void CPSAttribMakerMemory<uint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<uint32>::newElement(const CPSEmitterInfo &info)
|
void CPSAttribMakerMemory<uint32>::newElement(const CPSEmitterInfo &info)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<uint32>::newElement(info);
|
CPSAttribMakerMemoryBase<uint32>::newElement(info);
|
||||||
|
@ -54,7 +54,7 @@ void CPSAttribMakerMemory<uint32>::newElement(const CPSEmitterInfo &info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<sint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSAttribMakerMemory<sint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<sint32>::serial(f);
|
CPSAttribMakerMemoryBase<sint32>::serial(f);
|
||||||
|
@ -72,7 +72,7 @@ void CPSAttribMakerMemory<sint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<sint32>::newElement(const CPSEmitterInfo &info)
|
void CPSAttribMakerMemory<sint32>::newElement(const CPSEmitterInfo &info)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<sint32>::newElement(info);
|
CPSAttribMakerMemoryBase<sint32>::newElement(info);
|
||||||
|
@ -87,7 +87,7 @@ void CPSAttribMakerMemory<sint32>::newElement(const CPSEmitterInfo &info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<float>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSAttribMakerMemory<float>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<float>::serial(f);
|
CPSAttribMakerMemoryBase<float>::serial(f);
|
||||||
|
@ -105,7 +105,7 @@ void CPSAttribMakerMemory<float>::serial(NLMISC::IStream &f) throw(NLMISC::EStre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CPSAttribMakerMemory<float>::newElement(const CPSEmitterInfo &info)
|
void CPSAttribMakerMemory<float>::newElement(const CPSEmitterInfo &info)
|
||||||
{
|
{
|
||||||
CPSAttribMakerMemoryBase<float>::newElement(info);
|
CPSAttribMakerMemoryBase<float>::newElement(info);
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
CPSLight::CPSLight() : _Color(CRGBA::White),
|
CPSLight::CPSLight() : _Color(CRGBA::White),
|
||||||
_ColorScheme(NULL),
|
_ColorScheme(NULL),
|
||||||
_AttenStart(0.1f),
|
_AttenStart(0.1f),
|
||||||
|
@ -40,7 +40,7 @@ CPSLight::CPSLight() : _Color(CRGBA::White),
|
||||||
NL_PS_FUNC(CPSLight_CPSLight)
|
NL_PS_FUNC(CPSLight_CPSLight)
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
CPSLight::~CPSLight()
|
CPSLight::~CPSLight()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_CPSLight)
|
NL_PS_FUNC(CPSLight_CPSLight)
|
||||||
|
@ -67,7 +67,7 @@ CPSLight::~CPSLight()
|
||||||
delete _AttenEndScheme;
|
delete _AttenEndScheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSLight::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_serial)
|
NL_PS_FUNC(CPSLight_serial)
|
||||||
|
@ -134,14 +134,14 @@ void CPSLight::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
uint32 CPSLight::getType(void) const
|
uint32 CPSLight::getType(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_getType)
|
NL_PS_FUNC(CPSLight_getType)
|
||||||
return PSLight;
|
return PSLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::onShow(bool shown)
|
void CPSLight::onShow(bool shown)
|
||||||
{
|
{
|
||||||
for(uint k = 0; k < _Lights.getSize(); ++k)
|
for(uint k = 0; k < _Lights.getSize(); ++k)
|
||||||
|
@ -160,7 +160,7 @@ void CPSLight::onShow(bool shown)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::step(TPSProcessPass pass)
|
void CPSLight::step(TPSProcessPass pass)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_step)
|
NL_PS_FUNC(CPSLight_step)
|
||||||
|
@ -287,7 +287,7 @@ void CPSLight::step(TPSProcessPass pass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setColor(NLMISC::CRGBA color)
|
void CPSLight::setColor(NLMISC::CRGBA color)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setColor)
|
NL_PS_FUNC(CPSLight_setColor)
|
||||||
|
@ -296,7 +296,7 @@ void CPSLight::setColor(NLMISC::CRGBA color)
|
||||||
_Color = color;
|
_Color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setColorScheme(CPSAttribMaker<NLMISC::CRGBA> *scheme)
|
void CPSLight::setColorScheme(CPSAttribMaker<NLMISC::CRGBA> *scheme)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setColorScheme)
|
NL_PS_FUNC(CPSLight_setColorScheme)
|
||||||
|
@ -308,7 +308,7 @@ void CPSLight::setColorScheme(CPSAttribMaker<NLMISC::CRGBA> *scheme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setAttenStart(float radius)
|
void CPSLight::setAttenStart(float radius)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setAttenStart)
|
NL_PS_FUNC(CPSLight_setAttenStart)
|
||||||
|
@ -318,7 +318,7 @@ void CPSLight::setAttenStart(float radius)
|
||||||
_AttenStart = radius;
|
_AttenStart = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setAttenStartScheme(CPSAttribMaker<float> *scheme)
|
void CPSLight::setAttenStartScheme(CPSAttribMaker<float> *scheme)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setAttenStartScheme)
|
NL_PS_FUNC(CPSLight_setAttenStartScheme)
|
||||||
|
@ -330,7 +330,7 @@ void CPSLight::setAttenStartScheme(CPSAttribMaker<float> *scheme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setAttenEnd(float radius)
|
void CPSLight::setAttenEnd(float radius)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setAttenEnd)
|
NL_PS_FUNC(CPSLight_setAttenEnd)
|
||||||
|
@ -339,7 +339,7 @@ void CPSLight::setAttenEnd(float radius)
|
||||||
_AttenEnd = radius;
|
_AttenEnd = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::setAttenEndScheme(CPSAttribMaker<float> *scheme)
|
void CPSLight::setAttenEndScheme(CPSAttribMaker<float> *scheme)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_setAttenEndScheme)
|
NL_PS_FUNC(CPSLight_setAttenEndScheme)
|
||||||
|
@ -351,7 +351,7 @@ void CPSLight::setAttenEndScheme(CPSAttribMaker<float> *scheme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::newElement(const CPSEmitterInfo &info)
|
void CPSLight::newElement(const CPSEmitterInfo &info)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_newElement)
|
NL_PS_FUNC(CPSLight_newElement)
|
||||||
|
@ -361,7 +361,7 @@ void CPSLight::newElement(const CPSEmitterInfo &info)
|
||||||
_Lights.insert(NULL); // instance is created during step()
|
_Lights.insert(NULL); // instance is created during step()
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::deleteElement(uint32 index)
|
void CPSLight::deleteElement(uint32 index)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_deleteElement)
|
NL_PS_FUNC(CPSLight_deleteElement)
|
||||||
|
@ -376,7 +376,7 @@ void CPSLight::deleteElement(uint32 index)
|
||||||
_Lights.remove(index);
|
_Lights.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::resize(uint32 size)
|
void CPSLight::resize(uint32 size)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_resize)
|
NL_PS_FUNC(CPSLight_resize)
|
||||||
|
@ -387,7 +387,7 @@ void CPSLight::resize(uint32 size)
|
||||||
_Lights.resize(size);
|
_Lights.resize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::releaseAllRef()
|
void CPSLight::releaseAllRef()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_releaseAllRef)
|
NL_PS_FUNC(CPSLight_releaseAllRef)
|
||||||
|
@ -404,7 +404,7 @@ void CPSLight::releaseAllRef()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CPSLight::show()
|
void CPSLight::show()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLight_show)
|
NL_PS_FUNC(CPSLight_show)
|
||||||
|
|
|
@ -56,7 +56,7 @@ CPSCollisionInfo *CPSLocated::_FirstCollision = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -81,7 +81,7 @@ CPSLocated::CPSLocated() : /*_MaxNumFaces(0),*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
const NLMISC::CMatrix &CPSLocated::getLocalToWorldMatrix() const
|
const NLMISC::CMatrix &CPSLocated::getLocalToWorldMatrix() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getLocalToWorldMatrix)
|
NL_PS_FUNC(CPSLocated_getLocalToWorldMatrix)
|
||||||
|
@ -98,7 +98,7 @@ const NLMISC::CMatrix &CPSLocated::getLocalToWorldMatrix() const
|
||||||
return NLMISC::CMatrix::Identity;
|
return NLMISC::CMatrix::Identity;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
const NLMISC::CMatrix &CPSLocated::getWorldToLocalMatrix() const
|
const NLMISC::CMatrix &CPSLocated::getWorldToLocalMatrix() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getWorldToLocalMatrix)
|
NL_PS_FUNC(CPSLocated_getWorldToLocalMatrix)
|
||||||
|
@ -116,7 +116,7 @@ const NLMISC::CMatrix &CPSLocated::getWorldToLocalMatrix() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
float CPSLocated::evalMaxDuration() const
|
float CPSLocated::evalMaxDuration() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_evalMaxDuration)
|
NL_PS_FUNC(CPSLocated_evalMaxDuration)
|
||||||
|
@ -125,7 +125,7 @@ float CPSLocated::evalMaxDuration() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::checkIntegrity() const
|
void CPSLocated::checkIntegrity() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_checkIntegrity)
|
NL_PS_FUNC(CPSLocated_checkIntegrity)
|
||||||
|
@ -147,7 +147,7 @@ void CPSLocated::checkIntegrity() const
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
bool CPSLocated::setLastForever()
|
bool CPSLocated::setLastForever()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setLastForever)
|
NL_PS_FUNC(CPSLocated_setLastForever)
|
||||||
|
@ -168,7 +168,7 @@ bool CPSLocated::setLastForever()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::systemDateChanged()
|
void CPSLocated::systemDateChanged()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_systemDateChanged)
|
NL_PS_FUNC(CPSLocated_systemDateChanged)
|
||||||
|
@ -181,7 +181,7 @@ void CPSLocated::systemDateChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::releaseRefTo(const CParticleSystemProcess *other)
|
void CPSLocated::releaseRefTo(const CParticleSystemProcess *other)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_releaseRefTo)
|
NL_PS_FUNC(CPSLocated_releaseRefTo)
|
||||||
|
@ -209,7 +209,7 @@ void CPSLocated::releaseRefTo(const CParticleSystemProcess *other)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::releaseAllRef()
|
void CPSLocated::releaseAllRef()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_releaseAllRef)
|
NL_PS_FUNC(CPSLocated_releaseAllRef)
|
||||||
|
@ -241,7 +241,7 @@ void CPSLocated::releaseAllRef()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::notifyMotionTypeChanged(void)
|
void CPSLocated::notifyMotionTypeChanged(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_notifyMotionTypeChanged)
|
NL_PS_FUNC(CPSLocated_notifyMotionTypeChanged)
|
||||||
|
@ -254,7 +254,7 @@ void CPSLocated::notifyMotionTypeChanged(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::integrateSingle(float startDate, float deltaT, uint numStep,
|
void CPSLocated::integrateSingle(float startDate, float deltaT, uint numStep,
|
||||||
uint32 indexInLocated,
|
uint32 indexInLocated,
|
||||||
NLMISC::CVector *destPos,
|
NLMISC::CVector *destPos,
|
||||||
|
@ -302,7 +302,7 @@ void CPSLocated::integrateSingle(float startDate, float deltaT, uint numStep,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::performParametricMotion(TAnimationTime date)
|
void CPSLocated::performParametricMotion(TAnimationTime date)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_performParametricMotion)
|
NL_PS_FUNC(CPSLocated_performParametricMotion)
|
||||||
|
@ -340,7 +340,7 @@ void CPSLocated::performParametricMotion(TAnimationTime date)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// allocate parametric infos
|
/// allocate parametric infos
|
||||||
void CPSLocated::allocateParametricInfos(void)
|
void CPSLocated::allocateParametricInfos(void)
|
||||||
{
|
{
|
||||||
|
@ -364,7 +364,7 @@ void CPSLocated::allocateParametricInfos(void)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// release parametric infos
|
/// release parametric infos
|
||||||
void CPSLocated::releaseParametricInfos(void)
|
void CPSLocated::releaseParametricInfos(void)
|
||||||
{
|
{
|
||||||
|
@ -377,7 +377,7 @@ void CPSLocated::releaseParametricInfos(void)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// Test whether this located support parametric motion
|
/// Test whether this located support parametric motion
|
||||||
bool CPSLocated::supportParametricMotion(void) const
|
bool CPSLocated::supportParametricMotion(void) const
|
||||||
{
|
{
|
||||||
|
@ -385,7 +385,7 @@ bool CPSLocated::supportParametricMotion(void) const
|
||||||
return _NonIntegrableForceNbRefs == 0 && _NumIntegrableForceWithDifferentBasis == 0;
|
return _NonIntegrableForceNbRefs == 0 && _NumIntegrableForceWithDifferentBasis == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/** When set to true, this tells the system to use parametric motion. This is needed in a few case only,
|
/** When set to true, this tells the system to use parametric motion. This is needed in a few case only,
|
||||||
* and can only work if all the forces that apply to the system are integrable
|
* and can only work if all the forces that apply to the system are integrable
|
||||||
*/
|
*/
|
||||||
|
@ -405,7 +405,7 @@ void CPSLocated::enableParametricMotion(bool enable /*= true*/)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setMatrixMode(TPSMatrixMode matrixMode)
|
void CPSLocated::setMatrixMode(TPSMatrixMode matrixMode)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setMatrixMode)
|
NL_PS_FUNC(CPSLocated_setMatrixMode)
|
||||||
|
@ -426,7 +426,7 @@ void CPSLocated::setMatrixMode(TPSMatrixMode matrixMode)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/*
|
/*
|
||||||
void CPSLocated::notifyMaxNumFacesChanged(void)
|
void CPSLocated::notifyMaxNumFacesChanged(void)
|
||||||
{
|
{
|
||||||
|
@ -448,7 +448,7 @@ void CPSLocated::notifyMaxNumFacesChanged(void)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
uint CPSLocated::getNumWantedTris() const
|
uint CPSLocated::getNumWantedTris() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getNumWantedTris)
|
NL_PS_FUNC(CPSLocated_getNumWantedTris)
|
||||||
|
@ -488,7 +488,7 @@ bool CPSLocated::hasParticles(void) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// tells whether there are alive emitters
|
/// tells whether there are alive emitters
|
||||||
bool CPSLocated::hasEmitters(void) const
|
bool CPSLocated::hasEmitters(void) const
|
||||||
{
|
{
|
||||||
|
@ -502,7 +502,7 @@ bool CPSLocated::hasEmitters(void) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::getLODVect(NLMISC::CVector &v, float &offset, TPSMatrixMode matrixMode)
|
void CPSLocated::getLODVect(NLMISC::CVector &v, float &offset, TPSMatrixMode matrixMode)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getLODVect)
|
NL_PS_FUNC(CPSLocated_getLODVect)
|
||||||
|
@ -512,7 +512,7 @@ void CPSLocated::getLODVect(NLMISC::CVector &v, float &offset, TPSMatrixMode mat
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
float CPSLocated::getUserParam(uint numParam) const
|
float CPSLocated::getUserParam(uint numParam) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getUserParam)
|
NL_PS_FUNC(CPSLocated_getUserParam)
|
||||||
|
@ -521,7 +521,7 @@ float CPSLocated::getUserParam(uint numParam) const
|
||||||
return _Owner->getUserParam(numParam);
|
return _Owner->getUserParam(numParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CScene *CPSLocated::getScene(void)
|
CScene *CPSLocated::getScene(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getScene)
|
NL_PS_FUNC(CPSLocated_getScene)
|
||||||
|
@ -530,7 +530,7 @@ CScene *CPSLocated::getScene(void)
|
||||||
return _Owner->getScene();
|
return _Owner->getScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::incrementNbDrawnParticles(uint num)
|
void CPSLocated::incrementNbDrawnParticles(uint num)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_incrementNbDrawnParticles)
|
NL_PS_FUNC(CPSLocated_incrementNbDrawnParticles)
|
||||||
|
@ -538,7 +538,7 @@ void CPSLocated::incrementNbDrawnParticles(uint num)
|
||||||
CParticleSystem::NbParticlesDrawn += num; // for benchmark purpose
|
CParticleSystem::NbParticlesDrawn += num; // for benchmark purpose
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setInitialLife(TAnimationTime lifeTime)
|
void CPSLocated::setInitialLife(TAnimationTime lifeTime)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setInitialLife)
|
NL_PS_FUNC(CPSLocated_setInitialLife)
|
||||||
|
@ -563,7 +563,7 @@ void CPSLocated::setInitialLife(TAnimationTime lifeTime)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setLifeScheme(CPSAttribMaker<float> *scheme)
|
void CPSLocated::setLifeScheme(CPSAttribMaker<float> *scheme)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setLifeScheme)
|
NL_PS_FUNC(CPSLocated_setLifeScheme)
|
||||||
|
@ -581,7 +581,7 @@ void CPSLocated::setLifeScheme(CPSAttribMaker<float> *scheme)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setInitialMass(float mass)
|
void CPSLocated::setInitialMass(float mass)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setInitialMass)
|
NL_PS_FUNC(CPSLocated_setInitialMass)
|
||||||
|
@ -592,7 +592,7 @@ void CPSLocated::setInitialMass(float mass)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setMassScheme(CPSAttribMaker<float> *scheme)
|
void CPSLocated::setMassScheme(CPSAttribMaker<float> *scheme)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setMassScheme)
|
NL_PS_FUNC(CPSLocated_setMassScheme)
|
||||||
|
@ -604,7 +604,7 @@ void CPSLocated::setMassScheme(CPSAttribMaker<float> *scheme)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// get a matrix that helps to express located B coordinate in located A basis
|
/// get a matrix that helps to express located B coordinate in located A basis
|
||||||
const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CParticleSystem &ps, TPSMatrixMode destMode, TPSMatrixMode srcMode)
|
const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CParticleSystem &ps, TPSMatrixMode destMode, TPSMatrixMode srcMode)
|
||||||
{
|
{
|
||||||
|
@ -648,7 +648,7 @@ const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CParticleSystem &ps
|
||||||
return NLMISC::CMatrix::Identity;
|
return NLMISC::CMatrix::Identity;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
NLMISC::CVector CPSLocated::computeI(void) const
|
NLMISC::CVector CPSLocated::computeI(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeI)
|
NL_PS_FUNC(CPSLocated_computeI)
|
||||||
|
@ -679,7 +679,7 @@ NLMISC::CVector CPSLocated::computeI(void) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
NLMISC::CVector CPSLocated::computeIWithZAxisAligned(void) const
|
NLMISC::CVector CPSLocated::computeIWithZAxisAligned(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeIWithZAxisAligned)
|
NL_PS_FUNC(CPSLocated_computeIWithZAxisAligned)
|
||||||
|
@ -713,7 +713,7 @@ NLMISC::CVector CPSLocated::computeIWithZAxisAligned(void) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
NLMISC::CVector CPSLocated::computeJ(void) const
|
NLMISC::CVector CPSLocated::computeJ(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeJ)
|
NL_PS_FUNC(CPSLocated_computeJ)
|
||||||
|
@ -744,7 +744,7 @@ NLMISC::CVector CPSLocated::computeJ(void) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
NLMISC::CVector CPSLocated::computeK(void) const
|
NLMISC::CVector CPSLocated::computeK(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeK)
|
NL_PS_FUNC(CPSLocated_computeK)
|
||||||
|
@ -776,7 +776,7 @@ NLMISC::CVector CPSLocated::computeK(void) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
NLMISC::CVector CPSLocated::computeKWithZAxisAligned(void) const
|
NLMISC::CVector CPSLocated::computeKWithZAxisAligned(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeKWithZAxisAligned)
|
NL_PS_FUNC(CPSLocated_computeKWithZAxisAligned)
|
||||||
|
@ -807,7 +807,7 @@ NLMISC::CVector CPSLocated::computeKWithZAxisAligned(void) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
IDriver *CPSLocated::getDriver() const
|
IDriver *CPSLocated::getDriver() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getDriver)
|
NL_PS_FUNC(CPSLocated_getDriver)
|
||||||
|
@ -817,7 +817,7 @@ IDriver *CPSLocated::getDriver() const
|
||||||
return _Owner->getDriver();
|
return _Owner->getDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// dtor
|
/// dtor
|
||||||
CPSLocated::~CPSLocated()
|
CPSLocated::~CPSLocated()
|
||||||
{
|
{
|
||||||
|
@ -852,7 +852,7 @@ CPSLocated::~CPSLocated()
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/**
|
/**
|
||||||
* sorted insertion (by decreasing priority order) of a bindable (particle e.g an aspect, emitter) in a located
|
* sorted insertion (by decreasing priority order) of a bindable (particle e.g an aspect, emitter) in a located
|
||||||
*/
|
*/
|
||||||
|
@ -915,7 +915,7 @@ bool CPSLocated::bind(CPSLocatedBindable *lb)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::remove(const CPSLocatedBindable *p)
|
void CPSLocated::remove(const CPSLocatedBindable *p)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_remove)
|
NL_PS_FUNC(CPSLocated_remove)
|
||||||
|
@ -932,7 +932,7 @@ void CPSLocated::remove(const CPSLocatedBindable *p)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::registerDtorObserver(CPSLocatedBindable *anObserver)
|
void CPSLocated::registerDtorObserver(CPSLocatedBindable *anObserver)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_registerDtorObserver)
|
NL_PS_FUNC(CPSLocated_registerDtorObserver)
|
||||||
|
@ -943,7 +943,7 @@ void CPSLocated::registerDtorObserver(CPSLocatedBindable *anObserver)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::unregisterDtorObserver(CPSLocatedBindable *anObserver)
|
void CPSLocated::unregisterDtorObserver(CPSLocatedBindable *anObserver)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_unregisterDtorObserver)
|
NL_PS_FUNC(CPSLocated_unregisterDtorObserver)
|
||||||
|
@ -956,7 +956,7 @@ void CPSLocated::unregisterDtorObserver(CPSLocatedBindable *anObserver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::postNewElement(const NLMISC::CVector &pos,
|
void CPSLocated::postNewElement(const NLMISC::CVector &pos,
|
||||||
const NLMISC::CVector &speed,
|
const NLMISC::CVector &speed,
|
||||||
CPSLocated &emitterLocated,
|
CPSLocated &emitterLocated,
|
||||||
|
@ -1028,7 +1028,7 @@ void CPSLocated::postNewElement(const NLMISC::CVector &pos,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
sint32 CPSLocated::newElement(const CPSSpawnInfo &si, bool doEmitOnce /* = false */, TAnimationTime ellapsedTime)
|
sint32 CPSLocated::newElement(const CPSSpawnInfo &si, bool doEmitOnce /* = false */, TAnimationTime ellapsedTime)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_newElement)
|
NL_PS_FUNC(CPSLocated_newElement)
|
||||||
|
@ -1236,7 +1236,7 @@ sint32 CPSLocated::newElement(const CPSSpawnInfo &si, bool doEmitOnce /* = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
sint32 CPSLocated::newElement(const CVector &pos, const CVector &speed, CPSLocated *emitter, uint32 indexInEmitter,
|
sint32 CPSLocated::newElement(const CVector &pos, const CVector &speed, CPSLocated *emitter, uint32 indexInEmitter,
|
||||||
TPSMatrixMode speedCoordSystem, bool doEmitOnce /* = false */)
|
TPSMatrixMode speedCoordSystem, bool doEmitOnce /* = false */)
|
||||||
{
|
{
|
||||||
|
@ -1265,7 +1265,7 @@ sint32 CPSLocated::newElement(const CVector &pos, const CVector &speed, CPSLocat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
static inline uint32 IDToLittleEndian(uint32 input)
|
static inline uint32 IDToLittleEndian(uint32 input)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(IDToLittleEndian)
|
NL_PS_FUNC(IDToLittleEndian)
|
||||||
|
@ -1279,7 +1279,7 @@ static inline uint32 IDToLittleEndian(uint32 input)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
inline void CPSLocated::deleteElementBase(uint32 index)
|
inline void CPSLocated::deleteElementBase(uint32 index)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_deleteElementBase)
|
NL_PS_FUNC(CPSLocated_deleteElementBase)
|
||||||
|
@ -1316,7 +1316,7 @@ inline void CPSLocated::deleteElementBase(uint32 index)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::deleteElement(uint32 index)
|
void CPSLocated::deleteElement(uint32 index)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_deleteElement)
|
NL_PS_FUNC(CPSLocated_deleteElement)
|
||||||
|
@ -1336,7 +1336,7 @@ void CPSLocated::deleteElement(uint32 index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::deleteElement(uint32 index, TAnimationTime timeToNextSimStep)
|
void CPSLocated::deleteElement(uint32 index, TAnimationTime timeToNextSimStep)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_deleteElement)
|
NL_PS_FUNC(CPSLocated_deleteElement)
|
||||||
|
@ -1355,7 +1355,7 @@ void CPSLocated::deleteElement(uint32 index, TAnimationTime timeToNextSimStep)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resize the located container
|
/// Resize the located container
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::resize(uint32 newSize)
|
void CPSLocated::resize(uint32 newSize)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_resize)
|
NL_PS_FUNC(CPSLocated_resize)
|
||||||
|
@ -1417,7 +1417,7 @@ public:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSLocated::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_serial)
|
NL_PS_FUNC(CPSLocated_serial)
|
||||||
|
@ -1636,7 +1636,7 @@ void CPSLocated::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
// integrate speed of particles. Makes eventually use of SSE instructions when present
|
// integrate speed of particles. Makes eventually use of SSE instructions when present
|
||||||
static void IntegrateSpeed(uint count, float *src1, const float *src2, float *dest, float ellapsedTime)
|
static void IntegrateSpeed(uint count, float *src1, const float *src2, float *dest, float ellapsedTime)
|
||||||
{
|
{
|
||||||
|
@ -1767,7 +1767,7 @@ static void IntegrateSpeed(uint count, float *src1, const float *src2, float *de
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::computeMotion()
|
void CPSLocated::computeMotion()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeMotion)
|
NL_PS_FUNC(CPSLocated_computeMotion)
|
||||||
|
@ -1797,7 +1797,7 @@ void CPSLocated::computeMotion()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::computeNewParticleMotion(uint firstInstanceIndex)
|
void CPSLocated::computeNewParticleMotion(uint firstInstanceIndex)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeNewParticleMotion)
|
NL_PS_FUNC(CPSLocated_computeNewParticleMotion)
|
||||||
|
@ -1806,7 +1806,7 @@ void CPSLocated::computeNewParticleMotion(uint firstInstanceIndex)
|
||||||
computeCollisions(firstInstanceIndex, &CParticleSystem::_SpawnPos[0], &_Pos[0]);
|
computeCollisions(firstInstanceIndex, &CParticleSystem::_SpawnPos[0], &_Pos[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::resetCollisions(uint numInstances)
|
void CPSLocated::resetCollisions(uint numInstances)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_resetCollisions)
|
NL_PS_FUNC(CPSLocated_resetCollisions)
|
||||||
|
@ -1828,7 +1828,7 @@ void CPSLocated::resetCollisions(uint numInstances)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::updateCollisions()
|
void CPSLocated::updateCollisions()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_updateCollisions)
|
NL_PS_FUNC(CPSLocated_updateCollisions)
|
||||||
|
@ -1908,7 +1908,7 @@ void CPSLocated::updateCollisions()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::doLODDegradation()
|
void CPSLocated::doLODDegradation()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_doLODDegradation)
|
NL_PS_FUNC(CPSLocated_doLODDegradation)
|
||||||
|
@ -1940,7 +1940,7 @@ void CPSLocated::doLODDegradation()
|
||||||
CParticleSystem::InsideRemoveLoop = false;
|
CParticleSystem::InsideRemoveLoop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::step(TPSProcessPass pass)
|
void CPSLocated::step(TPSProcessPass pass)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_step)
|
NL_PS_FUNC(CPSLocated_step)
|
||||||
|
@ -1989,7 +1989,7 @@ void CPSLocated::step(TPSProcessPass pass)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::updateLife()
|
void CPSLocated::updateLife()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_updateLife)
|
NL_PS_FUNC(CPSLocated_updateLife)
|
||||||
|
@ -2086,7 +2086,7 @@ void CPSLocated::updateLife()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
// When a particle is deleted, it is replaced by the last particle in the array
|
// When a particle is deleted, it is replaced by the last particle in the array
|
||||||
// if this particle is to be deleted to, must update its new index
|
// if this particle is to be deleted to, must update its new index
|
||||||
static inline void removeParticleFromRemoveList(uint indexToRemove, uint arraySize)
|
static inline void removeParticleFromRemoveList(uint indexToRemove, uint arraySize)
|
||||||
|
@ -2131,7 +2131,7 @@ void checkRemoveArray(uint size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
#ifndef NL_DEBUG
|
#ifndef NL_DEBUG
|
||||||
inline
|
inline
|
||||||
#endif
|
#endif
|
||||||
|
@ -2150,7 +2150,7 @@ TAnimationTime CPSLocated::computeDateFromCollisionToNextSimStep(uint particleIn
|
||||||
return std::max(0.f, result);
|
return std::max(0.f, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::removeOldParticles()
|
void CPSLocated::removeOldParticles()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_removeOldParticles)
|
NL_PS_FUNC(CPSLocated_removeOldParticles)
|
||||||
|
@ -2360,7 +2360,7 @@ void CPSLocated::removeOldParticles()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::addNewlySpawnedParticles()
|
void CPSLocated::addNewlySpawnedParticles()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_addNewlySpawnedParticles)
|
NL_PS_FUNC(CPSLocated_addNewlySpawnedParticles)
|
||||||
|
@ -2418,7 +2418,7 @@ void CPSLocated::addNewlySpawnedParticles()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
bool CPSLocated::computeBBox(NLMISC::CAABBox &box) const
|
bool CPSLocated::computeBBox(NLMISC::CAABBox &box) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeBBox)
|
NL_PS_FUNC(CPSLocated_computeBBox)
|
||||||
|
@ -2478,7 +2478,7 @@ bool CPSLocated::computeBBox(NLMISC::CAABBox &box) const
|
||||||
|
|
||||||
|
|
||||||
/// Setup the driver model matrix. It is set accordingly to the basis used for rendering
|
/// Setup the driver model matrix. It is set accordingly to the basis used for rendering
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setupDriverModelMatrix(void)
|
void CPSLocated::setupDriverModelMatrix(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setupDriverModelMatrix)
|
NL_PS_FUNC(CPSLocated_setupDriverModelMatrix)
|
||||||
|
@ -2487,7 +2487,7 @@ void CPSLocated::setupDriverModelMatrix(void)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::queryCollisionInfo(void)
|
void CPSLocated::queryCollisionInfo(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_queryCollisionInfo)
|
NL_PS_FUNC(CPSLocated_queryCollisionInfo)
|
||||||
|
@ -2509,7 +2509,7 @@ void CPSLocated::queryCollisionInfo(void)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::releaseCollisionInfo(void)
|
void CPSLocated::releaseCollisionInfo(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_releaseCollisionInfo)
|
NL_PS_FUNC(CPSLocated_releaseCollisionInfo)
|
||||||
|
@ -2527,7 +2527,7 @@ void CPSLocated::releaseCollisionInfo(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::registerIntegrableForce(CPSForce *f)
|
void CPSLocated::registerIntegrableForce(CPSForce *f)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_registerIntegrableForce)
|
NL_PS_FUNC(CPSLocated_registerIntegrableForce)
|
||||||
|
@ -2543,7 +2543,7 @@ void CPSLocated::registerIntegrableForce(CPSForce *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::unregisterIntegrableForce(CPSForce *f)
|
void CPSLocated::unregisterIntegrableForce(CPSForce *f)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_unregisterIntegrableForce)
|
NL_PS_FUNC(CPSLocated_unregisterIntegrableForce)
|
||||||
|
@ -2559,7 +2559,7 @@ void CPSLocated::unregisterIntegrableForce(CPSForce *f)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::addNonIntegrableForceRef(void)
|
void CPSLocated::addNonIntegrableForceRef(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_addNonIntegrableForceRef)
|
NL_PS_FUNC(CPSLocated_addNonIntegrableForceRef)
|
||||||
|
@ -2569,7 +2569,7 @@ void CPSLocated::addNonIntegrableForceRef(void)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::releaseNonIntegrableForceRef(void)
|
void CPSLocated::releaseNonIntegrableForceRef(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_releaseNonIntegrableForceRef)
|
NL_PS_FUNC(CPSLocated_releaseNonIntegrableForceRef)
|
||||||
|
@ -2580,7 +2580,7 @@ void CPSLocated::releaseNonIntegrableForceRef(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::integrableForceBasisChanged(TPSMatrixMode matrixMode)
|
void CPSLocated::integrableForceBasisChanged(TPSMatrixMode matrixMode)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_integrableForceBasisChanged)
|
NL_PS_FUNC(CPSLocated_integrableForceBasisChanged)
|
||||||
|
@ -2598,7 +2598,7 @@ void CPSLocated::integrableForceBasisChanged(TPSMatrixMode matrixMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CPSLocatedBindable *CPSLocated::unbind(uint index)
|
CPSLocatedBindable *CPSLocated::unbind(uint index)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_unbind)
|
NL_PS_FUNC(CPSLocated_unbind)
|
||||||
|
@ -2611,7 +2611,7 @@ CPSLocatedBindable *CPSLocated::unbind(uint index)
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
bool CPSLocated::isBound(const CPSLocatedBindable *lb) const
|
bool CPSLocated::isBound(const CPSLocatedBindable *lb) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_isBound)
|
NL_PS_FUNC(CPSLocated_isBound)
|
||||||
|
@ -2620,7 +2620,7 @@ bool CPSLocated::isBound(const CPSLocatedBindable *lb) const
|
||||||
return it != _LocatedBoundCont.end();
|
return it != _LocatedBoundCont.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
uint CPSLocated::getIndexOf(const CPSLocatedBindable *lb) const
|
uint CPSLocated::getIndexOf(const CPSLocatedBindable *lb) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getIndexOf)
|
NL_PS_FUNC(CPSLocated_getIndexOf)
|
||||||
|
@ -2640,14 +2640,14 @@ uint CPSLocated::getIndexOf(const CPSLocatedBindable *lb) const
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CPSLocatedBindable::CPSLocatedBindable() : _Owner(NULL), _ExternID(0), _LOD(PSLod1n2), _Active(true)
|
CPSLocatedBindable::CPSLocatedBindable() : _Owner(NULL), _ExternID(0), _LOD(PSLod1n2), _Active(true)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindable)
|
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindable)
|
||||||
_Owner = NULL;
|
_Owner = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::setOwner(CPSLocated *psl)
|
void CPSLocatedBindable::setOwner(CPSLocated *psl)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_setOwner)
|
NL_PS_FUNC(CPSLocatedBindable_setOwner)
|
||||||
|
@ -2675,7 +2675,7 @@ void CPSLocatedBindable::setOwner(CPSLocated *psl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::finalize(void)
|
void CPSLocatedBindable::finalize(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_finalize)
|
NL_PS_FUNC(CPSLocatedBindable_finalize)
|
||||||
|
@ -2685,7 +2685,7 @@ void CPSLocatedBindable::finalize(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CPSLocatedBindable::~CPSLocatedBindable()
|
CPSLocatedBindable::~CPSLocatedBindable()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindableDtor)
|
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindableDtor)
|
||||||
|
@ -2698,14 +2698,14 @@ CPSLocatedBindable::~CPSLocatedBindable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
void CPSLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_notifyTargetRemoved)
|
NL_PS_FUNC(CPSLocatedBindable_notifyTargetRemoved)
|
||||||
ptr->unregisterDtorObserver(this);
|
ptr->unregisterDtorObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_IStream )
|
NL_PS_FUNC(CPSLocatedBindable_IStream )
|
||||||
|
@ -2742,7 +2742,7 @@ void CPSLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::displayIcon2d(const CVector tab[], uint nbSegs, float scale)
|
void CPSLocatedBindable::displayIcon2d(const CVector tab[], uint nbSegs, float scale)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_displayIcon2d)
|
NL_PS_FUNC(CPSLocatedBindable_displayIcon2d)
|
||||||
|
@ -2796,7 +2796,7 @@ void CPSLocatedBindable::displayIcon2d(const CVector tab[], uint nbSegs, float s
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CFontManager *CPSLocatedBindable::getFontManager(void)
|
CFontManager *CPSLocatedBindable::getFontManager(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_getFontManager)
|
NL_PS_FUNC(CPSLocatedBindable_getFontManager)
|
||||||
|
@ -2804,7 +2804,7 @@ CFontManager *CPSLocatedBindable::getFontManager(void)
|
||||||
return _Owner->getFontManager();
|
return _Owner->getFontManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// Shortcut to get the font manager if one was set (const version)
|
/// Shortcut to get the font manager if one was set (const version)
|
||||||
const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
||||||
{
|
{
|
||||||
|
@ -2814,7 +2814,7 @@ const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
// Shortcut to get the matrix of the system
|
// Shortcut to get the matrix of the system
|
||||||
const NLMISC::CMatrix &CPSLocatedBindable::getSysMat(void) const
|
const NLMISC::CMatrix &CPSLocatedBindable::getSysMat(void) const
|
||||||
{
|
{
|
||||||
|
@ -2823,7 +2823,7 @@ const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
||||||
return _Owner->getOwner()->getSysMat();
|
return _Owner->getOwner()->getSysMat();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// shortcut to get the inverted matrix of the system
|
/// shortcut to get the inverted matrix of the system
|
||||||
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedSysMat(void) const
|
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedSysMat(void) const
|
||||||
{
|
{
|
||||||
|
@ -2833,7 +2833,7 @@ const NLMISC::CMatrix &CPSLocatedBindable::getInvertedSysMat(void) const
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// shortcut to get the view matrix
|
/// shortcut to get the view matrix
|
||||||
const NLMISC::CMatrix &CPSLocatedBindable::getViewMat(void) const
|
const NLMISC::CMatrix &CPSLocatedBindable::getViewMat(void) const
|
||||||
{
|
{
|
||||||
|
@ -2843,7 +2843,7 @@ const NLMISC::CMatrix &CPSLocatedBindable::getViewMat(void) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// shortcut to get the inverted view matrix
|
/// shortcut to get the inverted view matrix
|
||||||
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedViewMat(void) const
|
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedViewMat(void) const
|
||||||
{
|
{
|
||||||
|
@ -2852,7 +2852,7 @@ const NLMISC::CMatrix &CPSLocatedBindable::getInvertedViewMat(void) const
|
||||||
return _Owner->getOwner()->getInvertedViewMat();
|
return _Owner->getOwner()->getInvertedViewMat();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
/// shortcut to setup the model matrix (system basis or world basis)
|
/// shortcut to setup the model matrix (system basis or world basis)
|
||||||
void CPSLocatedBindable::setupDriverModelMatrix(void)
|
void CPSLocatedBindable::setupDriverModelMatrix(void)
|
||||||
{
|
{
|
||||||
|
@ -2861,7 +2861,7 @@ void CPSLocatedBindable::setupDriverModelMatrix(void)
|
||||||
_Owner->setupDriverModelMatrix();
|
_Owner->setupDriverModelMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::setExternID(uint32 id)
|
void CPSLocatedBindable::setExternID(uint32 id)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_setExternID)
|
NL_PS_FUNC(CPSLocatedBindable_setExternID)
|
||||||
|
@ -2883,7 +2883,7 @@ void CPSLocatedBindable::setExternID(uint32 id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocatedBindable::releaseAllRef()
|
void CPSLocatedBindable::releaseAllRef()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocatedBindable_releaseAllRef)
|
NL_PS_FUNC(CPSLocatedBindable_releaseAllRef)
|
||||||
|
@ -2897,7 +2897,7 @@ void CPSLocatedBindable::releaseAllRef()
|
||||||
// CPSTargetLocatedBindable implementation //
|
// CPSTargetLocatedBindable implementation //
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSTargetLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_serial)
|
NL_PS_FUNC(CPSTargetLocatedBindable_serial)
|
||||||
|
@ -2917,7 +2917,7 @@ void CPSTargetLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::attachTarget(CPSLocated *ptr)
|
void CPSTargetLocatedBindable::attachTarget(CPSLocated *ptr)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_attachTarget)
|
NL_PS_FUNC(CPSTargetLocatedBindable_attachTarget)
|
||||||
|
@ -2939,7 +2939,7 @@ void CPSTargetLocatedBindable::attachTarget(CPSLocated *ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
void CPSTargetLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_notifyTargetRemoved)
|
NL_PS_FUNC(CPSTargetLocatedBindable_notifyTargetRemoved)
|
||||||
|
@ -2955,7 +2955,7 @@ void CPSTargetLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::finalize(void)
|
void CPSTargetLocatedBindable::finalize(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_finalize)
|
NL_PS_FUNC(CPSTargetLocatedBindable_finalize)
|
||||||
|
@ -2969,7 +2969,7 @@ void CPSTargetLocatedBindable::finalize(void)
|
||||||
CPSLocatedBindable::finalize();
|
CPSLocatedBindable::finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
CPSTargetLocatedBindable::~CPSTargetLocatedBindable()
|
CPSTargetLocatedBindable::~CPSTargetLocatedBindable()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_CPSTargetLocatedBindable)
|
NL_PS_FUNC(CPSTargetLocatedBindable_CPSTargetLocatedBindable)
|
||||||
|
@ -2980,7 +2980,7 @@ CPSTargetLocatedBindable::~CPSTargetLocatedBindable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::releaseRefTo(const CParticleSystemProcess *other)
|
void CPSTargetLocatedBindable::releaseRefTo(const CParticleSystemProcess *other)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_releaseRefTo)
|
NL_PS_FUNC(CPSTargetLocatedBindable_releaseRefTo)
|
||||||
|
@ -2992,7 +2992,7 @@ void CPSTargetLocatedBindable::releaseRefTo(const CParticleSystemProcess *other)
|
||||||
nlassert(std::find(_Targets.begin(), _Targets.end(), other) == _Targets.end());
|
nlassert(std::find(_Targets.begin(), _Targets.end(), other) == _Targets.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSTargetLocatedBindable::releaseAllRef()
|
void CPSTargetLocatedBindable::releaseAllRef()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSTargetLocatedBindable_releaseAllRef)
|
NL_PS_FUNC(CPSTargetLocatedBindable_releaseAllRef)
|
||||||
|
@ -3005,7 +3005,7 @@ void CPSTargetLocatedBindable::releaseAllRef()
|
||||||
CPSLocatedBindable::releaseAllRef();
|
CPSLocatedBindable::releaseAllRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
uint CPSLocated::getUserMatrixUsageCount() const
|
uint CPSLocated::getUserMatrixUsageCount() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_getUserMatrixUsageCount)
|
NL_PS_FUNC(CPSLocated_getUserMatrixUsageCount)
|
||||||
|
@ -3017,7 +3017,7 @@ uint CPSLocated::getUserMatrixUsageCount() const
|
||||||
return count + CParticleSystemProcess::getUserMatrixUsageCount();
|
return count + CParticleSystemProcess::getUserMatrixUsageCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver &drv)
|
void CPSLocated::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver &drv)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_enumTexs)
|
NL_PS_FUNC(CPSLocated_enumTexs)
|
||||||
|
@ -3027,7 +3027,7 @@ void CPSLocated::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::setZBias(float value)
|
void CPSLocated::setZBias(float value)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_setZBias)
|
NL_PS_FUNC(CPSLocated_setZBias)
|
||||||
|
@ -3037,7 +3037,7 @@ void CPSLocated::setZBias(float value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::computeCollisions(uint firstInstanceIndex, const NLMISC::CVector *posBefore, const NLMISC::CVector *posAfter)
|
void CPSLocated::computeCollisions(uint firstInstanceIndex, const NLMISC::CVector *posBefore, const NLMISC::CVector *posAfter)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeCollisions)
|
NL_PS_FUNC(CPSLocated_computeCollisions)
|
||||||
|
@ -3050,7 +3050,7 @@ void CPSLocated::computeCollisions(uint firstInstanceIndex, const NLMISC::CVecto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::computeSpawns(uint firstInstanceIndex, bool includeEmitOnce)
|
void CPSLocated::computeSpawns(uint firstInstanceIndex, bool includeEmitOnce)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeSpawns)
|
NL_PS_FUNC(CPSLocated_computeSpawns)
|
||||||
|
@ -3084,7 +3084,7 @@ void CPSLocated::computeSpawns(uint firstInstanceIndex, bool includeEmitOnce)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::computeForces()
|
void CPSLocated::computeForces()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_computeForces)
|
NL_PS_FUNC(CPSLocated_computeForces)
|
||||||
|
@ -3099,7 +3099,7 @@ void CPSLocated::computeForces()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSCollisionInfo::update(const CPSCollisionInfo &other)
|
void CPSCollisionInfo::update(const CPSCollisionInfo &other)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSCollisionInfo_update)
|
NL_PS_FUNC(CPSCollisionInfo_update)
|
||||||
|
@ -3122,7 +3122,7 @@ void CPSCollisionInfo::update(const CPSCollisionInfo &other)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::checkLife() const
|
void CPSLocated::checkLife() const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSLocated_checkLife)
|
NL_PS_FUNC(CPSLocated_checkLife)
|
||||||
|
@ -3136,7 +3136,7 @@ void CPSLocated::checkLife() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///***************************************************************************************
|
/// ***************************************************************************************
|
||||||
void CPSLocated::onShow(bool shown)
|
void CPSLocated::onShow(bool shown)
|
||||||
{
|
{
|
||||||
for(TLocatedBoundCont::iterator it = _LocatedBoundCont.begin(); it != _LocatedBoundCont.end(); ++it)
|
for(TLocatedBoundCont::iterator it = _LocatedBoundCont.begin(); it != _LocatedBoundCont.end(); ++it)
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ void CPSMultiTexturedParticle::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture>
|
||||||
if (_Texture2) dest.push_back(_Texture2);
|
if (_Texture2) dest.push_back(_Texture2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
bool CPSMultiTexturedParticle::isAlternateTextureUsed(IDriver &driver) const
|
bool CPSMultiTexturedParticle::isAlternateTextureUsed(IDriver &driver) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSMultiTexturedParticle_isAlternateTextureUsed)
|
NL_PS_FUNC(CPSMultiTexturedParticle_isAlternateTextureUsed)
|
||||||
|
|
|
@ -666,7 +666,7 @@ void CPSQuad::updateMatBeforeRendering(IDriver *drv, CVertexBuffer &vb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver &drv)
|
void CPSQuad::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver &drv)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_enumTexs)
|
NL_PS_FUNC(CPSQuad_enumTexs)
|
||||||
|
@ -674,7 +674,7 @@ void CPSQuad::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver
|
||||||
CPSMultiTexturedParticle::enumTexs(dest, drv);
|
CPSMultiTexturedParticle::enumTexs(dest, drv);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::setZBias(float value)
|
void CPSQuad::setZBias(float value)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_setZBias)
|
NL_PS_FUNC(CPSQuad_setZBias)
|
||||||
|
@ -682,7 +682,7 @@ void CPSQuad::setZBias(float value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::setTexture(CSmartPtr<ITexture> tex)
|
void CPSQuad::setTexture(CSmartPtr<ITexture> tex)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_setTexture)
|
NL_PS_FUNC(CPSQuad_setTexture)
|
||||||
|
@ -690,7 +690,7 @@ void CPSQuad::setTexture(CSmartPtr<ITexture> tex)
|
||||||
CPSMultiTexturedParticle::touch();
|
CPSMultiTexturedParticle::touch();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::setTextureGroup(NLMISC::CSmartPtr<CTextureGrouped> texGroup)
|
void CPSQuad::setTextureGroup(NLMISC::CSmartPtr<CTextureGrouped> texGroup)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_setTextureGroup)
|
NL_PS_FUNC(CPSQuad_setTextureGroup)
|
||||||
|
@ -698,21 +698,21 @@ void CPSQuad::setTextureGroup(NLMISC::CSmartPtr<CTextureGrouped> texGroup)
|
||||||
CPSMultiTexturedParticle::touch();
|
CPSMultiTexturedParticle::touch();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::setTexture2(ITexture *tex)
|
void CPSQuad::setTexture2(ITexture *tex)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_setTexture2)
|
NL_PS_FUNC(CPSQuad_setTexture2)
|
||||||
CPSMultiTexturedParticle::setTexture2(tex);
|
CPSMultiTexturedParticle::setTexture2(tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::setTexture2Alternate(ITexture *tex)
|
void CPSQuad::setTexture2Alternate(ITexture *tex)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_setTexture2Alternate)
|
NL_PS_FUNC(CPSQuad_setTexture2Alternate)
|
||||||
CPSMultiTexturedParticle::setTexture2Alternate(tex);
|
CPSMultiTexturedParticle::setTexture2Alternate(tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CPSQuad::updateTexWrapMode(IDriver &drv)
|
void CPSQuad::updateTexWrapMode(IDriver &drv)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSQuad_updateTexWrapMode)
|
NL_PS_FUNC(CPSQuad_updateTexWrapMode)
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace NL3D
|
||||||
static const uint SoundBufSize = 1024;
|
static const uint SoundBufSize = 1024;
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
CPSSound::CPSSound() : _Gain(1.f),
|
CPSSound::CPSSound() : _Gain(1.f),
|
||||||
_GainScheme(NULL),
|
_GainScheme(NULL),
|
||||||
_Pitch(1.f),
|
_Pitch(1.f),
|
||||||
|
@ -46,7 +46,7 @@ CPSSound::CPSSound() : _Gain(1.f),
|
||||||
_SoundName = NLMISC::CStringMapper::emptyId();
|
_SoundName = NLMISC::CStringMapper::emptyId();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::stopSound()
|
void CPSSound::stopSound()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_stopSound)
|
NL_PS_FUNC(CPSSound_stopSound)
|
||||||
|
@ -67,7 +67,7 @@ void CPSSound::stopSound()
|
||||||
_SoundStopped = true;
|
_SoundStopped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::reactivateSound()
|
void CPSSound::reactivateSound()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_reactivateSound)
|
NL_PS_FUNC(CPSSound_reactivateSound)
|
||||||
|
@ -75,7 +75,7 @@ void CPSSound::reactivateSound()
|
||||||
_SoundReactivated = true;
|
_SoundReactivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::removeAllSources(void)
|
void CPSSound::removeAllSources(void)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_removeAllSources)
|
NL_PS_FUNC(CPSSound_removeAllSources)
|
||||||
|
@ -87,7 +87,7 @@ void CPSSound::removeAllSources(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
CPSSound::~CPSSound()
|
CPSSound::~CPSSound()
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_CPSSound)
|
NL_PS_FUNC(CPSSound_CPSSound)
|
||||||
|
@ -96,7 +96,7 @@ CPSSound::~CPSSound()
|
||||||
delete _PitchScheme;
|
delete _PitchScheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
uint32 CPSSound::getType(void) const
|
uint32 CPSSound::getType(void) const
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_getType)
|
NL_PS_FUNC(CPSSound_getType)
|
||||||
|
@ -105,7 +105,7 @@ uint32 CPSSound::getType(void) const
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::step(TPSProcessPass pass)
|
void CPSSound::step(TPSProcessPass pass)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_step)
|
NL_PS_FUNC(CPSSound_step)
|
||||||
|
@ -212,7 +212,7 @@ void CPSSound::step(TPSProcessPass pass)
|
||||||
while (leftToDo);
|
while (leftToDo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::setGain(float Gain)
|
void CPSSound::setGain(float Gain)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_setGain)
|
NL_PS_FUNC(CPSSound_setGain)
|
||||||
|
@ -221,7 +221,7 @@ void CPSSound::setGain(float Gain)
|
||||||
_Gain = Gain;
|
_Gain = Gain;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::setGainScheme(CPSAttribMaker<float> *Gain)
|
void CPSSound::setGainScheme(CPSAttribMaker<float> *Gain)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_setGainScheme)
|
NL_PS_FUNC(CPSSound_setGainScheme)
|
||||||
|
@ -233,7 +233,7 @@ void CPSSound::setGainScheme(CPSAttribMaker<float> *Gain)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::setPitch(float pitch)
|
void CPSSound::setPitch(float pitch)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_setPitch)
|
NL_PS_FUNC(CPSSound_setPitch)
|
||||||
|
@ -242,7 +242,7 @@ void CPSSound::setPitch(float pitch)
|
||||||
_Pitch = pitch;
|
_Pitch = pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::setPitchScheme(CPSAttribMaker<float> *pitch)
|
void CPSSound::setPitchScheme(CPSAttribMaker<float> *pitch)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_setPitchScheme)
|
NL_PS_FUNC(CPSSound_setPitchScheme)
|
||||||
|
@ -254,7 +254,7 @@ void CPSSound::setPitchScheme(CPSAttribMaker<float> *pitch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_serial)
|
NL_PS_FUNC(CPSSound_serial)
|
||||||
|
@ -366,7 +366,7 @@ void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::newElement(const CPSEmitterInfo &info)
|
void CPSSound::newElement(const CPSEmitterInfo &info)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_newElement)
|
NL_PS_FUNC(CPSSound_newElement)
|
||||||
|
@ -414,7 +414,7 @@ void CPSSound::newElement(const CPSEmitterInfo &info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::deleteElement(uint32 index)
|
void CPSSound::deleteElement(uint32 index)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_deleteElement)
|
NL_PS_FUNC(CPSSound_deleteElement)
|
||||||
|
@ -428,7 +428,7 @@ void CPSSound::deleteElement(uint32 index)
|
||||||
_Sounds.remove(index);
|
_Sounds.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::resize(uint32 size)
|
void CPSSound::resize(uint32 size)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_resize)
|
NL_PS_FUNC(CPSSound_resize)
|
||||||
|
@ -450,7 +450,7 @@ void CPSSound::resize(uint32 size)
|
||||||
_Sounds.resize(size);
|
_Sounds.resize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPSSound::setUseOriginalPitchFlag(bool useOriginalPitch)
|
void CPSSound::setUseOriginalPitchFlag(bool useOriginalPitch)
|
||||||
{
|
{
|
||||||
NL_PS_FUNC(CPSSound_setUseOriginalPitchFlag)
|
NL_PS_FUNC(CPSSound_setUseOriginalPitchFlag)
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void registerSerial3d()
|
void registerSerial3d()
|
||||||
{
|
{
|
||||||
static bool bInitialized=false;
|
static bool bInitialized=false;
|
||||||
|
|
|
@ -28,14 +28,14 @@ CTextureBlend::CTextureBlend() : _BlendFactor(0), _SharingEnabled(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
bool CTextureBlend::supportSharing() const
|
bool CTextureBlend::supportSharing() const
|
||||||
{
|
{
|
||||||
return _BlendTex[0] && _BlendTex[0]->supportSharing()
|
return _BlendTex[0] && _BlendTex[0]->supportSharing()
|
||||||
&& _BlendTex[1] && _BlendTex[1]->supportSharing();
|
&& _BlendTex[1] && _BlendTex[1]->supportSharing();
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
std::string CTextureBlend::getShareName() const
|
std::string CTextureBlend::getShareName() const
|
||||||
{
|
{
|
||||||
nlassert(supportSharing());
|
nlassert(supportSharing());
|
||||||
|
@ -48,14 +48,14 @@ std::string CTextureBlend::getShareName() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
void CTextureBlend::enableSharing(bool enabled /*= false*/)
|
void CTextureBlend::enableSharing(bool enabled /*= false*/)
|
||||||
{
|
{
|
||||||
_SharingEnabled = enabled;
|
_SharingEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
void CTextureBlend::release()
|
void CTextureBlend::release()
|
||||||
{
|
{
|
||||||
if (_BlendTex[0] && _BlendTex[0]->getReleasable()) _BlendTex[0]->release();
|
if (_BlendTex[0] && _BlendTex[0]->getReleasable()) _BlendTex[0]->release();
|
||||||
|
@ -63,7 +63,7 @@ void CTextureBlend::release()
|
||||||
ITexture::release();
|
ITexture::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
bool CTextureBlend::setBlendFactor(uint16 factor)
|
bool CTextureBlend::setBlendFactor(uint16 factor)
|
||||||
{
|
{
|
||||||
nlassert(factor <= 256);
|
nlassert(factor <= 256);
|
||||||
|
@ -77,7 +77,7 @@ bool CTextureBlend::setBlendFactor(uint16 factor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
void CTextureBlend::setBlendTexture(uint index, ITexture *tex)
|
void CTextureBlend::setBlendTexture(uint index, ITexture *tex)
|
||||||
{
|
{
|
||||||
nlassert(index < 2);
|
nlassert(index < 2);
|
||||||
|
@ -89,7 +89,7 @@ void CTextureBlend::setBlendTexture(uint index, ITexture *tex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
void CTextureBlend::doGenerate(bool async)
|
void CTextureBlend::doGenerate(bool async)
|
||||||
{
|
{
|
||||||
if (!_BlendTex[0] || !_BlendTex[1])
|
if (!_BlendTex[0] || !_BlendTex[1])
|
||||||
|
@ -107,7 +107,7 @@ void CTextureBlend::doGenerate(bool async)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************************************************************
|
// ************************************************************************
|
||||||
void CTextureBlend::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CTextureBlend::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialVersion(0);
|
f.serialVersion(0);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
CTextureEmboss::CTextureEmboss() : _Ambient(CRGBA::Black),
|
CTextureEmboss::CTextureEmboss() : _Ambient(CRGBA::Black),
|
||||||
_Diffuse(CRGBA::White),
|
_Diffuse(CRGBA::White),
|
||||||
_DisableSharing(false),
|
_DisableSharing(false),
|
||||||
|
@ -30,7 +30,7 @@ CTextureEmboss::CTextureEmboss() : _Ambient(CRGBA::Black),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CTextureEmboss::setHeightMap(ITexture *heightMap)
|
void CTextureEmboss::setHeightMap(ITexture *heightMap)
|
||||||
{
|
{
|
||||||
if (heightMap != _HeightMap)
|
if (heightMap != _HeightMap)
|
||||||
|
@ -40,7 +40,7 @@ void CTextureEmboss::setHeightMap(ITexture *heightMap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CTextureEmboss::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CTextureEmboss::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialVersion(0);
|
f.serialVersion(0);
|
||||||
|
@ -63,20 +63,20 @@ void CTextureEmboss::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(_DisableSharing);
|
f.serial(_DisableSharing);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
bool CTextureEmboss::supportSharing() const
|
bool CTextureEmboss::supportSharing() const
|
||||||
{
|
{
|
||||||
return !_DisableSharing && _HeightMap && _HeightMap->supportSharing();
|
return !_DisableSharing && _HeightMap && _HeightMap->supportSharing();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
std::string CTextureEmboss::getShareName() const
|
std::string CTextureEmboss::getShareName() const
|
||||||
{
|
{
|
||||||
nlassert(supportSharing());
|
nlassert(supportSharing());
|
||||||
return "Emboss:" + _HeightMap->getShareName();
|
return "Emboss:" + _HeightMap->getShareName();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CTextureEmboss::release()
|
void CTextureEmboss::release()
|
||||||
{
|
{
|
||||||
ITexture::release();
|
ITexture::release();
|
||||||
|
@ -89,7 +89,7 @@ void CTextureEmboss::release()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CTextureEmboss::doGenerate(bool /* async */)
|
void CTextureEmboss::doGenerate(bool /* async */)
|
||||||
{
|
{
|
||||||
if (!_HeightMap)
|
if (!_HeightMap)
|
||||||
|
|
|
@ -33,7 +33,7 @@ H_AUTO_DECL( NL3D_Misc_VisualCollisionEntity_GetLight )
|
||||||
#define NL3D_HAUTO_LIGHT_VCE H_AUTO_USE( NL3D_Misc_VisualCollisionEntity_GetLight )
|
#define NL3D_HAUTO_LIGHT_VCE H_AUTO_USE( NL3D_Misc_VisualCollisionEntity_GetLight )
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
bool CVisualCollisionEntityUser::snapToGround(CVector &pos)
|
bool CVisualCollisionEntityUser::snapToGround(CVector &pos)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_SNAP_VCE;
|
NL3D_HAUTO_SNAP_VCE;
|
||||||
|
|
|
@ -59,7 +59,7 @@ static uint32 inline getFVBVertex(uint section, uint side)
|
||||||
const uint NUM_FACES_TO_RENDER = 5;
|
const uint NUM_FACES_TO_RENDER = 5;
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
CWaterEnvMap::CWaterEnvMap()
|
CWaterEnvMap::CWaterEnvMap()
|
||||||
{
|
{
|
||||||
_UpdateTime = 0;
|
_UpdateTime = 0;
|
||||||
|
@ -73,7 +73,7 @@ CWaterEnvMap::CWaterEnvMap()
|
||||||
_Alpha = 255;
|
_Alpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime, IDriver &driver)
|
void CWaterEnvMap::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime, IDriver &driver)
|
||||||
{
|
{
|
||||||
// Allocate cube map
|
// Allocate cube map
|
||||||
|
@ -154,7 +154,7 @@ void CWaterEnvMap::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimatio
|
||||||
_Env2DSize = projection2DSize;
|
_Env2DSize = projection2DSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::update(TGlobalAnimationTime time, IDriver &driver)
|
void CWaterEnvMap::update(TGlobalAnimationTime time, IDriver &driver)
|
||||||
{
|
{
|
||||||
if (_LastRenderTime == time) return;
|
if (_LastRenderTime == time) return;
|
||||||
|
@ -206,7 +206,7 @@ void CWaterEnvMap::update(TGlobalAnimationTime time, IDriver &driver)
|
||||||
driver.setRenderTarget(NULL);
|
driver.setRenderTarget(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::doInit()
|
void CWaterEnvMap::doInit()
|
||||||
{
|
{
|
||||||
if (!_FlattenVBInitialized)
|
if (!_FlattenVBInitialized)
|
||||||
|
@ -241,7 +241,7 @@ static CVertexProgram testMeshVP(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::renderTestMesh(IDriver &driver)
|
void CWaterEnvMap::renderTestMesh(IDriver &driver)
|
||||||
{
|
{
|
||||||
doInit();
|
doInit();
|
||||||
|
@ -269,7 +269,7 @@ void CWaterEnvMap::renderTestMesh(IDriver &driver)
|
||||||
driver.activeVertexProgram(NULL);
|
driver.activeVertexProgram(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::initFlattenVB()
|
void CWaterEnvMap::initFlattenVB()
|
||||||
{
|
{
|
||||||
_FlattenVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
_FlattenVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
||||||
|
@ -336,7 +336,7 @@ void CWaterEnvMap::initFlattenVB()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::invalidate()
|
void CWaterEnvMap::invalidate()
|
||||||
{
|
{
|
||||||
_LastRenderTime = -1;
|
_LastRenderTime = -1;
|
||||||
|
@ -352,7 +352,7 @@ void CWaterEnvMap::invalidate()
|
||||||
_NumRenderedFaces = 0;
|
_NumRenderedFaces = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
void CWaterEnvMap::initTestVB()
|
void CWaterEnvMap::initTestVB()
|
||||||
{
|
{
|
||||||
_TestVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
_TestVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
||||||
// CWaterEnvMapUser //
|
// CWaterEnvMapUser //
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CWaterEnvMapUser::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime)
|
void CWaterEnvMapUser::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime)
|
||||||
{
|
{
|
||||||
EnvMap.init(cubeMapSize, projection2DSize, updateTime, *(EnvMap.Driver->getDriver()));
|
EnvMap.init(cubeMapSize, projection2DSize, updateTime, *(EnvMap.Driver->getDriver()));
|
||||||
|
@ -36,7 +36,7 @@ void CWaterEnvMapUser::init(uint cubeMapSize, uint projection2DSize, TGlobalAnim
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CWaterEnvMapRenderHelper::render(TFace face, TGlobalAnimationTime time, UDriver &drv)
|
void CWaterEnvMapRenderHelper::render(TFace face, TGlobalAnimationTime time, UDriver &drv)
|
||||||
{
|
{
|
||||||
CMatrix mat;
|
CMatrix mat;
|
||||||
|
@ -61,7 +61,7 @@ void CWaterEnvMapRenderHelper::render(TFace face, TGlobalAnimationTime time, UDr
|
||||||
// CWaterEnvMapRenderFromUScene //
|
// CWaterEnvMapRenderFromUScene //
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
CWaterEnvMapRenderFromUScene::CWaterEnvMapRenderFromUScene()
|
CWaterEnvMapRenderFromUScene::CWaterEnvMapRenderFromUScene()
|
||||||
{
|
{
|
||||||
_Scene = NULL;
|
_Scene = NULL;
|
||||||
|
@ -70,7 +70,7 @@ CWaterEnvMapRenderFromUScene::CWaterEnvMapRenderFromUScene()
|
||||||
_RenderPart = UScene::RenderAll;
|
_RenderPart = UScene::RenderAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CWaterEnvMapRenderFromUScene::setScene(UScene *scene, UCamera cam)
|
void CWaterEnvMapRenderFromUScene::setScene(UScene *scene, UCamera cam)
|
||||||
{
|
{
|
||||||
_Scene = scene;
|
_Scene = scene;
|
||||||
|
@ -82,7 +82,7 @@ void CWaterEnvMapRenderFromUScene::setScene(UScene *scene, UCamera cam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CWaterEnvMapRenderFromUScene::doRender(const CMatrix &camMatrix, TGlobalAnimationTime time, UDriver &drv)
|
void CWaterEnvMapRenderFromUScene::doRender(const CMatrix &camMatrix, TGlobalAnimationTime time, UDriver &drv)
|
||||||
{
|
{
|
||||||
if (!_Scene) return;
|
if (!_Scene) return;
|
||||||
|
@ -108,7 +108,7 @@ void CWaterEnvMapRenderFromUScene::doRender(const CMatrix &camMatrix, TGlobalAni
|
||||||
postRender(time, drv);
|
postRender(time, drv);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************
|
// ***********************************************************************************
|
||||||
void CWaterEnvMapUser::invalidate()
|
void CWaterEnvMapUser::invalidate()
|
||||||
{
|
{
|
||||||
EnvMap.invalidate();
|
EnvMap.invalidate();
|
||||||
|
|
|
@ -699,7 +699,7 @@ void CWaterHeightMap::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*** perform a bilinear on 4 values
|
// *** perform a bilinear on 4 values
|
||||||
// 0---1
|
// 0---1
|
||||||
// | |
|
// | |
|
||||||
// 3---2
|
// 3---2
|
||||||
|
|
|
@ -208,7 +208,7 @@ static void inline FillWaterVB(uint8 *&vbPointer, float x, float y, float z, flo
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
/*
|
/*
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
__forceinline
|
__forceinline
|
||||||
|
@ -331,7 +331,7 @@ static void SetupWaterVertex( sint qLeft,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
/*
|
/*
|
||||||
static void DrawPoly2D(CVertexBuffer &vb, IDriver *drv, const NLMISC::CMatrix &mat, const NLMISC::CPolygon &p)
|
static void DrawPoly2D(CVertexBuffer &vb, IDriver *drv, const NLMISC::CMatrix &mat, const NLMISC::CPolygon &p)
|
||||||
{
|
{
|
||||||
|
@ -366,7 +366,7 @@ static void DrawPoly2D(CVertexBuffer &vb, IDriver *drv, const NLMISC::CMatrix &m
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
/*
|
/*
|
||||||
void CWaterModel::traverseRender()
|
void CWaterModel::traverseRender()
|
||||||
{
|
{
|
||||||
|
@ -740,9 +740,9 @@ void CWaterModel::traverseRender()
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//***********************
|
// ***********************
|
||||||
// Water MATERIAL SETUP //
|
// Water MATERIAL SETUP //
|
||||||
//***********************
|
// ***********************
|
||||||
/*
|
/*
|
||||||
void CWaterModel::setupMaterialNVertexShader(IDriver *drv, CWaterShape *shape, const NLMISC::CVector &obsPos, bool above, float maxDist, float zHeight)
|
void CWaterModel::setupMaterialNVertexShader(IDriver *drv, CWaterShape *shape, const NLMISC::CVector &obsPos, bool above, float maxDist, float zHeight)
|
||||||
{
|
{
|
||||||
|
@ -1169,7 +1169,7 @@ void CWaterModel::computeClippedPoly()
|
||||||
_ClippedPoly.clip(tp);
|
_ClippedPoly.clip(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CWaterModel::unlink()
|
void CWaterModel::unlink()
|
||||||
{
|
{
|
||||||
if (!_Prev)
|
if (!_Prev)
|
||||||
|
@ -1186,7 +1186,7 @@ void CWaterModel::unlink()
|
||||||
_Prev = NULL;
|
_Prev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CWaterModel::link()
|
void CWaterModel::link()
|
||||||
{
|
{
|
||||||
nlassert(_Next == NULL);
|
nlassert(_Next == NULL);
|
||||||
|
@ -1204,7 +1204,7 @@ void CWaterModel::link()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
uint CWaterModel::getNumWantedVertices()
|
uint CWaterModel::getNumWantedVertices()
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_Water_Render );
|
H_AUTO( NL3D_Water_Render );
|
||||||
|
@ -1359,7 +1359,7 @@ uint CWaterModel::getNumWantedVertices()
|
||||||
return totalNumVertices;
|
return totalNumVertices;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
uint CWaterModel::fillVB(void *datas, uint startTri, IDriver &drv)
|
uint CWaterModel::fillVB(void *datas, uint startTri, IDriver &drv)
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_Water_Render );
|
H_AUTO( NL3D_Water_Render );
|
||||||
|
@ -1416,7 +1416,7 @@ void computeWaterVertexSoft(float px, float py, CVector &pos, CVector2f &envMapT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
uint CWaterModel::fillVBSoft(void *datas, uint startTri)
|
uint CWaterModel::fillVBSoft(void *datas, uint startTri)
|
||||||
{
|
{
|
||||||
_StartTri = (uint32) startTri;
|
_StartTri = (uint32) startTri;
|
||||||
|
@ -1531,7 +1531,7 @@ void computeWaterVertexHard(float px, float py, CVector &pos, const CVector &cam
|
||||||
pos.z = 0.f;
|
pos.z = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
||||||
{
|
{
|
||||||
_StartTri = (uint32) startTri;
|
_StartTri = (uint32) startTri;
|
||||||
|
@ -1609,7 +1609,7 @@ uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************************************
|
// ***************************************************************************************************************
|
||||||
void CWaterModel::traverseRender()
|
void CWaterModel::traverseRender()
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_Water_Render );
|
H_AUTO( NL3D_Water_Render );
|
||||||
|
@ -1677,7 +1677,7 @@ void CWaterModel::traverseRender()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
bool CWaterModel::clip()
|
bool CWaterModel::clip()
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_Water_Render );
|
H_AUTO( NL3D_Water_Render );
|
||||||
|
@ -1707,7 +1707,7 @@ struct CSimpleVertexInfo
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
/*
|
/*
|
||||||
void CWaterModel::doSimpleRender(IDriver *drv)
|
void CWaterModel::doSimpleRender(IDriver *drv)
|
||||||
{
|
{
|
||||||
|
@ -1915,7 +1915,7 @@ void CWaterModel::doSimpleRender(IDriver *drv)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
void CWaterModel::updateDiffuseMapMatrix(bool force /* = false*/)
|
void CWaterModel::updateDiffuseMapMatrix(bool force /* = false*/)
|
||||||
{
|
{
|
||||||
if (compareMatrixDate(_MatrixUpdateDate) ||force)
|
if (compareMatrixDate(_MatrixUpdateDate) ||force)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
CContiguousBlockAllocator::CContiguousBlockAllocator()
|
CContiguousBlockAllocator::CContiguousBlockAllocator()
|
||||||
{
|
{
|
||||||
_BlockStart = NULL;
|
_BlockStart = NULL;
|
||||||
|
@ -33,13 +33,13 @@ CContiguousBlockAllocator::CContiguousBlockAllocator()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
CContiguousBlockAllocator::~CContiguousBlockAllocator()
|
CContiguousBlockAllocator::~CContiguousBlockAllocator()
|
||||||
{
|
{
|
||||||
init(0);
|
init(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CContiguousBlockAllocator::init(uint numBytes /*=0*/)
|
void CContiguousBlockAllocator::init(uint numBytes /*=0*/)
|
||||||
{
|
{
|
||||||
if (_BlockStart) _DefaultAlloc.deallocate(_BlockStart, _BlockEnd - _BlockStart);
|
if (_BlockStart) _DefaultAlloc.deallocate(_BlockStart, _BlockEnd - _BlockStart);
|
||||||
|
@ -60,7 +60,7 @@ void CContiguousBlockAllocator::init(uint numBytes /*=0*/)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void *CContiguousBlockAllocator::alloc(uint numBytes)
|
void *CContiguousBlockAllocator::alloc(uint numBytes)
|
||||||
{
|
{
|
||||||
if (numBytes == 0) return NULL;
|
if (numBytes == 0) return NULL;
|
||||||
|
@ -84,7 +84,7 @@ void *CContiguousBlockAllocator::alloc(uint numBytes)
|
||||||
return _DefaultAlloc.allocate(numBytes);
|
return _DefaultAlloc.allocate(numBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CContiguousBlockAllocator::free(void *block, uint numBytes)
|
void CContiguousBlockAllocator::free(void *block, uint numBytes)
|
||||||
{
|
{
|
||||||
if (!block) return;
|
if (!block) return;
|
||||||
|
|
|
@ -31,12 +31,12 @@ static LRESULT CALLBACK nlDefaultWinProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
CDummyWindow::CDummyWindow() : _HWnd(NULL)
|
CDummyWindow::CDummyWindow() : _HWnd(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
bool CDummyWindow::init(HINSTANCE hInstance, WNDPROC winProc)
|
bool CDummyWindow::init(HINSTANCE hInstance, WNDPROC winProc)
|
||||||
{
|
{
|
||||||
release();
|
release();
|
||||||
|
@ -72,7 +72,7 @@ bool CDummyWindow::init(HINSTANCE hInstance, WNDPROC winProc)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
void CDummyWindow::release()
|
void CDummyWindow::release()
|
||||||
{
|
{
|
||||||
if (_HWnd)
|
if (_HWnd)
|
||||||
|
@ -82,7 +82,7 @@ void CDummyWindow::release()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
CDummyWindow::~CDummyWindow()
|
CDummyWindow::~CDummyWindow()
|
||||||
{
|
{
|
||||||
release();
|
release();
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CFixedSizeAllocator::CFixedSizeAllocator(uint numBytesPerBlock, uint numBlockPerChunk)
|
CFixedSizeAllocator::CFixedSizeAllocator(uint numBytesPerBlock, uint numBlockPerChunk)
|
||||||
{
|
{
|
||||||
_FreeSpace = NULL;
|
_FreeSpace = NULL;
|
||||||
|
@ -32,7 +32,7 @@ CFixedSizeAllocator::CFixedSizeAllocator(uint numBytesPerBlock, uint numBlockPer
|
||||||
_NumAlloc = 0;
|
_NumAlloc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CFixedSizeAllocator::~CFixedSizeAllocator()
|
CFixedSizeAllocator::~CFixedSizeAllocator()
|
||||||
{
|
{
|
||||||
if (_NumAlloc != 0)
|
if (_NumAlloc != 0)
|
||||||
|
@ -50,7 +50,7 @@ CFixedSizeAllocator::~CFixedSizeAllocator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void *CFixedSizeAllocator::alloc()
|
void *CFixedSizeAllocator::alloc()
|
||||||
{
|
{
|
||||||
if (!_FreeSpace)
|
if (!_FreeSpace)
|
||||||
|
@ -62,7 +62,7 @@ void *CFixedSizeAllocator::alloc()
|
||||||
return _FreeSpace->unlink();
|
return _FreeSpace->unlink();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CFixedSizeAllocator::free(void *block)
|
void CFixedSizeAllocator::free(void *block)
|
||||||
{
|
{
|
||||||
if (!block) return;
|
if (!block) return;
|
||||||
|
@ -76,20 +76,20 @@ void CFixedSizeAllocator::free(void *block)
|
||||||
node->link();
|
node->link();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
uint CFixedSizeAllocator::CChunk::getBlockSizeWithOverhead() const
|
uint CFixedSizeAllocator::CChunk::getBlockSizeWithOverhead() const
|
||||||
{
|
{
|
||||||
return std::max((uint)(sizeof(CNode) - offsetof(CNode, Next)),(uint)(Allocator->getNumBytesPerBlock())) + offsetof(CNode, Next);
|
return std::max((uint)(sizeof(CNode) - offsetof(CNode, Next)),(uint)(Allocator->getNumBytesPerBlock())) + offsetof(CNode, Next);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CFixedSizeAllocator::CChunk::CChunk()
|
CFixedSizeAllocator::CChunk::CChunk()
|
||||||
{
|
{
|
||||||
NumFreeObjs = 0;
|
NumFreeObjs = 0;
|
||||||
Allocator = NULL;
|
Allocator = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CFixedSizeAllocator::CChunk::~CChunk()
|
CFixedSizeAllocator::CChunk::~CChunk()
|
||||||
{
|
{
|
||||||
nlassert(Allocator != NULL);
|
nlassert(Allocator != NULL);
|
||||||
|
@ -103,7 +103,7 @@ CFixedSizeAllocator::CChunk::~CChunk()
|
||||||
delete Mem;
|
delete Mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CFixedSizeAllocator::CChunk::init(CFixedSizeAllocator *alloc)
|
void CFixedSizeAllocator::CChunk::init(CFixedSizeAllocator *alloc)
|
||||||
{
|
{
|
||||||
nlassert(!Allocator);
|
nlassert(!Allocator);
|
||||||
|
@ -134,7 +134,7 @@ void CFixedSizeAllocator::CChunk::init(CFixedSizeAllocator *alloc)
|
||||||
++(alloc->_NumChunks);
|
++(alloc->_NumChunks);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CFixedSizeAllocator::CNode &CFixedSizeAllocator::CChunk::getNode(uint index)
|
CFixedSizeAllocator::CNode &CFixedSizeAllocator::CChunk::getNode(uint index)
|
||||||
{
|
{
|
||||||
nlassert(Allocator != NULL);
|
nlassert(Allocator != NULL);
|
||||||
|
@ -142,7 +142,7 @@ CFixedSizeAllocator::CNode &CFixedSizeAllocator::CChunk::getNode(uint index)
|
||||||
return *(CNode *) ((uint8 *) Mem + index * getBlockSizeWithOverhead());
|
return *(CNode *) ((uint8 *) Mem + index * getBlockSizeWithOverhead());
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CFixedSizeAllocator::CChunk::add()
|
void CFixedSizeAllocator::CChunk::add()
|
||||||
{
|
{
|
||||||
nlassert(Allocator);
|
nlassert(Allocator);
|
||||||
|
@ -158,7 +158,7 @@ void CFixedSizeAllocator::CChunk::add()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CFixedSizeAllocator::CChunk::grab()
|
void CFixedSizeAllocator::CChunk::grab()
|
||||||
{
|
{
|
||||||
// a node of this chunk has been given back
|
// a node of this chunk has been given back
|
||||||
|
@ -166,7 +166,7 @@ void CFixedSizeAllocator::CChunk::grab()
|
||||||
-- NumFreeObjs;
|
-- NumFreeObjs;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void *CFixedSizeAllocator::CNode::unlink()
|
void *CFixedSizeAllocator::CNode::unlink()
|
||||||
{
|
{
|
||||||
nlassert(Prev != NULL);
|
nlassert(Prev != NULL);
|
||||||
|
@ -177,7 +177,7 @@ void *CFixedSizeAllocator::CNode::unlink()
|
||||||
return (void *) &Next;
|
return (void *) &Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CFixedSizeAllocator::CNode::link()
|
void CFixedSizeAllocator::CNode::link()
|
||||||
{
|
{
|
||||||
// destroy the obj to get back uninitialized memory
|
// destroy the obj to get back uninitialized memory
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
//********************************************************************************************************************************
|
// ********************************************************************************************************************************
|
||||||
void CGridTraversal::startTraverse(const NLMISC::CVector2f &start, sint &nextX, sint &nextY)
|
void CGridTraversal::startTraverse(const NLMISC::CVector2f &start, sint &nextX, sint &nextY)
|
||||||
{
|
{
|
||||||
nextX = (sint) floorf(start.x);
|
nextX = (sint) floorf(start.x);
|
||||||
nextY = (sint) floorf(start.y);
|
nextY = (sint) floorf(start.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************************************************
|
// ********************************************************************************************************************************
|
||||||
bool CGridTraversal::traverse(const NLMISC::CVector2f &start, const NLMISC::CVector2f &dir, sint &x, sint &y)
|
bool CGridTraversal::traverse(const NLMISC::CVector2f &start, const NLMISC::CVector2f &dir, sint &x, sint &y)
|
||||||
{
|
{
|
||||||
if (dir.x > 0.f)
|
if (dir.x > 0.f)
|
||||||
|
|
|
@ -33,13 +33,13 @@ namespace NLMISC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
// CInterWindowMsgQueue::CProtagonist //
|
// CInterWindowMsgQueue::CProtagonist //
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
CInterWindowMsgQueue::CProtagonist::CProtagonist() : _Id(0),
|
CInterWindowMsgQueue::CProtagonist::CProtagonist() : _Id(0),
|
||||||
_Wnd(0),
|
_Wnd(0),
|
||||||
_SharedMemMutex(0),
|
_SharedMemMutex(0),
|
||||||
|
@ -48,13 +48,13 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
CInterWindowMsgQueue::CProtagonist::~CProtagonist()
|
CInterWindowMsgQueue::CProtagonist::~CProtagonist()
|
||||||
{
|
{
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CProtagonist::release()
|
void CInterWindowMsgQueue::CProtagonist::release()
|
||||||
{
|
{
|
||||||
CloseHandle(_SharedMemMutex);
|
CloseHandle(_SharedMemMutex);
|
||||||
|
@ -69,7 +69,7 @@ namespace NLMISC
|
||||||
// unhook window
|
// unhook window
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CProtagonist::acquireSMMutex()
|
void CInterWindowMsgQueue::CProtagonist::acquireSMMutex()
|
||||||
{
|
{
|
||||||
nlassert(_SharedMemMutex);
|
nlassert(_SharedMemMutex);
|
||||||
|
@ -77,14 +77,14 @@ namespace NLMISC
|
||||||
nlassert(result != WAIT_FAILED);
|
nlassert(result != WAIT_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CProtagonist::releaseSMMutex()
|
void CInterWindowMsgQueue::CProtagonist::releaseSMMutex()
|
||||||
{
|
{
|
||||||
nlassert(_SharedMemMutex);
|
nlassert(_SharedMemMutex);
|
||||||
ReleaseMutex(_SharedMemMutex);
|
ReleaseMutex(_SharedMemMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::CProtagonist::init(uint32 id)
|
bool CInterWindowMsgQueue::CProtagonist::init(uint32 id)
|
||||||
{
|
{
|
||||||
nlassert(id != 0);
|
nlassert(id != 0);
|
||||||
|
@ -98,7 +98,7 @@ namespace NLMISC
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CProtagonist::setWnd(HWND wnd)
|
void CInterWindowMsgQueue::CProtagonist::setWnd(HWND wnd)
|
||||||
{
|
{
|
||||||
nlassert(wnd != 0);
|
nlassert(wnd != 0);
|
||||||
|
@ -114,7 +114,7 @@ namespace NLMISC
|
||||||
_Wnd = wnd;
|
_Wnd = wnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
HWND CInterWindowMsgQueue::CProtagonist::getWnd()
|
HWND CInterWindowMsgQueue::CProtagonist::getWnd()
|
||||||
{
|
{
|
||||||
if (!_SharedMemMutex)
|
if (!_SharedMemMutex)
|
||||||
|
@ -145,20 +145,20 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
// CInterWindowMsgQueue::CSendTask //
|
// CInterWindowMsgQueue::CSendTask //
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
CInterWindowMsgQueue::CSendTask::CSendTask(CInterWindowMsgQueue *parent) : _StopAsked(false)
|
CInterWindowMsgQueue::CSendTask::CSendTask(CInterWindowMsgQueue *parent) : _StopAsked(false)
|
||||||
{
|
{
|
||||||
nlassert(parent);
|
nlassert(parent);
|
||||||
_Parent = parent;
|
_Parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CSendTask::run()
|
void CInterWindowMsgQueue::CSendTask::run()
|
||||||
{
|
{
|
||||||
while(!_StopAsked)
|
while(!_StopAsked)
|
||||||
|
@ -209,39 +209,39 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::CSendTask::stop()
|
void CInterWindowMsgQueue::CSendTask::stop()
|
||||||
{
|
{
|
||||||
_StopAsked = true;
|
_StopAsked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
// CInterWindowMsgQueue //
|
// CInterWindowMsgQueue //
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
CInterWindowMsgQueue::CInterWindowMsgQueue() : _SendTask(NULL),
|
CInterWindowMsgQueue::CInterWindowMsgQueue() : _SendTask(NULL),
|
||||||
_SendThread(NULL),
|
_SendThread(NULL),
|
||||||
_OutMessageQueue("CInterWindowMsgQueue::_OutMessageQueue")
|
_OutMessageQueue("CInterWindowMsgQueue::_OutMessageQueue")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::init(HWND ownerWindow, uint32 localId, uint32 foreignId)
|
bool CInterWindowMsgQueue::init(HWND ownerWindow, uint32 localId, uint32 foreignId)
|
||||||
{
|
{
|
||||||
return initInternal(NULL, ownerWindow, localId, foreignId);
|
return initInternal(NULL, ownerWindow, localId, foreignId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::init(HINSTANCE hInstance, uint32 localId, uint32 foreignId)
|
bool CInterWindowMsgQueue::init(HINSTANCE hInstance, uint32 localId, uint32 foreignId)
|
||||||
{
|
{
|
||||||
return initInternal(hInstance, NULL, localId, foreignId);
|
return initInternal(hInstance, NULL, localId, foreignId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::initInternal(HINSTANCE hInstance, HWND ownerWindow, uint32 localId, uint32 foreignId)
|
bool CInterWindowMsgQueue::initInternal(HINSTANCE hInstance, HWND ownerWindow, uint32 localId, uint32 foreignId)
|
||||||
{
|
{
|
||||||
if (!ownerWindow)
|
if (!ownerWindow)
|
||||||
|
@ -307,7 +307,7 @@ namespace NLMISC
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::release()
|
void CInterWindowMsgQueue::release()
|
||||||
{
|
{
|
||||||
if (_LocalWindow.getWnd() != 0)
|
if (_LocalWindow.getWnd() != 0)
|
||||||
|
@ -458,13 +458,13 @@ namespace NLMISC
|
||||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
CInterWindowMsgQueue::~CInterWindowMsgQueue()
|
CInterWindowMsgQueue::~CInterWindowMsgQueue()
|
||||||
{
|
{
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::clearOutQueue()
|
void CInterWindowMsgQueue::clearOutQueue()
|
||||||
{
|
{
|
||||||
CSynchronized<TMsgList>::CAccessor outMessageQueue(&_OutMessageQueue);
|
CSynchronized<TMsgList>::CAccessor outMessageQueue(&_OutMessageQueue);
|
||||||
|
@ -474,7 +474,7 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
void CInterWindowMsgQueue::sendMessage(CMemStream &msg)
|
void CInterWindowMsgQueue::sendMessage(CMemStream &msg)
|
||||||
{
|
{
|
||||||
if (!msg.isReading())
|
if (!msg.isReading())
|
||||||
|
@ -491,7 +491,7 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::pumpMessage(CMemStream &dest)
|
bool CInterWindowMsgQueue::pumpMessage(CMemStream &dest)
|
||||||
{
|
{
|
||||||
if (_InMessageQueue.empty()) return false;
|
if (_InMessageQueue.empty()) return false;
|
||||||
|
@ -509,20 +509,20 @@ namespace NLMISC
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
bool CInterWindowMsgQueue::connected() const
|
bool CInterWindowMsgQueue::connected() const
|
||||||
{
|
{
|
||||||
return const_cast<CProtagonist &>(_ForeignWindow).getWnd() != NULL;
|
return const_cast<CProtagonist &>(_ForeignWindow).getWnd() != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
uint CInterWindowMsgQueue::getSendQueueSize() const
|
uint CInterWindowMsgQueue::getSendQueueSize() const
|
||||||
{
|
{
|
||||||
CSynchronized<TMsgList>::CAccessor outMessageQueue(&const_cast<CSynchronized<TMsgList> &>(_OutMessageQueue));
|
CSynchronized<TMsgList>::CAccessor outMessageQueue(&const_cast<CSynchronized<TMsgList> &>(_OutMessageQueue));
|
||||||
return (uint)outMessageQueue.value().size();
|
return (uint)outMessageQueue.value().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************
|
// **************************************************************************************************
|
||||||
uint CInterWindowMsgQueue::getReceiveQueueSize() const
|
uint CInterWindowMsgQueue::getReceiveQueueSize() const
|
||||||
{
|
{
|
||||||
return (uint)_InMessageQueue.size();
|
return (uint)_InMessageQueue.size();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
/// build some hermite spline value, with the given points and tangents
|
/// build some hermite spline value, with the given points and tangents
|
||||||
static inline void BuildHermiteVector(const NLMISC::CVector2f &P0,
|
static inline void BuildHermiteVector(const NLMISC::CVector2f &P0,
|
||||||
const NLMISC::CVector2f &P1,
|
const NLMISC::CVector2f &P1,
|
||||||
|
@ -41,7 +41,7 @@ static inline void BuildHermiteVector(const NLMISC::CVector2f &P0,
|
||||||
h1 * P0.y + h2 * P1.y + h3 * T0.y + h4 * T1.y);
|
h1 * P0.y + h2 * P1.y + h3 * T0.y + h4 * T1.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
CMouseSmoother::CMouseSmoother(double samplingPeriod /*=0.2f*/)
|
CMouseSmoother::CMouseSmoother(double samplingPeriod /*=0.2f*/)
|
||||||
{
|
{
|
||||||
nlassert(samplingPeriod > 0);
|
nlassert(samplingPeriod > 0);
|
||||||
|
@ -50,7 +50,7 @@ CMouseSmoother::CMouseSmoother(double samplingPeriod /*=0.2f*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CMouseSmoother::setSamplingPeriod(double period)
|
void CMouseSmoother::setSamplingPeriod(double period)
|
||||||
{
|
{
|
||||||
if (period == _SamplingPeriod) return;
|
if (period == _SamplingPeriod) return;
|
||||||
|
@ -60,7 +60,7 @@ void CMouseSmoother::setSamplingPeriod(double period)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
NLMISC::CVector2f CMouseSmoother::samplePos(const CVector2f &wantedPos, double date)
|
NLMISC::CVector2f CMouseSmoother::samplePos(const CVector2f &wantedPos, double date)
|
||||||
{
|
{
|
||||||
if (!_Init)
|
if (!_Init)
|
||||||
|
@ -124,7 +124,7 @@ NLMISC::CVector2f CMouseSmoother::samplePos(const CVector2f &wantedPos, double d
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CMouseSmoother::reset()
|
void CMouseSmoother::reset()
|
||||||
{
|
{
|
||||||
_Init = false;
|
_Init = false;
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace NLMISC
|
||||||
CObjectArenaAllocator *CObjectArenaAllocator::_DefaultAllocator = NULL;
|
CObjectArenaAllocator *CObjectArenaAllocator::_DefaultAllocator = NULL;
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CObjectArenaAllocator::CObjectArenaAllocator(uint maxAllocSize, uint granularity /* = 4*/)
|
CObjectArenaAllocator::CObjectArenaAllocator(uint maxAllocSize, uint granularity /* = 4*/)
|
||||||
{
|
{
|
||||||
nlassert(granularity > 0);
|
nlassert(granularity > 0);
|
||||||
|
@ -40,7 +40,7 @@ CObjectArenaAllocator::CObjectArenaAllocator(uint maxAllocSize, uint granularity
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CObjectArenaAllocator::~CObjectArenaAllocator()
|
CObjectArenaAllocator::~CObjectArenaAllocator()
|
||||||
{
|
{
|
||||||
for(uint k = 0; k < _ObjectSizeToAllocator.size(); ++k)
|
for(uint k = 0; k < _ObjectSizeToAllocator.size(); ++k)
|
||||||
|
@ -49,7 +49,7 @@ CObjectArenaAllocator::~CObjectArenaAllocator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void *CObjectArenaAllocator::alloc(uint size)
|
void *CObjectArenaAllocator::alloc(uint size)
|
||||||
{
|
{
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
|
@ -90,7 +90,7 @@ void *CObjectArenaAllocator::alloc(uint size)
|
||||||
return (void *) ((uint8 *) block + sizeof(uint));
|
return (void *) ((uint8 *) block + sizeof(uint));
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CObjectArenaAllocator::free(void *block)
|
void CObjectArenaAllocator::free(void *block)
|
||||||
{
|
{
|
||||||
if (!block) return;
|
if (!block) return;
|
||||||
|
@ -127,7 +127,7 @@ void CObjectArenaAllocator::free(void *block)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
uint CObjectArenaAllocator::getNumAllocatedBlocks() const
|
uint CObjectArenaAllocator::getNumAllocatedBlocks() const
|
||||||
{
|
{
|
||||||
uint numObjs = 0;
|
uint numObjs = 0;
|
||||||
|
@ -138,7 +138,7 @@ uint CObjectArenaAllocator::getNumAllocatedBlocks() const
|
||||||
return numObjs;
|
return numObjs;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CObjectArenaAllocator &CObjectArenaAllocator::getDefaultAllocator()
|
CObjectArenaAllocator &CObjectArenaAllocator::getDefaultAllocator()
|
||||||
{
|
{
|
||||||
if (!_DefaultAllocator)
|
if (!_DefaultAllocator)
|
||||||
|
@ -151,7 +151,7 @@ CObjectArenaAllocator &CObjectArenaAllocator::getDefaultAllocator()
|
||||||
|
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CObjectArenaAllocator::dumpUnreleasedBlocks()
|
void CObjectArenaAllocator::dumpUnreleasedBlocks()
|
||||||
{
|
{
|
||||||
for(std::map<void *, uint>::iterator it = _MemBlockToAllocID.begin(); it != _MemBlockToAllocID.end(); ++it)
|
for(std::map<void *, uint>::iterator it = _MemBlockToAllocID.begin(); it != _MemBlockToAllocID.end(); ++it)
|
||||||
|
@ -160,7 +160,7 @@ void CObjectArenaAllocator::dumpUnreleasedBlocks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CObjectArenaAllocator::setBreakForAllocID(bool enabled, uint id)
|
void CObjectArenaAllocator::setBreakForAllocID(bool enabled, uint id)
|
||||||
{
|
{
|
||||||
_WantBreakOnAlloc = enabled;
|
_WantBreakOnAlloc = enabled;
|
||||||
|
|
|
@ -301,7 +301,7 @@ bool CWinProcess::setCPUMask(uint64 mask)
|
||||||
return SetProcessAffinityMask((HANDLE)_ProcessHandle, processAffinityMask)!=0;
|
return SetProcessAffinityMask((HANDLE)_ProcessHandle, processAffinityMask)!=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
/**
|
/**
|
||||||
* Simple wrapper around the PSAPI library
|
* Simple wrapper around the PSAPI library
|
||||||
* \author Nicolas Vizerie
|
* \author Nicolas Vizerie
|
||||||
|
@ -327,7 +327,7 @@ private:
|
||||||
bool _LoadFailed;
|
bool _LoadFailed;
|
||||||
};
|
};
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
CPSAPILib::CPSAPILib()
|
CPSAPILib::CPSAPILib()
|
||||||
{
|
{
|
||||||
_LoadFailed = false;
|
_LoadFailed = false;
|
||||||
|
@ -337,7 +337,7 @@ CPSAPILib::CPSAPILib()
|
||||||
EnumProcessModules = NULL;
|
EnumProcessModules = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
CPSAPILib::~CPSAPILib()
|
CPSAPILib::~CPSAPILib()
|
||||||
{
|
{
|
||||||
if (_PSAPILibHandle)
|
if (_PSAPILibHandle)
|
||||||
|
@ -346,7 +346,7 @@ CPSAPILib::~CPSAPILib()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
bool CPSAPILib::init()
|
bool CPSAPILib::init()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -381,7 +381,7 @@ static CPSAPILib PSAPILib;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
bool CWinProcess::enumProcessesId(std::vector<uint32> &processesId)
|
bool CWinProcess::enumProcessesId(std::vector<uint32> &processesId)
|
||||||
{
|
{
|
||||||
if (!PSAPILib.init()) return false;
|
if (!PSAPILib.init()) return false;
|
||||||
|
@ -407,7 +407,7 @@ bool CWinProcess::enumProcessesId(std::vector<uint32> &processesId)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
bool CWinProcess::enumProcessModules(uint32 processId, std::vector<std::string> &moduleNames)
|
bool CWinProcess::enumProcessModules(uint32 processId, std::vector<std::string> &moduleNames)
|
||||||
{
|
{
|
||||||
if (!PSAPILib.init()) return false;
|
if (!PSAPILib.init()) return false;
|
||||||
|
@ -445,7 +445,7 @@ bool CWinProcess::enumProcessModules(uint32 processId, std::vector<std::string>
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
uint32 CWinProcess::getProcessIdFromModuleFilename(const std::string &moduleFileName)
|
uint32 CWinProcess::getProcessIdFromModuleFilename(const std::string &moduleFileName)
|
||||||
{
|
{
|
||||||
std::vector<uint32> processesId;
|
std::vector<uint32> processesId;
|
||||||
|
@ -467,7 +467,7 @@ uint32 CWinProcess::getProcessIdFromModuleFilename(const std::string &moduleFile
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
bool CWinProcess::terminateProcess(uint32 processId, uint exitCode)
|
bool CWinProcess::terminateProcess(uint32 processId, uint exitCode)
|
||||||
{
|
{
|
||||||
if (!processId) return false;
|
if (!processId) return false;
|
||||||
|
@ -478,7 +478,7 @@ bool CWinProcess::terminateProcess(uint32 processId, uint exitCode)
|
||||||
return ok != FALSE;
|
return ok != FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************
|
// ****************************************************************************************************************
|
||||||
bool CWinProcess::terminateProcessFromModuleName(const std::string &moduleName, uint exitCode)
|
bool CWinProcess::terminateProcessFromModuleName(const std::string &moduleName, uint exitCode)
|
||||||
{
|
{
|
||||||
return terminateProcess(getProcessIdFromModuleFilename(moduleName), exitCode);
|
return terminateProcess(getProcessIdFromModuleFilename(moduleName), exitCode);
|
||||||
|
|
|
@ -124,9 +124,9 @@ NL3D::UParticleSystemInstance CAnimationFX::createMatchingInstance(const float *
|
||||||
return fx;
|
return fx;
|
||||||
}// createMatchingInstance //
|
}// createMatchingInstance //
|
||||||
|
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
// CAnimationFXSet
|
// CAnimationFXSet
|
||||||
//*******************************************************************************
|
// *******************************************************************************
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// init
|
// init
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
|
|
||||||
extern NL3D::UScene *Scene;
|
extern NL3D::UScene *Scene;
|
||||||
|
|
||||||
//*********************************************************************
|
// *********************************************************************
|
||||||
CAnimationFXIDArray::CAnimationFXIDArray()
|
CAnimationFXIDArray::CAnimationFXIDArray()
|
||||||
{
|
{
|
||||||
_AnimSet = NULL;
|
_AnimSet = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************
|
// *********************************************************************
|
||||||
void CAnimationFXIDArray::release()
|
void CAnimationFXIDArray::release()
|
||||||
{
|
{
|
||||||
_IDToFXArray.clear();
|
_IDToFXArray.clear();
|
||||||
|
@ -42,7 +42,7 @@ void CAnimationFXIDArray::release()
|
||||||
_AnimSet = NULL;
|
_AnimSet = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************
|
// *********************************************************************
|
||||||
void CAnimationFXIDArray::init(const CIDToStringArraySheet &sheet, NL3D::UAnimationSet *animSet, bool mustDeleteAnimSet /* = false*/)
|
void CAnimationFXIDArray::init(const CIDToStringArraySheet &sheet, NL3D::UAnimationSet *animSet, bool mustDeleteAnimSet /* = false*/)
|
||||||
{
|
{
|
||||||
release();
|
release();
|
||||||
|
@ -66,7 +66,7 @@ void CAnimationFXIDArray::init(const CIDToStringArraySheet &sheet, NL3D::UAnimat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************
|
// *********************************************************************
|
||||||
void CAnimationFXIDArray::init(const std::string &sheetName, NL3D::UAnimationSet *animSet, bool mustDeleteAnimSet /*= false*/)
|
void CAnimationFXIDArray::init(const std::string &sheetName, NL3D::UAnimationSet *animSet, bool mustDeleteAnimSet /*= false*/)
|
||||||
{
|
{
|
||||||
CIDToStringArraySheet *array = dynamic_cast<CIDToStringArraySheet *>(SheetMngr.get(NLMISC::CSheetId(sheetName)));
|
CIDToStringArraySheet *array = dynamic_cast<CIDToStringArraySheet *>(SheetMngr.get(NLMISC::CSheetId(sheetName)));
|
||||||
|
@ -77,7 +77,7 @@ void CAnimationFXIDArray::init(const std::string &sheetName, NL3D::UAnimationSet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************
|
// *********************************************************************
|
||||||
const CAnimationFX *CAnimationFXIDArray::getFX(uint32 id) const
|
const CAnimationFX *CAnimationFXIDArray::getFX(uint32 id) const
|
||||||
{
|
{
|
||||||
// after init, element are sorted by ids
|
// after init, element are sorted by ids
|
||||||
|
|
|
@ -35,19 +35,19 @@ using namespace NL3D;
|
||||||
|
|
||||||
extern CUserEntity *UserEntity;
|
extern CUserEntity *UserEntity;
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CAttachedFX::CAttachedFX()
|
CAttachedFX::CAttachedFX()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CAttachedFX::~CAttachedFX()
|
CAttachedFX::~CAttachedFX()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CAttachedFX::clear()
|
void CAttachedFX::clear()
|
||||||
{
|
{
|
||||||
if (!FX.empty())
|
if (!FX.empty())
|
||||||
|
@ -70,7 +70,7 @@ void CAttachedFX::clear()
|
||||||
TargeterUserBoneID = 0xff;
|
TargeterUserBoneID = 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CAttachedFX::create(CCharacterCL &parent,
|
void CAttachedFX::create(CCharacterCL &parent,
|
||||||
const CBuildInfo &buildInfo,
|
const CBuildInfo &buildInfo,
|
||||||
const CTargeterInfo &targeterInfo
|
const CTargeterInfo &targeterInfo
|
||||||
|
@ -84,7 +84,7 @@ void CAttachedFX::create(CCharacterCL &parent,
|
||||||
create(parent, instance, buildInfo, targeterInfo);
|
create(parent, instance, buildInfo, targeterInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CAttachedFX::create(CCharacterCL &parent,
|
void CAttachedFX::create(CCharacterCL &parent,
|
||||||
NL3D::UParticleSystemInstance instance,
|
NL3D::UParticleSystemInstance instance,
|
||||||
const CBuildInfo &buildInfo,
|
const CBuildInfo &buildInfo,
|
||||||
|
@ -216,7 +216,7 @@ void CAttachedFX::create(CCharacterCL &parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CAttachedFX::evalTargeterStickPos(NLMISC::CVector &dest) const
|
void CAttachedFX::evalTargeterStickPos(NLMISC::CVector &dest) const
|
||||||
{
|
{
|
||||||
CEntityCL *targeter = EntitiesMngr.entity(TargeterInfo.Slot);
|
CEntityCL *targeter = EntitiesMngr.entity(TargeterInfo.Slot);
|
||||||
|
@ -256,7 +256,7 @@ void CAttachedFX::evalTargeterStickPos(NLMISC::CVector &dest) const
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CAttachedFX::update(CCharacterCL &parent, const NLMISC::CMatrix &alignMatrix)
|
void CAttachedFX::update(CCharacterCL &parent, const NLMISC::CMatrix &alignMatrix)
|
||||||
{
|
{
|
||||||
if (AniFX && !FX.empty())
|
if (AniFX && !FX.empty())
|
||||||
|
|
|
@ -66,13 +66,13 @@ static void buildAttackPart(const std::string &sheetName, CAnimationFXSet &fxSet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
CAttack::CAttack()
|
CAttack::CAttack()
|
||||||
{
|
{
|
||||||
Sheet = NULL;
|
Sheet = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CAttack::init(const CAttackSheet *sheet, NL3D::UAnimationSet *as)
|
void CAttack::init(const CAttackSheet *sheet, NL3D::UAnimationSet *as)
|
||||||
{
|
{
|
||||||
nlassert(!Sheet); // init already done
|
nlassert(!Sheet); // init already done
|
||||||
|
@ -88,7 +88,7 @@ void CAttack::init(const CAttackSheet *sheet, NL3D::UAnimationSet *as)
|
||||||
buildAttackPart(Sheet->ImpactFX, ImpactFX, as);
|
buildAttackPart(Sheet->ImpactFX, ImpactFX, as);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CAttackList::init(const CAttackListSheet *attackList, NL3D::UAnimationSet *as)
|
void CAttackList::init(const CAttackListSheet *attackList, NL3D::UAnimationSet *as)
|
||||||
{
|
{
|
||||||
nlassert(_Attacks.empty());
|
nlassert(_Attacks.empty());
|
||||||
|
@ -125,7 +125,7 @@ struct CAttackEntryComp2
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
const CAttack *CAttackList::getAttackFromID(const CAttackIDSheet &id) const
|
const CAttack *CAttackList::getAttackFromID(const CAttackIDSheet &id) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_AttackList);
|
H_AUTO_USE(RZ_AttackList);
|
||||||
|
@ -139,7 +139,7 @@ const CAttack *CAttackList::getAttackFromID(const CAttackIDSheet &id) const
|
||||||
return &(it->Attack);
|
return &(it->Attack);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
CAttackListManager &CAttackListManager::getInstance()
|
CAttackListManager &CAttackListManager::getInstance()
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_AttackList)
|
H_AUTO_USE(RZ_AttackList)
|
||||||
|
@ -148,7 +148,7 @@ CAttackListManager &CAttackListManager::getInstance()
|
||||||
return *_Instance;
|
return *_Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CAttackListManager::releaseInstance()
|
void CAttackListManager::releaseInstance()
|
||||||
{
|
{
|
||||||
if( _Instance )
|
if( _Instance )
|
||||||
|
@ -156,7 +156,7 @@ void CAttackListManager::releaseInstance()
|
||||||
_Instance = NULL;
|
_Instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CAttackListManager::init()
|
void CAttackListManager::init()
|
||||||
{
|
{
|
||||||
if (_AnimationSet) return; // init already done
|
if (_AnimationSet) return; // init already done
|
||||||
|
@ -185,7 +185,7 @@ void CAttackListManager::init()
|
||||||
buildLinkFXs();
|
buildLinkFXs();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CAttackListManager::release()
|
void CAttackListManager::release()
|
||||||
{
|
{
|
||||||
if (!_AnimationSet) return;
|
if (!_AnimationSet) return;
|
||||||
|
@ -197,7 +197,7 @@ void CAttackListManager::release()
|
||||||
_Instance = NULL;
|
_Instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
const CAttackList *CAttackListManager::getAttackList(const std::string &name) const
|
const CAttackList *CAttackListManager::getAttackList(const std::string &name) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_AttackList)
|
H_AUTO_USE(RZ_AttackList)
|
||||||
|
@ -206,19 +206,19 @@ const CAttackList *CAttackListManager::getAttackList(const std::string &name) co
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
CAttackListManager::CAttackListManager()
|
CAttackListManager::CAttackListManager()
|
||||||
{
|
{
|
||||||
_AnimationSet = NULL;
|
_AnimationSet = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListManager::buildAurasFXs()
|
void CAttackListManager::buildAurasFXs()
|
||||||
{
|
{
|
||||||
_Auras.init("auras.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
_Auras.init("auras.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListManager::buildLinkFXs()
|
void CAttackListManager::buildLinkFXs()
|
||||||
{
|
{
|
||||||
_Links.init("links.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
_Links.init("links.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
||||||
|
|
|
@ -3754,7 +3754,7 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB
|
||||||
}// endCast //
|
}// endCast //
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CCharacterCL::updateCurrentAttack()
|
void CCharacterCL::updateCurrentAttack()
|
||||||
{
|
{
|
||||||
// This is a behaviour for the magic.
|
// This is a behaviour for the magic.
|
||||||
|
@ -3842,7 +3842,7 @@ inline static void getResistAndDistance(uint8 packedInfo, bool isDirectAttack, b
|
||||||
resist = (packedInfo & 128) != 0;
|
resist = (packedInfo & 128) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool directOffensifSpell, vector<double> &targetHitDates, TAnimStateKey animForCombat)
|
void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool directOffensifSpell, vector<double> &targetHitDates, TAnimStateKey animForCombat)
|
||||||
{
|
{
|
||||||
if (!_CurrentAttack) return;
|
if (!_CurrentAttack) return;
|
||||||
|
@ -4213,7 +4213,7 @@ void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool dir
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CCharacterCL::buildStaticObjectCastFX(const NLMISC::CVector &castWorldOrigin, NLMISC::CVector &castWorldPos, const CAttackSheet &/* sheet */, uint intensity)
|
void CCharacterCL::buildStaticObjectCastFX(const NLMISC::CVector &castWorldOrigin, NLMISC::CVector &castWorldPos, const CAttackSheet &/* sheet */, uint intensity)
|
||||||
{
|
{
|
||||||
if (intensity == 0) return;
|
if (intensity == 0) return;
|
||||||
|
@ -4250,7 +4250,7 @@ void CCharacterCL::buildStaticObjectCastFX(const NLMISC::CVector &castWorldOrigi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CCharacterCL::computeTargetStickMode(const CAttackSheet &sheet, const CAttackInfo &attackInfo, CFXStickMode &dest, CEntityCL &target)
|
void CCharacterCL::computeTargetStickMode(const CAttackSheet &sheet, const CAttackInfo &attackInfo, CFXStickMode &dest, CEntityCL &target)
|
||||||
{
|
{
|
||||||
bool hasPhysicalImpact = false;
|
bool hasPhysicalImpact = false;
|
||||||
|
@ -4290,7 +4290,7 @@ void CCharacterCL::computeTargetStickMode(const CAttackSheet &sheet, const CAtta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
bool CCharacterCL::createCurrentAttackEndPart(CProjectileBuild &destPB,
|
bool CCharacterCL::createCurrentAttackEndPart(CProjectileBuild &destPB,
|
||||||
const CAttack *currentAttack,
|
const CAttack *currentAttack,
|
||||||
const CCharacterCL &target,
|
const CCharacterCL &target,
|
||||||
|
@ -4393,7 +4393,7 @@ bool CCharacterCL::createCurrentAttackEndPart(CProjectileBuild &destPB,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CCharacterCL::computeBestCastRay(CEntityCL &targetEntity,
|
void CCharacterCL::computeBestCastRay(CEntityCL &targetEntity,
|
||||||
const CFXStickMode &targetStickMode,
|
const CFXStickMode &targetStickMode,
|
||||||
NLMISC::CVector &castWorldOrigin,
|
NLMISC::CVector &castWorldOrigin,
|
||||||
|
@ -4425,7 +4425,7 @@ void CCharacterCL::computeBestCastRay(CEntityCL &targetEntity,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
bool CCharacterCL::isCurrentBehaviourAttackEnd() const
|
bool CCharacterCL::isCurrentBehaviourAttackEnd() const
|
||||||
{
|
{
|
||||||
switch(_CurrentBehaviour.Behaviour)
|
switch(_CurrentBehaviour.Behaviour)
|
||||||
|
@ -8928,7 +8928,7 @@ void CCharacterCL::attachFX(const CAttachedFX::TSmartPtr fx)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
||||||
{
|
{
|
||||||
nlassert(index < MaxNumAura);
|
nlassert(index < MaxNumAura);
|
||||||
|
@ -8959,7 +8959,7 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell)
|
void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell)
|
||||||
{
|
{
|
||||||
// no-op if same link
|
// no-op if same link
|
||||||
|
@ -8989,7 +8989,7 @@ void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::startItemAttackFXs(bool activateTrails, uint intensity)
|
void CCharacterCL::startItemAttackFXs(bool activateTrails, uint intensity)
|
||||||
{
|
{
|
||||||
uint numItems = (uint)_Items.size();
|
uint numItems = (uint)_Items.size();
|
||||||
|
@ -9000,7 +9000,7 @@ void CCharacterCL::startItemAttackFXs(bool activateTrails, uint intensity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::stopItemAttackFXs()
|
void CCharacterCL::stopItemAttackFXs()
|
||||||
{
|
{
|
||||||
uint numItems = (uint)_Items.size();
|
uint numItems = (uint)_Items.size();
|
||||||
|
@ -9083,7 +9083,7 @@ void CCharacterCL::applyVisualFX(sint64 prop)
|
||||||
setLinkFX(linkFX, dispellFX);
|
setLinkFX(linkFX, dispellFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
const char *CCharacterCL::getBoneNameFromBodyPart(BODY::TBodyPart part, BODY::TSide side) const
|
const char *CCharacterCL::getBoneNameFromBodyPart(BODY::TBodyPart part, BODY::TSide side) const
|
||||||
{
|
{
|
||||||
if (!_Sheet) return CEntityCL::getBoneNameFromBodyPart(part, side);
|
if (!_Sheet) return CEntityCL::getBoneNameFromBodyPart(part, side);
|
||||||
|
@ -9091,14 +9091,14 @@ const char *CCharacterCL::getBoneNameFromBodyPart(BODY::TBodyPart part, BODY::TS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
const CItemSheet *CCharacterCL::getRightHandItemSheet() const
|
const CItemSheet *CCharacterCL::getRightHandItemSheet() const
|
||||||
{
|
{
|
||||||
if (_RHandInstIdx == CEntityCL::BadIndex) return NULL;
|
if (_RHandInstIdx == CEntityCL::BadIndex) return NULL;
|
||||||
return _Items[_RHandInstIdx].Sheet;
|
return _Items[_RHandInstIdx].Sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
const CItemSheet *CCharacterCL::getLeftHandItemSheet() const
|
const CItemSheet *CCharacterCL::getLeftHandItemSheet() const
|
||||||
{
|
{
|
||||||
if (_LHandInstIdx == CEntityCL::BadIndex) return NULL;
|
if (_LHandInstIdx == CEntityCL::BadIndex) return NULL;
|
||||||
|
@ -9120,7 +9120,7 @@ void CCharacterCL::resetAllSoundAnimId()
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint intensity, SLOTTYPE::EVisualSlot visualSlot, bool activateTrail)
|
void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint intensity, SLOTTYPE::EVisualSlot visualSlot, bool activateTrail)
|
||||||
{
|
{
|
||||||
if (intensity < 1 || intensity > 5) return;
|
if (intensity < 1 || intensity > 5) return;
|
||||||
|
@ -9203,13 +9203,13 @@ void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint inten
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::stopAttackFX()
|
void CCharacterCL::CWornItem::stopAttackFX()
|
||||||
{
|
{
|
||||||
if (!Trail.empty()) Trail.stop();
|
if (!Trail.empty()) Trail.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::initFXs(SLOTTYPE::EVisualSlot /* visualSlot */, NL3D::UInstance parent)
|
void CCharacterCL::CWornItem::initFXs(SLOTTYPE::EVisualSlot /* visualSlot */, NL3D::UInstance parent)
|
||||||
{
|
{
|
||||||
releaseFXs();
|
releaseFXs();
|
||||||
|
@ -9236,7 +9236,7 @@ void CCharacterCL::CWornItem::initFXs(SLOTTYPE::EVisualSlot /* visualSlot */, NL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
||||||
{
|
{
|
||||||
if (!Sheet) return;
|
if (!Sheet) return;
|
||||||
|
@ -9278,7 +9278,7 @@ void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::releaseFXs()
|
void CCharacterCL::CWornItem::releaseFXs()
|
||||||
{
|
{
|
||||||
if (Scene)
|
if (Scene)
|
||||||
|
@ -9290,7 +9290,7 @@ void CCharacterCL::CWornItem::releaseFXs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::CWornItem::setTrailSize(uint size)
|
void CCharacterCL::CWornItem::setTrailSize(uint size)
|
||||||
{
|
{
|
||||||
if (Trail.empty()) return;
|
if (Trail.empty()) return;
|
||||||
|
@ -9308,14 +9308,14 @@ void CCharacterCL::CWornItem::setTrailSize(uint size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id) const
|
const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id) const
|
||||||
{
|
{
|
||||||
if (!_Sheet) return NULL;
|
if (!_Sheet) return NULL;
|
||||||
return getAttack(id, _Sheet->AttackLists);
|
return getAttack(id, _Sheet->AttackLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id, const std::vector<NLMISC::TSStringId> &attackList) const
|
const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id, const std::vector<NLMISC::TSStringId> &attackList) const
|
||||||
{
|
{
|
||||||
for(std::vector<NLMISC::TSStringId>::const_reverse_iterator it = attackList.rbegin(); it != attackList.rend(); ++it)
|
for(std::vector<NLMISC::TSStringId>::const_reverse_iterator it = attackList.rbegin(); it != attackList.rend(); ++it)
|
||||||
|
@ -9331,7 +9331,7 @@ const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id, const std::vect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************************************
|
// ***********************************************************************************************************************
|
||||||
void CCharacterCL::initStaticFX()
|
void CCharacterCL::initStaticFX()
|
||||||
{
|
{
|
||||||
_StaticFX = NULL;
|
_StaticFX = NULL;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "animation_fx_set_sheet.h"
|
#include "animation_fx_set_sheet.h"
|
||||||
#include "nel/georges/u_form_elm.h"
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
CAnimationFXSetSheet::CAnimationFXSetSheet()
|
CAnimationFXSetSheet::CAnimationFXSetSheet()
|
||||||
{
|
{
|
||||||
Type = ANIMATION_FX_SET;
|
Type = ANIMATION_FX_SET;
|
||||||
|
@ -31,13 +31,13 @@ CAnimationFXSetSheet::CAnimationFXSetSheet()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
void CAnimationFXSetSheet::build(const NLGEORGES::UFormElm &item)
|
void CAnimationFXSetSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
buildWithPrefix(item);
|
buildWithPrefix(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
void CAnimationFXSetSheet::buildWithPrefix(const NLGEORGES::UFormElm &item, const std::string &prefix /*=""*/)
|
void CAnimationFXSetSheet::buildWithPrefix(const NLGEORGES::UFormElm &item, const std::string &prefix /*=""*/)
|
||||||
{
|
{
|
||||||
FX.clear();
|
FX.clear();
|
||||||
|
@ -55,7 +55,7 @@ void CAnimationFXSetSheet::buildWithPrefix(const NLGEORGES::UFormElm &item, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
void CAnimationFXSetSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAnimationFXSetSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialCont(FX);
|
f.serialCont(FX);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nel/georges/u_form_elm.h"
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
void CAttackIDSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CAttackIDSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
uint32 attackType = 0;
|
uint32 attackType = 0;
|
||||||
|
@ -57,7 +57,7 @@ void CAttackIDSheet::build(const NLGEORGES::UFormElm &item, const std::string &p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
void CAttackIDSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAttackIDSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialEnum(Type);
|
f.serialEnum(Type);
|
||||||
|
@ -84,7 +84,7 @@ void CAttackIDSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
void CAttackIDSheet::CSpellInfo::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CAttackIDSheet::CSpellInfo::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
uint32 spellID = 0;
|
uint32 spellID = 0;
|
||||||
|
@ -95,14 +95,14 @@ void CAttackIDSheet::CSpellInfo::build(const NLGEORGES::UFormElm &item, const st
|
||||||
Mode = (MAGICFX::TSpellMode) spellMode;
|
Mode = (MAGICFX::TSpellMode) spellMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
void CAttackIDSheet::CSpellInfo::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAttackIDSheet::CSpellInfo::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialEnum(Mode);
|
f.serialEnum(Mode);
|
||||||
f.serialEnum(ID);
|
f.serialEnum(ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
||||||
{
|
{
|
||||||
if (lhs.Type != rhs.Type) return false;
|
if (lhs.Type != rhs.Type) return false;
|
||||||
|
@ -117,7 +117,7 @@ bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
bool operator < (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
bool operator < (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
||||||
{
|
{
|
||||||
if (lhs.Type != rhs.Type) return lhs.Type < rhs.Type;
|
if (lhs.Type != rhs.Type) return lhs.Type < rhs.Type;
|
||||||
|
@ -132,13 +132,13 @@ bool operator < (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
bool operator == (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CSpellInfo &rhs)
|
bool operator == (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CSpellInfo &rhs)
|
||||||
{
|
{
|
||||||
return lhs.Mode == rhs.Mode && lhs.ID == rhs.ID;
|
return lhs.Mode == rhs.Mode && lhs.ID == rhs.ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************
|
// *****************************************************************************************
|
||||||
bool operator < (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CSpellInfo &rhs)
|
bool operator < (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CSpellInfo &rhs)
|
||||||
{
|
{
|
||||||
if (lhs.Mode != rhs.Mode) return lhs.Mode < rhs.Mode;
|
if (lhs.Mode != rhs.Mode) return lhs.Mode < rhs.Mode;
|
||||||
|
|
|
@ -23,27 +23,27 @@
|
||||||
|
|
||||||
using namespace NLGEORGES;
|
using namespace NLGEORGES;
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
CAttackListSheet::CAttackListSheet()
|
CAttackListSheet::CAttackListSheet()
|
||||||
{
|
{
|
||||||
Type = ATTACK_LIST;
|
Type = ATTACK_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListSheetEntry::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CAttackListSheetEntry::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
ID.build(item, prefix + "ID." );
|
ID.build(item, prefix + "ID." );
|
||||||
Attack.build(item, prefix + "Attack.");
|
Attack.build(item, prefix + "Attack.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListSheetEntry::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAttackListSheetEntry::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(ID);
|
f.serial(ID);
|
||||||
f.serial(Attack);
|
f.serial(Attack);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListSheet::build(const NLGEORGES::UFormElm &item)
|
void CAttackListSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
const UFormElm *attacks = NULL;
|
const UFormElm *attacks = NULL;
|
||||||
|
@ -64,7 +64,7 @@ void CAttackListSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CAttackListSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAttackListSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialCont(Attacks);
|
f.serialCont(Attacks);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "nel/georges/u_form_loader.h"
|
#include "nel/georges/u_form_loader.h"
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
CAttackSheet::CAttackSheet()
|
CAttackSheet::CAttackSheet()
|
||||||
{
|
{
|
||||||
ProjectileDelay = 0.f;
|
ProjectileDelay = 0.f;
|
||||||
|
@ -37,7 +37,7 @@ CAttackSheet::CAttackSheet()
|
||||||
AdditionnalStartOffset.set(0.f, 0.f, 0.f);
|
AdditionnalStartOffset.set(0.f, 0.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CAttackSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CAttackSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
@ -71,7 +71,7 @@ void CAttackSheet::build(const NLGEORGES::UFormElm &item, const std::string &pre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CAttackSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CAttackSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialEnum(ProjectileMode);
|
f.serialEnum(ProjectileMode);
|
||||||
|
|
|
@ -29,7 +29,7 @@ static void build(NLMISC::TSStringId &result, const NLGEORGES::UFormElm &item, c
|
||||||
result = ClientSheetsStrings.add(str);
|
result = ClientSheetsStrings.add(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
CBodyToBoneSheet::CBodyToBoneSheet()
|
CBodyToBoneSheet::CBodyToBoneSheet()
|
||||||
{
|
{
|
||||||
Head = 0;
|
Head = 0;
|
||||||
|
@ -44,7 +44,7 @@ CBodyToBoneSheet::CBodyToBoneSheet()
|
||||||
RightFoot = 0;
|
RightFoot = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CBodyToBoneSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CBodyToBoneSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
::build(Head, item, prefix, "Head");
|
::build(Head, item, prefix, "Head");
|
||||||
|
@ -59,7 +59,7 @@ void CBodyToBoneSheet::build(const NLGEORGES::UFormElm &item, const std::string
|
||||||
::build(RightFoot, item, prefix, "RightFoot");
|
::build(RightFoot, item, prefix, "RightFoot");
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
void CBodyToBoneSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CBodyToBoneSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
ClientSheetsStrings.serial(f, Head);
|
ClientSheetsStrings.serial(f, Head);
|
||||||
|
@ -74,7 +74,7 @@ void CBodyToBoneSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
ClientSheetsStrings.serial(f, RightFoot);
|
ClientSheetsStrings.serial(f, RightFoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************************
|
// *********************************************************************************************
|
||||||
const char *CBodyToBoneSheet::getBoneName(BODY::TBodyPart part, BODY::TSide side) const
|
const char *CBodyToBoneSheet::getBoneName(BODY::TBodyPart part, BODY::TSide side) const
|
||||||
{
|
{
|
||||||
BODY::TBodyPart hominPart = BODY::getMatchingHominBodyPart(part);
|
BODY::TBodyPart hominPart = BODY::getMatchingHominBodyPart(part);
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
|
|
||||||
using namespace NLGEORGES;
|
using namespace NLGEORGES;
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
CFloraSheet::CFloraSheet()
|
CFloraSheet::CFloraSheet()
|
||||||
{
|
{
|
||||||
Type = FLORA;
|
Type = FLORA;
|
||||||
_TotalWeight = 0;
|
_TotalWeight = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CFloraSheet::build(const NLGEORGES::UFormElm &item)
|
void CFloraSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
const UFormElm *plantArray = NULL;
|
const UFormElm *plantArray = NULL;
|
||||||
|
@ -55,7 +55,7 @@ void CFloraSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
item.getValueByName(MicroLifeThreshold, "MicroLifeThreshold");
|
item.getValueByName(MicroLifeThreshold, "MicroLifeThreshold");
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CFloraSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CFloraSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialCont(_Plants);
|
f.serialCont(_Plants);
|
||||||
|
@ -63,7 +63,7 @@ void CFloraSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(_TotalWeight);
|
f.serial(_TotalWeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPlantInfo::build(const NLGEORGES::UFormElm &item)
|
void CPlantInfo::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
item.getValueByName(SheetName, "File name");
|
item.getValueByName(SheetName, "File name");
|
||||||
|
@ -74,14 +74,14 @@ void CPlantInfo::build(const NLGEORGES::UFormElm &item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
void CPlantInfo::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CPlantInfo::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(SheetName);
|
f.serial(SheetName);
|
||||||
f.serial(CumulatedWeight);
|
f.serial(CumulatedWeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
// ***************************************************************************************************
|
||||||
const CPlantInfo *CFloraSheet::getPlantInfoFromWeightedIndex(uint64 index) const
|
const CPlantInfo *CFloraSheet::getPlantInfoFromWeightedIndex(uint64 index) const
|
||||||
{
|
{
|
||||||
if (_TotalWeight == 0) return NULL;
|
if (_TotalWeight == 0) return NULL;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
|
|
||||||
using namespace NLGEORGES;
|
using namespace NLGEORGES;
|
||||||
|
|
||||||
//****************************************************************************************
|
// ****************************************************************************************
|
||||||
CIDToStringArraySheet::CIDToStringArraySheet()
|
CIDToStringArraySheet::CIDToStringArraySheet()
|
||||||
{
|
{
|
||||||
Type = ID_TO_STRING_ARRAY;
|
Type = ID_TO_STRING_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CIDToStringArraySheet::build(const NLGEORGES::UFormElm &item)
|
void CIDToStringArraySheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
const UFormElm *stringArray = NULL;
|
const UFormElm *stringArray = NULL;
|
||||||
|
@ -50,20 +50,20 @@ void CIDToStringArraySheet::build(const NLGEORGES::UFormElm &item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CIDToStringArraySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CIDToStringArraySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serialCont(Array);
|
f.serialCont(Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CIDToString::build(const NLGEORGES::UFormElm &item)
|
void CIDToString::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
item.getValueByName(String, "String");
|
item.getValueByName(String, "String");
|
||||||
item.getValueByName(ID, "ID");
|
item.getValueByName(ID, "ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CIDToString::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CIDToString::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(ID);
|
f.serial(ID);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "item_fx_sheet.h"
|
#include "item_fx_sheet.h"
|
||||||
#include "nel/georges/u_form_elm.h"
|
#include "nel/georges/u_form_elm.h"
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
CItemFXSheet::CItemFXSheet()
|
CItemFXSheet::CItemFXSheet()
|
||||||
{
|
{
|
||||||
_Trail = 0;
|
_Trail = 0;
|
||||||
|
@ -32,7 +32,7 @@ CItemFXSheet::CItemFXSheet()
|
||||||
AttackFXRot.set(0.f, 0.f, 0.f);
|
AttackFXRot.set(0.f, 0.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CItemFXSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CItemFXSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
std::string trail;
|
std::string trail;
|
||||||
|
@ -72,7 +72,7 @@ void CItemFXSheet::build(const NLGEORGES::UFormElm &item, const std::string &pre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CItemFXSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CItemFXSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(TrailMinSliceTime);
|
f.serial(TrailMinSliceTime);
|
||||||
|
@ -86,25 +86,25 @@ void CItemFXSheet::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serialCont(_StaticFXs);
|
f.serialCont(_StaticFXs);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const char *CItemFXSheet::getTrail() const
|
const char *CItemFXSheet::getTrail() const
|
||||||
{
|
{
|
||||||
return _Trail ? ClientSheetsStrings.get(_Trail) : "";
|
return _Trail ? ClientSheetsStrings.get(_Trail) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const char *CItemFXSheet::getAdvantageFX() const
|
const char *CItemFXSheet::getAdvantageFX() const
|
||||||
{
|
{
|
||||||
return _AdvantageFX ? ClientSheetsStrings.get(_AdvantageFX) : "";
|
return _AdvantageFX ? ClientSheetsStrings.get(_AdvantageFX) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const char *CItemFXSheet::getAttackFX() const
|
const char *CItemFXSheet::getAttackFX() const
|
||||||
{
|
{
|
||||||
return _AttackFX ? ClientSheetsStrings.get(_AttackFX) : "";
|
return _AttackFX ? ClientSheetsStrings.get(_AttackFX) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CItemFXSheet::CStaticFX::build(const NLGEORGES::UFormElm &item)
|
void CItemFXSheet::CStaticFX::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
@ -118,7 +118,7 @@ void CItemFXSheet::CStaticFX::build(const NLGEORGES::UFormElm &item)
|
||||||
item.getValueByName(Offset.z, "OffsetZ");
|
item.getValueByName(Offset.z, "OffsetZ");
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CItemFXSheet::CStaticFX::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CItemFXSheet::CStaticFX::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
ClientSheetsStrings.serial(f, Name);
|
ClientSheetsStrings.serial(f, Name);
|
||||||
|
@ -126,21 +126,21 @@ void CItemFXSheet::CStaticFX::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(Offset);
|
f.serial(Offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const char *CItemFXSheet::getStaticFXName(uint index) const
|
const char *CItemFXSheet::getStaticFXName(uint index) const
|
||||||
{
|
{
|
||||||
nlassert(index < _StaticFXs.size());
|
nlassert(index < _StaticFXs.size());
|
||||||
return _StaticFXs[index].Name ? ClientSheetsStrings.get(_StaticFXs[index].Name) : "";
|
return _StaticFXs[index].Name ? ClientSheetsStrings.get(_StaticFXs[index].Name) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const char *CItemFXSheet::getStaticFXBone(uint index) const
|
const char *CItemFXSheet::getStaticFXBone(uint index) const
|
||||||
{
|
{
|
||||||
nlassert(index < _StaticFXs.size());
|
nlassert(index < _StaticFXs.size());
|
||||||
return _StaticFXs[index].Bone ? ClientSheetsStrings.get(_StaticFXs[index].Bone) : "";
|
return _StaticFXs[index].Bone ? ClientSheetsStrings.get(_StaticFXs[index].Bone) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
const NLMISC::CVector &CItemFXSheet::getStaticFXOffset(uint index) const
|
const NLMISC::CVector &CItemFXSheet::getStaticFXOffset(uint index) const
|
||||||
{
|
{
|
||||||
nlassert(index < _StaticFXs.size());
|
nlassert(index < _StaticFXs.size());
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
// CSkyObjectSheet::CColorInfo //
|
// CSkyObjectSheet::CColorInfo //
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CColorInfoSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CSkyObjectSheet::CColorInfoSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
item.getValueByName(MapName, (prefix + "MapName").c_str());
|
item.getValueByName(MapName, (prefix + "MapName").c_str());
|
||||||
|
@ -30,7 +30,7 @@ void CSkyObjectSheet::CColorInfoSheet::build(const NLGEORGES::UFormElm &item, co
|
||||||
Mode = (TSkyColorMode) mode;
|
Mode = (TSkyColorMode) mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CColorInfoSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSkyObjectSheet::CColorInfoSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(MapName);
|
f.serial(MapName);
|
||||||
|
@ -41,7 +41,7 @@ void CSkyObjectSheet::CColorInfoSheet::serial(class NLMISC::IStream &f) throw(NL
|
||||||
// CSkyObjectSheet::CColorGradientInfo //
|
// CSkyObjectSheet::CColorGradientInfo //
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CColorGradientInfoSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CSkyObjectSheet::CColorGradientInfoSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
item.getValueByName(TargetTextureStage, (prefix + "TargetTextureStage").c_str());
|
item.getValueByName(TargetTextureStage, (prefix + "TargetTextureStage").c_str());
|
||||||
|
@ -59,7 +59,7 @@ void CSkyObjectSheet::CColorGradientInfoSheet::build(const NLGEORGES::UFormElm &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CColorGradientInfoSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSkyObjectSheet::CColorGradientInfoSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(TargetTextureStage);
|
f.serial(TargetTextureStage);
|
||||||
|
@ -70,7 +70,7 @@ void CSkyObjectSheet::CColorGradientInfoSheet::serial(class NLMISC::IStream &f)
|
||||||
// CSkyObjectSheet::CVersion //
|
// CSkyObjectSheet::CVersion //
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CVersionSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CSkyObjectSheet::CVersionSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
item.getValueByName(ShapeName, (prefix + "ShapeName").c_str());
|
item.getValueByName(ShapeName, (prefix + "ShapeName").c_str());
|
||||||
|
@ -101,7 +101,7 @@ void CSkyObjectSheet::CVersionSheet::build(const NLGEORGES::UFormElm &item, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::CVersionSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSkyObjectSheet::CVersionSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(ShapeName);
|
f.serial(ShapeName);
|
||||||
|
@ -125,14 +125,14 @@ void CSkyObjectSheet::CVersionSheet::serial(class NLMISC::IStream &f) throw(NLMI
|
||||||
// CSkyObjectSheet //
|
// CSkyObjectSheet //
|
||||||
/////////////////////
|
/////////////////////
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
CSkyObjectSheet::CSkyObjectSheet()
|
CSkyObjectSheet::CSkyObjectSheet()
|
||||||
{
|
{
|
||||||
VisibleInMainScene = true;
|
VisibleInMainScene = true;
|
||||||
VisibleInEnvMap = true;
|
VisibleInEnvMap = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CSkyObjectSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
Std.build(item, prefix + "StdVersion.");
|
Std.build(item, prefix + "StdVersion.");
|
||||||
|
@ -142,7 +142,7 @@ void CSkyObjectSheet::build(const NLGEORGES::UFormElm &item, const std::string &
|
||||||
item.getValueByName(VisibleInEnvMap, (prefix + "VisibleInEnvMap").c_str());
|
item.getValueByName(VisibleInEnvMap, (prefix + "VisibleInEnvMap").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkyObjectSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSkyObjectSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(Std);
|
f.serial(Std);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
#include "sky_sheet.h"
|
#include "sky_sheet.h"
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
CSkySheet::CSkySheet()
|
CSkySheet::CSkySheet()
|
||||||
{
|
{
|
||||||
AnimLengthInSeconds = 3; // by default, anim last 3 secconds (over 90 frames)
|
AnimLengthInSeconds = 3; // by default, anim last 3 secconds (over 90 frames)
|
||||||
|
@ -26,7 +26,7 @@ CSkySheet::CSkySheet()
|
||||||
WaterEnvMapAlpha = 255;
|
WaterEnvMapAlpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkySheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
void CSkySheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||||
{
|
{
|
||||||
item.getValueByName(InstanceGroupName, (prefix + "InstanceGroupName").c_str());
|
item.getValueByName(InstanceGroupName, (prefix + "InstanceGroupName").c_str());
|
||||||
|
@ -55,7 +55,7 @@ void CSkySheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix
|
||||||
item.getValueByName(WaterEnvMapAlpha, (prefix + "WaterEnvMapAlpha").c_str());
|
item.getValueByName(WaterEnvMapAlpha, (prefix + "WaterEnvMapAlpha").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSkySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
f.serial(InstanceGroupName);
|
f.serial(InstanceGroupName);
|
||||||
|
@ -69,7 +69,7 @@ void CSkySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
f.serial(WaterEnvMapAlpha);
|
f.serial(WaterEnvMapAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
void CSkySheet::build(const NLGEORGES::UFormElm &item)
|
void CSkySheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
build(item, "");
|
build(item, "");
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************
|
// *********************************************************
|
||||||
bool CCustomMatrix::set(bool newOn, const NLMISC::CMatrix &newMat)
|
bool CCustomMatrix::set(bool newOn, const NLMISC::CMatrix &newMat)
|
||||||
{
|
{
|
||||||
if (newOn)
|
if (newOn)
|
||||||
|
|
|
@ -89,7 +89,7 @@ static NL3D::CVertexProgram DecalAttenuationVertexProgram(DecalAttenuationVertex
|
||||||
|
|
||||||
typedef CShadowPolyReceiver::CRGBAVertex CRGBAVertex;
|
typedef CShadowPolyReceiver::CRGBAVertex CRGBAVertex;
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CDecal::CDecal()
|
CDecal::CDecal()
|
||||||
{
|
{
|
||||||
_ShadowMap = new CShadowMap(&(((CSceneUser *) Scene)->getScene().getRenderTrav().getShadowMapManager()));
|
_ShadowMap = new CShadowMap(&(((CSceneUser *) Scene)->getScene().getRenderTrav().getShadowMapManager()));
|
||||||
|
@ -134,7 +134,7 @@ CDecal::CDecal()
|
||||||
_TopBlendZMax = 10100.f;
|
_TopBlendZMax = 10100.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setCustomUVMatrix(bool on, const NLMISC::CMatrix &matrix)
|
void CDecal::setCustomUVMatrix(bool on, const NLMISC::CMatrix &matrix)
|
||||||
{
|
{
|
||||||
if (_CustomUVMatrix.set(on, matrix))
|
if (_CustomUVMatrix.set(on, matrix))
|
||||||
|
@ -143,7 +143,7 @@ void CDecal::setCustomUVMatrix(bool on, const NLMISC::CMatrix &matrix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
const std::string &CDecal::getTextureFileName() const
|
const std::string &CDecal::getTextureFileName() const
|
||||||
{
|
{
|
||||||
CTextureFile *tf = dynamic_cast<CTextureFile *>(_Material.getTexture(0));
|
CTextureFile *tf = dynamic_cast<CTextureFile *>(_Material.getTexture(0));
|
||||||
|
@ -152,39 +152,39 @@ const std::string &CDecal::getTextureFileName() const
|
||||||
return emptyString;
|
return emptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setupMaterialColor()
|
void CDecal::setupMaterialColor()
|
||||||
{
|
{
|
||||||
_Material.texConstantColor(1, NLMISC::CRGBA(_Emissive.R, _Emissive.G, _Emissive.B, _Diffuse.A));
|
_Material.texConstantColor(1, NLMISC::CRGBA(_Emissive.R, _Emissive.G, _Emissive.B, _Diffuse.A));
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setEmissive(NLMISC::CRGBA emissive)
|
void CDecal::setEmissive(NLMISC::CRGBA emissive)
|
||||||
{
|
{
|
||||||
_Emissive = emissive;
|
_Emissive = emissive;
|
||||||
setupMaterialColor();
|
setupMaterialColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setDiffuse(NLMISC::CRGBA diffuse)
|
void CDecal::setDiffuse(NLMISC::CRGBA diffuse)
|
||||||
{
|
{
|
||||||
_Diffuse = diffuse;
|
_Diffuse = diffuse;
|
||||||
setupMaterialColor();
|
setupMaterialColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CRGBA CDecal::getDiffuse() const
|
CRGBA CDecal::getDiffuse() const
|
||||||
{
|
{
|
||||||
return _Diffuse;
|
return _Diffuse;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
CDecal::~CDecal()
|
CDecal::~CDecal()
|
||||||
{
|
{
|
||||||
delete _ShadowMap;
|
delete _ShadowMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setTexture(const std::string &fileName, bool clampU, bool clampV, bool filtered)
|
void CDecal::setTexture(const std::string &fileName, bool clampU, bool clampV, bool filtered)
|
||||||
{
|
{
|
||||||
if (getTextureFileName() != fileName)
|
if (getTextureFileName() != fileName)
|
||||||
|
@ -225,7 +225,7 @@ void CDecal::setTexture(const std::string &fileName, bool clampU, bool clamp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setWorldMatrix(const NLMISC::CMatrix &matrix)
|
void CDecal::setWorldMatrix(const NLMISC::CMatrix &matrix)
|
||||||
{
|
{
|
||||||
float newMat[16];
|
float newMat[16];
|
||||||
|
@ -253,7 +253,7 @@ void CDecal::setWorldMatrix(const NLMISC::CMatrix &matrix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
bool CDecal::clipFront(const NLMISC::CPlane &p) const
|
bool CDecal::clipFront(const NLMISC::CPlane &p) const
|
||||||
{
|
{
|
||||||
for(uint k = 0; k < 8; ++k)
|
for(uint k = 0; k < 8; ++k)
|
||||||
|
@ -263,7 +263,7 @@ bool CDecal::clipFront(const NLMISC::CPlane &p) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setWorldMatrixForArrow(const NLMISC::CVector2f &start, const NLMISC::CVector2f &end, float halfWidth)
|
void CDecal::setWorldMatrixForArrow(const NLMISC::CVector2f &start, const NLMISC::CVector2f &end, float halfWidth)
|
||||||
{
|
{
|
||||||
CMatrix matrix;
|
CMatrix matrix;
|
||||||
|
@ -274,7 +274,7 @@ void CDecal::setWorldMatrixForArrow(const NLMISC::CVector2f &start, const NLM
|
||||||
setWorldMatrix(matrix);
|
setWorldMatrix(matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setWorldMatrixForSpot(const NLMISC::CVector2f &pos, float radius, float angleInRadians)
|
void CDecal::setWorldMatrixForSpot(const NLMISC::CVector2f &pos, float radius, float angleInRadians)
|
||||||
{
|
{
|
||||||
CMatrix matrix;
|
CMatrix matrix;
|
||||||
|
@ -288,7 +288,7 @@ void CDecal::setWorldMatrixForSpot(const NLMISC::CVector2f &pos, float radius,
|
||||||
NLMISC::CVector r2MaskOffset(1.f / 4.f, 1.f / 4.f, 0.f);
|
NLMISC::CVector r2MaskOffset(1.f / 4.f, 1.f / 4.f, 0.f);
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/* receiver */, bool useVertexProgram)
|
void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/* receiver */, bool useVertexProgram)
|
||||||
{
|
{
|
||||||
if (_TriCache.empty()) return;
|
if (_TriCache.empty()) return;
|
||||||
|
@ -400,7 +400,7 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::render(NL3D::UDriver &/* drv */,
|
void CDecal::render(NL3D::UDriver &/* drv */,
|
||||||
NL3D::CShadowPolyReceiver &receiver,
|
NL3D::CShadowPolyReceiver &receiver,
|
||||||
const std::vector<CPlane> &worldPyramid,
|
const std::vector<CPlane> &worldPyramid,
|
||||||
|
@ -534,7 +534,7 @@ void CDecal::render(NL3D::UDriver &/* drv */,
|
||||||
renderTriCache(*drvInternal, receiver, useVertexProgram);
|
renderTriCache(*drvInternal, receiver, useVertexProgram);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecalRenderList::renderAllDecals()
|
void CDecalRenderList::renderAllDecals()
|
||||||
{
|
{
|
||||||
if (_Empty) return;
|
if (_Empty) return;
|
||||||
|
@ -588,7 +588,7 @@ void CDecalRenderList::renderAllDecals()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecalRenderList::clearRenderList()
|
void CDecalRenderList::clearRenderList()
|
||||||
{
|
{
|
||||||
for(uint k = 0; k < DECAL_NUM_PRIORITIES; ++k)
|
for(uint k = 0; k < DECAL_NUM_PRIORITIES; ++k)
|
||||||
|
@ -598,7 +598,7 @@ void CDecalRenderList::clearRenderList()
|
||||||
_Empty = true;
|
_Empty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::addToRenderList(uint priority /*=0*/)
|
void CDecal::addToRenderList(uint priority /*=0*/)
|
||||||
{
|
{
|
||||||
if( !Landscape)
|
if( !Landscape)
|
||||||
|
@ -611,14 +611,14 @@ void CDecal::addToRenderList(uint priority /*=0*/)
|
||||||
drl._Empty = false;
|
drl._Empty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
bool CDecal::contains(const NLMISC::CVector2f &pos) const
|
bool CDecal::contains(const NLMISC::CVector2f &pos) const
|
||||||
{
|
{
|
||||||
CVector posIn = _InvertedWorldMatrix * CVector(pos.x, pos.y, 0.f);
|
CVector posIn = _InvertedWorldMatrix * CVector(pos.x, pos.y, 0.f);
|
||||||
return posIn.x >= 0.f && posIn.x <= 1.f && posIn.y >= 0.f && posIn.y <= 1.f;
|
return posIn.x >= 0.f && posIn.x <= 1.f && posIn.y >= 0.f && posIn.y <= 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setClipDownFacing(bool clipDownFacing)
|
void CDecal::setClipDownFacing(bool clipDownFacing)
|
||||||
{
|
{
|
||||||
if (clipDownFacing != _ClipDownFacing)
|
if (clipDownFacing != _ClipDownFacing)
|
||||||
|
@ -628,7 +628,7 @@ void CDecal::setClipDownFacing(bool clipDownFacing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setBottomBlend(float zMin, float zMax)
|
void CDecal::setBottomBlend(float zMin, float zMax)
|
||||||
{
|
{
|
||||||
if (zMin > zMax) std::swap(zMin, zMax);
|
if (zMin > zMax) std::swap(zMin, zMax);
|
||||||
|
@ -636,7 +636,7 @@ void CDecal::setBottomBlend(float zMin, float zMax)
|
||||||
_BottomBlendZMax = zMax;
|
_BottomBlendZMax = zMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CDecal::setTopBlend(float zMin, float zMax)
|
void CDecal::setTopBlend(float zMin, float zMax)
|
||||||
{
|
{
|
||||||
if (zMin > zMax) std::swap(zMin, zMax);
|
if (zMin > zMax) std::swap(zMin, zMax);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
CDecalAnim::CDecalAnim()
|
CDecalAnim::CDecalAnim()
|
||||||
{
|
{
|
||||||
DurationInMs = 1000;
|
DurationInMs = 1000;
|
||||||
|
@ -39,7 +39,7 @@ CDecalAnim::CDecalAnim()
|
||||||
EndEmissive = CRGBA::Black;
|
EndEmissive = CRGBA::Black;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CDecalAnim::updateDecal(const NLMISC::CVector2f &pos, float animRatio, CDecal &dest, float refScale) const
|
void CDecalAnim::updateDecal(const NLMISC::CVector2f &pos, float animRatio, CDecal &dest, float refScale) const
|
||||||
{
|
{
|
||||||
dest.setTexture(Texture);
|
dest.setTexture(Texture);
|
||||||
|
@ -51,7 +51,7 @@ void CDecalAnim::updateDecal(const NLMISC::CVector2f &pos, float animRatio, CDec
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CDecalAnim::buildFromLuaTable(CLuaObject &table)
|
void CDecalAnim::buildFromLuaTable(CLuaObject &table)
|
||||||
{
|
{
|
||||||
// retrieve a value from a lua table or affect a default value if not found
|
// retrieve a value from a lua table or affect a default value if not found
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ void CEntityCL::setClusterSystem(UInstanceGroup *cluster)
|
||||||
}
|
}
|
||||||
}// setCluster //
|
}// setCluster //
|
||||||
|
|
||||||
//*****************************************************************************************************
|
// *****************************************************************************************************
|
||||||
NL3D::UInstanceGroup *CEntityCL::getClusterSystem()
|
NL3D::UInstanceGroup *CEntityCL::getClusterSystem()
|
||||||
{
|
{
|
||||||
if (!_Skeleton.empty()) return _Skeleton.getClusterSystem();
|
if (!_Skeleton.empty()) return _Skeleton.getClusterSystem();
|
||||||
|
|
|
@ -214,7 +214,7 @@ void CEventsListener::operator()(const CEvent& event)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************
|
// ***********************************************************************
|
||||||
void CEventsListener::smoothMouseCoordinates(float &x, float &y, float smoothingPeriod)
|
void CEventsListener::smoothMouseCoordinates(float &x, float &y, float smoothingPeriod)
|
||||||
{
|
{
|
||||||
if (smoothingPeriod > 0.001f)
|
if (smoothingPeriod > 0.001f)
|
||||||
|
@ -227,7 +227,7 @@ void CEventsListener::smoothMouseCoordinates(float &x, float &y, float smoothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************
|
// *************************************************************
|
||||||
void CEventsListener::updateMouseSmoothing()
|
void CEventsListener::updateMouseSmoothing()
|
||||||
{
|
{
|
||||||
if (_LastFreeLookUpdateDate != TimeInSec)
|
if (_LastFreeLookUpdateDate != TimeInSec)
|
||||||
|
@ -245,7 +245,7 @@ void CEventsListener::updateMouseSmoothing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
void CEventsListener::enableMouseSmoothing(bool on)
|
void CEventsListener::enableMouseSmoothing(bool on)
|
||||||
{
|
{
|
||||||
if (on == _MouseSmoothingOn) return;
|
if (on == _MouseSmoothingOn) return;
|
||||||
|
@ -263,7 +263,7 @@ void CEventsListener::enableMouseSmoothing(bool on)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
void CEventsListener::updateFreeLookPos(float x, float y)
|
void CEventsListener::updateFreeLookPos(float x, float y)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ void CEventsListener::updateFreeLookPos(float x, float y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************
|
// ***************************************************************
|
||||||
void CEventsListener::updateCursorPos(float x, float y)
|
void CEventsListener::updateCursorPos(float x, float y)
|
||||||
{
|
{
|
||||||
// Backup mouse
|
// Backup mouse
|
||||||
|
|
|
@ -59,7 +59,7 @@ static const float MAX_DIST_TO_REUSE_OLD_FX = 1.5f;
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
CGroundFXManager::CGroundFXManager() :
|
CGroundFXManager::CGroundFXManager() :
|
||||||
_MinSpeed(1.5f),
|
_MinSpeed(1.5f),
|
||||||
_MaxSpeed(6.f),
|
_MaxSpeed(6.f),
|
||||||
|
@ -77,7 +77,7 @@ CGroundFXManager::CGroundFXManager() :
|
||||||
// Construct
|
// Construct
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
CGroundFXManager::~CGroundFXManager()
|
CGroundFXManager::~CGroundFXManager()
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -85,7 +85,7 @@ CGroundFXManager::~CGroundFXManager()
|
||||||
CHECK_INTEGRITY
|
CHECK_INTEGRITY
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::reset()
|
void CGroundFXManager::reset()
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -124,7 +124,7 @@ void CGroundFXManager::reset()
|
||||||
_Scene = NULL;
|
_Scene = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::init(NL3D::UScene *scene, float maxDist, uint maxNumFX, uint fxCacheSize)
|
void CGroundFXManager::init(NL3D::UScene *scene, float maxDist, uint maxNumFX, uint fxCacheSize)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -135,7 +135,7 @@ void CGroundFXManager::init(NL3D::UScene *scene, float maxDist, uint maxNumFX, u
|
||||||
_MaxNumCachedFX = fxCacheSize;
|
_MaxNumCachedFX = fxCacheSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
CGroundFXManager::TEntityHandle CGroundFXManager::add(CEntityCL *entity)
|
CGroundFXManager::TEntityHandle CGroundFXManager::add(CEntityCL *entity)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -162,7 +162,7 @@ CGroundFXManager::TEntityHandle CGroundFXManager::add(CEntityCL *entity)
|
||||||
return _InstancesList.begin();
|
return _InstancesList.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::remove(TEntityHandle handle)
|
void CGroundFXManager::remove(TEntityHandle handle)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -195,7 +195,7 @@ void CGroundFXManager::remove(TEntityHandle handle)
|
||||||
|
|
||||||
// predicate to test a ground id
|
// predicate to test a ground id
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
// Predicate for binary search in a vector of sorted ground fx sheets
|
// Predicate for binary search in a vector of sorted ground fx sheets
|
||||||
struct CCmpGroundIDPred
|
struct CCmpGroundIDPred
|
||||||
{
|
{
|
||||||
|
@ -205,7 +205,7 @@ struct CCmpGroundIDPred
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::CInstance::getFXNameFromGroundType(uint32 groundID, std::string &fxName) const
|
void CGroundFXManager::CInstance::getFXNameFromGroundType(uint32 groundID, std::string &fxName) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -224,7 +224,7 @@ void CGroundFXManager::CInstance::getFXNameFromGroundType(uint32 groundID, std::
|
||||||
fxName= it->getFXName();
|
fxName= it->getFXName();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
/** Predicate to sort instances by distances.
|
/** Predicate to sort instances by distances.
|
||||||
*/
|
*/
|
||||||
struct CSortInstancePred
|
struct CSortInstancePred
|
||||||
|
@ -235,7 +235,7 @@ struct CSortInstancePred
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::invalidateFX(TEntityHandle instance)
|
void CGroundFXManager::invalidateFX(TEntityHandle instance)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -272,7 +272,7 @@ void CGroundFXManager::invalidateFX(TEntityHandle instance)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::moveFXInCache(TGroundFXList &ownerList, TGroundFXHandle fx)
|
void CGroundFXManager::moveFXInCache(TGroundFXList &ownerList, TGroundFXHandle fx)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -295,7 +295,7 @@ void CGroundFXManager::moveFXInCache(TGroundFXList &ownerList, TGroundFXHandle f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CGroundFXManager::checkIntegrity()
|
void CGroundFXManager::checkIntegrity()
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -330,7 +330,7 @@ void CGroundFXManager::checkIntegrity()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CGroundFXManager::update(const NLMISC::CVectorD &camPos)
|
void CGroundFXManager::update(const NLMISC::CVectorD &camPos)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -759,7 +759,7 @@ using NLMISC::toString;
|
||||||
|
|
||||||
CTestGroundFX TestGroundFX;
|
CTestGroundFX TestGroundFX;
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CTestGroundFX::update()
|
void CTestGroundFX::update()
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -796,7 +796,7 @@ void CTestGroundFX::update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
void CTestGroundFX::displayFXBoxes() const
|
void CTestGroundFX::displayFXBoxes() const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -832,7 +832,7 @@ void CTestGroundFX::displayFXBoxes() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CGroundFXManager::setMinSpeed(float minSpeed)
|
void CGroundFXManager::setMinSpeed(float minSpeed)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -840,7 +840,7 @@ void CGroundFXManager::setMinSpeed(float minSpeed)
|
||||||
_MinSpeed = minSpeed;
|
_MinSpeed = minSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CGroundFXManager::setMaxSpeed(float maxSpeed)
|
void CGroundFXManager::setMaxSpeed(float maxSpeed)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -848,7 +848,7 @@ void CGroundFXManager::setMaxSpeed(float maxSpeed)
|
||||||
_MaxSpeed = maxSpeed;
|
_MaxSpeed = maxSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CGroundFXManager::setSpeedWaterWalkFast(float speed)
|
void CGroundFXManager::setSpeedWaterWalkFast(float speed)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -856,7 +856,7 @@ void CGroundFXManager::setSpeedWaterWalkFast(float speed)
|
||||||
_SpeedWaterWalkFast = speed;
|
_SpeedWaterWalkFast = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CGroundFXManager::setSpeedWaterSwimFast(float speed)
|
void CGroundFXManager::setSpeedWaterSwimFast(float speed)
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_GroundFXManager)
|
H_AUTO_USE(RZ_GroundFXManager)
|
||||||
|
@ -866,7 +866,7 @@ void CGroundFXManager::setSpeedWaterSwimFast(float speed)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
// temp, for debug
|
// temp, for debug
|
||||||
|
|
||||||
// add an entity for test
|
// add an entity for test
|
||||||
|
|
|
@ -152,7 +152,7 @@ extern CContinentManager ContinentMngr;
|
||||||
ucstring TipsOfTheDay;
|
ucstring TipsOfTheDay;
|
||||||
uint TipsOfTheDayIndex;
|
uint TipsOfTheDayIndex;
|
||||||
|
|
||||||
// includes pour les register class qui suivent (grrrr !!!!)
|
// includes for following register classes
|
||||||
#include "entities.h"
|
#include "entities.h"
|
||||||
#include "character_cl.h"
|
#include "character_cl.h"
|
||||||
#include "player_cl.h"
|
#include "player_cl.h"
|
||||||
|
@ -578,7 +578,6 @@ void checkDriverDepth ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void addSearchPaths(IProgressCallback &progress)
|
void addSearchPaths(IProgressCallback &progress)
|
||||||
{
|
{
|
||||||
// Add search path of UI addon. Allow only a subset of files.
|
// Add search path of UI addon. Allow only a subset of files.
|
||||||
|
@ -744,7 +743,6 @@ void prelogInit()
|
||||||
|
|
||||||
CLoginProgressPostThread::getInstance().init(ClientCfg.ConfigFile);
|
CLoginProgressPostThread::getInstance().init(ClientCfg.ConfigFile);
|
||||||
|
|
||||||
|
|
||||||
// tmp for patcher debug
|
// tmp for patcher debug
|
||||||
extern void tmpFlagMainlandPatchCategories(NLMISC::CConfigFile &cf);
|
extern void tmpFlagMainlandPatchCategories(NLMISC::CConfigFile &cf);
|
||||||
extern void tmpFlagRemovedPatchCategories(NLMISC::CConfigFile &cf);
|
extern void tmpFlagRemovedPatchCategories(NLMISC::CConfigFile &cf);
|
||||||
|
@ -790,7 +788,6 @@ void prelogInit()
|
||||||
|
|
||||||
FPU_CHECKER_ONCE
|
FPU_CHECKER_ONCE
|
||||||
|
|
||||||
|
|
||||||
switch (getCurrentColorDepth())
|
switch (getCurrentColorDepth())
|
||||||
{
|
{
|
||||||
case 16: CustomMouse.setColorDepth(CCustomMouse::ColorDepth16); break;
|
case 16: CustomMouse.setColorDepth(CCustomMouse::ColorDepth16); break;
|
||||||
|
@ -801,7 +798,6 @@ void prelogInit()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check driver version
|
// Check driver version
|
||||||
checkDriverVersion();
|
checkDriverVersion();
|
||||||
|
|
||||||
|
@ -835,8 +831,6 @@ void prelogInit()
|
||||||
}
|
}
|
||||||
Driver = UDriver::createDriver ((uint)LoadIcon (HInstance, MAKEINTRESOURCE(IDI_MAIN_ICON)), direct3D);
|
Driver = UDriver::createDriver ((uint)LoadIcon (HInstance, MAKEINTRESOURCE(IDI_MAIN_ICON)), direct3D);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#else // NL_OS_WINDOWS
|
#else // NL_OS_WINDOWS
|
||||||
Driver = UDriver::createDriver ();
|
Driver = UDriver::createDriver ();
|
||||||
#endif // NL_OS_WINDOWS
|
#endif // NL_OS_WINDOWS
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
// Misc
|
// Misc
|
||||||
#include "nel/misc/mouse_device.h"
|
#include "nel/misc/mouse_device.h"
|
||||||
#include "nel/misc/mouse_smoother.h"
|
#include "nel/misc/mouse_smoother.h"
|
||||||
|
#include "nel/misc/system_utils.h"
|
||||||
// Game Share
|
// Game Share
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,13 +75,13 @@ bool MouseCapture = false;
|
||||||
// FUNCTION //
|
// FUNCTION //
|
||||||
//////////////
|
//////////////
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
uint GetMouseButtonsState()
|
uint GetMouseButtonsState()
|
||||||
{
|
{
|
||||||
return DownMouseButtons;
|
return DownMouseButtons;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Initialize the mouse
|
// Initialize the mouse
|
||||||
bool InitMouseWithCursor (bool hardware)
|
bool InitMouseWithCursor (bool hardware)
|
||||||
{
|
{
|
||||||
|
@ -181,14 +182,14 @@ bool InitMouseWithCursor (bool hardware)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Is mouse cursor hardware ?
|
// Is mouse cursor hardware ?
|
||||||
bool IsMouseCursorHardware ()
|
bool IsMouseCursorHardware ()
|
||||||
{
|
{
|
||||||
return MouseHardware;
|
return MouseHardware;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Set the mouse mode. Call this method once per frame to update window size
|
// Set the mouse mode. Call this method once per frame to update window size
|
||||||
void UpdateMouse ()
|
void UpdateMouse ()
|
||||||
{
|
{
|
||||||
|
@ -228,7 +229,7 @@ void UpdateMouse ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Use this method to toggle the mouse (freelook <- cursor)
|
// Use this method to toggle the mouse (freelook <- cursor)
|
||||||
void SetMouseFreeLook ()
|
void SetMouseFreeLook ()
|
||||||
{
|
{
|
||||||
|
@ -258,14 +259,14 @@ void SetMouseFreeLook ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool IsMouseFreeLook()
|
bool IsMouseFreeLook()
|
||||||
{
|
{
|
||||||
return MouseFreeLook;
|
return MouseFreeLook;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Use this method to toggle the mouse (freelook -> cursor)
|
// Use this method to toggle the mouse (freelook -> cursor)
|
||||||
void SetMouseCursor (bool updatePos)
|
void SetMouseCursor (bool updatePos)
|
||||||
{
|
{
|
||||||
|
@ -348,7 +349,7 @@ void SetMouseCursor (bool updatePos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Use this method to set the cursor speed
|
// Use this method to set the cursor speed
|
||||||
void SetMouseSpeed (float speed)
|
void SetMouseSpeed (float speed)
|
||||||
{
|
{
|
||||||
|
@ -356,7 +357,7 @@ void SetMouseSpeed (float speed)
|
||||||
UpdateMouse ();
|
UpdateMouse ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// Use this method to set the cursor acceleration
|
// Use this method to set the cursor acceleration
|
||||||
void SetMouseAcceleration (uint accel)
|
void SetMouseAcceleration (uint accel)
|
||||||
{
|
{
|
||||||
|
@ -364,7 +365,7 @@ void SetMouseAcceleration (uint accel)
|
||||||
UpdateMouse ();
|
UpdateMouse ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CaptureSystemCursor()
|
void CaptureSystemCursor()
|
||||||
{
|
{
|
||||||
if (IsSystemCursorCaptured()) return;
|
if (IsSystemCursorCaptured()) return;
|
||||||
|
@ -378,7 +379,7 @@ void CaptureSystemCursor()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void ReleaseSystemCursor()
|
void ReleaseSystemCursor()
|
||||||
{
|
{
|
||||||
if (!IsSystemCursorCaptured()) return;
|
if (!IsSystemCursorCaptured()) return;
|
||||||
|
@ -397,7 +398,7 @@ void ReleaseSystemCursor()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool IsSystemCursorCaptured()
|
bool IsSystemCursorCaptured()
|
||||||
{
|
{
|
||||||
if (!Driver) return false;
|
if (!Driver) return false;
|
||||||
|
@ -408,7 +409,7 @@ bool IsSystemCursorCaptured()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void HandleSystemCursorCapture(const CEvent &event)
|
void HandleSystemCursorCapture(const CEvent &event)
|
||||||
{
|
{
|
||||||
if (event == EventMouseDownId)
|
if (event == EventMouseDownId)
|
||||||
|
@ -440,7 +441,7 @@ void HandleSystemCursorCapture(const CEvent &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool IsSystemCursorInClientArea()
|
bool IsSystemCursorInClientArea()
|
||||||
{
|
{
|
||||||
if (!Driver) return false;
|
if (!Driver) return false;
|
||||||
|
|
|
@ -49,14 +49,14 @@ using namespace NLMISC;
|
||||||
|
|
||||||
CInterfaceItemEdition *CInterfaceItemEdition::_Instance = NULL;
|
CInterfaceItemEdition *CInterfaceItemEdition::_Instance = NULL;
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
CInterfaceItemEdition *CInterfaceItemEdition::getInstance()
|
CInterfaceItemEdition *CInterfaceItemEdition::getInstance()
|
||||||
{
|
{
|
||||||
if (!_Instance) _Instance = new CInterfaceItemEdition;
|
if (!_Instance) _Instance = new CInterfaceItemEdition;
|
||||||
return _Instance;
|
return _Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::releaseInstance()
|
void CInterfaceItemEdition::releaseInstance()
|
||||||
{
|
{
|
||||||
if( _Instance )
|
if( _Instance )
|
||||||
|
@ -66,7 +66,7 @@ void CInterfaceItemEdition::releaseInstance()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::setCurrWindow(CDBCtrlSheet* ctrlSheet, const std::string &windowName, const bool &isInEditionMode)
|
void CInterfaceItemEdition::setCurrWindow(CDBCtrlSheet* ctrlSheet, const std::string &windowName, const bool &isInEditionMode)
|
||||||
{
|
{
|
||||||
_CurrWindow.end();
|
_CurrWindow.end();
|
||||||
|
@ -84,19 +84,19 @@ void CInterfaceItemEdition::setCurrWindow(CDBCtrlSheet* ctrlSheet, const std::st
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::update()
|
void CInterfaceItemEdition::update()
|
||||||
{
|
{
|
||||||
_CurrWindow.update();
|
_CurrWindow.update();
|
||||||
}
|
}
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::validate()
|
void CInterfaceItemEdition::validate()
|
||||||
{
|
{
|
||||||
_CurrWindow.validate();
|
_CurrWindow.validate();
|
||||||
setCurrWindow(NULL);
|
setCurrWindow(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
||||||
{
|
{
|
||||||
if(_CurrItemSheet && !WindowName.empty())
|
if(_CurrItemSheet && !WindowName.empty())
|
||||||
|
@ -164,7 +164,7 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::CItemEditionWindow::update()
|
void CInterfaceItemEdition::CItemEditionWindow::update()
|
||||||
{
|
{
|
||||||
if(_CurrItemSheet && (ItemSheet != _CurrItemSheet->getSheetId()))
|
if(_CurrItemSheet && (ItemSheet != _CurrItemSheet->getSheetId()))
|
||||||
|
@ -172,7 +172,7 @@ void CInterfaceItemEdition::CItemEditionWindow::update()
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::CItemEditionWindow::begin()
|
void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
{
|
{
|
||||||
if(_CurrItemSheet && !WindowName.empty())
|
if(_CurrItemSheet && !WindowName.empty())
|
||||||
|
@ -291,7 +291,7 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInterfaceItemEdition::CItemEditionWindow::end()
|
void CInterfaceItemEdition::CItemEditionWindow::end()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -502,7 +502,7 @@ struct CCameraBackup
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************
|
// *********************************************************
|
||||||
CCameraBackup setupCameraForScreenshot(UScene &scene, uint left, uint right, uint top, uint bottom, uint screenShotWidth, uint screenShotHeight)
|
CCameraBackup setupCameraForScreenshot(UScene &scene, uint left, uint right, uint top, uint bottom, uint screenShotWidth, uint screenShotHeight)
|
||||||
{
|
{
|
||||||
CCameraBackup cb;
|
CCameraBackup cb;
|
||||||
|
@ -530,7 +530,7 @@ CCameraBackup setupCameraForScreenshot(UScene &scene, uint left, uint right, uin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************
|
// *********************************************************
|
||||||
static void restoreCamera(UScene &scene, const CCameraBackup &backup)
|
static void restoreCamera(UScene &scene, const CCameraBackup &backup)
|
||||||
{
|
{
|
||||||
scene.getCam().setFrustum (backup.Frustum);
|
scene.getCam().setFrustum (backup.Frustum);
|
||||||
|
|
|
@ -34,7 +34,7 @@ using namespace NLNET;
|
||||||
CBotChatManager *CBotChatManager::_Instance = NULL;
|
CBotChatManager *CBotChatManager::_Instance = NULL;
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
CBotChatManager::CBotChatManager()
|
CBotChatManager::CBotChatManager()
|
||||||
{
|
{
|
||||||
_CurrPage = NULL;
|
_CurrPage = NULL;
|
||||||
|
@ -42,21 +42,21 @@ CBotChatManager::CBotChatManager()
|
||||||
//_ChosenMissionFlags = 0;
|
//_ChosenMissionFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
CBotChatManager::~CBotChatManager()
|
CBotChatManager::~CBotChatManager()
|
||||||
{
|
{
|
||||||
// Destruct
|
// Destruct
|
||||||
nlassert(_CurrPage == NULL); // should have called setCurrPage(NULL) before quitting (and before releasing the interface) !
|
nlassert(_CurrPage == NULL); // should have called setCurrPage(NULL) before quitting (and before releasing the interface) !
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
CBotChatManager *CBotChatManager::getInstance()
|
CBotChatManager *CBotChatManager::getInstance()
|
||||||
{
|
{
|
||||||
if (!_Instance) _Instance = new CBotChatManager;
|
if (!_Instance) _Instance = new CBotChatManager;
|
||||||
return _Instance;
|
return _Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CBotChatManager::releaseInstance()
|
void CBotChatManager::releaseInstance()
|
||||||
{
|
{
|
||||||
if( _Instance )
|
if( _Instance )
|
||||||
|
@ -66,7 +66,7 @@ void CBotChatManager::releaseInstance()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CBotChatManager::setCurrPage(CBotChatPage *page)
|
void CBotChatManager::setCurrPage(CBotChatPage *page)
|
||||||
{
|
{
|
||||||
if (_CurrPage)
|
if (_CurrPage)
|
||||||
|
@ -85,13 +85,13 @@ void CBotChatManager::setCurrPage(CBotChatPage *page)
|
||||||
_CurrPage = page;
|
_CurrPage = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CBotChatManager::update()
|
void CBotChatManager::update()
|
||||||
{
|
{
|
||||||
if (_CurrPage) _CurrPage->update();
|
if (_CurrPage) _CurrPage->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CBotChatManager::endDialog()
|
void CBotChatManager::endDialog()
|
||||||
{
|
{
|
||||||
NLMISC::CBitMemStream out;
|
NLMISC::CBitMemStream out;
|
||||||
|
@ -212,7 +212,7 @@ void CBotChatManager::debugLocalReceiveMissionInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
/*void CBotChatManager::processMissionHelpInfos(uint8 index, CPrerequisitInfos &infos)
|
/*void CBotChatManager::processMissionHelpInfos(uint8 index, CPrerequisitInfos &infos)
|
||||||
{
|
{
|
||||||
std::map<uint8,CInterfaceGroup*>::iterator it = _MissionHelpWindowsWaiting.find(index);
|
std::map<uint8,CInterfaceGroup*>::iterator it = _MissionHelpWindowsWaiting.find(index);
|
||||||
|
|
|
@ -76,7 +76,7 @@ public:
|
||||||
void setChosenMissionFlags(uint flag) { _ChosenMissionFlags = flag; }
|
void setChosenMissionFlags(uint flag) { _ChosenMissionFlags = flag; }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//***
|
// ***
|
||||||
// Add a Waiter on mission prereq info (MissionHelp opening). no-op if here, but reorder
|
// Add a Waiter on mission prereq info (MissionHelp opening). no-op if here, but reorder
|
||||||
void addMissionInfoWaiter(IMissionPrereqInfosWaiter *waiter);
|
void addMissionInfoWaiter(IMissionPrereqInfosWaiter *waiter);
|
||||||
// remove a Waiter on mission prereq info (MissionHelp closing). no-op if not here. NB: no delete
|
// remove a Waiter on mission prereq info (MissionHelp closing). no-op if not here. NB: no delete
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
static CBotChatManager *_Instance;
|
static CBotChatManager *_Instance;
|
||||||
//uint _ChosenMissionFlags;
|
//uint _ChosenMissionFlags;
|
||||||
|
|
||||||
//*** keep infos on opened mission help windows (for prerequisits)
|
// *** keep infos on opened mission help windows (for prerequisits)
|
||||||
typedef std::list<IMissionPrereqInfosWaiter*> TMissionPrereqInfosWaiter;
|
typedef std::list<IMissionPrereqInfosWaiter*> TMissionPrereqInfosWaiter;
|
||||||
TMissionPrereqInfosWaiter _MissionInfoWaiters;
|
TMissionPrereqInfosWaiter _MissionInfoWaiters;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "../user_entity.h"
|
#include "../user_entity.h"
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************
|
// *****************************************************************************
|
||||||
void CBotChatPage::activateWindow(const char *windowName, bool active)
|
void CBotChatPage::activateWindow(const char *windowName, bool active)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
CBotChatPageAll *BotChatPageAll = NULL;
|
CBotChatPageAll *BotChatPageAll = NULL;
|
||||||
|
|
||||||
//*******************************************************************
|
// *******************************************************************
|
||||||
CBotChatPageAll::CBotChatPageAll()
|
CBotChatPageAll::CBotChatPageAll()
|
||||||
{
|
{
|
||||||
Trade = NULL;
|
Trade = NULL;
|
||||||
|
@ -50,7 +50,7 @@ CBotChatPageAll::CBotChatPageAll()
|
||||||
RingSessions = NULL;
|
RingSessions = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************
|
// *******************************************************************
|
||||||
CBotChatPageAll::~CBotChatPageAll()
|
CBotChatPageAll::~CBotChatPageAll()
|
||||||
{
|
{
|
||||||
delete Trade;
|
delete Trade;
|
||||||
|
@ -63,7 +63,7 @@ CBotChatPageAll::~CBotChatPageAll()
|
||||||
delete RingSessions;
|
delete RingSessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************
|
// *******************************************************************
|
||||||
void CBotChatPageAll::init()
|
void CBotChatPageAll::init()
|
||||||
{
|
{
|
||||||
Trade = new CBotChatPageTrade;
|
Trade = new CBotChatPageTrade;
|
||||||
|
|
|
@ -32,7 +32,7 @@ using namespace std;
|
||||||
|
|
||||||
static const char *WIN_BOT_CHAT_PAGE_CREATE_GUILD = "ui:interface:bot_chat_create_guild";
|
static const char *WIN_BOT_CHAT_PAGE_CREATE_GUILD = "ui:interface:bot_chat_create_guild";
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageCreateGuild::begin()
|
void CBotChatPageCreateGuild::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -43,7 +43,7 @@ void CBotChatPageCreateGuild::begin()
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_CREATE_GUILD, true);
|
activateWindow(WIN_BOT_CHAT_PAGE_CREATE_GUILD, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageCreateGuild::end()
|
void CBotChatPageCreateGuild::end()
|
||||||
{
|
{
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_CREATE_GUILD, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_CREATE_GUILD, false);
|
||||||
|
|
|
@ -47,7 +47,7 @@ static const char *DM_VALID_DB_PATH = "UI:TEMP:DYNAMIC_MISSION_VALID";
|
||||||
using namespace STRING_MANAGER;
|
using namespace STRING_MANAGER;
|
||||||
using NLMISC::toString;
|
using NLMISC::toString;
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
CBotChatPageDynamicMission::CBotChatPageDynamicMission()
|
CBotChatPageDynamicMission::CBotChatPageDynamicMission()
|
||||||
{
|
{
|
||||||
std::fill(_ChoiceCB, _ChoiceCB + DYNAMIC_MISSION_NUM_CHOICES, (CDBGroupComboBox *) NULL);
|
std::fill(_ChoiceCB, _ChoiceCB + DYNAMIC_MISSION_NUM_CHOICES, (CDBGroupComboBox *) NULL);
|
||||||
|
@ -62,7 +62,7 @@ CBotChatPageDynamicMission::CBotChatPageDynamicMission()
|
||||||
_MissionValid = false;
|
_MissionValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CBotChatPageDynamicMission::invalidateMission()
|
void CBotChatPageDynamicMission::invalidateMission()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -72,7 +72,7 @@ void CBotChatPageDynamicMission::invalidateMission()
|
||||||
_MissionValid = false;
|
_MissionValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CBotChatPageDynamicMission::begin()
|
void CBotChatPageDynamicMission::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -119,7 +119,7 @@ void CBotChatPageDynamicMission::begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CBotChatPageDynamicMission::end()
|
void CBotChatPageDynamicMission::end()
|
||||||
{
|
{
|
||||||
// if a menu is currently poped, disable it
|
// if a menu is currently poped, disable it
|
||||||
|
@ -128,13 +128,13 @@ void CBotChatPageDynamicMission::end()
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CBotChatPageDynamicMission::init()
|
void CBotChatPageDynamicMission::init()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************************
|
// *************************************************************************************************
|
||||||
void CBotChatPageDynamicMission::update()
|
void CBotChatPageDynamicMission::update()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -223,7 +223,7 @@ void CBotChatPageDynamicMission::update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageDynamicMission::sendChoices()
|
void CBotChatPageDynamicMission::sendChoices()
|
||||||
{
|
{
|
||||||
uint k;
|
uint k;
|
||||||
|
@ -250,7 +250,7 @@ void CBotChatPageDynamicMission::sendChoices()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageDynamicMission::selectionChanged(uint choice)
|
void CBotChatPageDynamicMission::selectionChanged(uint choice)
|
||||||
{
|
{
|
||||||
if (choice > DYNAMIC_MISSION_NUM_CHOICES)
|
if (choice > DYNAMIC_MISSION_NUM_CHOICES)
|
||||||
|
@ -268,7 +268,7 @@ void CBotChatPageDynamicMission::selectionChanged(uint choice)
|
||||||
sendChoices();
|
sendChoices();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageDynamicMission::regen()
|
void CBotChatPageDynamicMission::regen()
|
||||||
{
|
{
|
||||||
if (!_MissionValid) return;
|
if (!_MissionValid) return;
|
||||||
|
@ -282,7 +282,7 @@ void CBotChatPageDynamicMission::regen()
|
||||||
// ACTION HANDLERS //
|
// ACTION HANDLERS //
|
||||||
/////////////////////
|
/////////////////////
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
// the player has clicked on an item to buy it
|
// the player has clicked on an item to buy it
|
||||||
class CAHChangeDMOption : public IActionHandler
|
class CAHChangeDMOption : public IActionHandler
|
||||||
{
|
{
|
||||||
|
@ -301,7 +301,7 @@ class CAHChangeDMOption : public IActionHandler
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER(CAHChangeDMOption, "change_dm_option");
|
REGISTER_ACTION_HANDLER(CAHChangeDMOption, "change_dm_option");
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
// regenerate current mission
|
// regenerate current mission
|
||||||
class CAHRegenDM : public IActionHandler
|
class CAHRegenDM : public IActionHandler
|
||||||
{
|
{
|
||||||
|
@ -313,7 +313,7 @@ class CAHRegenDM : public IActionHandler
|
||||||
REGISTER_ACTION_HANDLER(CAHRegenDM, "regen_dm");
|
REGISTER_ACTION_HANDLER(CAHRegenDM, "regen_dm");
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
// the player accepted the mission
|
// the player accepted the mission
|
||||||
class CAHAcceptDM : public IActionHandler
|
class CAHAcceptDM : public IActionHandler
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,14 +39,14 @@ static const char *WIN_BOT_CHAT_PAGE_MISSION = "ui:interface:bot_chat_missions";
|
||||||
static const char *WIN_BOT_CHAT_ACCEPT_MISSION = "ui:interface:bot_chat_accept_mission";
|
static const char *WIN_BOT_CHAT_ACCEPT_MISSION = "ui:interface:bot_chat_accept_mission";
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
CBotChatPageMission::CBotChatPageMission()
|
CBotChatPageMission::CBotChatPageMission()
|
||||||
{
|
{
|
||||||
_MissionPagesObs.setListType(CHugeListObs::Missions);
|
_MissionPagesObs.setListType(CHugeListObs::Missions);
|
||||||
_CurrSel = NULL;
|
_CurrSel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************
|
// *******************************************************************************************
|
||||||
void CBotChatPageMission::init()
|
void CBotChatPageMission::init()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -55,7 +55,7 @@ void CBotChatPageMission::init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageMission::begin()
|
void CBotChatPageMission::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -83,14 +83,14 @@ void CBotChatPageMission::begin()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageMission::end()
|
void CBotChatPageMission::end()
|
||||||
{
|
{
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_MISSION, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_MISSION, false);
|
||||||
activateWindow(WIN_BOT_CHAT_ACCEPT_MISSION, false);
|
activateWindow(WIN_BOT_CHAT_ACCEPT_MISSION, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
||||||
{
|
{
|
||||||
if (!missionSheet) return;
|
if (!missionSheet) return;
|
||||||
|
@ -132,7 +132,7 @@ void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
||||||
_CurrSel = missionSheet;
|
_CurrSel = missionSheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageMission::acceptMission()
|
void CBotChatPageMission::acceptMission()
|
||||||
{
|
{
|
||||||
if (!_CurrSel) return;
|
if (!_CurrSel) return;
|
||||||
|
|
|
@ -31,7 +31,7 @@ static const char *WIN_BOT_CHAT_PAGE_MISSION_END = "ui:interface:bot_chat_missio
|
||||||
// Context help
|
// Context help
|
||||||
extern void contextHelp (const std::string &help);
|
extern void contextHelp (const std::string &help);
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageMissionEnd::begin()
|
void CBotChatPageMissionEnd::begin()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -71,7 +71,7 @@ void CBotChatPageMissionEnd::begin()
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageMissionEnd::end()
|
void CBotChatPageMissionEnd::end()
|
||||||
{
|
{
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_MISSION_END, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_MISSION_END, false);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
static const char *WIN_BOT_CHAT_PAGE_NEWS = "ui:interface:bot_chat_news";
|
static const char *WIN_BOT_CHAT_PAGE_NEWS = "ui:interface:bot_chat_news";
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageNews::begin()
|
void CBotChatPageNews::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -34,7 +34,7 @@ void CBotChatPageNews::begin()
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_NEWS, true);
|
activateWindow(WIN_BOT_CHAT_PAGE_NEWS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
// ***************************************************************************
|
||||||
void CBotChatPageNews::end()
|
void CBotChatPageNews::end()
|
||||||
{
|
{
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_NEWS, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_NEWS, false);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
static const char *WIN_BOT_CHAT_PAGE_PLAYER_GIFT = "ui:interface:bot_chat_player_gift";
|
static const char *WIN_BOT_CHAT_PAGE_PLAYER_GIFT = "ui:interface:bot_chat_player_gift";
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CBotChatPagePlayerGift::begin()
|
void CBotChatPagePlayerGift::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -55,7 +55,7 @@ void CBotChatPagePlayerGift::begin()
|
||||||
PlayerTrade.BotChatGiftContext= true;
|
PlayerTrade.BotChatGiftContext= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CBotChatPagePlayerGift::end()
|
void CBotChatPagePlayerGift::end()
|
||||||
{
|
{
|
||||||
// If the player gift was not validated, restore all items. else must not!
|
// If the player gift was not validated, restore all items. else must not!
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
|
|
||||||
#define WIN_BOT_CHAT_PAGE_RING_SESSION "ui:interface:ring_sessions"
|
#define WIN_BOT_CHAT_PAGE_RING_SESSION "ui:interface:ring_sessions"
|
||||||
|
|
||||||
//*************************************************
|
// *************************************************
|
||||||
CBotChatPageRingSessions::CBotChatPageRingSessions()
|
CBotChatPageRingSessions::CBotChatPageRingSessions()
|
||||||
{
|
{
|
||||||
RingAccessPointPos.set(0.f, 0.f, 0.f);
|
RingAccessPointPos.set(0.f, 0.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*************************************************
|
// *************************************************
|
||||||
void CBotChatPageRingSessions::begin()
|
void CBotChatPageRingSessions::begin()
|
||||||
{
|
{
|
||||||
CBotChatPage::begin();
|
CBotChatPage::begin();
|
||||||
|
@ -43,7 +43,7 @@ void CBotChatPageRingSessions::begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************
|
// *************************************************
|
||||||
void CBotChatPageRingSessions::end()
|
void CBotChatPageRingSessions::end()
|
||||||
{
|
{
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_RING_SESSION, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_RING_SESSION, false);
|
||||||
|
|
|
@ -503,7 +503,7 @@ uint32 CBotChatPageTrade::getUserFactionPoints(PVP_CLAN::TPVPClan clan) const
|
||||||
return pLeaf->getValue32();
|
return pLeaf->getValue32();
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageTrade::notifyDownloadComplete(bool completed)
|
void CBotChatPageTrade::notifyDownloadComplete(bool completed)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -527,7 +527,7 @@ void CBotChatPageTrade::notifyDownloadComplete(bool completed)
|
||||||
gc->visit(&visitor);
|
gc->visit(&visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
void CBotChatPageTrade::updateTradeModal()
|
void CBotChatPageTrade::updateTradeModal()
|
||||||
{
|
{
|
||||||
// if loading is finished, then signal it to all sheet list, so they can display an help message if they
|
// if loading is finished, then signal it to all sheet list, so they can display an help message if they
|
||||||
|
|
|
@ -1225,7 +1225,7 @@ CChatWindow *CChatWindowManager::getChatWindowByIndex(uint index)
|
||||||
/////////////////////
|
/////////////////////
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
class CHandlerChatBoxEntry : public IActionHandler
|
class CHandlerChatBoxEntry : public IActionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1298,7 +1298,7 @@ static ucstring getFreeTellerName(CInterfaceElement *pCaller)
|
||||||
return cgw->getFreeTellerName(freeTeller->getId());
|
return cgw->getFreeTellerName(freeTeller->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
class CHandlerAddTellerToFriendList : public IActionHandler
|
class CHandlerAddTellerToFriendList : public IActionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1323,7 +1323,7 @@ public:
|
||||||
REGISTER_ACTION_HANDLER(CHandlerAddTellerToFriendList, "add_teller_to_friend_list");
|
REGISTER_ACTION_HANDLER(CHandlerAddTellerToFriendList, "add_teller_to_friend_list");
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
class CHandlerAddTellerToIgnoreList : public IActionHandler
|
class CHandlerAddTellerToIgnoreList : public IActionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1358,7 +1358,7 @@ public:
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER(CHandlerAddTellerToIgnoreList, "add_teller_to_ignore_list");
|
REGISTER_ACTION_HANDLER(CHandlerAddTellerToIgnoreList, "add_teller_to_ignore_list");
|
||||||
|
|
||||||
//***************************************************************************************
|
// ***************************************************************************************
|
||||||
class CHandlerInviteToRingSession : public IActionHandler
|
class CHandlerInviteToRingSession : public IActionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
CCtrlPolygon::CCtrlPolygon() : CCtrlBase(TCtorParam())
|
CCtrlPolygon::CCtrlPolygon() : CCtrlBase(TCtorParam())
|
||||||
{
|
{
|
||||||
// Construct
|
// Construct
|
||||||
|
@ -33,7 +33,7 @@ CCtrlPolygon::CCtrlPolygon() : CCtrlBase(TCtorParam())
|
||||||
_Valid = true;
|
_Valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlPolygon::updateBoudingRect()
|
void CCtrlPolygon::updateBoudingRect()
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_updateBoudingRect)
|
H_AUTO(Rz_CCtrlPolygon_updateBoudingRect)
|
||||||
|
@ -68,7 +68,7 @@ void CCtrlPolygon::updateBoudingRect()
|
||||||
setH(ymax - ymin);
|
setH(ymax - ymin);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool CCtrlPolygon::contains(const CVector2f &pos) const
|
bool CCtrlPolygon::contains(const CVector2f &pos) const
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_contains)
|
H_AUTO(Rz_CCtrlPolygon_contains)
|
||||||
|
@ -76,7 +76,7 @@ bool CCtrlPolygon::contains(const CVector2f &pos) const
|
||||||
return _XFormPoly.contains(pos, false);
|
return _XFormPoly.contains(pos, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlPolygon::setVertices(const std::vector<NLMISC::CVector> &vertices)
|
void CCtrlPolygon::setVertices(const std::vector<NLMISC::CVector> &vertices)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_setVertices)
|
H_AUTO(Rz_CCtrlPolygon_setVertices)
|
||||||
|
@ -132,7 +132,7 @@ static inline bool totallyOutside(const CVector &minCorner, const CVector &maxCo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
/*void CCtrlPolygon::setMatrix(const NLMISC::CMatrix &mat)
|
/*void CCtrlPolygon::setMatrix(const NLMISC::CMatrix &mat)
|
||||||
{
|
{
|
||||||
const float *lhs = mat.get();
|
const float *lhs = mat.get();
|
||||||
|
@ -144,7 +144,7 @@ static inline bool totallyOutside(const CVector &minCorner, const CVector &maxCo
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlPolygon::draw()
|
void CCtrlPolygon::draw()
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_draw)
|
H_AUTO(Rz_CCtrlPolygon_draw)
|
||||||
|
@ -262,7 +262,7 @@ void CCtrlPolygon::draw()
|
||||||
vr.drawUnclippedTriangles(_RenderLayer, _RealTris, col);
|
vr.drawUnclippedTriangles(_RenderLayer, _RealTris, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlPolygon::updateCoords()
|
void CCtrlPolygon::updateCoords()
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_updateCoords)
|
H_AUTO(Rz_CCtrlPolygon_updateCoords)
|
||||||
|
@ -272,21 +272,21 @@ void CCtrlPolygon::updateCoords()
|
||||||
_Touched = true;
|
_Touched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlPolygon::setAlpha(sint32 a)
|
void CCtrlPolygon::setAlpha(sint32 a)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_setAlpha)
|
H_AUTO(Rz_CCtrlPolygon_setAlpha)
|
||||||
_Color.A = (uint8) a;
|
_Color.A = (uint8) a;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool CCtrlPolygon::handleEvent(const CEventDescriptor &/* event */)
|
bool CCtrlPolygon::handleEvent(const CEventDescriptor &/* event */)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlPolygon_handleEvent)
|
H_AUTO(Rz_CCtrlPolygon_handleEvent)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// TMP TMP
|
// TMP TMP
|
||||||
void CCtrlPolygon::computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CVector2f &src)
|
void CCtrlPolygon::computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CVector2f &src)
|
||||||
{
|
{
|
||||||
|
@ -294,7 +294,7 @@ void CCtrlPolygon::computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CV
|
||||||
dest.set(src.x, src.y);
|
dest.set(src.x, src.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
// TMP TMP
|
// TMP TMP
|
||||||
void CCtrlPolygon::touch()
|
void CCtrlPolygon::touch()
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
CCtrlQuad::CCtrlQuad() : CCtrlBase(TCtorParam()), _Color(CRGBA::White),
|
CCtrlQuad::CCtrlQuad() : CCtrlBase(TCtorParam()), _Color(CRGBA::White),
|
||||||
_Additif(false),
|
_Additif(false),
|
||||||
_Filtered(true),
|
_Filtered(true),
|
||||||
|
@ -39,14 +39,14 @@ CCtrlQuad::CCtrlQuad() : CCtrlBase(TCtorParam()), _Color(CRGBA::White),
|
||||||
_RealQuad.Uv3.set(0.f, 1.f);
|
_RealQuad.Uv3.set(0.f, 1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool CCtrlQuad::parse(xmlNodePtr /* cur */, CInterfaceGroup * /* parentGroup */)
|
bool CCtrlQuad::parse(xmlNodePtr /* cur */, CInterfaceGroup * /* parentGroup */)
|
||||||
{
|
{
|
||||||
nlassert(0); // NOT IMPLEMENTED (only created dynamically at this time)
|
nlassert(0); // NOT IMPLEMENTED (only created dynamically at this time)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::updateCoords()
|
void CCtrlQuad::updateCoords()
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_updateCoords)
|
H_AUTO(Rz_CCtrlQuad_updateCoords)
|
||||||
|
@ -57,7 +57,7 @@ void CCtrlQuad::updateCoords()
|
||||||
_RealQuad.set(_Quad.V0 + delta, _Quad.V1 + delta, _Quad.V2 + delta, _Quad.V3 + delta);
|
_RealQuad.set(_Quad.V0 + delta, _Quad.V1 + delta, _Quad.V2 + delta, _Quad.V3 + delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::draw()
|
void CCtrlQuad::draw()
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_draw)
|
H_AUTO(Rz_CCtrlQuad_draw)
|
||||||
|
@ -287,14 +287,14 @@ void CCtrlQuad::draw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setAlpha(sint32 a)
|
void CCtrlQuad::setAlpha(sint32 a)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setAlpha)
|
H_AUTO(Rz_CCtrlQuad_setAlpha)
|
||||||
_Color.A = (uint8) a;
|
_Color.A = (uint8) a;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setTexture(const std::string &texName)
|
void CCtrlQuad::setTexture(const std::string &texName)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setTexture)
|
H_AUTO(Rz_CCtrlQuad_setTexture)
|
||||||
|
@ -303,7 +303,7 @@ void CCtrlQuad::setTexture(const std::string &texName)
|
||||||
_TextureId.setTexture(texName.c_str());
|
_TextureId.setTexture(texName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
std::string CCtrlQuad::getTexture() const
|
std::string CCtrlQuad::getTexture() const
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_getTexture)
|
H_AUTO(Rz_CCtrlQuad_getTexture)
|
||||||
|
@ -312,7 +312,7 @@ std::string CCtrlQuad::getTexture() const
|
||||||
return rVR.getTextureNameFromId (_TextureId);
|
return rVR.getTextureNameFromId (_TextureId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setQuad(const CQuad &quad)
|
void CCtrlQuad::setQuad(const CQuad &quad)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setQuad)
|
H_AUTO(Rz_CCtrlQuad_setQuad)
|
||||||
|
@ -328,7 +328,7 @@ void CCtrlQuad::setQuad(const CQuad &quad)
|
||||||
_Quad = quad;
|
_Quad = quad;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setQuad(const NLMISC::CVector &start, const NLMISC::CVector &end, float thickness)
|
void CCtrlQuad::setQuad(const NLMISC::CVector &start, const NLMISC::CVector &end, float thickness)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setQuad)
|
H_AUTO(Rz_CCtrlQuad_setQuad)
|
||||||
|
@ -338,7 +338,7 @@ void CCtrlQuad::setQuad(const NLMISC::CVector &start, const NLMISC::CVector &end
|
||||||
setQuad(CQuad(start + up, end + up, end - up, start - up));
|
setQuad(CQuad(start + up, end + up, end - up, start - up));
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setQuad(const NLMISC::CVector &pos, float radius, float angle /*=0.f*/)
|
void CCtrlQuad::setQuad(const NLMISC::CVector &pos, float radius, float angle /*=0.f*/)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setQuad)
|
H_AUTO(Rz_CCtrlQuad_setQuad)
|
||||||
|
@ -353,7 +353,7 @@ void CCtrlQuad::setQuad(const NLMISC::CVector &pos, float radius, float angle /*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setQuad(const std::string &texName, const NLMISC::CVector &srcPos, float angle /*= 0.f*/, float offCenter /* = 0.f*/)
|
void CCtrlQuad::setQuad(const std::string &texName, const NLMISC::CVector &srcPos, float angle /*= 0.f*/, float offCenter /* = 0.f*/)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setQuad)
|
H_AUTO(Rz_CCtrlQuad_setQuad)
|
||||||
|
@ -379,21 +379,21 @@ void CCtrlQuad::setQuad(const std::string &texName, const NLMISC::CVector &srcPo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setAdditif(bool additif)
|
void CCtrlQuad::setAdditif(bool additif)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setAdditif)
|
H_AUTO(Rz_CCtrlQuad_setAdditif)
|
||||||
_Additif = additif;
|
_Additif = additif;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setFiltered(bool filtered)
|
void CCtrlQuad::setFiltered(bool filtered)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setFiltered)
|
H_AUTO(Rz_CCtrlQuad_setFiltered)
|
||||||
_Filtered = filtered;
|
_Filtered = filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setPattern(float umin, float umax, TWrapMode wrapMode)
|
void CCtrlQuad::setPattern(float umin, float umax, TWrapMode wrapMode)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setPattern)
|
H_AUTO(Rz_CCtrlQuad_setPattern)
|
||||||
|
@ -403,7 +403,7 @@ void CCtrlQuad::setPattern(float umin, float umax, TWrapMode wrapMode)
|
||||||
_WrapMode = wrapMode;
|
_WrapMode = wrapMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
void CCtrlQuad::setCustomUVs(const CUV uvs[4])
|
void CCtrlQuad::setCustomUVs(const CUV uvs[4])
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_setCustomUVs)
|
H_AUTO(Rz_CCtrlQuad_setCustomUVs)
|
||||||
|
@ -411,14 +411,14 @@ void CCtrlQuad::setCustomUVs(const CUV uvs[4])
|
||||||
_WrapMode = CustomUVs;
|
_WrapMode = CustomUVs;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool CCtrlQuad::handleEvent(const CEventDescriptor &/* event */)
|
bool CCtrlQuad::handleEvent(const CEventDescriptor &/* event */)
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_handleEvent)
|
H_AUTO(Rz_CCtrlQuad_handleEvent)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*********************************************************************************
|
// *********************************************************************************
|
||||||
bool CCtrlQuad::contains(const NLMISC::CVector2f &pos) const
|
bool CCtrlQuad::contains(const NLMISC::CVector2f &pos) const
|
||||||
{
|
{
|
||||||
H_AUTO(Rz_CCtrlQuad_contains)
|
H_AUTO(Rz_CCtrlQuad_contains)
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace NL3D;
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CCustomMouse::CCursor::CCursor() : ColorDepth(CCustomMouse::ColorDepth32),
|
CCustomMouse::CCursor::CCursor() : ColorDepth(CCustomMouse::ColorDepth32),
|
||||||
OrigHeight(32),
|
OrigHeight(32),
|
||||||
HotspotScale(1.f),
|
HotspotScale(1.f),
|
||||||
|
@ -44,7 +44,7 @@ CCustomMouse::CCursor::CCursor() : ColorDepth(CCustomMouse::ColorDepth32),
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CCustomMouse::CCursor::~CCursor()
|
CCustomMouse::CCursor::~CCursor()
|
||||||
{
|
{
|
||||||
if (Icon)
|
if (Icon)
|
||||||
|
@ -53,7 +53,7 @@ CCustomMouse::CCursor::~CCursor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CCustomMouse::CCustomMouse()
|
CCustomMouse::CCustomMouse()
|
||||||
{
|
{
|
||||||
_ColorDepth = CCustomMouse::ColorDepth32;
|
_ColorDepth = CCustomMouse::ColorDepth32;
|
||||||
|
@ -68,7 +68,7 @@ CCustomMouse::CCustomMouse()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
bool CCustomMouse::isAlphaBlendedCursorSupported()
|
bool CCustomMouse::isAlphaBlendedCursorSupported()
|
||||||
{
|
{
|
||||||
if (!_AlphaBlendedCursorSupportRetrieved)
|
if (!_AlphaBlendedCursorSupportRetrieved)
|
||||||
|
@ -96,7 +96,7 @@ namespace NLMISC
|
||||||
extern bool TempMaxVerboseResample;
|
extern bool TempMaxVerboseResample;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::addCursor(const std::string &name, const NLMISC::CBitmap &cursorBitmap)
|
void CCustomMouse::addCursor(const std::string &name, const NLMISC::CBitmap &cursorBitmap)
|
||||||
{
|
{
|
||||||
if (!isAlphaBlendedCursorSupported()) return;
|
if (!isAlphaBlendedCursorSupported()) return;
|
||||||
|
@ -279,7 +279,7 @@ void CCustomMouse::addCursor(const std::string &name, const NLMISC::CBitmap &cur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::release()
|
void CCustomMouse::release()
|
||||||
{
|
{
|
||||||
if (!isAlphaBlendedCursorSupported()) return;
|
if (!isAlphaBlendedCursorSupported()) return;
|
||||||
|
@ -292,7 +292,7 @@ void CCustomMouse::release()
|
||||||
_Cursors.clear();
|
_Cursors.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setColorDepth(TColorDepth colorDepth)
|
void CCustomMouse::setColorDepth(TColorDepth colorDepth)
|
||||||
{
|
{
|
||||||
if (colorDepth == _ColorDepth) return;
|
if (colorDepth == _ColorDepth) return;
|
||||||
|
@ -300,14 +300,14 @@ void CCustomMouse::setColorDepth(TColorDepth colorDepth)
|
||||||
updateCursor(true);
|
updateCursor(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::updateCursor(bool forceRebuild)
|
void CCustomMouse::updateCursor(bool forceRebuild)
|
||||||
{
|
{
|
||||||
if (!Driver) return;
|
if (!Driver) return;
|
||||||
setCursor(_CurrName, _CurrCol, _CurrRot, _CurrHotSpotX, _CurrHotSpotY, forceRebuild);
|
setCursor(_CurrName, _CurrCol, _CurrRot, _CurrHotSpotX, _CurrHotSpotY, forceRebuild);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setCursor(const std::string &name, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY, bool forceRebuild)
|
void CCustomMouse::setCursor(const std::string &name, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY, bool forceRebuild)
|
||||||
{
|
{
|
||||||
if (!isAlphaBlendedCursorSupported()) return;
|
if (!isAlphaBlendedCursorSupported()) return;
|
||||||
|
@ -363,7 +363,7 @@ void CCustomMouse::setCursor(const std::string &name, NLMISC::CRGBA col, uint8 r
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
HICON CCustomMouse::buildCursor(const CBitmap &src, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY)
|
HICON CCustomMouse::buildCursor(const CBitmap &src, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY)
|
||||||
{
|
{
|
||||||
nlassert(isAlphaBlendedCursorSupported());
|
nlassert(isAlphaBlendedCursorSupported());
|
||||||
|
@ -440,7 +440,7 @@ HICON CCustomMouse::buildCursor(const CBitmap &src, NLMISC::CRGBA col, uint8 rot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setSystemArrow()
|
void CCustomMouse::setSystemArrow()
|
||||||
{
|
{
|
||||||
extern HINSTANCE HInstance;
|
extern HINSTANCE HInstance;
|
||||||
|
@ -460,31 +460,31 @@ void CCustomMouse::setSystemArrow()
|
||||||
|
|
||||||
// not implemented yet for other OS
|
// not implemented yet for other OS
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
CCustomMouse::CCustomMouse()
|
CCustomMouse::CCustomMouse()
|
||||||
{
|
{
|
||||||
// NOT IMPLEMENTED
|
// NOT IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setCursor(const std::string &name, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY, bool forceRebuild)
|
void CCustomMouse::setCursor(const std::string &name, NLMISC::CRGBA col, uint8 rot, sint hotSpotX, sint hotSpotY, bool forceRebuild)
|
||||||
{
|
{
|
||||||
// NOT IMPLEMENTED
|
// NOT IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::release()
|
void CCustomMouse::release()
|
||||||
{
|
{
|
||||||
// NOT IMPLEMENTED
|
// NOT IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
bool CCustomMouse::isAlphaBlendedCursorSupported()
|
bool CCustomMouse::isAlphaBlendedCursorSupported()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setSystemArrow()
|
void CCustomMouse::setSystemArrow()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -495,13 +495,13 @@ void CCustomMouse::addCursor(const std::string &name, const NLMISC::CBitmap &cur
|
||||||
// TODO for Linux
|
// TODO for Linux
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::setColorDepth(TColorDepth colorDepth)
|
void CCustomMouse::setColorDepth(TColorDepth colorDepth)
|
||||||
{
|
{
|
||||||
// TODO for Linux
|
// TODO for Linux
|
||||||
}
|
}
|
||||||
|
|
||||||
//*************************************************************************************
|
// *************************************************************************************
|
||||||
void CCustomMouse::updateCursor(bool forceRebuild)
|
void CCustomMouse::updateCursor(bool forceRebuild)
|
||||||
{
|
{
|
||||||
// TODO for Linux
|
// TODO for Linux
|
||||||
|
|
|
@ -29,7 +29,7 @@ using namespace NLMISC;
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListSheetMission, std::string, "list_sheet_mission");
|
NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListSheetMission, std::string, "list_sheet_mission");
|
||||||
|
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
void CDBGroupListSheetMission::CSheetChildMission::init(CDBGroupListSheetText *pFather, uint index)
|
void CDBGroupListSheetMission::CSheetChildMission::init(CDBGroupListSheetText *pFather, uint index)
|
||||||
{
|
{
|
||||||
// init my parent
|
// init my parent
|
||||||
|
@ -46,7 +46,7 @@ void CDBGroupListSheetMission::CSheetChildMission::init(CDBGroupListSheetText *p
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
CViewText *CDBGroupListSheetMission::CSheetChildMission::createViewText() const
|
CViewText *CDBGroupListSheetMission::CSheetChildMission::createViewText() const
|
||||||
{
|
{
|
||||||
// create a view text id because mission text is send by the server
|
// create a view text id because mission text is send by the server
|
||||||
|
@ -57,7 +57,7 @@ CViewText *CDBGroupListSheetMission::CSheetChildMission::createViewText() const
|
||||||
return vti;
|
return vti;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
bool CDBGroupListSheetMission::CSheetChildMission::isInvalidated(CDBGroupListSheetText * /* pFather */)
|
bool CDBGroupListSheetMission::CSheetChildMission::isInvalidated(CDBGroupListSheetText * /* pFather */)
|
||||||
{
|
{
|
||||||
uint8 newPreReqState = (uint8)CurrentPreReqState.getSInt32();
|
uint8 newPreReqState = (uint8)CurrentPreReqState.getSInt32();
|
||||||
|
@ -78,7 +78,7 @@ void CDBGroupListSheetMission::CSheetChildMission::update(CDBGroupListSheetText
|
||||||
CSheetChild::update(pFather);
|
CSheetChild::update(pFather);
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
void CDBGroupListSheetMission::CSheetChildMission::updateViewText(CDBGroupListSheetText *pFather)
|
void CDBGroupListSheetMission::CSheetChildMission::updateViewText(CDBGroupListSheetText *pFather)
|
||||||
{
|
{
|
||||||
CSheetChild::updateViewText(pFather);
|
CSheetChild::updateViewText(pFather);
|
||||||
|
@ -130,7 +130,7 @@ void CDBGroupListSheetMission::CSheetChildMission::updateViewText(CDBGroupListSh
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
bool CDBGroupListSheetMission::CSheetChildMission::isSheetValid(CDBGroupListSheetText * /* pFather */)
|
bool CDBGroupListSheetMission::CSheetChildMission::isSheetValid(CDBGroupListSheetText * /* pFather */)
|
||||||
{
|
{
|
||||||
if (!Ctrl) return false;
|
if (!Ctrl) return false;
|
||||||
|
|
|
@ -32,12 +32,12 @@ using namespace NLMISC;
|
||||||
// CGroupHeader //
|
// CGroupHeader //
|
||||||
//////////////////
|
//////////////////
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CGroupHeader::CGroupHeader(const TCtorParam ¶m) : CGroupList(param), _HeaderMaxSize(32767)
|
CGroupHeader::CGroupHeader(const TCtorParam ¶m) : CGroupList(param), _HeaderMaxSize(32767)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CGroupHeader::enlargeColumns(sint32 margin)
|
void CGroupHeader::enlargeColumns(sint32 margin)
|
||||||
{
|
{
|
||||||
std::vector<CGroupHeaderEntry *> entries;
|
std::vector<CGroupHeaderEntry *> entries;
|
||||||
|
@ -115,7 +115,7 @@ void CGroupHeader::enlargeColumns(sint32 margin)
|
||||||
invalidateCoords();
|
invalidateCoords();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CGroupHeader::resizeColumnsAndContainer(sint32 margin)
|
void CGroupHeader::resizeColumnsAndContainer(sint32 margin)
|
||||||
{
|
{
|
||||||
std::vector<CGroupHeaderEntry *> entries;
|
std::vector<CGroupHeaderEntry *> entries;
|
||||||
|
@ -182,7 +182,7 @@ void CGroupHeader::resizeColumnsAndContainer(sint32 margin)
|
||||||
invalidateCoords();
|
invalidateCoords();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CGroupHeader::getEntries(std::vector<CGroupHeaderEntry *> &dest)
|
void CGroupHeader::getEntries(std::vector<CGroupHeaderEntry *> &dest)
|
||||||
{
|
{
|
||||||
dest.clear();
|
dest.clear();
|
||||||
|
@ -197,7 +197,7 @@ void CGroupHeader::getEntries(std::vector<CGroupHeaderEntry *> &dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
int CGroupHeader::luaEnlargeColumns(CLuaState &ls)
|
int CGroupHeader::luaEnlargeColumns(CLuaState &ls)
|
||||||
{
|
{
|
||||||
const char *funcName = "enlargeColumns";
|
const char *funcName = "enlargeColumns";
|
||||||
|
@ -207,7 +207,7 @@ int CGroupHeader::luaEnlargeColumns(CLuaState &ls)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
int CGroupHeader::luaResizeColumnsAndContainer(CLuaState &ls)
|
int CGroupHeader::luaResizeColumnsAndContainer(CLuaState &ls)
|
||||||
{
|
{
|
||||||
const char *funcName = "resizeColumnsAndContainer";
|
const char *funcName = "resizeColumnsAndContainer";
|
||||||
|
@ -217,7 +217,7 @@ int CGroupHeader::luaResizeColumnsAndContainer(CLuaState &ls)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
if(!CGroupList::parse(cur, parentGroup)) return false;
|
if(!CGroupList::parse(cur, parentGroup)) return false;
|
||||||
|
@ -373,13 +373,13 @@ private:
|
||||||
sint32 _WMin;
|
sint32 _WMin;
|
||||||
};
|
};
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CGroupHeaderEntry::CGroupHeaderEntry(const TCtorParam ¶m) : CInterfaceGroup(param)
|
CGroupHeaderEntry::CGroupHeaderEntry(const TCtorParam ¶m) : CInterfaceGroup(param)
|
||||||
{
|
{
|
||||||
_MinSize = 4;
|
_MinSize = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
bool CGroupHeaderEntry::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CGroupHeaderEntry::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
if (!CInterfaceGroup::parse(cur, parentGroup)) return false;
|
if (!CInterfaceGroup::parse(cur, parentGroup)) return false;
|
||||||
|
@ -416,14 +416,14 @@ bool CGroupHeaderEntry::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CInterfaceGroup *CGroupHeaderEntry::getTargetColumn() const
|
CInterfaceGroup *CGroupHeaderEntry::getTargetColumn() const
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
return dynamic_cast<CInterfaceGroup*>(im->getElementFromId(_TargetColumnId));
|
return dynamic_cast<CInterfaceGroup*>(im->getElementFromId(_TargetColumnId));
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
void CGroupHeaderEntry::updateCoords()
|
void CGroupHeaderEntry::updateCoords()
|
||||||
{
|
{
|
||||||
CInterfaceGroup::updateCoords();
|
CInterfaceGroup::updateCoords();
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
class CGroupHeaderEntry;
|
class CGroupHeaderEntry;
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
/** Display a header with movable entries.
|
/** Display a header with movable entries.
|
||||||
* Usually used with a table to change the size of each column (much like the windows file explorer in 'details' mode)
|
* Usually used with a table to change the size of each column (much like the windows file explorer in 'details' mode)
|
||||||
*
|
*
|
||||||
|
@ -54,7 +54,7 @@ private:
|
||||||
int luaResizeColumnsAndContainer(CLuaState &ls);
|
int luaResizeColumnsAndContainer(CLuaState &ls);
|
||||||
};
|
};
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
// an entry in a header, includes a "mover control" to move it inside its parent header
|
// an entry in a header, includes a "mover control" to move it inside its parent header
|
||||||
// NOTE : when not used inside a CGroupHeader, will work, but there will be no 'max_size'
|
// NOTE : when not used inside a CGroupHeader, will work, but there will be no 'max_size'
|
||||||
class CGroupHeaderEntry : public CInterfaceGroup
|
class CGroupHeaderEntry : public CInterfaceGroup
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
|
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CInterfaceGroupWheel, std::string, "group_wheel");
|
NLMISC_REGISTER_OBJECT(CViewBase, CInterfaceGroupWheel, std::string, "group_wheel");
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param)
|
CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param)
|
||||||
{
|
{
|
||||||
_AHWheelUp = NULL;
|
_AHWheelUp = NULL;
|
||||||
_AHWheelDown = NULL;
|
_AHWheelDown = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
if (!CInterfaceGroup::parse(cur, parentGroup)) return false;
|
if (!CInterfaceGroup::parse(cur, parentGroup)) return false;
|
||||||
|
@ -42,7 +42,7 @@ bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
bool CInterfaceGroupWheel::handleEvent(const CEventDescriptor &event)
|
bool CInterfaceGroupWheel::handleEvent(const CEventDescriptor &event)
|
||||||
{
|
{
|
||||||
if (CInterfaceGroup::handleEvent(event)) return true;
|
if (CInterfaceGroup::handleEvent(event)) return true;
|
||||||
|
|
|
@ -606,7 +606,7 @@ void CGuildManager::initDBObservers()
|
||||||
// CDBGroupListAscensor
|
// CDBGroupListAscensor
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
void CDBGroupListAscensor::CSheetChildAscensor::init(CDBGroupListSheetText *pFather, uint index)
|
void CDBGroupListAscensor::CSheetChildAscensor::init(CDBGroupListSheetText *pFather, uint index)
|
||||||
{
|
{
|
||||||
// init my parent
|
// init my parent
|
||||||
|
@ -617,7 +617,7 @@ void CDBGroupListAscensor::CSheetChildAscensor::init(CDBGroupListSheetText *pFat
|
||||||
SecondSheetIdCache = 0;
|
SecondSheetIdCache = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetText * /* pFather */)
|
bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetText * /* pFather */)
|
||||||
{
|
{
|
||||||
if (Ctrl->getSheetId() != SecondSheetIdCache)
|
if (Ctrl->getSheetId() != SecondSheetIdCache)
|
||||||
|
@ -663,7 +663,7 @@ bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetT
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************************************************************************
|
// **********************************************************************************
|
||||||
bool CDBGroupListAscensor::CSheetChildAscensor::isSheetValid(CDBGroupListSheetText * /* pFather */)
|
bool CDBGroupListAscensor::CSheetChildAscensor::isSheetValid(CDBGroupListSheetText * /* pFather */)
|
||||||
{
|
{
|
||||||
if (!Ctrl) return false;
|
if (!Ctrl) return false;
|
||||||
|
|
|
@ -75,7 +75,7 @@ CInputHandlerManager::~CInputHandlerManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************************
|
// ********************************************************************************************
|
||||||
void CInputHandlerManager::releaseInstance()
|
void CInputHandlerManager::releaseInstance()
|
||||||
{
|
{
|
||||||
if( _Instance )
|
if( _Instance )
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "../cdb_leaf.h"
|
#include "../cdb_leaf.h"
|
||||||
#include "../cdb_branch.h"
|
#include "../cdb_branch.h"
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
void CInterfaceExprNodeValue::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeValue::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
result = Value;
|
result = Value;
|
||||||
|
@ -37,7 +37,7 @@ void CInterfaceExprNodeValue::getDepends(std::vector<ICDBNode *> &/* nodes */)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
nlassert(Func);
|
nlassert(Func);
|
||||||
|
@ -80,7 +80,7 @@ CInterfaceExprNodeValueFnCall::~CInterfaceExprNodeValueFnCall()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
void CInterfaceExprNodeDBLeaf::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeDBLeaf::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
nlassert(Leaf);
|
nlassert(Leaf);
|
||||||
|
@ -107,7 +107,7 @@ void CInterfaceExprNodeDBLeaf::getDepends(std::vector<ICDBNode *> &nodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
void CInterfaceExprNodeDBBranch::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeDBBranch::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
nlassert(Branch);
|
nlassert(Branch);
|
||||||
|
@ -134,7 +134,7 @@ void CInterfaceExprNodeDBBranch::getDepends(std::vector<ICDBNode *> &nodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
void CInterfaceExprNodeDependantDBRead::eval(CInterfaceExprValue &result)
|
void CInterfaceExprNodeDependantDBRead::eval(CInterfaceExprValue &result)
|
||||||
{
|
{
|
||||||
// no gain there, but barely used
|
// no gain there, but barely used
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
/** A constant value already parsed by interface (in a interface expr parse tree)
|
/** A constant value already parsed by interface (in a interface expr parse tree)
|
||||||
*/
|
*/
|
||||||
class CInterfaceExprNodeValue : public CInterfaceExprNode
|
class CInterfaceExprNodeValue : public CInterfaceExprNode
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
||||||
};
|
};
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
/** A fct call (in a interface expr parse tree)
|
/** A fct call (in a interface expr parse tree)
|
||||||
*/
|
*/
|
||||||
class CInterfaceExprNodeValueFnCall : public CInterfaceExprNode
|
class CInterfaceExprNodeValueFnCall : public CInterfaceExprNode
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
virtual ~CInterfaceExprNodeValueFnCall();
|
virtual ~CInterfaceExprNodeValueFnCall();
|
||||||
};
|
};
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
/** A db leaf read (in a interface expr parse tree)
|
/** A db leaf read (in a interface expr parse tree)
|
||||||
*/
|
*/
|
||||||
class CInterfaceExprNodeDBLeaf : public CInterfaceExprNode
|
class CInterfaceExprNodeDBLeaf : public CInterfaceExprNode
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
||||||
};
|
};
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
/** A db branch read (in a interface expr parse tree)
|
/** A db branch read (in a interface expr parse tree)
|
||||||
*/
|
*/
|
||||||
class CInterfaceExprNodeDBBranch : public CInterfaceExprNode
|
class CInterfaceExprNodeDBBranch : public CInterfaceExprNode
|
||||||
|
@ -94,7 +94,7 @@ public:
|
||||||
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
virtual void getDepends(std::vector<ICDBNode *> &nodes);
|
||||||
};
|
};
|
||||||
|
|
||||||
//*******************************************************************************************************
|
// *******************************************************************************************************
|
||||||
/** A dependant db read (in a interface expr parse tree)
|
/** A dependant db read (in a interface expr parse tree)
|
||||||
* This is rarely used so no real optim there..
|
* This is rarely used so no real optim there..
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,7 +54,7 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//**************************************************************************
|
// **************************************************************************
|
||||||
/** Helper class to restore the lua stack to the desired size when this object goes out of scope
|
/** Helper class to restore the lua stack to the desired size when this object goes out of scope
|
||||||
*/
|
*/
|
||||||
class CLuaStackRestorer
|
class CLuaStackRestorer
|
||||||
|
|
|
@ -125,7 +125,7 @@ void CHugeListObs::setListType(ListType listType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
bool CHugeListObs::init()
|
bool CHugeListObs::init()
|
||||||
{
|
{
|
||||||
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
||||||
|
@ -233,7 +233,7 @@ bool CHugeListObs::init()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CHugeListObs::start()
|
void CHugeListObs::start()
|
||||||
{
|
{
|
||||||
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
||||||
|
@ -301,7 +301,7 @@ void CHugeListObs::start()
|
||||||
_PhraseClientFill= false;
|
_PhraseClientFill= false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CHugeListObs::update(ICDBNode * /* node */)
|
void CHugeListObs::update(ICDBNode * /* node */)
|
||||||
{
|
{
|
||||||
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
||||||
|
@ -493,7 +493,7 @@ void CHugeListObs::update(ICDBNode * /* node */)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
void CHugeListObs::updateUIItemPage(uint index)
|
void CHugeListObs::updateUIItemPage(uint index)
|
||||||
{
|
{
|
||||||
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
nlassert((uint) _Category < ListTypeCount); // must call setListType
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define DB_LOCAL_BRANCH_FOR_MISSIONS "LOCAL:CHOOSE_MISSIONS"
|
#define DB_LOCAL_BRANCH_FOR_MISSIONS "LOCAL:CHOOSE_MISSIONS"
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************
|
// ****************************************************************************
|
||||||
/** Database observer to update incrementaly a list of items
|
/** Database observer to update incrementaly a list of items
|
||||||
* Class synchronizing huge list of leaves from server to local
|
* Class synchronizing huge list of leaves from server to local
|
||||||
* This is done through a small window in the server database of 8 (for the moment) elements
|
* This is done through a small window in the server database of 8 (for the moment) elements
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue