mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-12 18:29:04 +00:00
Merge
This commit is contained in:
commit
d4ad6c774d
250 changed files with 8557 additions and 3567 deletions
|
@ -44,6 +44,7 @@ default_c
|
|||
*.so.*
|
||||
*_debug
|
||||
core
|
||||
*.pc
|
||||
|
||||
# Mac OS X compile
|
||||
*.dylib
|
||||
|
|
50
code/nel/CMakeModules/FindEFXUtil.cmake
Normal file
50
code/nel/CMakeModules/FindEFXUtil.cmake
Normal file
|
@ -0,0 +1,50 @@
|
|||
# - Locate EFX-Util library
|
||||
# This module defines
|
||||
# EFXUTIL_LIBRARY, the library to link against
|
||||
# EFXUTIL_FOUND, if false, do not try to link to EFX-Util
|
||||
# EFXUTIL_INCLUDE_DIR, where to find headers.
|
||||
|
||||
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
||||
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||
|
||||
|
||||
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
||||
EFX-Util.h
|
||||
PATHS
|
||||
$ENV{EFXUTIL_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES AL
|
||||
)
|
||||
|
||||
FIND_LIBRARY(EFXUTIL_LIBRARY
|
||||
NAMES EFX-Util efxutil libefxutil
|
||||
PATHS
|
||||
$ENV{EFXUTIL_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||
SET(EFXUTIL_FOUND "YES")
|
||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
||||
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||
ELSE(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
||||
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
51
code/nel/CMakeModules/FindSquish.cmake
Normal file
51
code/nel/CMakeModules/FindSquish.cmake
Normal file
|
@ -0,0 +1,51 @@
|
|||
#
|
||||
# Find the LibSquish includes and library
|
||||
#
|
||||
# This module defines
|
||||
# SQUISH_INCLUDE_DIR, where to find squish.h
|
||||
# SQUISH_LIBRARY, where to find the Squish library.
|
||||
# SQUISH_FOUND, If false, do not try to use Squish.
|
||||
|
||||
# also defined, but not for general use are
|
||||
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(SQUISH_FIND_QUIETLY TRUE)
|
||||
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(SQUISH_INCLUDE_DIR
|
||||
squish.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES cppunit
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SQUISH_LIBRARY
|
||||
squish
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||
SET(SQUISH_FOUND "YES")
|
||||
IF(NOT SQUISH_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARY}")
|
||||
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||
ELSE(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||
IF(NOT SQUISH_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
||||
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||
|
|
@ -11,7 +11,7 @@ ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
|||
|
||||
|
||||
FIND_PATH(XF86VidMode_INCLUDE_DIR
|
||||
xf86vm.h
|
||||
xf86vmode.h
|
||||
PATHS
|
||||
$ENV{XF86VidMode_DIR}/include
|
||||
/usr/include/X11/
|
||||
|
|
|
@ -56,7 +56,7 @@ using NLMISC::CSmartPtr;
|
|||
using NLMISC::CRGBA;
|
||||
using NLMISC::CVector;
|
||||
using NLMISC::CMatrix;
|
||||
using NLMISC::CSynchronized;
|
||||
using NLMISC::CUnfairSynchronized;
|
||||
|
||||
|
||||
class CMaterial;
|
||||
|
@ -69,7 +69,7 @@ struct IOcclusionQuery;
|
|||
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/// A Graphic Mode descriptor.
|
||||
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);
|
||||
};
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
// Exceptions.
|
||||
struct EBadDisplay : public NLMISC::Exception
|
||||
{
|
||||
EBadDisplay(const std::string &reason) : Exception(reason) { }
|
||||
};
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
typedef void (*emptyProc)(void);
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
// *** IMPORTANT ********************
|
||||
// *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL
|
||||
// **********************************
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
CSynchronized<TTexDrvInfoPtrMap> _SyncTexDrvInfos;
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap> _SyncTexDrvInfos;
|
||||
|
||||
TTexDrvSharePtrList _TexDrvShares;
|
||||
TMatDrvInfoPtrList _MatDrvInfos;
|
||||
|
|
|
@ -413,6 +413,12 @@ public:
|
|||
//
|
||||
virtual NLMISC::IKeyboardDevice *enableLowLevelKeyboard(bool enable);
|
||||
virtual NLMISC::IInputDeviceManager *getLowLevelInputDeviceManager();
|
||||
|
||||
/**
|
||||
* wrapper for IEventEmitter::emulateMouseRawMode()
|
||||
*/
|
||||
virtual void emulateMouseRawMode(bool enable);
|
||||
|
||||
virtual uint getDoubleClickDelay(bool hardwareMouse);
|
||||
|
||||
/// show cursor if b is true, or hide it if b is false
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
namespace NL3D
|
||||
{
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* Startup initialisation.
|
||||
* \author Cyril Corvazier
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* ULandscape Implementation
|
||||
* \author Lionel Berenguier
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
// the pass that is applied on particles
|
||||
enum TPass { Anim, SolidRender, BlendRender, ToolRender };
|
||||
public:
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Object
|
||||
//@{
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
// CParticleSystem *clone(CPSCopyHelper *ch = NULL) ;
|
||||
//@}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Sharing system
|
||||
//@{
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
bool isSharingEnabled() const { return _Sharing; }
|
||||
//@}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Driver setup
|
||||
//@{
|
||||
|
@ -126,7 +126,7 @@ public:
|
|||
/// return the driver that will be used for rendering
|
||||
IDriver *getDriver(void) { return _Driver; }
|
||||
//@}
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Scene setup
|
||||
//@{
|
||||
|
@ -139,7 +139,7 @@ public:
|
|||
CScene *getScene() const { return _Scene; }
|
||||
//@}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Position of the system
|
||||
//@{
|
||||
|
@ -209,7 +209,7 @@ public:
|
|||
//@}
|
||||
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Execution of the system
|
||||
//@{
|
||||
|
@ -228,7 +228,7 @@ public:
|
|||
/// used for benchs. must be reset by the user
|
||||
static uint32 NbParticlesDrawn;
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
/**\name Process attachment. Most process are located : set of objects of the same type that have a position
|
||||
* in space
|
||||
|
@ -287,7 +287,7 @@ public:
|
|||
|
||||
//@}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\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
|
||||
* of the system
|
||||
|
@ -377,7 +377,7 @@ public:
|
|||
|
||||
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Edition methods : provides some tools for an external editor
|
||||
// @{
|
||||
|
@ -430,7 +430,7 @@ public:
|
|||
/// Get the name of the system.
|
||||
std::string getName(void) const { return _Name; }
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Transparency / opacity
|
||||
// @{
|
||||
|
@ -441,7 +441,7 @@ public:
|
|||
bool hasTransparentObjects(void) const;
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Lighting
|
||||
// @{
|
||||
|
@ -449,7 +449,7 @@ public:
|
|||
bool hasLightableObjects() const;
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Integration parameters
|
||||
// @{
|
||||
|
@ -546,7 +546,7 @@ public:
|
|||
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
/**\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).
|
||||
|
@ -680,7 +680,7 @@ public:
|
|||
NLMISC::CRGBA getLightingColor() const { return _LightingColor; }
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
// \name Load balancing
|
||||
// @{
|
||||
|
@ -702,7 +702,7 @@ public:
|
|||
void enableLoadBalancing(bool enabled = true);
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
|
||||
///\name Bounding box managment
|
||||
// @{
|
||||
|
@ -741,7 +741,7 @@ public:
|
|||
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)
|
||||
// @{
|
||||
|
@ -929,7 +929,7 @@ public:
|
|||
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
///\name sound managment
|
||||
// @{
|
||||
/// 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)
|
||||
// @{
|
||||
/** register a locatedBindable, and allow it to be referenced by the given ID
|
||||
|
@ -963,7 +963,7 @@ public:
|
|||
void unregisterLocatedBindableExternID(CPSLocatedBindable *lb);
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
///\name external access to locatedBindable. PUBLIC PART
|
||||
// @{
|
||||
/// return the number the number of located bindable bound with this ID
|
||||
|
@ -983,7 +983,7 @@ public:
|
|||
void getIDs(std::vector<uint32> &dest) const;
|
||||
// @}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
///\name Misc. options / functions
|
||||
// @{
|
||||
/** 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 {
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* A Primitive counter.
|
||||
* \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 //
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//*************************************************************************************************************
|
||||
// *************************************************************************************************************
|
||||
/** template specialization implementations
|
||||
* They're useful to get the correct min / max values depending on the type
|
||||
*/
|
||||
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
inline uint32 CPSAttribMakerBinOp<uint32>::getMinValue(void) const
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ inline uint32 CPSAttribMakerBinOp<uint32>::getMinValue(void) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
inline uint32 CPSAttribMakerBinOp<uint32>::getMaxValue(void) const
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ inline uint32 CPSAttribMakerBinOp<uint32>::getMaxValue(void) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
inline sint32 CPSAttribMakerBinOp<sint32>::getMinValue(void) const
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ inline sint32 CPSAttribMakerBinOp<sint32>::getMinValue(void) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
inline sint32 CPSAttribMakerBinOp<sint32>::getMaxValue(void) const
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ inline sint32 CPSAttribMakerBinOp<sint32>::getMaxValue(void) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
inline float CPSAttribMakerBinOp<float>::getMinValue(void) const
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ inline float CPSAttribMakerBinOp<float>::getMinValue(void) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
// ***********************************************************************
|
||||
template <>
|
||||
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
|
||||
|
@ -1030,7 +1030,7 @@ protected:
|
|||
// INLINES //
|
||||
/////////////
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
inline const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CPSLocated *A,const CPSLocated *B)
|
||||
{
|
||||
nlassert(A);
|
||||
|
@ -1041,7 +1041,7 @@ inline const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CPSLocated *
|
|||
return getConversionMatrix(*ps, A->getMatrixMode(), B->getMatrixMode());
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
inline TAnimationTime CPSLocated::getAgeInSeconds(uint elementIndex) const
|
||||
{
|
||||
nlassert(elementIndex < _Size);
|
||||
|
@ -1050,14 +1050,14 @@ inline TAnimationTime CPSLocated::getAgeInSeconds(uint elementIndex) const
|
|||
return _Time[elementIndex] * _InitialLife;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
inline void CPSLocated::computeParametricPos(float date, uint indexInLocated, NLMISC::CVector &dest) const
|
||||
{
|
||||
integrateSingle(date, 1.f, 1, indexInLocated, &dest);
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
inline const NLMISC::CMatrix &CPSLocatedBindable::getLocalToWorldMatrix() const
|
||||
{
|
||||
nlassert(_Owner);
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* This global function register all Serialisable Polymorphic 3D classes.
|
||||
* \author Lionel Berenguier
|
||||
|
|
|
@ -39,7 +39,7 @@ using NLMISC::CBitmap;
|
|||
class IDriver;
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
|
||||
// List typedef.
|
||||
class ITextureDrvInfos;
|
||||
|
@ -89,7 +89,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* Interface for textures
|
||||
*
|
||||
|
@ -405,7 +405,7 @@ public:
|
|||
// get the texture category
|
||||
CTextureCategory *getTextureCategory() const {return _TextureCategory;}
|
||||
|
||||
//****************************
|
||||
// ****************************
|
||||
// Private part.
|
||||
protected:
|
||||
// Derived texture should set it to true when they are updated.
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* CTextureCube
|
||||
* \author Matthieu Besson
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* CTextureFile
|
||||
* \author Stephane Coutelas
|
||||
|
|
|
@ -28,7 +28,7 @@ class CFontGenerator;
|
|||
#define TEXTUREFONT_NBCATEGORY 5 // Config 1
|
||||
//#define TEXTUREFONT_NBCATEGORY 4
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* CTextureFont
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* CTextureMem
|
||||
*/
|
||||
|
|
|
@ -66,7 +66,7 @@ class UWaterEnvMap;
|
|||
|
||||
typedef void (*emptyProc)(void);
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/// Monitor color properties
|
||||
struct CMonitorColorProperties
|
||||
{
|
||||
|
@ -571,6 +571,11 @@ public:
|
|||
*/
|
||||
virtual NLMISC::IInputDeviceManager *getLowLevelInputDeviceManager() = 0;
|
||||
|
||||
/**
|
||||
* wrapper for IEventEmitter::emulateMouseRawMode()
|
||||
*/
|
||||
virtual void emulateMouseRawMode(bool enable) = 0;
|
||||
|
||||
// get delay used for mouse double click
|
||||
virtual uint getDoubleClickDelay(bool hardwareMouse) = 0;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class UPointLight;
|
|||
class UWaterEnvMap;
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
// useful callback for createInstanceGroupAndAddToSceneAsync
|
||||
class IAsyncLoadCallback
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
/**
|
||||
* Game Interface for Scene.
|
||||
* A UScene create instances, camera lights etc... Those objects are not sharable through different scenes. You
|
||||
|
|
|
@ -49,7 +49,19 @@ public:
|
|||
* \param server
|
||||
*/
|
||||
virtual void submitEvents(CEventServer & server, bool allWindows) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Instruct the event emitter to send CGDMouseMove instead of CEventMouseMove.
|
||||
*
|
||||
* On windows, the mouse device can be set into RawMode. Using this mode,
|
||||
* CGDMouseMove events (only containing the raw movement delta) are emitted
|
||||
* instead of the normal CEventMouseMove events (containing the mouse position).
|
||||
*
|
||||
* On Linux and Mac OS X, there is no MouseDevice implementation, all the
|
||||
* events are created by the event emitter. So the event emitter has to
|
||||
* emulate the mouse raw mode.
|
||||
*/
|
||||
virtual void emulateMouseRawMode(bool) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ private:
|
|||
// IMPLEMENTATION //
|
||||
////////////////////
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
template <class T>
|
||||
inline void CHistoric<T>::push(const T &value)
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ inline void CHistoric<T>::push(const T &value)
|
|||
_Historic.push_back(value);
|
||||
}
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
template <class T>
|
||||
inline void CHistoric<T>::pop()
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ inline void CHistoric<T>::pop()
|
|||
_Historic.pop_back();
|
||||
}
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
template <class T>
|
||||
inline void CHistoric<T>::setMaxSize(uint maxSize)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
namespace NLMISC
|
||||
{
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
/** IPC Utility class to enable easy window-window communication
|
||||
*
|
||||
* This enable 2-ways non blocking communication between 2 windows on the same machine (windows
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
uint getReceiveQueueSize() const;
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
private:
|
||||
struct CMsg
|
||||
{
|
||||
|
|
|
@ -99,6 +99,9 @@ public:
|
|||
* Return true if the message must be trapped, false if DefWindowProc must be called afterwards
|
||||
*/
|
||||
bool processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPARAM lParam, CEventServer *server=NULL);
|
||||
|
||||
void emulateMouseRawMode(bool enable);
|
||||
|
||||
private:
|
||||
CWinEventServer _InternalServer;
|
||||
HWND _HWnd;
|
||||
|
|
|
@ -664,6 +664,8 @@ SOURCE_GROUP(Shadows FILES
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nel3d SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-3d.pc.in nel-3d.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-3d.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nel3d STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
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());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
void nlCheckIBA(CIndexBufferReadWrite &iba, const uint8 *ptStart)
|
||||
{
|
||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
||||
}
|
||||
|
||||
//************************************************************************************
|
||||
// ************************************************************************************
|
||||
void nlCheckIBA(CIndexBufferRead &iba, const uint8 *ptStart)
|
||||
{
|
||||
checkRange((uint8 *) iba.getPtr(), (uint8 *) iba.getPtr() + iba.getParent()->getNumIndexes() * iba.getIndexNumBytes(), ptStart, 0, iba.getParent()->getName());
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
// ***************************************************************************
|
||||
const uint32 IDriver::InterfaceVersion = 0x65; // Added nlWindow patch.
|
||||
const uint32 IDriver::InterfaceVersion = 0x66; // added IEventEmitter::emulateMouseRawMode(bool)
|
||||
|
||||
// ***************************************************************************
|
||||
IDriver::IDriver() : _SyncTexDrvInfos( "IDriver::_SyncTexDrvInfos" )
|
||||
|
@ -50,7 +50,7 @@ IDriver::~IDriver()
|
|||
// Must clean up everything before closing driver.
|
||||
// Must doing this in release(), so assert here if not done...
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
nlassert( rTexDrvInfos.size() == 0 );
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ bool IDriver::release(void)
|
|||
|
||||
// Release refptr of TextureDrvInfos. Should be all null (because of precedent pass).
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
// must be empty, because precedent pass should have deleted all.
|
||||
|
@ -234,7 +234,7 @@ void IDriver::removeIBDrvInfoPtr(ItIBDrvInfoPtrList ibDrvInfoIt)
|
|||
// ***************************************************************************
|
||||
void IDriver::removeTextureDrvInfoPtr(ItTexDrvInfoPtrMap texDrvInfoIt)
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
rTexDrvInfos.erase(texDrvInfoIt);
|
||||
|
@ -268,7 +268,7 @@ bool IDriver::invalidateShareTexture (ITexture &texture)
|
|||
getTextureShareName (texture, name);
|
||||
|
||||
// Look for the driver info for this share name
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
TTexDrvInfoPtrMap::iterator iteDrvInfo = rTexDrvInfos.find (name);
|
||||
if (iteDrvInfo != rTexDrvInfos.end())
|
||||
|
|
|
@ -549,7 +549,7 @@ bool CDriverD3D::setupTextureEx (ITexture& tex, bool bUpload, bool &bAllUploaded
|
|||
|
||||
// insert or get the texture.
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
ItTexDrvInfoPtrMap itTex;
|
||||
|
@ -1013,7 +1013,7 @@ bool CDriverD3D::isTextureExist(const ITexture&tex)
|
|||
getTextureShareName (tex, name);
|
||||
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
result = (rTexDrvInfos.find(name) != rTexDrvInfos.end());
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -842,6 +842,7 @@ private:
|
|||
|
||||
private:
|
||||
void switchBackToOldMode();
|
||||
bool setupDisplay();
|
||||
|
||||
// Get the proj matrix setupped in GL
|
||||
void refreshProjMatrixFromGL();
|
||||
|
|
|
@ -467,6 +467,10 @@
|
|||
RelativePath="driver_opengl_vertex_program.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\driver_opengl_window.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stdopengl.cpp"
|
||||
>
|
||||
|
|
|
@ -620,10 +620,12 @@ static bool setupATITextureEnvCombine3(const char *glext)
|
|||
{
|
||||
H_AUTO_OGL(setupATITextureEnvCombine3);
|
||||
|
||||
#ifdef NL_OS_MAC
|
||||
// Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
return false;
|
||||
#endif
|
||||
// reenabled to allow bloom on mac, TODO: cleanly fix the water issue
|
||||
// i think this issue was mtp target related - is this the case in ryzom too?
|
||||
// #ifdef NL_OS_MAC
|
||||
// // Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
// return false;
|
||||
// #endif
|
||||
|
||||
CHECK_EXT("GL_ATI_texture_env_combine3");
|
||||
return true;
|
||||
|
@ -671,10 +673,12 @@ static bool setupNVVertexProgram(const char *glext)
|
|||
{
|
||||
H_AUTO_OGL(setupNVVertexProgram);
|
||||
|
||||
#ifdef NL_OS_MAC
|
||||
// Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
return false;
|
||||
#endif
|
||||
// reenabled to allow bloom on mac, TODO: cleanly fix the water issue
|
||||
// i think this issue was mtp target related - is this the case in ryzom too?
|
||||
// #ifdef NL_OS_MAC
|
||||
// // Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
// return false;
|
||||
// #endif
|
||||
|
||||
CHECK_EXT("GL_NV_vertex_program");
|
||||
CHECK_ADDRESS(NEL_PFNGLAREPROGRAMSRESIDENTNVPROC, glAreProgramsResidentNV);
|
||||
|
@ -882,10 +886,12 @@ static bool setupNVTextureShader(const char *glext)
|
|||
{
|
||||
H_AUTO_OGL(setupNVTextureShader);
|
||||
|
||||
#ifdef NL_OS_MAC
|
||||
// Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
return false;
|
||||
#endif
|
||||
// reenabled to allow bloom on mac, TODO: cleanly fix the water issue
|
||||
// i think this issue was mtp target related - is this the case in ryzom too?
|
||||
// #ifdef NL_OS_MAC
|
||||
// // Water doesn't render on GeForce 8600M GT (on MAC OS X) if this extension is enabled
|
||||
// return false;
|
||||
// #endif
|
||||
|
||||
CHECK_EXT("GL_NV_texture_shader");
|
||||
return true;
|
||||
|
|
|
@ -179,12 +179,8 @@ void CDriverGLStates::forceDefaults(uint nbStages)
|
|||
// Cull order
|
||||
_CullMode = CCW;
|
||||
glCullFace(GL_BACK);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
void CDriverGLStates::enableBlend(uint enable)
|
||||
{
|
||||
|
|
|
@ -656,7 +656,7 @@ bool CDriverGL::setupTextureEx (ITexture& tex, bool bUpload, bool &bAllUploaded,
|
|||
|
||||
// insert or get the texture.
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
ItTexDrvInfoPtrMap itTex;
|
||||
|
|
1691
code/nel/src/3d/driver/opengl/driver_opengl_window.cpp
Normal file
1691
code/nel/src/3d/driver/opengl/driver_opengl_window.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -55,6 +55,9 @@ bool init(uint windowIcon = 0, emptyProc exitFunc = 0);
|
|||
/// mac specific stuff while calling CDriverGL::setDisplay()
|
||||
bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setMode()
|
||||
bool setMode(const GfxMode& mode);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::getWindowSize()
|
||||
void getWindowSize(uint32 &width, uint32 &height);
|
||||
|
||||
|
@ -70,10 +73,25 @@ void setWindowTitle(const ucstring &title);
|
|||
/// mac specific stuff while calling CDriverGL::swapBuffers()
|
||||
void swapBuffers();
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setCapture()
|
||||
void setCapture(bool b);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::showCursor()
|
||||
void showCursor(bool b);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setMousePos()
|
||||
void setMousePos(float x, float y);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::release()
|
||||
void release();
|
||||
|
||||
/// mac specific stuff while calling CCocoaEventEmitter::submitEvents()
|
||||
void submitEvents(NLMISC::CEventServer& server,
|
||||
bool allWindows, NLMISC::CCocoaEventEmitter* eventEmitter);
|
||||
|
||||
/// mac specific stuff while calling CCocoaEventEmitter::emulateMouseRawMode()
|
||||
void emulateMouseRawMode(bool enable);
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,13 +19,14 @@
|
|||
#include "cocoa_adapter.h"
|
||||
|
||||
#include "nel/misc/events.h"
|
||||
#include "nel/misc/game_device_events.h"
|
||||
#include "nel/3d/driver.h"
|
||||
|
||||
#include "cocoa_event_emitter.h"
|
||||
#include "cocoa_opengl_view.h"
|
||||
#include "cocoa_window.h"
|
||||
|
||||
// virtual key codes are only defined here. we still do not need to link carbon
|
||||
// Virtual key codes are only defined here. We still do not need to link carbon.
|
||||
// see: http://lists.apple.com/archives/Cocoa-dev/2009/May/msg01180.html
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
|
@ -33,16 +34,22 @@
|
|||
|
||||
namespace NL3D { namespace MAC {
|
||||
|
||||
static NSApplication* g_app = 0;
|
||||
static NSAutoreleasePool* g_pool = 0;
|
||||
static CocoaWindow* g_window = 0;
|
||||
static CocoaOpenGLView* g_glview = 0;
|
||||
static NSOpenGLContext* g_glctx = 0;
|
||||
static NSApplication* g_app = nil;
|
||||
static NSAutoreleasePool* g_pool = nil;
|
||||
static CocoaWindow* g_window = nil;
|
||||
static CocoaOpenGLView* g_glview = nil;
|
||||
static NSOpenGLContext* g_glctx = nil;
|
||||
static bool g_emulateRawMode = false;
|
||||
|
||||
|
||||
#define UGLY_BACKBUFFER_SIZE_WORKAROUND
|
||||
|
||||
#ifdef UGLY_BACKBUFFER_SIZE_WORKAROUND
|
||||
static int g_bufferSize[2];
|
||||
#endif
|
||||
|
||||
void ctor()
|
||||
{
|
||||
nldebug("mac cpp bridge called");
|
||||
|
||||
// create a pool, cocoa code would leak memory otherwise
|
||||
g_pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
|
@ -52,7 +59,9 @@ void ctor()
|
|||
|
||||
void dtor()
|
||||
{
|
||||
nldebug("mac cpp bridge called");
|
||||
/*
|
||||
TODO there might be some more stuff to release ;)
|
||||
*/
|
||||
|
||||
// release the pool
|
||||
[g_pool release];
|
||||
|
@ -60,32 +69,51 @@ void dtor()
|
|||
|
||||
bool init(uint windowIcon, emptyProc exitFunc)
|
||||
{
|
||||
nldebug("mac cpp bridge called with %u %u", windowIcon, exitFunc);
|
||||
/*
|
||||
TODO nothing to do here? split other stuff to match api cleanly.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable)
|
||||
{
|
||||
nldebug("mac cpp bridge called with %u %u %u %u", wnd, &mode, show, resizeable);
|
||||
/*
|
||||
TODO use show
|
||||
*/
|
||||
|
||||
// create a window
|
||||
/* TODO: NSBackingStoreBuffered ??? */
|
||||
g_window = [[CocoaWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1024, 768)
|
||||
styleMask:NSTitledWindowMask | NSResizableWindowMask |
|
||||
NSClosableWindowMask | NSMiniaturizableWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
/*
|
||||
TODO add menu, on quit send EventDestroyWindowId
|
||||
*/
|
||||
|
||||
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask;
|
||||
|
||||
if(resizeable)
|
||||
styleMask |= NSResizableWindowMask;
|
||||
|
||||
// create a cocoa window with the size provided by the mode parameter
|
||||
g_window = [[CocoaWindow alloc]
|
||||
initWithContentRect:NSMakeRect(0, 0, mode.Width, mode.Height)
|
||||
styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
|
||||
|
||||
if(!g_window)
|
||||
nlerror("cannot create window");
|
||||
|
||||
/*
|
||||
TODO use mode.Depth
|
||||
TODO NSOpenGLPFAOffScreen
|
||||
*/
|
||||
// setup opengl settings
|
||||
NSOpenGLPixelFormatAttribute att[] =
|
||||
{
|
||||
NSOpenGLPFAWindow,
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
NSOpenGLPFADepthSize, 24,
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFADepthSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
NSOpenGLPFAStencilSize, 8,
|
||||
NSOpenGLPFANoRecovery,
|
||||
NSOpenGLPFAAccelerated,
|
||||
NSOpenGLPFABackingStore,
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -93,63 +121,323 @@ bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable)
|
|||
NSOpenGLPixelFormat* format =
|
||||
[[NSOpenGLPixelFormat alloc] initWithAttributes:att];
|
||||
|
||||
if(!format)
|
||||
nlerror("cannot create NSOpenGLPixelFormat");
|
||||
|
||||
// create a opengl view with the created format
|
||||
g_glview = [[CocoaOpenGLView alloc]
|
||||
initWithFrame:NSMakeRect(0, 0, 1024, 768) pixelFormat: format];
|
||||
initWithFrame:NSMakeRect(0, 0, 0, 0) pixelFormat: format];
|
||||
|
||||
if(!g_glview)
|
||||
nlerror("cannot create view");
|
||||
|
||||
// put the view into the window
|
||||
[g_window setContentView:g_glview];
|
||||
|
||||
// set the window to non transparent
|
||||
[g_window setOpaque:YES];
|
||||
|
||||
// enable mouse move events, NeL wants them
|
||||
[g_window setAcceptsMouseMovedEvents:YES];
|
||||
|
||||
// there are no overlapping subviews, so we can use the magical optimization!
|
||||
[g_window useOptimizedDrawing:YES];
|
||||
|
||||
// create a opengl context for the view
|
||||
g_glctx = [g_glview openGLContext];
|
||||
|
||||
// setup some stuff in the window
|
||||
[g_window setContentView:g_glview];
|
||||
[g_window makeKeyAndOrderFront:nil];
|
||||
[g_window setAcceptsMouseMovedEvents:YES];
|
||||
if(!g_glctx)
|
||||
nlerror("cannot create context");
|
||||
|
||||
// make the views opengl context the currrent one
|
||||
// make the view's opengl context the currrent one
|
||||
[g_glctx makeCurrentContext];
|
||||
|
||||
// put the window to the front and make it the key window
|
||||
[g_window makeKeyAndOrderFront:nil];
|
||||
|
||||
// this is our main window
|
||||
[g_window makeMainWindow];
|
||||
|
||||
// tell the application that we are running now
|
||||
[g_app finishLaunching];
|
||||
|
||||
// free the pixel format object
|
||||
[format release];
|
||||
|
||||
// further mode setting, like switching to fullscreen and resolution setup
|
||||
setMode(mode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool setMode(const GfxMode& mode)
|
||||
{
|
||||
// for fullscreen mode, adjust the back buffer size to the desired resolution
|
||||
if(!mode.Windowed)
|
||||
{
|
||||
// set the back buffer manually to match the desired rendering resolution
|
||||
GLint dim[2] = { mode.Width, mode.Height };
|
||||
CGLError error = CGLSetParameter((CGLContextObj)[g_glctx CGLContextObj],
|
||||
kCGLCPSurfaceBackingSize, dim);
|
||||
|
||||
if(error != kCGLNoError)
|
||||
nlerror("cannot set kCGLCPSurfaceBackingSize parameter (%s)",
|
||||
CGLErrorString(error));
|
||||
}
|
||||
|
||||
// leave fullscreen mode, enter windowed mode
|
||||
if(mode.Windowed && [g_glview isInFullScreenMode])
|
||||
{
|
||||
// disable manual setting of back buffer size, cocoa handles this
|
||||
// automatically as soon as the view gets resized
|
||||
CGLError error = CGLDisable((CGLContextObj)[g_glctx CGLContextObj],
|
||||
kCGLCESurfaceBackingSize);
|
||||
|
||||
if(error != kCGLNoError)
|
||||
nlerror("cannot disable kCGLCESurfaceBackingSize (%s)",
|
||||
CGLErrorString(error));
|
||||
|
||||
// pull the view back from fullscreen restoring window options
|
||||
[g_glview exitFullScreenModeWithOptions:nil];
|
||||
}
|
||||
|
||||
// enter fullscreen, leave windowed mode
|
||||
else if(!mode.Windowed && ![g_glview isInFullScreenMode])
|
||||
{
|
||||
// enable manual back buffer size for mode setting in fullscreen
|
||||
CGLError error = CGLEnable((CGLContextObj)[g_glctx CGLContextObj],
|
||||
kCGLCESurfaceBackingSize);
|
||||
|
||||
if(error != kCGLNoError)
|
||||
nlerror("cannot enable kCGLCESurfaceBackingSize (%s)",
|
||||
CGLErrorString(error));
|
||||
|
||||
// put the view in fullscreen mode, hiding the dock but enabling the menubar
|
||||
// to pop up if the mouse hits the top screen border.
|
||||
// NOTE: withOptions:nil disables <CMD>+<Tab> application switching!
|
||||
[g_glview enterFullScreenMode:[NSScreen mainScreen] withOptions:
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt:
|
||||
NSApplicationPresentationHideDock |
|
||||
NSApplicationPresentationAutoHideMenuBar],
|
||||
NSFullScreenModeApplicationPresentationOptions, nil]];
|
||||
|
||||
/*
|
||||
TODO check if simply using NSView enterFullScreenMode is a good idea.
|
||||
the context can be set to full screen as well, performance differences?
|
||||
*/
|
||||
}
|
||||
|
||||
#ifdef UGLY_BACKBUFFER_SIZE_WORKAROUND
|
||||
// due to a back buffer size reading problem, just store the size
|
||||
g_bufferSize[0] = mode.Width;
|
||||
g_bufferSize[1] = mode.Height;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void getWindowSize(uint32 &width, uint32 &height)
|
||||
{
|
||||
NSRect rect = [g_glview bounds];
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
if(!g_glctx)
|
||||
return;
|
||||
|
||||
// A cocoa fullscreen view stays at the native resolution of the display.
|
||||
// When changing the rendering resolution, the size of the back buffer gets
|
||||
// changed, but the view still stays at full resolution. So the scaling of
|
||||
// the image from the rendered resolution to the view's resolution is done
|
||||
// by cocoa automatically while flushing buffers.
|
||||
// That's why, in fullscreen mode, return the resolution of the back buffer,
|
||||
// not the one from the window.
|
||||
|
||||
#ifdef UGLY_BACKBUFFER_SIZE_WORKAROUND
|
||||
// in fullscreen mode
|
||||
if([g_glview isInFullScreenMode])
|
||||
{
|
||||
// use the size stored in setMode()
|
||||
width = g_bufferSize[0];
|
||||
height = g_bufferSize[1];
|
||||
}
|
||||
|
||||
// in windowed mode
|
||||
else
|
||||
{
|
||||
// use the size of the view
|
||||
NSRect rect = [g_glview frame];
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
}
|
||||
#else
|
||||
/*
|
||||
TODO does not work atm, "invalid enumeration"
|
||||
*/
|
||||
// check if manual back buffer sizing is enabled (thats only in fullscreen)
|
||||
GLint surfaceBackingSizeSet = 0;
|
||||
CGLError error = CGLIsEnabled((CGLContextObj)[g_glctx CGLContextObj],
|
||||
kCGLCESurfaceBackingSize, &surfaceBackingSizeSet);
|
||||
|
||||
if(error != kCGLNoError)
|
||||
nlerror("cannot check kCGLCESurfaceBackingSize state (%s)",
|
||||
CGLErrorString(error));
|
||||
|
||||
// if in fullscreen mode (only in fullscreen back buffer sizing is used)
|
||||
if(surfaceBackingSizeSet)
|
||||
{
|
||||
/*
|
||||
TODO does not work atm, "invalid enumeration"
|
||||
*/
|
||||
// get the back buffer size
|
||||
GLint dim[2];
|
||||
CGLError error = CGLGetParameter((CGLContextObj)[g_glctx CGLContextObj],
|
||||
kCGLCPSurfaceBackingSize, dim);
|
||||
|
||||
if(error != kCGLNoError)
|
||||
nlerror("cannot get kCGLCPSurfaceBackingSize value (%s)",
|
||||
CGLErrorString(error));
|
||||
|
||||
// put size into ref params
|
||||
width = dim[0];
|
||||
height = dim[1];
|
||||
}
|
||||
|
||||
// if in windowed mode
|
||||
else
|
||||
{
|
||||
// return the views size
|
||||
NSRect rect = [g_glview frame];
|
||||
|
||||
// put size into ref params
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void getWindowPos(uint32 &x, uint32 &y)
|
||||
{
|
||||
// get the rect (position, size) of the screen
|
||||
NSRect screenRect = [[g_window screen] frame];
|
||||
|
||||
// get the rect (position, size) of the window
|
||||
NSRect windowRect = [g_window frame];
|
||||
|
||||
// simply return x
|
||||
x = windowRect.origin.x;
|
||||
|
||||
// map y from cocoa to NeL coordinates before returning
|
||||
y = screenRect.size.height - windowRect.size.height - windowRect.origin.y;
|
||||
}
|
||||
|
||||
void setWindowPos(uint32 x, uint32 y)
|
||||
{
|
||||
// get the size of the screen
|
||||
NSRect screenRect = [[g_window screen] frame];
|
||||
|
||||
// get the size of the window
|
||||
NSRect windowRect = [g_window frame];
|
||||
y = screenRect.size.height - y;
|
||||
|
||||
// convert y from NeL coordinates to cocoa coordinates
|
||||
y = screenRect.size.height - y;
|
||||
|
||||
// tell cocoa to move the window
|
||||
[g_window setFrameTopLeftPoint:NSMakePoint(x, y)];
|
||||
}
|
||||
|
||||
void setWindowTitle(const ucstring &title)
|
||||
{
|
||||
// well... set the title of the window
|
||||
[g_window setTitle:[NSString stringWithUTF8String:title.toUtf8().c_str()]];
|
||||
}
|
||||
|
||||
void swapBuffers()
|
||||
{
|
||||
// make cocoa draw buffer contents to the view
|
||||
[g_glctx flushBuffer];
|
||||
}
|
||||
|
||||
void setCapture(bool b)
|
||||
{
|
||||
// no need to capture
|
||||
}
|
||||
|
||||
void showCursor(bool b)
|
||||
{
|
||||
// Mac OS manages a show/hide counter for the cursor, so hiding the cursor
|
||||
// twice requires two calls to "show" to make the cursor visible again.
|
||||
// Since other platforms seem to not do this, the functionality is masked here
|
||||
// by only calling hide if the cursor is visible and only calling show if
|
||||
// the cursor was hidden.
|
||||
|
||||
CGDisplayErr error = kCGErrorSuccess;
|
||||
static bool visible = true;
|
||||
|
||||
if(b && !visible)
|
||||
{
|
||||
error = CGDisplayShowCursor(kCGDirectMainDisplay);
|
||||
visible = true;
|
||||
}
|
||||
else if(!b && visible)
|
||||
{
|
||||
error = CGDisplayHideCursor(kCGDirectMainDisplay);
|
||||
visible = false;
|
||||
}
|
||||
|
||||
if(error != kCGErrorSuccess)
|
||||
nlerror("cannot capture / un-capture cursor");
|
||||
}
|
||||
|
||||
void setMousePos(float x, float y)
|
||||
{
|
||||
/*
|
||||
TODO FIXME for windows placed on non primary monitor
|
||||
*/
|
||||
|
||||
// CG wants absolute coordinates related to screen top left
|
||||
CGFloat fromScreenLeft = 0.0;
|
||||
CGFloat fromScreenTop = 0.0;
|
||||
|
||||
// get the gl view's rect for height and width
|
||||
NSRect viewRect = [g_glview frame];
|
||||
|
||||
// if the view is not fullscreen, window top left is needed as offset
|
||||
if(![g_glview isInFullScreenMode])
|
||||
{
|
||||
// get the rect (position, size) of the screen
|
||||
NSRect screenRect = [[g_window screen] frame];
|
||||
|
||||
// get the rect (position, size) of the window
|
||||
NSRect windowRect = [g_window frame];
|
||||
|
||||
// window's x is ok
|
||||
fromScreenLeft = windowRect.origin.x;
|
||||
|
||||
// TODO this code assumes, that the view fills the window
|
||||
|
||||
// map window bottom to view top
|
||||
fromScreenTop = screenRect.size.height -
|
||||
viewRect.size.height - windowRect.origin.y;
|
||||
}
|
||||
|
||||
// position inside the view
|
||||
fromScreenLeft += (viewRect.size.width * x);
|
||||
fromScreenTop += (viewRect.size.height * (1 - y));
|
||||
|
||||
// actually set the mouse position
|
||||
CGDisplayErr error = CGDisplayMoveCursorToPoint(
|
||||
kCGDirectMainDisplay, CGPointMake(fromScreenLeft, fromScreenTop));
|
||||
|
||||
if(error != kCGErrorSuccess)
|
||||
nlerror("cannot set mouse position");
|
||||
}
|
||||
|
||||
void release()
|
||||
{
|
||||
/*
|
||||
TODO release some stuff
|
||||
*/
|
||||
nlwarning("not implemented");
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: this function has to be moved to a more central place to handle key
|
||||
mapping on mac x11 as well
|
||||
|
@ -262,8 +550,8 @@ NLMISC::TKey virtualKeycodeToNelKey(unsigned short keycode)
|
|||
case kVK_RightArrow: return NLMISC::KeyRIGHT;
|
||||
case kVK_DownArrow: return NLMISC::KeyDOWN;
|
||||
case kVK_UpArrow: return NLMISC::KeyUP;
|
||||
case kVK_Command:break;
|
||||
case kVK_Option:break;
|
||||
case kVK_Command:break;
|
||||
case kVK_Option:break;
|
||||
case kVK_RightOption:break;
|
||||
case kVK_Function:break;
|
||||
case kVK_VolumeUp:break;
|
||||
|
@ -296,7 +584,7 @@ NLMISC::TKeyButton modifierFlagsToNelKeyButton(unsigned int modifierFlags)
|
|||
|
||||
bool isTextKeyEvent(NSEvent* event)
|
||||
{
|
||||
// if there are no characters provided with this event, is is not a text event
|
||||
// if there are no characters provided with this event, it is not a text event
|
||||
if([[event characters] length] == 0)
|
||||
return false;
|
||||
|
||||
|
@ -312,33 +600,33 @@ bool isTextKeyEvent(NSEvent* event)
|
|||
|
||||
// get the character reported by cocoa
|
||||
unsigned int character = [[event characters] characterAtIndex:0];
|
||||
|
||||
|
||||
// printable ascii characters
|
||||
if(isprint(character))
|
||||
return true;
|
||||
|
||||
|
||||
/*
|
||||
TODO check why iswprint(character) does not solve it.
|
||||
TODO check why iswprint(character) does not solve it.
|
||||
it always returns false, even for π, é, ...
|
||||
*/
|
||||
// > 127 but not printable
|
||||
if( nelKey == NLMISC::KeyF1 || nelKey == NLMISC::KeyF2 ||
|
||||
nelKey == NLMISC::KeyF3 || nelKey == NLMISC::KeyF4 ||
|
||||
nelKey == NLMISC::KeyF5 || nelKey == NLMISC::KeyF6 ||
|
||||
nelKey == NLMISC::KeyF7 || nelKey == NLMISC::KeyF8 ||
|
||||
// characters > 127 but not printable
|
||||
if( nelKey == NLMISC::KeyF1 || nelKey == NLMISC::KeyF2 ||
|
||||
nelKey == NLMISC::KeyF3 || nelKey == NLMISC::KeyF4 ||
|
||||
nelKey == NLMISC::KeyF5 || nelKey == NLMISC::KeyF6 ||
|
||||
nelKey == NLMISC::KeyF7 || nelKey == NLMISC::KeyF8 ||
|
||||
nelKey == NLMISC::KeyF9 || nelKey == NLMISC::KeyF10 ||
|
||||
nelKey == NLMISC::KeyF11 || nelKey == NLMISC::KeyF12 ||
|
||||
nelKey == NLMISC::KeyF13 || nelKey == NLMISC::KeyF14 ||
|
||||
nelKey == NLMISC::KeyF15 || nelKey == NLMISC::KeyF16 ||
|
||||
nelKey == NLMISC::KeyF17 || nelKey == NLMISC::KeyF18 ||
|
||||
nelKey == NLMISC::KeyF11 || nelKey == NLMISC::KeyF12 ||
|
||||
nelKey == NLMISC::KeyF13 || nelKey == NLMISC::KeyF14 ||
|
||||
nelKey == NLMISC::KeyF15 || nelKey == NLMISC::KeyF16 ||
|
||||
nelKey == NLMISC::KeyF17 || nelKey == NLMISC::KeyF18 ||
|
||||
nelKey == NLMISC::KeyF19 || nelKey == NLMISC::KeyF20 ||
|
||||
nelKey == NLMISC::KeyUP || nelKey == NLMISC::KeyDOWN ||
|
||||
nelKey == NLMISC::KeyUP || nelKey == NLMISC::KeyDOWN ||
|
||||
nelKey == NLMISC::KeyLEFT || nelKey == NLMISC::KeyRIGHT ||
|
||||
nelKey == NLMISC::KeyHOME || nelKey == NLMISC::KeyEND ||
|
||||
nelKey == NLMISC::KeyPRIOR || nelKey == NLMISC::KeyNEXT ||
|
||||
nelKey == NLMISC::KeyDELETE)
|
||||
return false;
|
||||
|
||||
|
||||
// all the fancy wide characters
|
||||
if(character > 127)
|
||||
return true;
|
||||
|
@ -346,6 +634,11 @@ bool isTextKeyEvent(NSEvent* event)
|
|||
return false;
|
||||
}
|
||||
|
||||
void emulateMouseRawMode(bool enable)
|
||||
{
|
||||
g_emulateRawMode = enable;
|
||||
}
|
||||
|
||||
void submitEvents(NLMISC::CEventServer& server,
|
||||
bool allWindows, NLMISC::CCocoaEventEmitter* eventEmitter)
|
||||
{
|
||||
|
@ -354,7 +647,7 @@ void submitEvents(NLMISC::CEventServer& server,
|
|||
g_pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
// we break if there was no event to handle
|
||||
/* TODO maximum? */
|
||||
/* TODO maximum number of events processed in one update? */
|
||||
while(true)
|
||||
{
|
||||
// get the next event to handle
|
||||
|
@ -366,82 +659,173 @@ void submitEvents(NLMISC::CEventServer& server,
|
|||
if(!event)
|
||||
break;
|
||||
|
||||
// NSLog(@"%@", event);
|
||||
// get the views size
|
||||
NSRect rect = [g_glview frame];
|
||||
|
||||
uint32 width, height;
|
||||
/* TODO cache? */
|
||||
getWindowSize(width, height);
|
||||
// TODO this code assumes, that the view fills the window
|
||||
// convert the mouse position to NeL style (relative)
|
||||
float mouseX = event.locationInWindow.x / (float)rect.size.width;
|
||||
float mouseY = event.locationInWindow.y / (float)rect.size.height;
|
||||
|
||||
// get the mouse position in nel style (relative)
|
||||
float mouseX = event.locationInWindow.x / (float)width;
|
||||
float mouseY = event.locationInWindow.y / (float)height;
|
||||
// if the mouse event was placed on the window's titlebar, don't tell NeL :)
|
||||
if(mouseY > 1.0 && event.type != NSKeyDown && event.type != NSKeyUp)
|
||||
{
|
||||
[g_app sendEvent:event];
|
||||
[g_app updateWindows];
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(event.type)
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
server.postEvent(new NLMISC::CEventMouseDown(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
}
|
||||
break;
|
||||
case NSLeftMouseUp:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
server.postEvent(new NLMISC::CEventMouseUp(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NSRightMouseDown:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
server.postEvent(new NLMISC::CEventMouseDown(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NSRightMouseUp:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
server.postEvent(new NLMISC::CEventMouseUp(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NSMouseMoved:
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, (NLMISC::TMouseButton)0 /* modifiers */, eventEmitter));
|
||||
break;
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
NLMISC::CEvent* nelEvent;
|
||||
|
||||
// when emulating raw mode, send the delta in a CGDMouseMove event
|
||||
if(g_emulateRawMode)
|
||||
nelEvent = new NLMISC::CGDMouseMove(
|
||||
eventEmitter, NULL /* no mouse device */, event.deltaX, -event.deltaY);
|
||||
|
||||
// normally send position in a CEventMouseMove
|
||||
else
|
||||
nelEvent = new NLMISC::CEventMouseMove(mouseX, mouseY,
|
||||
(NLMISC::TMouseButton)0 /* modifiers */, eventEmitter);
|
||||
|
||||
|
||||
server.postEvent(nelEvent);
|
||||
break;
|
||||
}
|
||||
case NSLeftMouseDragged:
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSRightMouseDragged:break;
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
NLMISC::CEvent* nelEvent;
|
||||
|
||||
// when emulating raw mode, send the delta in a CGDMouseMove event
|
||||
if(g_emulateRawMode)
|
||||
nelEvent = new NLMISC::CGDMouseMove(
|
||||
eventEmitter, NULL /* no mouse device */, event.deltaX, -event.deltaY);
|
||||
|
||||
// normally send position in a CEventMouseMove
|
||||
else
|
||||
nelEvent = new NLMISC::CEventMouseMove(mouseX, mouseY,
|
||||
NLMISC::leftButton /* modifiers */, eventEmitter);
|
||||
|
||||
server.postEvent(nelEvent);
|
||||
break;
|
||||
}
|
||||
case NSRightMouseDragged:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
NLMISC::CEvent* nelEvent;
|
||||
|
||||
// when emulating raw mode, send the delta in a CGDMouseMove event
|
||||
if(g_emulateRawMode)
|
||||
nelEvent = new NLMISC::CGDMouseMove(
|
||||
eventEmitter, NULL /* no mouse device */, event.deltaX, -event.deltaY);
|
||||
|
||||
// normally send position in a CEventMouseMove
|
||||
else
|
||||
nelEvent = new NLMISC::CEventMouseMove(mouseX, mouseY,
|
||||
NLMISC::rightButton /* modifiers */, eventEmitter);
|
||||
|
||||
server.postEvent(nelEvent);
|
||||
break;
|
||||
}
|
||||
case NSMouseEntered:break;
|
||||
case NSMouseExited:break;
|
||||
case NSKeyDown:
|
||||
// push the key press event to the new event server
|
||||
{
|
||||
// push the key press event to the event server
|
||||
server.postEvent(new NLMISC::CEventKeyDown(
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
[event isARepeat] == NO,
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
[event isARepeat] == NO,
|
||||
eventEmitter));
|
||||
|
||||
if(isTextKeyEvent(event))
|
||||
|
||||
// if this was a text event
|
||||
if(isTextKeyEvent(event))
|
||||
{
|
||||
ucstring ucstr;
|
||||
|
||||
// get the string associated with the key press event
|
||||
ucstr.fromUtf8([[event characters] UTF8String]);
|
||||
|
||||
// push to event server
|
||||
// push the text event to event server as well
|
||||
server.postEvent(new NLMISC::CEventChar(
|
||||
ucstr[0],
|
||||
NLMISC::noKeyButton,
|
||||
ucstr[0],
|
||||
NLMISC::noKeyButton,
|
||||
eventEmitter));
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NSKeyUp:
|
||||
{
|
||||
// push the key release event to the event server
|
||||
server.postEvent(new NLMISC::CEventKeyUp(
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
eventEmitter));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NSFlagsChanged:break;
|
||||
case NSAppKitDefined:break;
|
||||
case NSSystemDefined:break;
|
||||
case NSApplicationDefined:break;
|
||||
case NSPeriodic:break;
|
||||
case NSCursorUpdate:break;
|
||||
case NSScrollWheel:break;
|
||||
case NSScrollWheel:
|
||||
{
|
||||
/*
|
||||
TODO modifiers with mouse events
|
||||
*/
|
||||
server.postEvent(new NLMISC::CEventMouseWheel(
|
||||
mouseX, mouseY, (NLMISC::TMouseButton)0 /* modifiers */,
|
||||
(event.deltaY > 0), eventEmitter));
|
||||
break;
|
||||
}
|
||||
case NSTabletPoint:break;
|
||||
case NSTabletProximity:break;
|
||||
case NSOtherMouseDown:break;
|
||||
|
@ -454,9 +838,11 @@ void submitEvents(NLMISC::CEventServer& server,
|
|||
case NSEventTypeBeginGesture:break;
|
||||
case NSEventTypeEndGesture:break;
|
||||
default:
|
||||
{
|
||||
nlwarning("Unknown event type. dropping.");
|
||||
// NSLog(@"%@", event);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[g_app sendEvent:event];
|
||||
|
|
|
@ -27,4 +27,10 @@ void CCocoaEventEmitter::submitEvents(CEventServer & server, bool allWindows)
|
|||
NL3D::MAC::submitEvents(server, allWindows, this);
|
||||
}
|
||||
|
||||
void CCocoaEventEmitter::emulateMouseRawMode(bool enable)
|
||||
{
|
||||
// just forwarding to our cocoa adapter
|
||||
NL3D::MAC::emulateMouseRawMode(enable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ class CCocoaEventEmitter : public IEventEmitter
|
|||
{
|
||||
public:
|
||||
virtual void submitEvents(CEventServer & server, bool allWindows);
|
||||
virtual void emulateMouseRawMode(bool enable);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
@interface CocoaOpenGLView : NSOpenGLView<NSTextInputClient>
|
||||
{
|
||||
NSMutableAttributedString* backingStore;
|
||||
NSMutableAttributedString* characterStorage;
|
||||
NSRange markedRange;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{
|
||||
if(self = [super initWithFrame:frame])
|
||||
{
|
||||
backingStore = [[NSMutableAttributedString alloc] initWithString:@""];
|
||||
characterStorage = [[NSMutableAttributedString alloc] initWithString:@""];
|
||||
return self;
|
||||
}
|
||||
return nil;
|
||||
|
@ -32,9 +32,10 @@
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[backingStore release];
|
||||
[characterStorage release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(BOOL)acceptsFirstResponder
|
||||
{
|
||||
return YES;
|
||||
|
@ -77,13 +78,13 @@
|
|||
|
||||
if([aString length] == 0)
|
||||
{
|
||||
[backingStore deleteCharactersInRange:replacementRange];
|
||||
[characterStorage deleteCharactersInRange:replacementRange];
|
||||
[self unmarkText];
|
||||
}
|
||||
else
|
||||
{
|
||||
markedRange = NSMakeRange(replacementRange.location, [aString length]);
|
||||
[backingStore replaceCharactersInRange:replacementRange withString:aString];
|
||||
[characterStorage replaceCharactersInRange:replacementRange withString:aString];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +103,7 @@
|
|||
-(NSAttributedString*)attributedSubstringForProposedRange:(NSRange)aRange
|
||||
actualRange:(NSRangePointer)actualRange
|
||||
{
|
||||
return [backingStore attributedSubstringFromRange:aRange];
|
||||
return [characterStorage attributedSubstringFromRange:aRange];
|
||||
}
|
||||
|
||||
-(void)insertText:(id)aString
|
||||
|
@ -111,7 +112,7 @@
|
|||
if(replacementRange.location == NSNotFound)
|
||||
replacementRange = markedRange;
|
||||
|
||||
[backingStore replaceCharactersInRange:replacementRange withString:aString];
|
||||
[characterStorage replaceCharactersInRange:replacementRange withString:aString];
|
||||
}
|
||||
|
||||
-(NSUInteger)characterIndexForPoint:(NSPoint)aPoint
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace NLMISC {
|
||||
|
||||
CUnixEventEmitter::CUnixEventEmitter ():_dpy(NULL), _win(0), _PreviousKey(KeyNOKEY)
|
||||
CUnixEventEmitter::CUnixEventEmitter ():_dpy(NULL), _win(0), _PreviousKey(KeyNOKEY), _emulateRawMode(false)
|
||||
{
|
||||
_im = 0;
|
||||
_ic = 0;
|
||||
|
@ -83,6 +83,19 @@ void CUnixEventEmitter::submitEvents(CEventServer & server, bool allWindows)
|
|||
}
|
||||
}
|
||||
|
||||
void CUnixEventEmitter::emulateMouseRawMode(bool enable)
|
||||
{
|
||||
_emulateRawMode = enable;
|
||||
|
||||
if(_emulateRawMode)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes(_dpy, _win, &xwa);
|
||||
XWarpPointer(_dpy, None, _win, None, None, None, None,
|
||||
(xwa.width / 2), (xwa.height / 2));
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef AltMask
|
||||
# ifdef NL_OS_MAC
|
||||
# define AltMask (8192)
|
||||
|
@ -120,6 +133,9 @@ TKey getKeyFromKeycode (uint keycode)
|
|||
switch (keycode)
|
||||
{
|
||||
#ifdef NL_OS_MAC
|
||||
/*
|
||||
TODO use key mapping from driver/opengl/mac/cocoa_adapter.mm
|
||||
*/
|
||||
case 0x12: return Key1;
|
||||
case 0x13: return Key2;
|
||||
case 0x14: return Key3;
|
||||
|
@ -162,10 +178,37 @@ TKey getKeyFromKeycode (uint keycode)
|
|||
case 0x31: return KeyAPOSTROPHE;
|
||||
case 0x33: return KeyBACKSLASH;
|
||||
case 0x5e: return KeyOEM_102;
|
||||
case 0x3a: return KeyCOMMA;
|
||||
// case 0x3a: return KeyCOMMA;
|
||||
case 0x3b: return KeyPERIOD;
|
||||
case 0x3c: return KeySLASH;
|
||||
case 0x3d: return KeyPARAGRAPH;
|
||||
// for non-standard keyboards, maps to QWERTY keys
|
||||
case 0x18: return KeyQ;
|
||||
case 0x19: return KeyW;
|
||||
case 0x1a: return KeyE;
|
||||
case 0x1b: return KeyR;
|
||||
case 0x1c: return KeyT;
|
||||
case 0x1d: return KeyY;
|
||||
case 0x1e: return KeyU;
|
||||
case 0x1f: return KeyI;
|
||||
case 0x20: return KeyO;
|
||||
case 0x21: return KeyP;
|
||||
case 0x26: return KeyQ;
|
||||
case 0x27: return KeyS;
|
||||
case 0x28: return KeyD;
|
||||
case 0x29: return KeyF;
|
||||
case 0x2a: return KeyG;
|
||||
case 0x2b: return KeyH;
|
||||
case 0x2c: return KeyJ;
|
||||
case 0x2d: return KeyK;
|
||||
case 0x2e: return KeyL;
|
||||
case 0x34: return KeyZ;
|
||||
case 0x35: return KeyX;
|
||||
case 0x36: return KeyC;
|
||||
case 0x37: return KeyV;
|
||||
case 0x38: return KeyB;
|
||||
case 0x39: return KeyN;
|
||||
case 0x3a: return KeyM;
|
||||
#endif
|
||||
default:
|
||||
// nlwarning("missing keycode 0x%x %d '%c'", keycode, keycode, keycode);
|
||||
|
@ -316,6 +359,9 @@ TKey getKeyFromKeySym (KeySym keysym)
|
|||
|
||||
void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes (_dpy, _win, &xwa);
|
||||
|
||||
switch (event.type)
|
||||
{
|
||||
Case(ReparentNotify)
|
||||
|
@ -325,8 +371,6 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
|
|||
Case(ButtonPress)
|
||||
{
|
||||
//nlinfo("%d %d %d", event.xbutton.button, event.xbutton.x, event.xbutton.y);
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes (_dpy, _win, &xwa);
|
||||
float fX = (float) event.xbutton.x / (float) xwa.width;
|
||||
float fY = 1.0f - (float) event.xbutton.y / (float) xwa.height;
|
||||
TMouseButton button=getMouseButton(event.xbutton.state);
|
||||
|
@ -353,8 +397,6 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
|
|||
Case(ButtonRelease)
|
||||
{
|
||||
//nlinfo("%d %d %d", event.xbutton.button, event.xbutton.x, event.xbutton.y);
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes (_dpy, _win, &xwa);
|
||||
float fX = (float) event.xbutton.x / (float) xwa.width;
|
||||
float fY = 1.0f - (float) event.xbutton.y / (float) xwa.height;
|
||||
switch(event.xbutton.button)
|
||||
|
@ -373,13 +415,36 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
|
|||
}
|
||||
Case(MotionNotify)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes (_dpy, _win, &xwa);
|
||||
float fX = (float) event.xbutton.x / (float) xwa.width;
|
||||
float fY = 1.0f - (float) event.xbutton.y / (float) xwa.height;
|
||||
if ((fX == 0.5f) && (fY == 0.5f)) break;
|
||||
TMouseButton button=getMouseButton (event.xbutton.state);
|
||||
server.postEvent (new CEventMouseMove (fX, fY, button, this));
|
||||
|
||||
// if raw mode should be emulated
|
||||
if(_emulateRawMode)
|
||||
{
|
||||
// when we just wrapped back the pointer to 0.5 / 0.5, ignore event
|
||||
if(event.xbutton.x == xwa.width / 2 && event.xbutton.y == xwa.height / 2)
|
||||
break;
|
||||
|
||||
// post a CGDMouseMove with the movement delta to the event server
|
||||
server.postEvent(
|
||||
new CGDMouseMove(this, NULL /* no mouse device */,
|
||||
event.xbutton.x - (xwa.width / 2),
|
||||
(xwa.height / 2) - event.xbutton.y));
|
||||
|
||||
// move the pointer back to the center of the window
|
||||
XWarpPointer(_dpy, None, _win, None, None, None, None,
|
||||
(xwa.width / 2), (xwa.height / 2));
|
||||
}
|
||||
|
||||
// if in normal mouse mode
|
||||
else
|
||||
{
|
||||
// get the relative mouse position
|
||||
float fX = (float) event.xbutton.x / (float) xwa.width;
|
||||
float fY = 1.0f - (float) event.xbutton.y / (float) xwa.height;
|
||||
|
||||
// post a normal mouse move event to the event server
|
||||
server.postEvent (new CEventMouseMove (fX, fY, button, this));
|
||||
}
|
||||
break;
|
||||
}
|
||||
Case(KeyPress)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/event_emitter.h"
|
||||
#include "nel/misc/events.h"
|
||||
#include "nel/misc/game_device_events.h"
|
||||
|
||||
#ifdef NL_OS_UNIX
|
||||
|
||||
|
@ -54,6 +55,8 @@ public:
|
|||
*/
|
||||
virtual void submitEvents(CEventServer & server, bool allWindows);
|
||||
|
||||
virtual void emulateMouseRawMode(bool);
|
||||
|
||||
public:
|
||||
void processMessage (XEvent &event, CEventServer &server);
|
||||
|
||||
|
@ -65,6 +68,7 @@ private:
|
|||
TKey _PreviousKey;
|
||||
XIM _im;
|
||||
XIC _ic;
|
||||
bool _emulateRawMode;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "nel/3d/water_pool_manager.h"
|
||||
#include "nel/3d/u_camera.h"
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/event_emitter.h"
|
||||
|
||||
|
||||
using namespace NLMISC;
|
||||
|
@ -1594,6 +1595,11 @@ NLMISC::IKeyboardDevice *CDriverUser::enableLowLevelKeyboard(bool enable)
|
|||
return _Driver->enableLowLevelKeyboard(enable);
|
||||
}
|
||||
|
||||
void CDriverUser::emulateMouseRawMode(bool enable)
|
||||
{
|
||||
_Driver->getEventEmitter()->emulateMouseRawMode(enable);
|
||||
}
|
||||
|
||||
uint CDriverUser::getDoubleClickDelay(bool hardwareMouse)
|
||||
{
|
||||
NL3D_HAUTO_UI_DRIVER;
|
||||
|
|
|
@ -41,7 +41,7 @@ CVertexBuffer CFlareModel::_OcclusionQueryVB;
|
|||
using NLMISC::CVector;
|
||||
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
CFlareModel::CFlareModel()
|
||||
{
|
||||
std::fill(_Intensity, _Intensity + MaxNumContext, 0.f);
|
||||
|
@ -56,7 +56,7 @@ CFlareModel::CFlareModel()
|
|||
Next = NULL;
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::resetOcclusionQuerries()
|
||||
{
|
||||
for(uint k = 0; k < MaxNumContext; ++k)
|
||||
|
@ -69,7 +69,7 @@ void CFlareModel::resetOcclusionQuerries()
|
|||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
CFlareModel::~CFlareModel()
|
||||
{
|
||||
// if driver hasn't changed, delete all querries
|
||||
|
@ -92,7 +92,7 @@ CFlareModel::~CFlareModel()
|
|||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::registerBasic()
|
||||
{
|
||||
// register the model
|
||||
|
@ -117,7 +117,7 @@ static inline void vbWrite(uint8 *&dest, float uCoord, float vCoord)
|
|||
dest += 2 * sizeof(float);
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::traverseRender()
|
||||
{
|
||||
CRenderTrav &renderTrav = getOwnerScene()->getRenderTrav();
|
||||
|
@ -540,7 +540,7 @@ void CFlareModel::traverseRender()
|
|||
}
|
||||
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::initStatics()
|
||||
{
|
||||
if (!_OcclusionQuerySettuped)
|
||||
|
@ -560,7 +560,7 @@ void CFlareModel::initStatics()
|
|||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
||||
{
|
||||
nlassert(drv);
|
||||
|
@ -571,13 +571,13 @@ void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
|||
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::updateOcclusionQueryEnd(IDriver *drv)
|
||||
{
|
||||
drv->setColorMask(true, true, true, true);
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::updateOcclusionQuery(IDriver *drv)
|
||||
{
|
||||
nlassert(drv);
|
||||
|
@ -604,7 +604,7 @@ void CFlareModel::updateOcclusionQuery(IDriver *drv)
|
|||
oq->end();
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::renderOcclusionMeshPrimitives(CMesh &mesh, IDriver &drv)
|
||||
{
|
||||
uint numMatrixBlock = mesh.getNbMatrixBlock();
|
||||
|
@ -620,7 +620,7 @@ void CFlareModel::renderOcclusionMeshPrimitives(CMesh &mesh, IDriver &drv)
|
|||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::setupOcclusionMeshMatrix(IDriver &drv, CScene &scene) const
|
||||
{
|
||||
nlassert(Shape);
|
||||
|
@ -638,7 +638,7 @@ void CFlareModel::setupOcclusionMeshMatrix(IDriver &drv, CScene &scene) const
|
|||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
||||
{
|
||||
nlassert(_Scene);
|
||||
|
@ -676,7 +676,7 @@ void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
|||
drv.setColorMask(true, true, true, true); // restore pixel writes
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
// ********************************************************************************************************************
|
||||
void CFlareModel::renderOcclusionTestMesh(IDriver &drv)
|
||||
{
|
||||
nlassert(_Scene);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
namespace NL3D {
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
CFlareShape::CFlareShape() : _Color(NLMISC::CRGBA::White),
|
||||
_DazzleColor(NLMISC::CRGBA::Black),
|
||||
_SizeDisappear(0.f),
|
||||
|
@ -59,7 +59,7 @@ CFlareShape::CFlareShape() : _Color(NLMISC::CRGBA::White),
|
|||
}
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CFlareShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
CFlareModel *fm = NLMISC::safe_cast<CFlareModel *>(scene.createModel(FlareModelClassId) );
|
||||
|
@ -123,7 +123,7 @@ CTransformShape *CFlareShape::createInstance(CScene &scene)
|
|||
return fm;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
float CFlareShape::getNumTriangles (float distance)
|
||||
{
|
||||
float count = 0;
|
||||
|
@ -134,7 +134,7 @@ float CFlareShape::getNumTriangles (float distance)
|
|||
return count;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
bool CFlareShape::clip(const std::vector<CPlane> &pyramid, const CMatrix &worldMatrix)
|
||||
{
|
||||
// compute flare pos in world basis :
|
||||
|
@ -150,7 +150,7 @@ bool CFlareShape::clip(const std::vector<CPlane> &pyramid, const CMatrix &wor
|
|||
return true;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
|
||||
{
|
||||
// the flare himself is a point
|
||||
|
@ -158,7 +158,7 @@ void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
|
|||
bbox.setHalfSize(CVector::Null);
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CFlareShape::flushTextures (IDriver &driver, uint selectedTexture)
|
||||
{
|
||||
// Flush each texture
|
||||
|
@ -175,7 +175,7 @@ void CFlareShape::flushTextures (IDriver &driver, uint selectedTexture)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CFlareShape::setOcclusionTestMeshName(const std::string &shapeName)
|
||||
{
|
||||
if (shapeName == _OcclusionTestMeshName) return;
|
||||
|
@ -184,7 +184,7 @@ void CFlareShape::setOcclusionTestMeshName(const std::string &shapeName)
|
|||
}
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
CMesh *CFlareShape::getOcclusionTestMesh(CShapeBank &sb)
|
||||
{
|
||||
if (_OcclusionTestMesh) return _OcclusionTestMesh;
|
||||
|
|
|
@ -48,20 +48,20 @@ CLandscapeUser::~CLandscapeUser()
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setZonePath(const std::string &zonePath)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_ZoneManager.setZonePath(zonePath);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::invalidateAllTiles()
|
||||
{
|
||||
_Landscape->Landscape.invalidateAllTiles();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::loadBankFiles(const std::string &tileBankFile, const std::string &farBankFile)
|
||||
{
|
||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||
|
@ -89,7 +89,7 @@ void CLandscapeUser::loadBankFiles(const std::string &tileBankFile, const std::s
|
|||
farbankFile.close();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius, std::v
|
|||
_Landscape->Landscape.checkBinds();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
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)
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ void CLandscapeUser::getAllZoneLoaded(std::vector<std::string> &zoneLoaded) cons
|
|||
}
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::loadAllZonesAround(const CVector &pos, float radius)
|
||||
{
|
||||
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)
|
||||
{
|
||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||
|
@ -257,7 +257,7 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius)
|
|||
std::string 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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::removeAllZones()
|
||||
{
|
||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||
|
@ -349,7 +349,7 @@ void CLandscapeUser::removeAllZones()
|
|||
_ZoneManager.clear();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -358,37 +358,37 @@ void CLandscapeUser::setupStaticLight (const CRGBA &diffuse, const CRGBA &ambian
|
|||
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setThreshold (float thre)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setThreshold(thre);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
float CLandscapeUser::getThreshold () const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->Landscape.getThreshold();
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setTileNear (float tileNear)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setTileNear(tileNear);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
float CLandscapeUser::getTileNear () const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->Landscape.getTileNear();
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setTileMaxSubdivision (uint tileDiv)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setTileMaxSubdivision(tileDiv);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
uint CLandscapeUser::getTileMaxSubdivision ()
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -396,7 +396,7 @@ uint CLandscapeUser::getTileMaxSubdivision ()
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
std::string CLandscapeUser::getZoneName(const CVector &pos)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -404,14 +404,14 @@ std::string CLandscapeUser::getZoneName(const CVector &pos)
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
CVector CLandscapeUser::getHeightFieldDeltaZ(float x, float y) const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->Landscape.getHeightFieldDeltaZ(x,y);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setHeightField(const CHeightMap &hf)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -419,35 +419,35 @@ void CLandscapeUser::setHeightField(const CHeightMap &hf)
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::enableVegetable(bool enable)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.enableVegetable(enable);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::loadVegetableTexture(const std::string &textureFileName)
|
||||
{
|
||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||
_Landscape->Landscape.loadVegetableTexture(textureFileName);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setupVegetableLighting(const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setupVegetableLighting(ambient, diffuse, directionalLight);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setVegetableWind(const CVector &windDir, float windFreq, float windPower, float windBendMin)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setVegetableWind(windDir, windFreq, windPower, windBendMin);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setVegetableUpdateLightingFrequency(float freq)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -455,7 +455,7 @@ void CLandscapeUser::setVegetableUpdateLightingFrequency(float freq)
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setUpdateLightingFrequency(float freq)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
|
@ -463,57 +463,57 @@ void CLandscapeUser::setUpdateLightingFrequency(float freq)
|
|||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::enableAdditive (bool enable)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->enableAdditive(enable);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
bool CLandscapeUser::isAdditiveEnabled () const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->isAdditive ();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setPointLightDiffuseMaterial(CRGBA diffuse)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setPointLightDiffuseMaterial(diffuse);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
CRGBA CLandscapeUser::getPointLightDiffuseMaterial () const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->Landscape.getPointLightDiffuseMaterial();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::setDLMGlobalVegetableColor(CRGBA gvc)
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
_Landscape->Landscape.setDLMGlobalVegetableColor(gvc);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
CRGBA CLandscapeUser::getDLMGlobalVegetableColor() const
|
||||
{
|
||||
NL3D_HAUTO_UI_LANDSCAPE;
|
||||
return _Landscape->Landscape.getDLMGlobalVegetableColor();
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::updateLightingAll()
|
||||
{
|
||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||
_Landscape->Landscape.updateLightingAll();
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::postfixTileFilename (const char *postfix)
|
||||
{
|
||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||
_Landscape->Landscape.TileBank.postfixTileFilename (postfix);
|
||||
}
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void CLandscapeUser::postfixTileVegetableDesc (const char *postfix)
|
||||
{
|
||||
NL3D_HAUTO_LANDSCAPE_UPDATE_LIGHTING_ALL;
|
||||
|
|
|
@ -2429,7 +2429,7 @@ void CMesh::CMeshBuild::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}*/
|
||||
|
||||
|
||||
//************************************
|
||||
// ************************************
|
||||
CMesh::CMeshBuild::CMeshBuild()
|
||||
{
|
||||
for (uint k = 0; k < CVertexBuffer::MaxStage; ++k)
|
||||
|
|
|
@ -4,8 +4,8 @@ libdir=@libdir@
|
|||
includedir=@includedir@
|
||||
|
||||
Name: nel-3d
|
||||
Version: @VERSION@
|
||||
Description: NeL @VERSION@
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ @FREETYPE_LIBS@ -lc
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
||||
{
|
||||
_ZoneGrid.clear();
|
||||
|
@ -77,7 +77,7 @@ void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
|||
_RaytraceCounter = ~0;
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
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;
|
||||
|
@ -138,7 +138,7 @@ bool CPackedWorld::raytrace(const NLMISC::CVector &start, const NLMISC::CVector
|
|||
return false;
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
||||
{
|
||||
zones.clear();
|
||||
|
@ -148,7 +148,7 @@ void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
|||
}
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialVersion(1);
|
||||
|
@ -156,7 +156,7 @@ void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
f.serialCont(ZoneNames);
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CPackedWorld::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
serialZoneNames(f);
|
||||
|
@ -166,7 +166,7 @@ void CPackedWorld::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
f.serial(_ZoneMinY);
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CPackedWorld::select(const NLMISC::CPolygon2D &poly, std::vector<NLMISC::CTriangle> &selectedTriangles) const
|
||||
{
|
||||
selectedTriangles.clear();
|
||||
|
|
|
@ -23,7 +23,7 @@ uint PSEnterLeaveDepth = 0;
|
|||
uint PSEnterLeaveMaxDepth = 1;
|
||||
std::string PSCurrName;
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
CPSEnterLeave::CPSEnterLeave(const char *name)
|
||||
{
|
||||
++ PSEnterLeaveDepth;
|
||||
|
@ -35,7 +35,7 @@ CPSEnterLeave::CPSEnterLeave(const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
CPSEnterLeave::~CPSEnterLeave()
|
||||
{
|
||||
if (PSEnterLeaveDepth <= PSEnterLeaveMaxDepth)
|
||||
|
@ -54,7 +54,7 @@ namespace NL3D {
|
|||
// CParticleSystemProcess implementation //
|
||||
/////////////////////////////////////////////
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CParticleSystemProcess::setOwner(CParticleSystem *ps)
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_setOwner)
|
||||
|
@ -69,14 +69,14 @@ void CParticleSystemProcess::setOwner(CParticleSystem *ps)
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
uint CParticleSystemProcess::getUserMatrixUsageCount() const
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_getUserMatrixUsageCount)
|
||||
return _MatrixMode == PSUserMatrix;
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CParticleSystemProcess::setMatrixMode(TPSMatrixMode matrixMode)
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_setMatrixMode)
|
||||
|
@ -90,7 +90,7 @@ void CParticleSystemProcess::setMatrixMode(TPSMatrixMode matrixMode)
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
CFontGenerator *CParticleSystemProcess::getFontGenerator(void)
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
||||
|
@ -98,7 +98,7 @@ CFontGenerator *CParticleSystemProcess::getFontGenerator(void)
|
|||
return _Owner->getFontGenerator();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
const CFontGenerator *CParticleSystemProcess::getFontGenerator(void) const
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_getFontGenerator)
|
||||
|
@ -106,7 +106,7 @@ const CFontGenerator *CParticleSystemProcess::getFontGenerator(void) const
|
|||
return _Owner->getFontGenerator();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
CFontManager *CParticleSystemProcess::getFontManager(void)
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
||||
|
@ -114,7 +114,7 @@ CFontManager *CParticleSystemProcess::getFontManager(void)
|
|||
return _Owner->getFontManager();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
const CFontManager *CParticleSystemProcess::getFontManager(void) const
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_getFontManager)
|
||||
|
@ -124,7 +124,7 @@ const CFontManager *CParticleSystemProcess::getFontManager(void) const
|
|||
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CParticleSystemProcess::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
NL_PS_FUNC(CParticleSystemProcess_serial)
|
||||
|
|
|
@ -2293,7 +2293,7 @@ CTileElement *CPatch::getTileElement(const CUV &uv)
|
|||
return &(Tiles[ts+tt*OrderS]);
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
uint32 CPatch::countNumTriFar0() const
|
||||
{
|
||||
uint32 numIndex = MasterBlock.Far0FaceVector ? *MasterBlock.Far0FaceVector : 0;
|
||||
|
@ -2311,7 +2311,7 @@ uint32 CPatch::countNumTriFar0() const
|
|||
return numIndex;
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
uint32 CPatch::countNumTriFar1() const
|
||||
{
|
||||
uint32 numIndex = MasterBlock.Far1FaceVector ? *MasterBlock.Far1FaceVector : 0;
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
void CPSAttribMakerMemory<uint32>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
CPSAttribMakerMemoryBase<float>::newElement(info);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
CPSLight::CPSLight() : _Color(CRGBA::White),
|
||||
_ColorScheme(NULL),
|
||||
_AttenStart(0.1f),
|
||||
|
@ -40,7 +40,7 @@ CPSLight::CPSLight() : _Color(CRGBA::White),
|
|||
NL_PS_FUNC(CPSLight_CPSLight)
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
CPSLight::~CPSLight()
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_CPSLight)
|
||||
|
@ -67,7 +67,7 @@ CPSLight::~CPSLight()
|
|||
delete _AttenEndScheme;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_serial)
|
||||
|
@ -134,14 +134,14 @@ void CPSLight::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
uint32 CPSLight::getType(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_getType)
|
||||
return PSLight;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::onShow(bool shown)
|
||||
{
|
||||
for(uint k = 0; k < _Lights.getSize(); ++k)
|
||||
|
@ -160,7 +160,7 @@ void CPSLight::onShow(bool shown)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::step(TPSProcessPass pass)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_step)
|
||||
|
@ -287,7 +287,7 @@ void CPSLight::step(TPSProcessPass pass)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setColor(NLMISC::CRGBA color)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setColor)
|
||||
|
@ -296,7 +296,7 @@ void CPSLight::setColor(NLMISC::CRGBA color)
|
|||
_Color = color;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setColorScheme(CPSAttribMaker<NLMISC::CRGBA> *scheme)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setColorScheme)
|
||||
|
@ -308,7 +308,7 @@ void CPSLight::setColorScheme(CPSAttribMaker<NLMISC::CRGBA> *scheme)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setAttenStart(float radius)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setAttenStart)
|
||||
|
@ -318,7 +318,7 @@ void CPSLight::setAttenStart(float radius)
|
|||
_AttenStart = radius;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setAttenStartScheme(CPSAttribMaker<float> *scheme)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setAttenStartScheme)
|
||||
|
@ -330,7 +330,7 @@ void CPSLight::setAttenStartScheme(CPSAttribMaker<float> *scheme)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setAttenEnd(float radius)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setAttenEnd)
|
||||
|
@ -339,7 +339,7 @@ void CPSLight::setAttenEnd(float radius)
|
|||
_AttenEnd = radius;
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::setAttenEndScheme(CPSAttribMaker<float> *scheme)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_setAttenEndScheme)
|
||||
|
@ -351,7 +351,7 @@ void CPSLight::setAttenEndScheme(CPSAttribMaker<float> *scheme)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::newElement(const CPSEmitterInfo &info)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_newElement)
|
||||
|
@ -361,7 +361,7 @@ void CPSLight::newElement(const CPSEmitterInfo &info)
|
|||
_Lights.insert(NULL); // instance is created during step()
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::deleteElement(uint32 index)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_deleteElement)
|
||||
|
@ -376,7 +376,7 @@ void CPSLight::deleteElement(uint32 index)
|
|||
_Lights.remove(index);
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::resize(uint32 size)
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_resize)
|
||||
|
@ -387,7 +387,7 @@ void CPSLight::resize(uint32 size)
|
|||
_Lights.resize(size);
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::releaseAllRef()
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_releaseAllRef)
|
||||
|
@ -404,7 +404,7 @@ void CPSLight::releaseAllRef()
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CPSLight::show()
|
||||
{
|
||||
NL_PS_FUNC(CPSLight_show)
|
||||
|
|
|
@ -56,7 +56,7 @@ CPSCollisionInfo *CPSLocated::_FirstCollision = NULL;
|
|||
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@ CPSLocated::CPSLocated() : /*_MaxNumFaces(0),*/
|
|||
}
|
||||
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
const NLMISC::CMatrix &CPSLocated::getLocalToWorldMatrix() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getLocalToWorldMatrix)
|
||||
|
@ -98,7 +98,7 @@ const NLMISC::CMatrix &CPSLocated::getLocalToWorldMatrix() const
|
|||
return NLMISC::CMatrix::Identity;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
const NLMISC::CMatrix &CPSLocated::getWorldToLocalMatrix() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getWorldToLocalMatrix)
|
||||
|
@ -116,7 +116,7 @@ const NLMISC::CMatrix &CPSLocated::getWorldToLocalMatrix() const
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
float CPSLocated::evalMaxDuration() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_evalMaxDuration)
|
||||
|
@ -125,7 +125,7 @@ float CPSLocated::evalMaxDuration() const
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::checkIntegrity() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_checkIntegrity)
|
||||
|
@ -147,7 +147,7 @@ void CPSLocated::checkIntegrity() const
|
|||
//
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
bool CPSLocated::setLastForever()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setLastForever)
|
||||
|
@ -168,7 +168,7 @@ bool CPSLocated::setLastForever()
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::systemDateChanged()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_systemDateChanged)
|
||||
|
@ -181,7 +181,7 @@ void CPSLocated::systemDateChanged()
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::releaseRefTo(const CParticleSystemProcess *other)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_releaseRefTo)
|
||||
|
@ -209,7 +209,7 @@ void CPSLocated::releaseRefTo(const CParticleSystemProcess *other)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::releaseAllRef()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_releaseAllRef)
|
||||
|
@ -241,7 +241,7 @@ void CPSLocated::releaseAllRef()
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::notifyMotionTypeChanged(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_notifyMotionTypeChanged)
|
||||
|
@ -254,7 +254,7 @@ void CPSLocated::notifyMotionTypeChanged(void)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::integrateSingle(float startDate, float deltaT, uint numStep,
|
||||
uint32 indexInLocated,
|
||||
NLMISC::CVector *destPos,
|
||||
|
@ -302,7 +302,7 @@ void CPSLocated::integrateSingle(float startDate, float deltaT, uint numStep,
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::performParametricMotion(TAnimationTime date)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_performParametricMotion)
|
||||
|
@ -340,7 +340,7 @@ void CPSLocated::performParametricMotion(TAnimationTime date)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// allocate parametric infos
|
||||
void CPSLocated::allocateParametricInfos(void)
|
||||
{
|
||||
|
@ -364,7 +364,7 @@ void CPSLocated::allocateParametricInfos(void)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// release parametric infos
|
||||
void CPSLocated::releaseParametricInfos(void)
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ void CPSLocated::releaseParametricInfos(void)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// Test whether this located support parametric motion
|
||||
bool CPSLocated::supportParametricMotion(void) const
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ bool CPSLocated::supportParametricMotion(void) const
|
|||
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,
|
||||
* 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
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setMatrixMode(TPSMatrixMode matrixMode)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setMatrixMode)
|
||||
|
@ -426,7 +426,7 @@ void CPSLocated::setMatrixMode(TPSMatrixMode matrixMode)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/*
|
||||
void CPSLocated::notifyMaxNumFacesChanged(void)
|
||||
{
|
||||
|
@ -448,7 +448,7 @@ void CPSLocated::notifyMaxNumFacesChanged(void)
|
|||
}
|
||||
*/
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
uint CPSLocated::getNumWantedTris() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getNumWantedTris)
|
||||
|
@ -488,7 +488,7 @@ bool CPSLocated::hasParticles(void) const
|
|||
return false;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// tells whether there are alive emitters
|
||||
bool CPSLocated::hasEmitters(void) const
|
||||
{
|
||||
|
@ -502,7 +502,7 @@ bool CPSLocated::hasEmitters(void) const
|
|||
return false;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::getLODVect(NLMISC::CVector &v, float &offset, TPSMatrixMode matrixMode)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getLODVect)
|
||||
|
@ -512,7 +512,7 @@ void CPSLocated::getLODVect(NLMISC::CVector &v, float &offset, TPSMatrixMode mat
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
float CPSLocated::getUserParam(uint numParam) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getUserParam)
|
||||
|
@ -521,7 +521,7 @@ float CPSLocated::getUserParam(uint numParam) const
|
|||
return _Owner->getUserParam(numParam);
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
CScene *CPSLocated::getScene(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getScene)
|
||||
|
@ -530,7 +530,7 @@ CScene *CPSLocated::getScene(void)
|
|||
return _Owner->getScene();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::incrementNbDrawnParticles(uint num)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_incrementNbDrawnParticles)
|
||||
|
@ -538,7 +538,7 @@ void CPSLocated::incrementNbDrawnParticles(uint num)
|
|||
CParticleSystem::NbParticlesDrawn += num; // for benchmark purpose
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setInitialLife(TAnimationTime lifeTime)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setInitialLife)
|
||||
|
@ -563,7 +563,7 @@ void CPSLocated::setInitialLife(TAnimationTime lifeTime)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setLifeScheme(CPSAttribMaker<float> *scheme)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setLifeScheme)
|
||||
|
@ -581,7 +581,7 @@ void CPSLocated::setLifeScheme(CPSAttribMaker<float> *scheme)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setInitialMass(float mass)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setInitialMass)
|
||||
|
@ -592,7 +592,7 @@ void CPSLocated::setInitialMass(float mass)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setMassScheme(CPSAttribMaker<float> *scheme)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setMassScheme)
|
||||
|
@ -604,7 +604,7 @@ void CPSLocated::setMassScheme(CPSAttribMaker<float> *scheme)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// 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)
|
||||
{
|
||||
|
@ -648,7 +648,7 @@ const NLMISC::CMatrix &CPSLocated::getConversionMatrix(const CParticleSystem &ps
|
|||
return NLMISC::CMatrix::Identity;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
NLMISC::CVector CPSLocated::computeI(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeI)
|
||||
|
@ -679,7 +679,7 @@ NLMISC::CVector CPSLocated::computeI(void) const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
NLMISC::CVector CPSLocated::computeIWithZAxisAligned(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeIWithZAxisAligned)
|
||||
|
@ -713,7 +713,7 @@ NLMISC::CVector CPSLocated::computeIWithZAxisAligned(void) const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
NLMISC::CVector CPSLocated::computeJ(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeJ)
|
||||
|
@ -744,7 +744,7 @@ NLMISC::CVector CPSLocated::computeJ(void) const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
NLMISC::CVector CPSLocated::computeK(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeK)
|
||||
|
@ -776,7 +776,7 @@ NLMISC::CVector CPSLocated::computeK(void) const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
NLMISC::CVector CPSLocated::computeKWithZAxisAligned(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeKWithZAxisAligned)
|
||||
|
@ -807,7 +807,7 @@ NLMISC::CVector CPSLocated::computeKWithZAxisAligned(void) const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
IDriver *CPSLocated::getDriver() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getDriver)
|
||||
|
@ -817,7 +817,7 @@ IDriver *CPSLocated::getDriver() const
|
|||
return _Owner->getDriver();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// dtor
|
||||
CPSLocated::~CPSLocated()
|
||||
{
|
||||
|
@ -852,7 +852,7 @@ CPSLocated::~CPSLocated()
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::remove(const CPSLocatedBindable *p)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_remove)
|
||||
|
@ -932,7 +932,7 @@ void CPSLocated::remove(const CPSLocatedBindable *p)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::registerDtorObserver(CPSLocatedBindable *anObserver)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_registerDtorObserver)
|
||||
|
@ -943,7 +943,7 @@ void CPSLocated::registerDtorObserver(CPSLocatedBindable *anObserver)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::unregisterDtorObserver(CPSLocatedBindable *anObserver)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_unregisterDtorObserver)
|
||||
|
@ -956,7 +956,7 @@ void CPSLocated::unregisterDtorObserver(CPSLocatedBindable *anObserver)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::postNewElement(const NLMISC::CVector &pos,
|
||||
const NLMISC::CVector &speed,
|
||||
CPSLocated &emitterLocated,
|
||||
|
@ -1028,7 +1028,7 @@ void CPSLocated::postNewElement(const NLMISC::CVector &pos,
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
sint32 CPSLocated::newElement(const CPSSpawnInfo &si, bool doEmitOnce /* = false */, TAnimationTime ellapsedTime)
|
||||
{
|
||||
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,
|
||||
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)
|
||||
{
|
||||
NL_PS_FUNC(IDToLittleEndian)
|
||||
|
@ -1279,7 +1279,7 @@ static inline uint32 IDToLittleEndian(uint32 input)
|
|||
#endif
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
inline void CPSLocated::deleteElementBase(uint32 index)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_deleteElementBase)
|
||||
|
@ -1316,7 +1316,7 @@ inline void CPSLocated::deleteElementBase(uint32 index)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::deleteElement(uint32 index)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_deleteElement)
|
||||
|
@ -1336,7 +1336,7 @@ void CPSLocated::deleteElement(uint32 index)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::deleteElement(uint32 index, TAnimationTime timeToNextSimStep)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_deleteElement)
|
||||
|
@ -1355,7 +1355,7 @@ void CPSLocated::deleteElement(uint32 index, TAnimationTime timeToNextSimStep)
|
|||
}
|
||||
|
||||
/// Resize the located container
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::resize(uint32 newSize)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_resize)
|
||||
|
@ -1417,7 +1417,7 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_serial)
|
||||
|
@ -1636,7 +1636,7 @@ void CPSLocated::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
// 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)
|
||||
{
|
||||
|
@ -1767,7 +1767,7 @@ static void IntegrateSpeed(uint count, float *src1, const float *src2, float *de
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::computeMotion()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeMotion)
|
||||
|
@ -1797,7 +1797,7 @@ void CPSLocated::computeMotion()
|
|||
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::computeNewParticleMotion(uint firstInstanceIndex)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeNewParticleMotion)
|
||||
|
@ -1806,7 +1806,7 @@ void CPSLocated::computeNewParticleMotion(uint firstInstanceIndex)
|
|||
computeCollisions(firstInstanceIndex, &CParticleSystem::_SpawnPos[0], &_Pos[0]);
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::resetCollisions(uint numInstances)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_resetCollisions)
|
||||
|
@ -1828,7 +1828,7 @@ void CPSLocated::resetCollisions(uint numInstances)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::updateCollisions()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_updateCollisions)
|
||||
|
@ -1908,7 +1908,7 @@ void CPSLocated::updateCollisions()
|
|||
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::doLODDegradation()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_doLODDegradation)
|
||||
|
@ -1940,7 +1940,7 @@ void CPSLocated::doLODDegradation()
|
|||
CParticleSystem::InsideRemoveLoop = false;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::step(TPSProcessPass pass)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_step)
|
||||
|
@ -1989,7 +1989,7 @@ void CPSLocated::step(TPSProcessPass pass)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void 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
|
||||
// if this particle is to be deleted to, must update its new index
|
||||
static inline void removeParticleFromRemoveList(uint indexToRemove, uint arraySize)
|
||||
|
@ -2131,7 +2131,7 @@ void checkRemoveArray(uint size)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
#ifndef NL_DEBUG
|
||||
inline
|
||||
#endif
|
||||
|
@ -2150,7 +2150,7 @@ TAnimationTime CPSLocated::computeDateFromCollisionToNextSimStep(uint particleIn
|
|||
return std::max(0.f, result);
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::removeOldParticles()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_removeOldParticles)
|
||||
|
@ -2360,7 +2360,7 @@ void CPSLocated::removeOldParticles()
|
|||
#endif
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::addNewlySpawnedParticles()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_addNewlySpawnedParticles)
|
||||
|
@ -2418,7 +2418,7 @@ void CPSLocated::addNewlySpawnedParticles()
|
|||
#endif
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
bool CPSLocated::computeBBox(NLMISC::CAABBox &box) const
|
||||
{
|
||||
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
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setupDriverModelMatrix(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_setupDriverModelMatrix)
|
||||
|
@ -2487,7 +2487,7 @@ void CPSLocated::setupDriverModelMatrix(void)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::queryCollisionInfo(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_queryCollisionInfo)
|
||||
|
@ -2509,7 +2509,7 @@ void CPSLocated::queryCollisionInfo(void)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::releaseCollisionInfo(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_releaseCollisionInfo)
|
||||
|
@ -2527,7 +2527,7 @@ void CPSLocated::releaseCollisionInfo(void)
|
|||
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::registerIntegrableForce(CPSForce *f)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_registerIntegrableForce)
|
||||
|
@ -2543,7 +2543,7 @@ void CPSLocated::registerIntegrableForce(CPSForce *f)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::unregisterIntegrableForce(CPSForce *f)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_unregisterIntegrableForce)
|
||||
|
@ -2559,7 +2559,7 @@ void CPSLocated::unregisterIntegrableForce(CPSForce *f)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::addNonIntegrableForceRef(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_addNonIntegrableForceRef)
|
||||
|
@ -2569,7 +2569,7 @@ void CPSLocated::addNonIntegrableForceRef(void)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::releaseNonIntegrableForceRef(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_releaseNonIntegrableForceRef)
|
||||
|
@ -2580,7 +2580,7 @@ void CPSLocated::releaseNonIntegrableForceRef(void)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::integrableForceBasisChanged(TPSMatrixMode matrixMode)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_integrableForceBasisChanged)
|
||||
|
@ -2598,7 +2598,7 @@ void CPSLocated::integrableForceBasisChanged(TPSMatrixMode matrixMode)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
CPSLocatedBindable *CPSLocated::unbind(uint index)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_unbind)
|
||||
|
@ -2611,7 +2611,7 @@ CPSLocatedBindable *CPSLocated::unbind(uint index)
|
|||
CHECK_PS_INTEGRITY
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
bool CPSLocated::isBound(const CPSLocatedBindable *lb) const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_isBound)
|
||||
|
@ -2620,7 +2620,7 @@ bool CPSLocated::isBound(const CPSLocatedBindable *lb) const
|
|||
return it != _LocatedBoundCont.end();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
uint CPSLocated::getIndexOf(const CPSLocatedBindable *lb) const
|
||||
{
|
||||
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)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindable)
|
||||
_Owner = NULL;
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::setOwner(CPSLocated *psl)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_setOwner)
|
||||
|
@ -2675,7 +2675,7 @@ void CPSLocatedBindable::setOwner(CPSLocated *psl)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::finalize(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_finalize)
|
||||
|
@ -2685,7 +2685,7 @@ void CPSLocatedBindable::finalize(void)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
CPSLocatedBindable::~CPSLocatedBindable()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_CPSLocatedBindableDtor)
|
||||
|
@ -2698,14 +2698,14 @@ CPSLocatedBindable::~CPSLocatedBindable()
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_notifyTargetRemoved)
|
||||
ptr->unregisterDtorObserver(this);
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
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)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_displayIcon2d)
|
||||
|
@ -2796,7 +2796,7 @@ void CPSLocatedBindable::displayIcon2d(const CVector tab[], uint nbSegs, float s
|
|||
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
CFontManager *CPSLocatedBindable::getFontManager(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_getFontManager)
|
||||
|
@ -2804,7 +2804,7 @@ CFontManager *CPSLocatedBindable::getFontManager(void)
|
|||
return _Owner->getFontManager();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// Shortcut to get the font manager if one was set (const version)
|
||||
const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
||||
{
|
||||
|
@ -2814,7 +2814,7 @@ const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
// Shortcut to get the matrix of the system
|
||||
const NLMISC::CMatrix &CPSLocatedBindable::getSysMat(void) const
|
||||
{
|
||||
|
@ -2823,7 +2823,7 @@ const CFontManager *CPSLocatedBindable::getFontManager(void) const
|
|||
return _Owner->getOwner()->getSysMat();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// shortcut to get the inverted matrix of the system
|
||||
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedSysMat(void) const
|
||||
{
|
||||
|
@ -2833,7 +2833,7 @@ const NLMISC::CMatrix &CPSLocatedBindable::getInvertedSysMat(void) const
|
|||
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// shortcut to get the view matrix
|
||||
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
|
||||
const NLMISC::CMatrix &CPSLocatedBindable::getInvertedViewMat(void) const
|
||||
{
|
||||
|
@ -2852,7 +2852,7 @@ const NLMISC::CMatrix &CPSLocatedBindable::getInvertedViewMat(void) const
|
|||
return _Owner->getOwner()->getInvertedViewMat();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
/// shortcut to setup the model matrix (system basis or world basis)
|
||||
void CPSLocatedBindable::setupDriverModelMatrix(void)
|
||||
{
|
||||
|
@ -2861,7 +2861,7 @@ void CPSLocatedBindable::setupDriverModelMatrix(void)
|
|||
_Owner->setupDriverModelMatrix();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::setExternID(uint32 id)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_setExternID)
|
||||
|
@ -2883,7 +2883,7 @@ void CPSLocatedBindable::setExternID(uint32 id)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocatedBindable::releaseAllRef()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocatedBindable_releaseAllRef)
|
||||
|
@ -2897,7 +2897,7 @@ void CPSLocatedBindable::releaseAllRef()
|
|||
// CPSTargetLocatedBindable implementation //
|
||||
/////////////////////////////////////////////
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_serial)
|
||||
|
@ -2917,7 +2917,7 @@ void CPSTargetLocatedBindable::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::attachTarget(CPSLocated *ptr)
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_attachTarget)
|
||||
|
@ -2939,7 +2939,7 @@ void CPSTargetLocatedBindable::attachTarget(CPSLocated *ptr)
|
|||
}
|
||||
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_notifyTargetRemoved)
|
||||
|
@ -2955,7 +2955,7 @@ void CPSTargetLocatedBindable::notifyTargetRemoved(CPSLocated *ptr)
|
|||
|
||||
// dtor
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::finalize(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_finalize)
|
||||
|
@ -2969,7 +2969,7 @@ void CPSTargetLocatedBindable::finalize(void)
|
|||
CPSLocatedBindable::finalize();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
CPSTargetLocatedBindable::~CPSTargetLocatedBindable()
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_CPSTargetLocatedBindable)
|
||||
|
@ -2980,7 +2980,7 @@ CPSTargetLocatedBindable::~CPSTargetLocatedBindable()
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::releaseRefTo(const CParticleSystemProcess *other)
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSTargetLocatedBindable::releaseAllRef()
|
||||
{
|
||||
NL_PS_FUNC(CPSTargetLocatedBindable_releaseAllRef)
|
||||
|
@ -3005,7 +3005,7 @@ void CPSTargetLocatedBindable::releaseAllRef()
|
|||
CPSLocatedBindable::releaseAllRef();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
uint CPSLocated::getUserMatrixUsageCount() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_getUserMatrixUsageCount)
|
||||
|
@ -3017,7 +3017,7 @@ uint CPSLocated::getUserMatrixUsageCount() const
|
|||
return count + CParticleSystemProcess::getUserMatrixUsageCount();
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver &drv)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_enumTexs)
|
||||
|
@ -3027,7 +3027,7 @@ void CPSLocated::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriv
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::setZBias(float value)
|
||||
{
|
||||
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)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeCollisions)
|
||||
|
@ -3050,7 +3050,7 @@ void CPSLocated::computeCollisions(uint firstInstanceIndex, const NLMISC::CVecto
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::computeSpawns(uint firstInstanceIndex, bool includeEmitOnce)
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeSpawns)
|
||||
|
@ -3084,7 +3084,7 @@ void CPSLocated::computeSpawns(uint firstInstanceIndex, bool includeEmitOnce)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::computeForces()
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_computeForces)
|
||||
|
@ -3099,7 +3099,7 @@ void CPSLocated::computeForces()
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSCollisionInfo::update(const CPSCollisionInfo &other)
|
||||
{
|
||||
NL_PS_FUNC(CPSCollisionInfo_update)
|
||||
|
@ -3122,7 +3122,7 @@ void CPSCollisionInfo::update(const CPSCollisionInfo &other)
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::checkLife() const
|
||||
{
|
||||
NL_PS_FUNC(CPSLocated_checkLife)
|
||||
|
@ -3136,7 +3136,7 @@ void CPSLocated::checkLife() const
|
|||
}
|
||||
}
|
||||
|
||||
///***************************************************************************************
|
||||
/// ***************************************************************************************
|
||||
void CPSLocated::onShow(bool shown)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
bool CPSMultiTexturedParticle::isAlternateTextureUsed(IDriver &driver) const
|
||||
{
|
||||
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)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_enumTexs)
|
||||
|
@ -674,7 +674,7 @@ void CPSQuad::enumTexs(std::vector<NLMISC::CSmartPtr<ITexture> > &dest, IDriver
|
|||
CPSMultiTexturedParticle::enumTexs(dest, drv);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::setZBias(float value)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_setZBias)
|
||||
|
@ -682,7 +682,7 @@ void CPSQuad::setZBias(float value)
|
|||
}
|
||||
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::setTexture(CSmartPtr<ITexture> tex)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_setTexture)
|
||||
|
@ -690,7 +690,7 @@ void CPSQuad::setTexture(CSmartPtr<ITexture> tex)
|
|||
CPSMultiTexturedParticle::touch();
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::setTextureGroup(NLMISC::CSmartPtr<CTextureGrouped> texGroup)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_setTextureGroup)
|
||||
|
@ -698,21 +698,21 @@ void CPSQuad::setTextureGroup(NLMISC::CSmartPtr<CTextureGrouped> texGroup)
|
|||
CPSMultiTexturedParticle::touch();
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::setTexture2(ITexture *tex)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_setTexture2)
|
||||
CPSMultiTexturedParticle::setTexture2(tex);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::setTexture2Alternate(ITexture *tex)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_setTexture2Alternate)
|
||||
CPSMultiTexturedParticle::setTexture2Alternate(tex);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
// *****************************************************************************************************
|
||||
void CPSQuad::updateTexWrapMode(IDriver &drv)
|
||||
{
|
||||
NL_PS_FUNC(CPSQuad_updateTexWrapMode)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace NL3D
|
|||
static const uint SoundBufSize = 1024;
|
||||
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
CPSSound::CPSSound() : _Gain(1.f),
|
||||
_GainScheme(NULL),
|
||||
_Pitch(1.f),
|
||||
|
@ -46,7 +46,7 @@ CPSSound::CPSSound() : _Gain(1.f),
|
|||
_SoundName = NLMISC::CStringMapper::emptyId();
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::stopSound()
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_stopSound)
|
||||
|
@ -67,7 +67,7 @@ void CPSSound::stopSound()
|
|||
_SoundStopped = true;
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::reactivateSound()
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_reactivateSound)
|
||||
|
@ -75,7 +75,7 @@ void CPSSound::reactivateSound()
|
|||
_SoundReactivated = true;
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::removeAllSources(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_removeAllSources)
|
||||
|
@ -87,7 +87,7 @@ void CPSSound::removeAllSources(void)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
CPSSound::~CPSSound()
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_CPSSound)
|
||||
|
@ -96,7 +96,7 @@ CPSSound::~CPSSound()
|
|||
delete _PitchScheme;
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
uint32 CPSSound::getType(void) const
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_getType)
|
||||
|
@ -105,7 +105,7 @@ uint32 CPSSound::getType(void) const
|
|||
|
||||
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::step(TPSProcessPass pass)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_step)
|
||||
|
@ -212,7 +212,7 @@ void CPSSound::step(TPSProcessPass pass)
|
|||
while (leftToDo);
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::setGain(float Gain)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_setGain)
|
||||
|
@ -221,7 +221,7 @@ void CPSSound::setGain(float Gain)
|
|||
_Gain = Gain;
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::setGainScheme(CPSAttribMaker<float> *Gain)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_setGainScheme)
|
||||
|
@ -233,7 +233,7 @@ void CPSSound::setGainScheme(CPSAttribMaker<float> *Gain)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::setPitch(float pitch)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_setPitch)
|
||||
|
@ -242,7 +242,7 @@ void CPSSound::setPitch(float pitch)
|
|||
_Pitch = pitch;
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::setPitchScheme(CPSAttribMaker<float> *pitch)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_setPitchScheme)
|
||||
|
@ -254,7 +254,7 @@ void CPSSound::setPitchScheme(CPSAttribMaker<float> *pitch)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_serial)
|
||||
|
@ -366,7 +366,7 @@ void CPSSound::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::newElement(const CPSEmitterInfo &info)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_newElement)
|
||||
|
@ -414,7 +414,7 @@ void CPSSound::newElement(const CPSEmitterInfo &info)
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::deleteElement(uint32 index)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_deleteElement)
|
||||
|
@ -428,7 +428,7 @@ void CPSSound::deleteElement(uint32 index)
|
|||
_Sounds.remove(index);
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::resize(uint32 size)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_resize)
|
||||
|
@ -450,7 +450,7 @@ void CPSSound::resize(uint32 size)
|
|||
_Sounds.resize(size);
|
||||
}
|
||||
|
||||
//***************************************************************************************************
|
||||
// ***************************************************************************************************
|
||||
void CPSSound::setUseOriginalPitchFlag(bool useOriginalPitch)
|
||||
{
|
||||
NL_PS_FUNC(CPSSound_setUseOriginalPitchFlag)
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace NL3D
|
|||
{
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
void registerSerial3d()
|
||||
{
|
||||
static bool bInitialized=false;
|
||||
|
|
|
@ -28,14 +28,14 @@ CTextureBlend::CTextureBlend() : _BlendFactor(0), _SharingEnabled(true)
|
|||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
bool CTextureBlend::supportSharing() const
|
||||
{
|
||||
return _BlendTex[0] && _BlendTex[0]->supportSharing()
|
||||
&& _BlendTex[1] && _BlendTex[1]->supportSharing();
|
||||
}
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
std::string CTextureBlend::getShareName() const
|
||||
{
|
||||
nlassert(supportSharing());
|
||||
|
@ -48,14 +48,14 @@ std::string CTextureBlend::getShareName() const
|
|||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
void CTextureBlend::enableSharing(bool enabled /*= false*/)
|
||||
{
|
||||
_SharingEnabled = enabled;
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
void CTextureBlend::release()
|
||||
{
|
||||
if (_BlendTex[0] && _BlendTex[0]->getReleasable()) _BlendTex[0]->release();
|
||||
|
@ -63,7 +63,7 @@ void CTextureBlend::release()
|
|||
ITexture::release();
|
||||
}
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
bool CTextureBlend::setBlendFactor(uint16 factor)
|
||||
{
|
||||
nlassert(factor <= 256);
|
||||
|
@ -77,7 +77,7 @@ bool CTextureBlend::setBlendFactor(uint16 factor)
|
|||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
void CTextureBlend::setBlendTexture(uint index, ITexture *tex)
|
||||
{
|
||||
nlassert(index < 2);
|
||||
|
@ -89,7 +89,7 @@ void CTextureBlend::setBlendTexture(uint index, ITexture *tex)
|
|||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
void CTextureBlend::doGenerate(bool async)
|
||||
{
|
||||
if (!_BlendTex[0] || !_BlendTex[1])
|
||||
|
@ -107,7 +107,7 @@ void CTextureBlend::doGenerate(bool async)
|
|||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
// ************************************************************************
|
||||
void CTextureBlend::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialVersion(0);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace NL3D {
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
CTextureEmboss::CTextureEmboss() : _Ambient(CRGBA::Black),
|
||||
_Diffuse(CRGBA::White),
|
||||
_DisableSharing(false),
|
||||
|
@ -30,7 +30,7 @@ CTextureEmboss::CTextureEmboss() : _Ambient(CRGBA::Black),
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CTextureEmboss::setHeightMap(ITexture *heightMap)
|
||||
{
|
||||
if (heightMap != _HeightMap)
|
||||
|
@ -40,7 +40,7 @@ void CTextureEmboss::setHeightMap(ITexture *heightMap)
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CTextureEmboss::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialVersion(0);
|
||||
|
@ -63,20 +63,20 @@ void CTextureEmboss::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
f.serial(_DisableSharing);
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
bool CTextureEmboss::supportSharing() const
|
||||
{
|
||||
return !_DisableSharing && _HeightMap && _HeightMap->supportSharing();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
std::string CTextureEmboss::getShareName() const
|
||||
{
|
||||
nlassert(supportSharing());
|
||||
return "Emboss:" + _HeightMap->getShareName();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CTextureEmboss::release()
|
||||
{
|
||||
ITexture::release();
|
||||
|
@ -89,7 +89,7 @@ void CTextureEmboss::release()
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CTextureEmboss::doGenerate(bool /* async */)
|
||||
{
|
||||
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 )
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// ****************************************************************************
|
||||
bool CVisualCollisionEntityUser::snapToGround(CVector &pos)
|
||||
{
|
||||
NL3D_HAUTO_SNAP_VCE;
|
||||
|
|
|
@ -59,7 +59,7 @@ static uint32 inline getFVBVertex(uint section, uint side)
|
|||
const uint NUM_FACES_TO_RENDER = 5;
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
CWaterEnvMap::CWaterEnvMap()
|
||||
{
|
||||
_UpdateTime = 0;
|
||||
|
@ -73,7 +73,7 @@ CWaterEnvMap::CWaterEnvMap()
|
|||
_Alpha = 255;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime, IDriver &driver)
|
||||
{
|
||||
// Allocate cube map
|
||||
|
@ -154,7 +154,7 @@ void CWaterEnvMap::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimatio
|
|||
_Env2DSize = projection2DSize;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::update(TGlobalAnimationTime time, IDriver &driver)
|
||||
{
|
||||
if (_LastRenderTime == time) return;
|
||||
|
@ -206,7 +206,7 @@ void CWaterEnvMap::update(TGlobalAnimationTime time, IDriver &driver)
|
|||
driver.setRenderTarget(NULL);
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::doInit()
|
||||
{
|
||||
if (!_FlattenVBInitialized)
|
||||
|
@ -241,7 +241,7 @@ static CVertexProgram testMeshVP(
|
|||
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::renderTestMesh(IDriver &driver)
|
||||
{
|
||||
doInit();
|
||||
|
@ -269,7 +269,7 @@ void CWaterEnvMap::renderTestMesh(IDriver &driver)
|
|||
driver.activeVertexProgram(NULL);
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::initFlattenVB()
|
||||
{
|
||||
_FlattenVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
||||
|
@ -336,7 +336,7 @@ void CWaterEnvMap::initFlattenVB()
|
|||
}
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::invalidate()
|
||||
{
|
||||
_LastRenderTime = -1;
|
||||
|
@ -352,7 +352,7 @@ void CWaterEnvMap::invalidate()
|
|||
_NumRenderedFaces = 0;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
void CWaterEnvMap::initTestVB()
|
||||
{
|
||||
_TestVB.setPreferredMemory(CVertexBuffer::AGPPreferred, true);
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NL3D
|
|||
// CWaterEnvMapUser //
|
||||
//////////////////////
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
void CWaterEnvMapUser::init(uint cubeMapSize, uint projection2DSize, TGlobalAnimationTime updateTime)
|
||||
{
|
||||
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)
|
||||
{
|
||||
CMatrix mat;
|
||||
|
@ -61,7 +61,7 @@ void CWaterEnvMapRenderHelper::render(TFace face, TGlobalAnimationTime time, UDr
|
|||
// CWaterEnvMapRenderFromUScene //
|
||||
//////////////////////////////////
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
CWaterEnvMapRenderFromUScene::CWaterEnvMapRenderFromUScene()
|
||||
{
|
||||
_Scene = NULL;
|
||||
|
@ -70,7 +70,7 @@ CWaterEnvMapRenderFromUScene::CWaterEnvMapRenderFromUScene()
|
|||
_RenderPart = UScene::RenderAll;
|
||||
}
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
void CWaterEnvMapRenderFromUScene::setScene(UScene *scene, UCamera cam)
|
||||
{
|
||||
_Scene = scene;
|
||||
|
@ -82,7 +82,7 @@ void CWaterEnvMapRenderFromUScene::setScene(UScene *scene, UCamera cam)
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
void CWaterEnvMapRenderFromUScene::doRender(const CMatrix &camMatrix, TGlobalAnimationTime time, UDriver &drv)
|
||||
{
|
||||
if (!_Scene) return;
|
||||
|
@ -108,7 +108,7 @@ void CWaterEnvMapRenderFromUScene::doRender(const CMatrix &camMatrix, TGlobalAni
|
|||
postRender(time, drv);
|
||||
}
|
||||
|
||||
//***********************************************************************************
|
||||
// ***********************************************************************************
|
||||
void CWaterEnvMapUser::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
|
||||
// | |
|
||||
// 3---2
|
||||
|
|
|
@ -208,7 +208,7 @@ static void inline FillWaterVB(uint8 *&vbPointer, float x, float y, float z, flo
|
|||
}
|
||||
*/
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
/*
|
||||
#ifdef NL_OS_WINDOWS
|
||||
__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)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ static void DrawPoly2D(CVertexBuffer &vb, IDriver *drv, const NLMISC::CMatrix &m
|
|||
*/
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
/*
|
||||
void CWaterModel::traverseRender()
|
||||
{
|
||||
|
@ -740,9 +740,9 @@ void CWaterModel::traverseRender()
|
|||
}
|
||||
*/
|
||||
|
||||
//***********************
|
||||
// ***********************
|
||||
// Water MATERIAL SETUP //
|
||||
//***********************
|
||||
// ***********************
|
||||
/*
|
||||
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);
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CWaterModel::unlink()
|
||||
{
|
||||
if (!_Prev)
|
||||
|
@ -1186,7 +1186,7 @@ void CWaterModel::unlink()
|
|||
_Prev = NULL;
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CWaterModel::link()
|
||||
{
|
||||
nlassert(_Next == NULL);
|
||||
|
@ -1204,7 +1204,7 @@ void CWaterModel::link()
|
|||
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
uint CWaterModel::getNumWantedVertices()
|
||||
{
|
||||
H_AUTO( NL3D_Water_Render );
|
||||
|
@ -1359,7 +1359,7 @@ uint CWaterModel::getNumWantedVertices()
|
|||
return totalNumVertices;
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
uint CWaterModel::fillVB(void *datas, uint startTri, IDriver &drv)
|
||||
{
|
||||
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)
|
||||
{
|
||||
_StartTri = (uint32) startTri;
|
||||
|
@ -1531,7 +1531,7 @@ void computeWaterVertexHard(float px, float py, CVector &pos, const CVector &cam
|
|||
pos.z = 0.f;
|
||||
}
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
||||
{
|
||||
_StartTri = (uint32) startTri;
|
||||
|
@ -1609,7 +1609,7 @@ uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
|||
|
||||
|
||||
|
||||
//***************************************************************************************************************
|
||||
// ***************************************************************************************************************
|
||||
void CWaterModel::traverseRender()
|
||||
{
|
||||
H_AUTO( NL3D_Water_Render );
|
||||
|
@ -1677,7 +1677,7 @@ void CWaterModel::traverseRender()
|
|||
|
||||
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
bool CWaterModel::clip()
|
||||
{
|
||||
H_AUTO( NL3D_Water_Render );
|
||||
|
@ -1707,7 +1707,7 @@ struct CSimpleVertexInfo
|
|||
};
|
||||
*/
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
/*
|
||||
void CWaterModel::doSimpleRender(IDriver *drv)
|
||||
{
|
||||
|
@ -1915,7 +1915,7 @@ void CWaterModel::doSimpleRender(IDriver *drv)
|
|||
}
|
||||
*/
|
||||
|
||||
//***********************************************************************************************************
|
||||
// ***********************************************************************************************************
|
||||
void CWaterModel::updateDiffuseMapMatrix(bool force /* = false*/)
|
||||
{
|
||||
if (compareMatrixDate(_MatrixUpdateDate) ||force)
|
||||
|
|
|
@ -6,6 +6,8 @@ SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H})
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelgeorges SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-georges.pc.in nel-georges.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-georges.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelgeorges STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
12
code/nel/src/georges/nel-georges.pc.in
Normal file
12
code/nel/src/georges/nel-georges.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: nel-georges
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc
|
||||
Cflags: -I${includedir}
|
|
@ -2,6 +2,8 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelligo SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-ligo.pc.in nel-ligo.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-ligo.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelligo STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
12
code/nel/src/ligo/nel-ligo.pc.in
Normal file
12
code/nel/src/ligo/nel-ligo.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: nel-ligo
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc
|
||||
Cflags: -I${includedir}
|
|
@ -2,6 +2,8 @@ FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelmisc SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-misc.pc.in nel-misc.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-misc.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelmisc STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
namespace NLMISC
|
||||
{
|
||||
|
||||
//*********************************************************************************************************
|
||||
// *********************************************************************************************************
|
||||
CContiguousBlockAllocator::CContiguousBlockAllocator()
|
||||
{
|
||||
_BlockStart = NULL;
|
||||
|
@ -33,13 +33,13 @@ CContiguousBlockAllocator::CContiguousBlockAllocator()
|
|||
#endif
|
||||
}
|
||||
|
||||
//*********************************************************************************************************
|
||||
// *********************************************************************************************************
|
||||
CContiguousBlockAllocator::~CContiguousBlockAllocator()
|
||||
{
|
||||
init(0);
|
||||
}
|
||||
|
||||
//*********************************************************************************************************
|
||||
// *********************************************************************************************************
|
||||
void CContiguousBlockAllocator::init(uint numBytes /*=0*/)
|
||||
{
|
||||
if (_BlockStart) _DefaultAlloc.deallocate(_BlockStart, _BlockEnd - _BlockStart);
|
||||
|
@ -60,7 +60,7 @@ void CContiguousBlockAllocator::init(uint numBytes /*=0*/)
|
|||
#endif
|
||||
}
|
||||
|
||||
//*********************************************************************************************************
|
||||
// *********************************************************************************************************
|
||||
void *CContiguousBlockAllocator::alloc(uint numBytes)
|
||||
{
|
||||
if (numBytes == 0) return NULL;
|
||||
|
@ -84,7 +84,7 @@ void *CContiguousBlockAllocator::alloc(uint numBytes)
|
|||
return _DefaultAlloc.allocate(numBytes);
|
||||
}
|
||||
|
||||
//*********************************************************************************************************
|
||||
// *********************************************************************************************************
|
||||
void CContiguousBlockAllocator::free(void *block, uint numBytes)
|
||||
{
|
||||
if (!block) return;
|
||||
|
|
|
@ -230,7 +230,7 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess
|
|||
printf ("%s", str.c_str());
|
||||
|
||||
if (!args.CallstackAndLog.empty())
|
||||
printf (args.CallstackAndLog.c_str());
|
||||
printf ("%s", args.CallstackAndLog.c_str());
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
|
|
@ -31,12 +31,12 @@ static LRESULT CALLBACK nlDefaultWinProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
|||
}
|
||||
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
CDummyWindow::CDummyWindow() : _HWnd(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
bool CDummyWindow::init(HINSTANCE hInstance, WNDPROC winProc)
|
||||
{
|
||||
release();
|
||||
|
@ -72,7 +72,7 @@ bool CDummyWindow::init(HINSTANCE hInstance, WNDPROC winProc)
|
|||
return false;
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
void CDummyWindow::release()
|
||||
{
|
||||
if (_HWnd)
|
||||
|
@ -82,7 +82,7 @@ void CDummyWindow::release()
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// ***************************************************************
|
||||
CDummyWindow::~CDummyWindow()
|
||||
{
|
||||
release();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace NLMISC
|
||||
{
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CFixedSizeAllocator::CFixedSizeAllocator(uint numBytesPerBlock, uint numBlockPerChunk)
|
||||
{
|
||||
_FreeSpace = NULL;
|
||||
|
@ -32,7 +32,7 @@ CFixedSizeAllocator::CFixedSizeAllocator(uint numBytesPerBlock, uint numBlockPer
|
|||
_NumAlloc = 0;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CFixedSizeAllocator::~CFixedSizeAllocator()
|
||||
{
|
||||
if (_NumAlloc != 0)
|
||||
|
@ -50,7 +50,7 @@ CFixedSizeAllocator::~CFixedSizeAllocator()
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void *CFixedSizeAllocator::alloc()
|
||||
{
|
||||
if (!_FreeSpace)
|
||||
|
@ -62,7 +62,7 @@ void *CFixedSizeAllocator::alloc()
|
|||
return _FreeSpace->unlink();
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CFixedSizeAllocator::free(void *block)
|
||||
{
|
||||
if (!block) return;
|
||||
|
@ -76,20 +76,20 @@ void CFixedSizeAllocator::free(void *block)
|
|||
node->link();
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
uint CFixedSizeAllocator::CChunk::getBlockSizeWithOverhead() const
|
||||
{
|
||||
return std::max((uint)(sizeof(CNode) - offsetof(CNode, Next)),(uint)(Allocator->getNumBytesPerBlock())) + offsetof(CNode, Next);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CFixedSizeAllocator::CChunk::CChunk()
|
||||
{
|
||||
NumFreeObjs = 0;
|
||||
Allocator = NULL;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CFixedSizeAllocator::CChunk::~CChunk()
|
||||
{
|
||||
nlassert(Allocator != NULL);
|
||||
|
@ -103,7 +103,7 @@ CFixedSizeAllocator::CChunk::~CChunk()
|
|||
delete Mem;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CFixedSizeAllocator::CChunk::init(CFixedSizeAllocator *alloc)
|
||||
{
|
||||
nlassert(!Allocator);
|
||||
|
@ -134,7 +134,7 @@ void CFixedSizeAllocator::CChunk::init(CFixedSizeAllocator *alloc)
|
|||
++(alloc->_NumChunks);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CFixedSizeAllocator::CNode &CFixedSizeAllocator::CChunk::getNode(uint index)
|
||||
{
|
||||
nlassert(Allocator != NULL);
|
||||
|
@ -142,7 +142,7 @@ CFixedSizeAllocator::CNode &CFixedSizeAllocator::CChunk::getNode(uint index)
|
|||
return *(CNode *) ((uint8 *) Mem + index * getBlockSizeWithOverhead());
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CFixedSizeAllocator::CChunk::add()
|
||||
{
|
||||
nlassert(Allocator);
|
||||
|
@ -158,7 +158,7 @@ void CFixedSizeAllocator::CChunk::add()
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CFixedSizeAllocator::CChunk::grab()
|
||||
{
|
||||
// a node of this chunk has been given back
|
||||
|
@ -166,7 +166,7 @@ void CFixedSizeAllocator::CChunk::grab()
|
|||
-- NumFreeObjs;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void *CFixedSizeAllocator::CNode::unlink()
|
||||
{
|
||||
nlassert(Prev != NULL);
|
||||
|
@ -177,7 +177,7 @@ void *CFixedSizeAllocator::CNode::unlink()
|
|||
return (void *) &Next;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CFixedSizeAllocator::CNode::link()
|
||||
{
|
||||
// destroy the obj to get back uninitialized memory
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
namespace NLMISC
|
||||
{
|
||||
|
||||
//********************************************************************************************************************************
|
||||
// ********************************************************************************************************************************
|
||||
void CGridTraversal::startTraverse(const NLMISC::CVector2f &start, sint &nextX, sint &nextY)
|
||||
{
|
||||
nextX = (sint) floorf(start.x);
|
||||
nextY = (sint) floorf(start.y);
|
||||
}
|
||||
|
||||
//********************************************************************************************************************************
|
||||
// ********************************************************************************************************************************
|
||||
bool CGridTraversal::traverse(const NLMISC::CVector2f &start, const NLMISC::CVector2f &dir, sint &x, sint &y)
|
||||
{
|
||||
if (dir.x > 0.f)
|
||||
|
|
|
@ -33,13 +33,13 @@ namespace NLMISC
|
|||
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
|
||||
////////////////////////////////////////
|
||||
// CInterWindowMsgQueue::CProtagonist //
|
||||
////////////////////////////////////////
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
CInterWindowMsgQueue::CProtagonist::CProtagonist() : _Id(0),
|
||||
_Wnd(0),
|
||||
_SharedMemMutex(0),
|
||||
|
@ -48,13 +48,13 @@ namespace NLMISC
|
|||
}
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
CInterWindowMsgQueue::CProtagonist::~CProtagonist()
|
||||
{
|
||||
release();
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CProtagonist::release()
|
||||
{
|
||||
CloseHandle(_SharedMemMutex);
|
||||
|
@ -69,7 +69,7 @@ namespace NLMISC
|
|||
// unhook window
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CProtagonist::acquireSMMutex()
|
||||
{
|
||||
nlassert(_SharedMemMutex);
|
||||
|
@ -77,14 +77,14 @@ namespace NLMISC
|
|||
nlassert(result != WAIT_FAILED);
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CProtagonist::releaseSMMutex()
|
||||
{
|
||||
nlassert(_SharedMemMutex);
|
||||
ReleaseMutex(_SharedMemMutex);
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::CProtagonist::init(uint32 id)
|
||||
{
|
||||
nlassert(id != 0);
|
||||
|
@ -98,7 +98,7 @@ namespace NLMISC
|
|||
return true;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CProtagonist::setWnd(HWND wnd)
|
||||
{
|
||||
nlassert(wnd != 0);
|
||||
|
@ -114,7 +114,7 @@ namespace NLMISC
|
|||
_Wnd = wnd;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
HWND CInterWindowMsgQueue::CProtagonist::getWnd()
|
||||
{
|
||||
if (!_SharedMemMutex)
|
||||
|
@ -145,20 +145,20 @@ namespace NLMISC
|
|||
}
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
|
||||
/////////////////////////////////////
|
||||
// CInterWindowMsgQueue::CSendTask //
|
||||
/////////////////////////////////////
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
CInterWindowMsgQueue::CSendTask::CSendTask(CInterWindowMsgQueue *parent) : _StopAsked(false)
|
||||
{
|
||||
nlassert(parent);
|
||||
_Parent = parent;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CSendTask::run()
|
||||
{
|
||||
while(!_StopAsked)
|
||||
|
@ -209,39 +209,39 @@ namespace NLMISC
|
|||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::CSendTask::stop()
|
||||
{
|
||||
_StopAsked = true;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
|
||||
//////////////////////////
|
||||
// CInterWindowMsgQueue //
|
||||
//////////////////////////
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
CInterWindowMsgQueue::CInterWindowMsgQueue() : _SendTask(NULL),
|
||||
_SendThread(NULL),
|
||||
_OutMessageQueue("CInterWindowMsgQueue::_OutMessageQueue")
|
||||
{
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::init(HWND ownerWindow, uint32 localId, uint32 foreignId)
|
||||
{
|
||||
return initInternal(NULL, ownerWindow, localId, foreignId);
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::init(HINSTANCE hInstance, uint32 localId, uint32 foreignId)
|
||||
{
|
||||
return initInternal(hInstance, NULL, localId, foreignId);
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::initInternal(HINSTANCE hInstance, HWND ownerWindow, uint32 localId, uint32 foreignId)
|
||||
{
|
||||
if (!ownerWindow)
|
||||
|
@ -307,7 +307,7 @@ namespace NLMISC
|
|||
return true;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::release()
|
||||
{
|
||||
if (_LocalWindow.getWnd() != 0)
|
||||
|
@ -458,13 +458,13 @@ namespace NLMISC
|
|||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
CInterWindowMsgQueue::~CInterWindowMsgQueue()
|
||||
{
|
||||
release();
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::clearOutQueue()
|
||||
{
|
||||
CSynchronized<TMsgList>::CAccessor outMessageQueue(&_OutMessageQueue);
|
||||
|
@ -474,7 +474,7 @@ namespace NLMISC
|
|||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
void CInterWindowMsgQueue::sendMessage(CMemStream &msg)
|
||||
{
|
||||
if (!msg.isReading())
|
||||
|
@ -491,7 +491,7 @@ namespace NLMISC
|
|||
}
|
||||
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::pumpMessage(CMemStream &dest)
|
||||
{
|
||||
if (_InMessageQueue.empty()) return false;
|
||||
|
@ -509,20 +509,20 @@ namespace NLMISC
|
|||
return true;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
bool CInterWindowMsgQueue::connected() const
|
||||
{
|
||||
return const_cast<CProtagonist &>(_ForeignWindow).getWnd() != NULL;
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
uint CInterWindowMsgQueue::getSendQueueSize() const
|
||||
{
|
||||
CSynchronized<TMsgList>::CAccessor outMessageQueue(&const_cast<CSynchronized<TMsgList> &>(_OutMessageQueue));
|
||||
return (uint)outMessageQueue.value().size();
|
||||
}
|
||||
|
||||
//**************************************************************************************************
|
||||
// **************************************************************************************************
|
||||
uint CInterWindowMsgQueue::getReceiveQueueSize() const
|
||||
{
|
||||
return (uint)_InMessageQueue.size();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
namespace NLMISC
|
||||
{
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
/// build some hermite spline value, with the given points and tangents
|
||||
static inline void BuildHermiteVector(const NLMISC::CVector2f &P0,
|
||||
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);
|
||||
}
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
CMouseSmoother::CMouseSmoother(double samplingPeriod /*=0.2f*/)
|
||||
{
|
||||
nlassert(samplingPeriod > 0);
|
||||
|
@ -50,7 +50,7 @@ CMouseSmoother::CMouseSmoother(double samplingPeriod /*=0.2f*/)
|
|||
}
|
||||
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
void CMouseSmoother::setSamplingPeriod(double period)
|
||||
{
|
||||
if (period == _SamplingPeriod) return;
|
||||
|
@ -60,7 +60,7 @@ void CMouseSmoother::setSamplingPeriod(double period)
|
|||
}
|
||||
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
NLMISC::CVector2f CMouseSmoother::samplePos(const CVector2f &wantedPos, double date)
|
||||
{
|
||||
if (!_Init)
|
||||
|
@ -124,7 +124,7 @@ NLMISC::CVector2f CMouseSmoother::samplePos(const CVector2f &wantedPos, double d
|
|||
return result;
|
||||
}
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
void CMouseSmoother::reset()
|
||||
{
|
||||
_Init = false;
|
||||
|
|
|
@ -4,8 +4,8 @@ libdir=@libdir@
|
|||
includedir=@includedir@
|
||||
|
||||
Name: nel-misc
|
||||
Version: @VERSION@
|
||||
Description: NeL @VERSION@
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc -lpthread -lrt -ldl
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NLMISC
|
|||
CObjectArenaAllocator *CObjectArenaAllocator::_DefaultAllocator = NULL;
|
||||
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CObjectArenaAllocator::CObjectArenaAllocator(uint maxAllocSize, uint granularity /* = 4*/)
|
||||
{
|
||||
nlassert(granularity > 0);
|
||||
|
@ -40,7 +40,7 @@ CObjectArenaAllocator::CObjectArenaAllocator(uint maxAllocSize, uint granularity
|
|||
#endif
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CObjectArenaAllocator::~CObjectArenaAllocator()
|
||||
{
|
||||
for(uint k = 0; k < _ObjectSizeToAllocator.size(); ++k)
|
||||
|
@ -49,7 +49,7 @@ CObjectArenaAllocator::~CObjectArenaAllocator()
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void *CObjectArenaAllocator::alloc(uint size)
|
||||
{
|
||||
#ifdef NL_DEBUG
|
||||
|
@ -90,7 +90,7 @@ void *CObjectArenaAllocator::alloc(uint size)
|
|||
return (void *) ((uint8 *) block + sizeof(uint));
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CObjectArenaAllocator::free(void *block)
|
||||
{
|
||||
if (!block) return;
|
||||
|
@ -127,7 +127,7 @@ void CObjectArenaAllocator::free(void *block)
|
|||
#endif
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
uint CObjectArenaAllocator::getNumAllocatedBlocks() const
|
||||
{
|
||||
uint numObjs = 0;
|
||||
|
@ -138,7 +138,7 @@ uint CObjectArenaAllocator::getNumAllocatedBlocks() const
|
|||
return numObjs;
|
||||
}
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
CObjectArenaAllocator &CObjectArenaAllocator::getDefaultAllocator()
|
||||
{
|
||||
if (!_DefaultAllocator)
|
||||
|
@ -151,7 +151,7 @@ CObjectArenaAllocator &CObjectArenaAllocator::getDefaultAllocator()
|
|||
|
||||
#ifdef NL_DEBUG
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// *****************************************************************************************************************
|
||||
void CObjectArenaAllocator::dumpUnreleasedBlocks()
|
||||
{
|
||||
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)
|
||||
{
|
||||
_WantBreakOnAlloc = enabled;
|
||||
|
|
|
@ -52,6 +52,13 @@ void CWinEventEmitter::submitEvents(CEventServer & server, bool allWindows)
|
|||
_InternalServer.pump (allWindows);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
emulateMouseRawMode()
|
||||
\*------------------------------------------------------------------*/
|
||||
void CWinEventEmitter::emulateMouseRawMode(bool enable)
|
||||
{
|
||||
nlerror("no raw mode emulation on windows, the CDIMouse has a real raw mode");
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
processMessage()
|
||||
|
|
|
@ -301,7 +301,7 @@ bool CWinProcess::setCPUMask(uint64 mask)
|
|||
return SetProcessAffinityMask((HANDLE)_ProcessHandle, processAffinityMask)!=0;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
/**
|
||||
* Simple wrapper around the PSAPI library
|
||||
* \author Nicolas Vizerie
|
||||
|
@ -327,7 +327,7 @@ private:
|
|||
bool _LoadFailed;
|
||||
};
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
CPSAPILib::CPSAPILib()
|
||||
{
|
||||
_LoadFailed = false;
|
||||
|
@ -337,7 +337,7 @@ CPSAPILib::CPSAPILib()
|
|||
EnumProcessModules = NULL;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
CPSAPILib::~CPSAPILib()
|
||||
{
|
||||
if (_PSAPILibHandle)
|
||||
|
@ -346,7 +346,7 @@ CPSAPILib::~CPSAPILib()
|
|||
}
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
bool CPSAPILib::init()
|
||||
{
|
||||
//
|
||||
|
@ -381,7 +381,7 @@ static CPSAPILib PSAPILib;
|
|||
|
||||
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
bool CWinProcess::enumProcessesId(std::vector<uint32> &processesId)
|
||||
{
|
||||
if (!PSAPILib.init()) return false;
|
||||
|
@ -407,7 +407,7 @@ bool CWinProcess::enumProcessesId(std::vector<uint32> &processesId)
|
|||
return true;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
bool CWinProcess::enumProcessModules(uint32 processId, std::vector<std::string> &moduleNames)
|
||||
{
|
||||
if (!PSAPILib.init()) return false;
|
||||
|
@ -445,7 +445,7 @@ bool CWinProcess::enumProcessModules(uint32 processId, std::vector<std::string>
|
|||
return true;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
uint32 CWinProcess::getProcessIdFromModuleFilename(const std::string &moduleFileName)
|
||||
{
|
||||
std::vector<uint32> processesId;
|
||||
|
@ -467,7 +467,7 @@ uint32 CWinProcess::getProcessIdFromModuleFilename(const std::string &moduleFile
|
|||
return 0;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
bool CWinProcess::terminateProcess(uint32 processId, uint exitCode)
|
||||
{
|
||||
if (!processId) return false;
|
||||
|
@ -478,7 +478,7 @@ bool CWinProcess::terminateProcess(uint32 processId, uint exitCode)
|
|||
return ok != FALSE;
|
||||
}
|
||||
|
||||
//****************************************************************************************************************
|
||||
// ****************************************************************************************************************
|
||||
bool CWinProcess::terminateProcessFromModuleName(const std::string &moduleName, uint exitCode)
|
||||
{
|
||||
return terminateProcess(getProcessIdFromModuleFilename(moduleName), exitCode);
|
||||
|
|
|
@ -9,6 +9,8 @@ SET(NLNET_LIB ${LIBNAME})
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelnet SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-net.pc.in nel-net.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-net.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelnet STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
12
code/nel/src/net/nel-net.pc.in
Normal file
12
code/nel/src/net/nel-net.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: nel-net
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc -lpthread -lrt -ldl
|
||||
Cflags: -I${includedir} -lc -lpthread -lrt -ldl
|
|
@ -2,6 +2,8 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelpacs SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-pacs.pc.in nel-pacs.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-pacs.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelpacs STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
12
code/nel/src/pacs/nel-pacs.pc.in
Normal file
12
code/nel/src/pacs/nel-pacs.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: nel-pacs
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc -lpthread -lrt -ldl
|
||||
Cflags: -I${includedir} -lc -lpthread -lrt -ldl
|
|
@ -8,6 +8,8 @@ ENDIF(APPLE)
|
|||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelsound SHARED ${SRC})
|
||||
CONFIGURE_FILE(nel-sound.pc.in nel-sound.pc)
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-sound.pc" DESTINATION lib/pkgconfig)
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(nelsound STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
|
|
@ -8,6 +8,11 @@ SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES VERSION ${NL_VERSION})
|
|||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WIN32)
|
||||
# Find and include EFX-Util on Windows.
|
||||
FIND_PACKAGE(EFXUtil)
|
||||
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_openal ${EFXUTIL_LIBRARY})
|
||||
|
||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES COMPILE_FLAGS "/Yustdopenal.h")
|
||||
SET_SOURCE_FILES_PROPERTIES(stdopenal.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopenal.h")
|
||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES
|
||||
|
|
12
code/nel/src/sound/nel-sound.pc.in
Normal file
12
code/nel/src/sound/nel-sound.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: nel-sound
|
||||
Version: @NL_VERSION@
|
||||
Description: NeL @NL_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc -lpthread -lrt -ldl
|
||||
Cflags: -I${includedir} -lc -lpthread -lrt -ldl
|
|
@ -2,8 +2,10 @@ FILE(GLOB SRC *.cpp *.h ../s3tc_compressor_lib/*.h ../s3tc_compressor_lib/*.cpp)
|
|||
|
||||
ADD_EXECUTABLE(panoply_maker ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${S3TC_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(panoply_maker ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${S3TC_LIBRARY} nelmisc nel3d)
|
||||
FIND_PACKAGE(Squish REQUIRED)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${SQUISH_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(panoply_maker ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(panoply_maker PROPERTIES
|
||||
LINK_FLAGS "/NODEFAULTLIB:libcmt /NODEFAULTLIB:libc"
|
||||
|
|
|
@ -38,7 +38,9 @@ FIND_PATH(LIBWWW_ADDITIONAL_INCLUDE_DIR
|
|||
)
|
||||
|
||||
# combine both include directories into one variable
|
||||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${LIBWWW_ADDITIONAL_INCLUDE_DIR})
|
||||
IF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
|
||||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${LIBWWW_ADDITIONAL_INCLUDE_DIR})
|
||||
ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
|
||||
|
||||
# helper to find all the libwww sub libraries
|
||||
MACRO(FIND_WWW_LIBRARY MYLIBRARY)
|
||||
|
@ -74,7 +76,6 @@ FIND_WWW_LIBRARY(LIBWWWINIT_LIBRARY wwwinit)
|
|||
FIND_WWW_LIBRARY(LIBWWWMIME_LIBRARY wwwmime)
|
||||
FIND_WWW_LIBRARY(LIBWWWMUX_LIBRARY wwwmux)
|
||||
FIND_WWW_LIBRARY(LIBWWWNEWS_LIBRARY wwwnews)
|
||||
FIND_WWW_LIBRARY(LIBWWWSSL_LIBRARY wwwssl)
|
||||
FIND_WWW_LIBRARY(LIBWWWSTREAM_LIBRARY wwwstream)
|
||||
FIND_WWW_LIBRARY(LIBWWWTELNET_LIBRARY wwwtelnet)
|
||||
FIND_WWW_LIBRARY(LIBWWWTRANS_LIBRARY wwwtrans)
|
||||
|
@ -88,7 +89,7 @@ SET(LIBWWW_LIBRARY
|
|||
${LIBWWWCORE_LIBRARY} ${LIBWWWDIR_LIBRARY} ${LIBWWWFILE_LIBRARY}
|
||||
${LIBWWWFTP_LIBRARY} ${LIBWWWGOPHER_LIBRARY} ${LIBWWWHTML_LIBRARY}
|
||||
${LIBWWWHTTP_LIBRARY} ${LIBWWWINIT_LIBRARY} ${LIBWWWMIME_LIBRARY}
|
||||
${LIBWWWMUX_LIBRARY} ${LIBWWWNEWS_LIBRARY} ${LIBWWWSSL_LIBRARY}
|
||||
${LIBWWWMUX_LIBRARY} ${LIBWWWNEWS_LIBRARY}
|
||||
${LIBWWWSTREAM_LIBRARY} ${LIBWWWTELNET_LIBRARY}
|
||||
${LIBWWWTRANS_LIBRARY} ${LIBWWWUTILS_LIBRARY} ${LIBWWWXML_LIBRARY}
|
||||
${LIBWWWZIP_LIBRARY}
|
||||
|
|
|
@ -44,22 +44,22 @@ if(APPLE)
|
|||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
|
||||
SET(MACOSX_BUNDLE_COPYRIGHT "Winchgate and The Ryzom Core Community")
|
||||
|
||||
ADD_EXECUTABLE(client MACOSX_BUNDLE ${SRC})
|
||||
ADD_EXECUTABLE(ryzom_client MACOSX_BUNDLE ${SRC})
|
||||
|
||||
# TODO: in release mode, cmake could copy all the dylibs into the .app
|
||||
# bundle for redistribution... should some part of cpack handle that?
|
||||
# ADD_CUSTOM_COMMAND(TARGET client POST_BUILD
|
||||
# ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD
|
||||
# # make frameworks directory in app bundle
|
||||
# COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/client.app/Contents/Frameworks
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.app/Contents/Frameworks
|
||||
# # copy framework into app bundle
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${SOME_LIBRARY}
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/client.app/Contents/Frameworks
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/ryzom_client.app/Contents/Frameworks
|
||||
# # ...
|
||||
# # install_name_tool the lib pathes
|
||||
|
||||
ELSE(APPLE)
|
||||
ADD_EXECUTABLE(client ${SRC})
|
||||
ADD_EXECUTABLE(ryzom_client ${SRC})
|
||||
ENDIF(APPLE)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
|
@ -70,10 +70,10 @@ INCLUDE_DIRECTORIES(
|
|||
${CURL_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(client ${PLATFORM_LINKFLAGS}
|
||||
TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${NELMISC_LIBRARY}
|
||||
game_share
|
||||
ryzom_gameshare
|
||||
${NELNET_LIBRARY}
|
||||
${NELLIGO_LIBRARY}
|
||||
${NELGEORGES_LIBRARY}
|
||||
|
@ -82,18 +82,17 @@ TARGET_LINK_LIBRARIES(client ${PLATFORM_LINKFLAGS}
|
|||
${CURL_LIBRARIES}
|
||||
${NELSOUND_LIBRARY}
|
||||
${NELSNDDRV_LIBRARY}
|
||||
client_sheets
|
||||
ryzom_clientsheets
|
||||
${NELPACS_LIBRARY}
|
||||
${LIBWWW_LIBRARY}
|
||||
${Boost_LIBRARIES}
|
||||
seven_zip
|
||||
ryzom_sevenzip
|
||||
luabind # TODO: find luabind and expat cleanly using a find script
|
||||
expat)
|
||||
|
||||
IF(NOT WITH_COCOA)
|
||||
TARGET_LINK_LIBRARIES(client ${X11_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES})
|
||||
ENDIF(NOT WITH_COCOA)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS client RUNTIME DESTINATION bin COMPONENT client BUNDLE DESTINATION /Applications)
|
||||
INSTALL(TARGETS ryzom_client RUNTIME DESTINATION bin COMPONENT client BUNDLE DESTINATION /Applications)
|
||||
|
|
|
@ -124,9 +124,9 @@ NL3D::UParticleSystemInstance CAnimationFX::createMatchingInstance(const float *
|
|||
return fx;
|
||||
}// createMatchingInstance //
|
||||
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
// CAnimationFXSet
|
||||
//*******************************************************************************
|
||||
// *******************************************************************************
|
||||
|
||||
//-----------------------------------------------
|
||||
// init
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
extern NL3D::UScene *Scene;
|
||||
|
||||
//*********************************************************************
|
||||
// *********************************************************************
|
||||
CAnimationFXIDArray::CAnimationFXIDArray()
|
||||
{
|
||||
_AnimSet = NULL;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
// *********************************************************************
|
||||
void CAnimationFXIDArray::release()
|
||||
{
|
||||
_IDToFXArray.clear();
|
||||
|
@ -42,7 +42,7 @@ void CAnimationFXIDArray::release()
|
|||
_AnimSet = NULL;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
// *********************************************************************
|
||||
void CAnimationFXIDArray::init(const CIDToStringArraySheet &sheet, NL3D::UAnimationSet *animSet, bool mustDeleteAnimSet /* = false*/)
|
||||
{
|
||||
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*/)
|
||||
{
|
||||
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
|
||||
{
|
||||
// after init, element are sorted by ids
|
||||
|
|
|
@ -35,19 +35,19 @@ using namespace NL3D;
|
|||
|
||||
extern CUserEntity *UserEntity;
|
||||
|
||||
//*************************************************************************************
|
||||
// *************************************************************************************
|
||||
CAttachedFX::CAttachedFX()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
//*************************************************************************************
|
||||
// *************************************************************************************
|
||||
CAttachedFX::~CAttachedFX()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CAttachedFX::clear()
|
||||
{
|
||||
if (!FX.empty())
|
||||
|
@ -70,7 +70,7 @@ void CAttachedFX::clear()
|
|||
TargeterUserBoneID = 0xff;
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CAttachedFX::create(CCharacterCL &parent,
|
||||
const CBuildInfo &buildInfo,
|
||||
const CTargeterInfo &targeterInfo
|
||||
|
@ -84,7 +84,7 @@ void CAttachedFX::create(CCharacterCL &parent,
|
|||
create(parent, instance, buildInfo, targeterInfo);
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CAttachedFX::create(CCharacterCL &parent,
|
||||
NL3D::UParticleSystemInstance instance,
|
||||
const CBuildInfo &buildInfo,
|
||||
|
@ -216,7 +216,7 @@ void CAttachedFX::create(CCharacterCL &parent,
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CAttachedFX::evalTargeterStickPos(NLMISC::CVector &dest) const
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (AniFX && !FX.empty())
|
||||
|
|
|
@ -66,13 +66,13 @@ static void buildAttackPart(const std::string &sheetName, CAnimationFXSet &fxSet
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
CAttack::CAttack()
|
||||
{
|
||||
Sheet = NULL;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
void CAttack::init(const CAttackSheet *sheet, NL3D::UAnimationSet *as)
|
||||
{
|
||||
nlassert(!Sheet); // init already done
|
||||
|
@ -88,7 +88,7 @@ void CAttack::init(const CAttackSheet *sheet, NL3D::UAnimationSet *as)
|
|||
buildAttackPart(Sheet->ImpactFX, ImpactFX, as);
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
void CAttackList::init(const CAttackListSheet *attackList, NL3D::UAnimationSet *as)
|
||||
{
|
||||
nlassert(_Attacks.empty());
|
||||
|
@ -125,7 +125,7 @@ struct CAttackEntryComp2
|
|||
}
|
||||
};
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
const CAttack *CAttackList::getAttackFromID(const CAttackIDSheet &id) const
|
||||
{
|
||||
H_AUTO_USE(RZ_AttackList);
|
||||
|
@ -139,7 +139,7 @@ const CAttack *CAttackList::getAttackFromID(const CAttackIDSheet &id) const
|
|||
return &(it->Attack);
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
CAttackListManager &CAttackListManager::getInstance()
|
||||
{
|
||||
H_AUTO_USE(RZ_AttackList)
|
||||
|
@ -148,7 +148,7 @@ CAttackListManager &CAttackListManager::getInstance()
|
|||
return *_Instance;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
void CAttackListManager::releaseInstance()
|
||||
{
|
||||
if( _Instance )
|
||||
|
@ -156,7 +156,7 @@ void CAttackListManager::releaseInstance()
|
|||
_Instance = NULL;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
void CAttackListManager::init()
|
||||
{
|
||||
if (_AnimationSet) return; // init already done
|
||||
|
@ -185,7 +185,7 @@ void CAttackListManager::init()
|
|||
buildLinkFXs();
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
void CAttackListManager::release()
|
||||
{
|
||||
if (!_AnimationSet) return;
|
||||
|
@ -197,7 +197,7 @@ void CAttackListManager::release()
|
|||
_Instance = NULL;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
const CAttackList *CAttackListManager::getAttackList(const std::string &name) const
|
||||
{
|
||||
H_AUTO_USE(RZ_AttackList)
|
||||
|
@ -206,19 +206,19 @@ const CAttackList *CAttackListManager::getAttackList(const std::string &name) co
|
|||
return NULL;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// ***********************************************************************************************
|
||||
CAttackListManager::CAttackListManager()
|
||||
{
|
||||
_AnimationSet = NULL;
|
||||
}
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
void CAttackListManager::buildAurasFXs()
|
||||
{
|
||||
_Auras.init("auras.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
||||
}
|
||||
|
||||
//*******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
void CAttackListManager::buildLinkFXs()
|
||||
{
|
||||
_Links.init("links.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
|
||||
|
|
|
@ -2291,6 +2291,8 @@ void CCharacterCL::endAnimTransition()
|
|||
dir(front());
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Change the current mode.
|
||||
if ( _ModeWanted != MBEHAV::UNKNOWN_MODE )
|
||||
|
@ -2658,6 +2660,8 @@ KeyChosen:
|
|||
else
|
||||
nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnMoveRight '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnMoveRight).c_str());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// On Rotation/About Face
|
||||
|
@ -2684,6 +2688,8 @@ KeyChosen:
|
|||
else
|
||||
nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnRightRotation '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnRightRotation).c_str());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Max Loop
|
||||
|
@ -2729,6 +2735,8 @@ KeyChosen:
|
|||
else
|
||||
nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnBigBendRight '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnBigBendRight).c_str());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// If the animation change according to a high speed and speed high enough or oo.
|
||||
|
@ -3084,6 +3092,7 @@ KeyChosen:
|
|||
case MAGICFX::CastLoop: afs = &_CurrentAttack->AttackLoopFX; break;
|
||||
case MAGICFX::CastEnd: afs = &_CurrentAttack->AttackEndFX; break;
|
||||
case MAGICFX::CastFail: afs = &_CurrentAttack->AttackFailFX; break;
|
||||
default: break;
|
||||
}
|
||||
playCastFX(afs, _CurrentAttackInfo.Intensity);
|
||||
}
|
||||
|
@ -3444,6 +3453,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
|
|||
case OnMoveRight:
|
||||
setAnim(_CurrentState->OnMoveRight);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// ON ROTATION
|
||||
|
@ -3458,6 +3469,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
|
|||
case OnRotRight:
|
||||
setAnim(CAnimationStateSheet::Idle);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// ON BAD HEADING
|
||||
|
@ -3475,6 +3488,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
|
|||
case OnBendRight:
|
||||
setAnim(_CurrentState->MoveState);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// \todo GUIGUI : changer de place cette partie je pense.
|
||||
|
@ -3640,6 +3655,8 @@ void CCharacterCL::beginCast(const MBEHAV::CBehaviour &behaviour)
|
|||
case MBEHAV::CAST_STUN:
|
||||
setAnim(CAnimationStateSheet::StunCastInit);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}// beginCast //
|
||||
|
||||
|
@ -3746,6 +3763,8 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB
|
|||
case MBEHAV::CAST_MIX_LINK:
|
||||
setAnim(CAnimationStateSheet::MixedCastLink);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -3754,7 +3773,7 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB
|
|||
}// endCast //
|
||||
|
||||
|
||||
//*************************************************************************************************
|
||||
// *************************************************************************************************
|
||||
void CCharacterCL::updateCurrentAttack()
|
||||
{
|
||||
// This is a behaviour for the magic.
|
||||
|
@ -3842,7 +3861,7 @@ inline static void getResistAndDistance(uint8 packedInfo, bool isDirectAttack, b
|
|||
resist = (packedInfo & 128) != 0;
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool directOffensifSpell, vector<double> &targetHitDates, TAnimStateKey animForCombat)
|
||||
{
|
||||
if (!_CurrentAttack) return;
|
||||
|
@ -4213,7 +4232,7 @@ void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool dir
|
|||
*/
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
void CCharacterCL::buildStaticObjectCastFX(const NLMISC::CVector &castWorldOrigin, NLMISC::CVector &castWorldPos, const CAttackSheet &/* sheet */, uint intensity)
|
||||
{
|
||||
if (intensity == 0) return;
|
||||
|
@ -4250,7 +4269,7 @@ void CCharacterCL::buildStaticObjectCastFX(const NLMISC::CVector &castWorldOrigi
|
|||
}
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
void CCharacterCL::computeTargetStickMode(const CAttackSheet &sheet, const CAttackInfo &attackInfo, CFXStickMode &dest, CEntityCL &target)
|
||||
{
|
||||
bool hasPhysicalImpact = false;
|
||||
|
@ -4290,7 +4309,7 @@ void CCharacterCL::computeTargetStickMode(const CAttackSheet &sheet, const CAtta
|
|||
}
|
||||
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
bool CCharacterCL::createCurrentAttackEndPart(CProjectileBuild &destPB,
|
||||
const CAttack *currentAttack,
|
||||
const CCharacterCL &target,
|
||||
|
@ -4393,7 +4412,7 @@ bool CCharacterCL::createCurrentAttackEndPart(CProjectileBuild &destPB,
|
|||
}
|
||||
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
void CCharacterCL::computeBestCastRay(CEntityCL &targetEntity,
|
||||
const CFXStickMode &targetStickMode,
|
||||
NLMISC::CVector &castWorldOrigin,
|
||||
|
@ -4425,7 +4444,7 @@ void CCharacterCL::computeBestCastRay(CEntityCL &targetEntity,
|
|||
}
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
bool CCharacterCL::isCurrentBehaviourAttackEnd() const
|
||||
{
|
||||
switch(_CurrentBehaviour.Behaviour)
|
||||
|
@ -4443,8 +4462,9 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const
|
|||
case MBEHAV::POWERFUL_ATTACK:
|
||||
case MBEHAV::AREA_ATTACK:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4627,6 +4647,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
|
|||
case RANGE_ATTACK:
|
||||
combatAnimState= CAnimationStateSheet::Attack1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8928,7 +8950,7 @@ void CCharacterCL::attachFX(const CAttachedFX::TSmartPtr fx)
|
|||
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
||||
{
|
||||
nlassert(index < MaxNumAura);
|
||||
|
@ -8959,7 +8981,7 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell)
|
||||
{
|
||||
// no-op if same link
|
||||
|
@ -8989,7 +9011,7 @@ void CCharacterCL::setLinkFX(const CAnimationFX *fx, const CAnimationFX *dispell
|
|||
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::startItemAttackFXs(bool activateTrails, uint intensity)
|
||||
{
|
||||
uint numItems = (uint)_Items.size();
|
||||
|
@ -9000,7 +9022,7 @@ void CCharacterCL::startItemAttackFXs(bool activateTrails, uint intensity)
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::stopItemAttackFXs()
|
||||
{
|
||||
uint numItems = (uint)_Items.size();
|
||||
|
@ -9083,7 +9105,7 @@ void CCharacterCL::applyVisualFX(sint64 prop)
|
|||
setLinkFX(linkFX, dispellFX);
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
const char *CCharacterCL::getBoneNameFromBodyPart(BODY::TBodyPart part, BODY::TSide side) const
|
||||
{
|
||||
if (!_Sheet) return CEntityCL::getBoneNameFromBodyPart(part, side);
|
||||
|
@ -9091,14 +9113,14 @@ const char *CCharacterCL::getBoneNameFromBodyPart(BODY::TBodyPart part, BODY::TS
|
|||
}
|
||||
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
const CItemSheet *CCharacterCL::getRightHandItemSheet() const
|
||||
{
|
||||
if (_RHandInstIdx == CEntityCL::BadIndex) return NULL;
|
||||
return _Items[_RHandInstIdx].Sheet;
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// *********************************************************************************************
|
||||
const CItemSheet *CCharacterCL::getLeftHandItemSheet() const
|
||||
{
|
||||
if (_LHandInstIdx == CEntityCL::BadIndex) return NULL;
|
||||
|
@ -9120,7 +9142,7 @@ void CCharacterCL::resetAllSoundAnimId()
|
|||
/////////////////////////////
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint intensity, SLOTTYPE::EVisualSlot visualSlot, bool activateTrail)
|
||||
{
|
||||
if (intensity < 1 || intensity > 5) return;
|
||||
|
@ -9151,6 +9173,8 @@ void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint inten
|
|||
else
|
||||
stickPoint = "box_arme_gauche";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (stickPoint)
|
||||
|
@ -9203,13 +9227,13 @@ void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint inten
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::stopAttackFX()
|
||||
{
|
||||
if (!Trail.empty()) Trail.stop();
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::initFXs(SLOTTYPE::EVisualSlot /* visualSlot */, NL3D::UInstance parent)
|
||||
{
|
||||
releaseFXs();
|
||||
|
@ -9236,7 +9260,7 @@ void CCharacterCL::CWornItem::initFXs(SLOTTYPE::EVisualSlot /* visualSlot */, NL
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
||||
{
|
||||
if (!Sheet) return;
|
||||
|
@ -9278,7 +9302,7 @@ void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::releaseFXs()
|
||||
{
|
||||
if (Scene)
|
||||
|
@ -9290,7 +9314,7 @@ void CCharacterCL::CWornItem::releaseFXs()
|
|||
}
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::CWornItem::setTrailSize(uint size)
|
||||
{
|
||||
if (Trail.empty()) return;
|
||||
|
@ -9308,14 +9332,14 @@ void CCharacterCL::CWornItem::setTrailSize(uint size)
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id) const
|
||||
{
|
||||
if (!_Sheet) return NULL;
|
||||
return getAttack(id, _Sheet->AttackLists);
|
||||
}
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
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)
|
||||
|
@ -9331,7 +9355,7 @@ const CAttack *CCharacterCL::getAttack(const CAttackIDSheet &id, const std::vect
|
|||
}
|
||||
|
||||
|
||||
//***********************************************************************************************************************
|
||||
// ***********************************************************************************************************************
|
||||
void CCharacterCL::initStaticFX()
|
||||
{
|
||||
_StaticFX = NULL;
|
||||
|
|
|
@ -5,26 +5,23 @@ SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H})
|
|||
|
||||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(client_sheets SHARED ${SRC})
|
||||
ADD_LIBRARY(ryzom_clientsheets SHARED ${SRC})
|
||||
ELSE(NOT WIN32)
|
||||
ADD_LIBRARY(client_sheets STATIC ${SRC})
|
||||
ADD_LIBRARY(ryzom_clientsheets STATIC ${SRC})
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(client_sheets game_share ${NELMISC_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(client_sheets PROPERTIES VERSION ${NL_VERSION})
|
||||
INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(ryzom_clientsheets ryzom_gameshare ${NELMISC_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(ryzom_clientsheets PROPERTIES VERSION ${NL_VERSION})
|
||||
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(client_sheets PROPERTIES COMPILE_FLAGS "/Yustdpch.h")
|
||||
SET_TARGET_PROPERTIES(ryzom_clientsheets PROPERTIES COMPILE_FLAGS "/Yustdpch.h")
|
||||
SET_SOURCE_FILES_PROPERTIES(stdpch.cpp PROPERTIES COMPILE_FLAGS "/Ycstdpch.h")
|
||||
SET_TARGET_PROPERTIES(client_sheets
|
||||
SET_TARGET_PROPERTIES(ryzom_clientsheets
|
||||
PROJECT_LABEL "Library: Client Sheets"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrt"
|
||||
LINK_FLAGS_RELEASE "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrtd")
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt"
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS client_sheets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
INSTALL(TARGETS ryzom_clientsheets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "animation_fx_set_sheet.h"
|
||||
#include "nel/georges/u_form_elm.h"
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
CAnimationFXSetSheet::CAnimationFXSetSheet()
|
||||
{
|
||||
Type = ANIMATION_FX_SET;
|
||||
|
@ -31,13 +31,13 @@ CAnimationFXSetSheet::CAnimationFXSetSheet()
|
|||
}
|
||||
}
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
void CAnimationFXSetSheet::build(const NLGEORGES::UFormElm &item)
|
||||
{
|
||||
buildWithPrefix(item);
|
||||
}
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
void CAnimationFXSetSheet::buildWithPrefix(const NLGEORGES::UFormElm &item, const std::string &prefix /*=""*/)
|
||||
{
|
||||
FX.clear();
|
||||
|
@ -55,7 +55,7 @@ void CAnimationFXSetSheet::buildWithPrefix(const NLGEORGES::UFormElm &item, cons
|
|||
}
|
||||
}
|
||||
|
||||
//****************************************************************************************************
|
||||
// ****************************************************************************************************
|
||||
void CAnimationFXSetSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialCont(FX);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "nel/georges/u_form_elm.h"
|
||||
|
||||
|
||||
//*****************************************************************************************
|
||||
// *****************************************************************************************
|
||||
void CAttackIDSheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
uint32 spellID = 0;
|
||||
|
@ -95,14 +95,14 @@ void CAttackIDSheet::CSpellInfo::build(const NLGEORGES::UFormElm &item, const st
|
|||
Mode = (MAGICFX::TSpellMode) spellMode;
|
||||
}
|
||||
|
||||
//*****************************************************************************************
|
||||
// *****************************************************************************************
|
||||
void CAttackIDSheet::CSpellInfo::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialEnum(Mode);
|
||||
f.serialEnum(ID);
|
||||
}
|
||||
|
||||
//*****************************************************************************************
|
||||
// *****************************************************************************************
|
||||
bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return lhs.Mode == rhs.Mode && lhs.ID == rhs.ID;
|
||||
}
|
||||
|
||||
//*****************************************************************************************
|
||||
// *****************************************************************************************
|
||||
bool operator < (const CAttackIDSheet::CSpellInfo &lhs, const CAttackIDSheet::CSpellInfo &rhs)
|
||||
{
|
||||
if (lhs.Mode != rhs.Mode) return lhs.Mode < rhs.Mode;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue