This commit is contained in:
rti 2010-11-14 16:02:00 +01:00
commit e80b6df4a2
174 changed files with 317 additions and 287 deletions

View file

@ -201,7 +201,7 @@ public:
/** Setup a correction matrix for Lighting. Normals are multiplied with this matrix before lighting. /** Setup a correction matrix for Lighting. Normals are multiplied with this matrix before lighting.
* This is important in Ryzom because models (and so Lods) are building with eye looking in Y<0. * This is important in Ryzom because models (and so Lods) are building with eye looking in Y<0.
* But they are animated with eye looking in X>0. * But they are animated with eye looking in X>0.
* The default setup is hence a matrix wich do a RotZ+=90. * The default setup is hence a matrix which do a RotZ+=90.
* \see addRenderCharacterKey * \see addRenderCharacterKey
*/ */
void setupNormalCorrectionMatrix(const CMatrix &normalMatrix); void setupNormalCorrectionMatrix(const CMatrix &normalMatrix);

View file

@ -459,7 +459,7 @@ public:
void enableAccurateIntegration(bool enable = true) { _AccurateIntegration = enable; } void enableAccurateIntegration(bool enable = true) { _AccurateIntegration = enable; }
bool isAccurateIntegrationEnabled(void) const { return _AccurateIntegration; } bool isAccurateIntegrationEnabled(void) const { return _AccurateIntegration; }
/** the the time threshold and the max number of integration to perform, when accurate integration is activated. /** the time threshold and the max number of integration to perform, when accurate integration is activated.
* The default is 0.15 for time threshold and 2 for max NbIntegrations * The default is 0.15 for time threshold and 2 for max NbIntegrations
* \param canSlowDown : Allow the system to slow down in speed but to keep accuracy in its movement. * \param canSlowDown : Allow the system to slow down in speed but to keep accuracy in its movement.
* It is useful for critical situations where the framerate is very low. The default is true. * It is useful for critical situations where the framerate is very low. The default is true.

View file

@ -1201,7 +1201,7 @@ private:
*/ */
CPatchDLMContext *_DLMContext; CPatchDLMContext *_DLMContext;
/** The reference count for DLMContext. Each TileMaterial created add a reference. Each pointLight wich /** The reference count for DLMContext. Each TileMaterial created add a reference. Each pointLight which
* touch the patch too. * touch the patch too.
*/ */
sint _DLMContextRefCount; sint _DLMContextRefCount;

View file

@ -316,7 +316,7 @@ public:
/// Set the type of texture animation to use. None is the default. Setting a new value discard the previous change. /// Set the type of texture animation to use. None is the default. Setting a new value discard the previous change.
void setTexAnimType(TTexAnimType type); void setTexAnimType(TTexAnimType type);
/// Get the the type of texture animation /// Get the type of texture animation
TTexAnimType getTexAnimType() const; TTexAnimType getTexAnimType() const;
//@} //@}

View file

@ -62,7 +62,7 @@ public:
TRibbonMode getRibbonMode() const { return _RibbonMode; } TRibbonMode getRibbonMode() const { return _RibbonMode; }
void setInterpolationMode(TInterpolationMode mode); void setInterpolationMode(TInterpolationMode mode);
TInterpolationMode getInterpolationMode() const { return _InterpolationMode; } TInterpolationMode getInterpolationMode() const { return _InterpolationMode; }
// Set the the coordinate system in which the trail will be created // Set the coordinate system in which the trail will be created
void setMatrixMode(TMatrixMode matrixMode); void setMatrixMode(TMatrixMode matrixMode);
TMatrixMode getMatrixMode() const { return _MatrixMode; } TMatrixMode getMatrixMode() const { return _MatrixMode; }
///@} ///@}
@ -79,7 +79,7 @@ public:
void setSegDuration(TAnimationTime ellapsedTime); void setSegDuration(TAnimationTime ellapsedTime);
TAnimationTime getSegDuration(void) const { return _SegDuration; } TAnimationTime getSegDuration(void) const { return _SegDuration; }
/** The the length in meter of the ribbon. This is used only if the ribbon mode is set to FixedSize. /** The length in meter of the ribbon. This is used only if the ribbon mode is set to FixedSize.
* These kind of ribbon are usually slower than variable size ribbons. * These kind of ribbon are usually slower than variable size ribbons.
* The default is one metter. * The default is one metter.
*/ */

View file

@ -93,7 +93,7 @@ public:
static void displayArrow(NL3D::IDriver *driver, const NLMISC::CVector &start, const NLMISC::CVector &v, float size, NLMISC::CRGBA col1, NLMISC::CRGBA col2); static void displayArrow(NL3D::IDriver *driver, const NLMISC::CVector &start, const NLMISC::CVector &v, float size, NLMISC::CRGBA col1, NLMISC::CRGBA col2);
/// display a string at the given world position. The The model matrix must be restored after this call /// display a string at the given world position. The model matrix must be restored after this call
static void print(NL3D::IDriver *driver, const std::string &text, CFontGenerator &fg, CFontManager &fm, const NLMISC::CVector &pos, float size, NLMISC::CRGBA col = NLMISC::CRGBA::White); static void print(NL3D::IDriver *driver, const std::string &text, CFontGenerator &fg, CFontManager &fm, const NLMISC::CVector &pos, float size, NLMISC::CRGBA col = NLMISC::CRGBA::White);

View file

@ -288,7 +288,7 @@ private:// Classes.
bool BBoxNeverRescale; bool BBoxNeverRescale;
CQuadNode *Sons[4]; CQuadNode *Sons[4];
CBaseNode RootNode; // First element of the element list in this quad. CBaseNode RootNode; // First element of the element list in this quad.
uint ListIndex; // [0,3]. index of wich list to follow in "Node.QuadNexts[]". uint ListIndex; // [0,3]. index of which list to follow in "Node.QuadNexts[]".
/* Topology of sons (top view: axe x/z): /* Topology of sons (top view: axe x/z):
0--1 0--1
| | | |

View file

@ -145,7 +145,7 @@ public:
*/ */
void detachSkeletonSon(CTransform *mi); void detachSkeletonSon(CTransform *mi);
/** Force the skeletonModel to recompute at next render which skins to render, at wich pass. /** Force the skeletonModel to recompute at next render which skins to render, at which pass.
* If you call setOpacity()/setTransparency() on one of the skins binded to the skeleton, you should call this * If you call setOpacity()/setTransparency() on one of the skins binded to the skeleton, you should call this
* method, else strange result may occurs. * method, else strange result may occurs.
* NB: this is automatically called by bindSkin()/detachSkeletonSon() * NB: this is automatically called by bindSkin()/detachSkeletonSon()

View file

@ -432,7 +432,7 @@ public:
* of this mesh that are bound to this bone * of this mesh that are bound to this bone
* NB: the instance must be skinned to the skeleton instance, BUT the result is not modified * NB: the instance must be skinned to the skeleton instance, BUT the result is not modified
* by current bone world matrix (eg: no current scale influence) * by current bone world matrix (eg: no current scale influence)
* \param boneId: the id of the skeleton's bone (wich the instance is skinned to) * \param boneId: the id of the skeleton's bone (which the instance is skinned to)
* \param bbox: the bbox (in bone basis) filled if return is true * \param bbox: the bbox (in bone basis) filled if return is true
* \return false if no vertices are bound to * \return false if no vertices are bound to
*/ */
@ -640,7 +640,7 @@ protected:
*/ */
virtual const std::vector<sint32> *getSkinBoneUsage() const {return NULL;} virtual const std::vector<sint32> *getSkinBoneUsage() const {return NULL;}
/** Deriver must change this method if isSkinnable(). It return a list of sphere relative to each bone /** Deriver must change this method if isSkinnable(). It return a list of sphere relative to each bone
* of the father skeleton. Use with getSkinBoneUsage() to know to wich bone this sphere apply * of the father skeleton. Use with getSkinBoneUsage() to know to which bone this sphere apply
* NB: if a sphere radius is -1, it means that the bone is not used (for any reason...) * NB: if a sphere radius is -1, it means that the bone is not used (for any reason...)
* default is to return NULL. * default is to return NULL.
*/ */

View file

@ -278,7 +278,7 @@ public:
NLMISC::CVector BoundingBoxVectors[8]; NLMISC::CVector BoundingBoxVectors[8];
}; };
// A hierachical heightfield // A hierarchical heightfield
class CHeightField class CHeightField
{ {
public: public:

View file

@ -711,7 +711,7 @@ public:
// Remove an alias from the list of alias in use (dynamic part only) // Remove an alias from the list of alias in use (dynamic part only)
void releaseAlias(IPrimitive *prim, uint32 dynamicAlias); void releaseAlias(IPrimitive *prim, uint32 dynamicAlias);
// Force the assignation of the specified alias the the primitive. If another primitive // Force the assignation of the specified alias to the primitive. If another primitive
// already hold the alias, this other primitive is assigned a new alias. // already hold the alias, this other primitive is assigned a new alias.
void forceAlias(CPrimAlias *prim, uint32 alias); void forceAlias(CPrimAlias *prim, uint32 alias);

View file

@ -177,7 +177,7 @@ void CArray2D<T>::getUpdateRects(sint moveOffsetX, sint moveOffsetY, std::vector
{ {
// the width to update // the width to update
uint width = std::min((uint) moveOffsetX, _Width); uint width = std::min((uint) moveOffsetX, _Width);
// the the grid moved top or bottom, exclude this part // the grid moved top or bottom, exclude this part
sint height = _Height - abs(moveOffsetY); sint height = _Height - abs(moveOffsetY);
if (height > 0) if (height > 0)
{ {
@ -192,7 +192,7 @@ void CArray2D<T>::getUpdateRects(sint moveOffsetX, sint moveOffsetY, std::vector
{ {
// the width to update // the width to update
uint width = std::min((uint) (- moveOffsetX), _Width); uint width = std::min((uint) (- moveOffsetX), _Width);
// the the grid moved top or bottom. // the grid moved top or bottom.
sint height = _Height - abs(moveOffsetY); sint height = _Height - abs(moveOffsetY);
if (height > 0) if (height > 0)
{ {

View file

@ -188,7 +188,7 @@ public:
std::string Name; std::string Name;
TVarType Type; TVarType Type;
bool Root; // true if this var comes from the root document. false else. bool Root; // true if this var comes from the root document. false else.
bool Comp; // true if the the parser found a 'complex' var (ie an array) bool Comp; // true if the parser found a 'complex' var (ie an array)
bool FromLocalFile; // Used during cfg parsing. True if the var has been created from the currently parsed cfg bool FromLocalFile; // Used during cfg parsing. True if the var has been created from the currently parsed cfg
std::vector<int> IntValues; std::vector<int> IntValues;
std::vector<double> RealValues; std::vector<double> RealValues;

View file

@ -301,7 +301,7 @@ void setCrashAlreadyReported(bool state);
* Example: * Example:
*\code *\code
// Load a file and assert if the load failed. This example will work \b only in debug mode because in release mode, // Load a file and assert if the load failed. This example will work \b only in debug mode because in release mode,
// nlassert do nothing, the the load function will not be called... // nlassert do nothing, the load function will not be called...
nlassert(load("test.tga")); nlassert(load("test.tga"));
// If you want to do that anyway, you could call nlverify. In release mode, the assertion will not be tested but // If you want to do that anyway, you could call nlverify. In release mode, the assertion will not be tested but

View file

@ -588,7 +588,7 @@ struct CFile
static bool createEmptyFile (const std::string& filename); static bool createEmptyFile (const std::string& filename);
/** /**
* Return a new filename that doesn't exists. It's used for screenshot filename for example. * Return a new filename that doesn't exist. It's used for screenshot filename for example.
* example: findNewFile("foobar.tga"); * example: findNewFile("foobar.tga");
* will try foobar001.tga, if the file exists, try foobar002.tga and so on until it finds an unexistant file. * will try foobar001.tga, if the file exists, try foobar002.tga and so on until it finds an unexistant file.
*/ */
@ -700,7 +700,7 @@ struct CFile
static bool createDirectoryTree(const std::string &dirname); static bool createDirectoryTree(const std::string &dirname);
/** Try to set the file access to read/write if not already set. /** Try to set the file access to read/write if not already set.
* return true if the file doesn't exists or if the file already have RW access. * return true if the file doesn't exist or if the file already have RW access.
* Work actually only on Windows and returns always true on other platforms. * Work actually only on Windows and returns always true on other platforms.
* \return true if RW access is granted * \return true if RW access is granted
*/ */

View file

@ -34,7 +34,7 @@ namespace NLMISC {
* with list<>/set<> etc... node allocations. * with list<>/set<> etc... node allocations.
* *
* NB: if used with a vector<> or a deque<> (ie if allocate(..,n) is called with n>1), it's still work, * NB: if used with a vector<> or a deque<> (ie if allocate(..,n) is called with n>1), it's still work,
* but it's use malloc()/free() instead, so it is fully unuseful in this case :) * but it's use malloc()/free() instead, so it is fully useless in this case :)
* *
* CSTLBlockAllocator use a pointer on a CBlockMemory, so multiple containers can share the same * CSTLBlockAllocator use a pointer on a CBlockMemory, so multiple containers can share the same
* blockMemory, for maximum space/speed efficiency. * blockMemory, for maximum space/speed efficiency.

View file

@ -45,7 +45,7 @@ public: // Attributes.
public: // Methods. public: // Methods.
/// @name Object. /// @name Object.
//@{ //@{
/// Constructor wich do nothing. /// Constructor which do nothing.
CVector2f() {} CVector2f() {}
/// Constructor. /// Constructor.
CVector2f(float _x, float _y) : x(_x), y(_y) {} CVector2f(float _x, float _y) : x(_x), y(_y) {}

View file

@ -45,7 +45,7 @@ public:
~CSourceCommon(); ~CSourceCommon();
/// Get the type the the source. /// Get the type of the source.
virtual TSOURCE_TYPE getType() const = 0; virtual TSOURCE_TYPE getType() const = 0;
void setPriority( TSoundPriority pr); void setPriority( TSoundPriority pr);

View file

@ -1551,7 +1551,7 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
if (_DisableHardwarePixelShader && _NbNeLTextureStages > 3) // yes, 3 is not a bug if (_DisableHardwarePixelShader && _NbNeLTextureStages > 3) // yes, 3 is not a bug
{ {
// If pixel shader are disabled, then can't emulate the texEnvColor feature with more than 2 stages. (only 2 constant available by using material emissive in addition to the the texture factor) // If pixel shader are disabled, then can't emulate the texEnvColor feature with more than 2 stages. (only 2 constant available by using material emissive in addition to the texture factor)
// Radeon with 3 stages cases : let the third stage to ensure availability of the EMBM feature // Radeon with 3 stages cases : let the third stage to ensure availability of the EMBM feature
// There is a special fix in CMaterial::isSupportedByDriver to force the number of stages to 2 for the radeons // There is a special fix in CMaterial::isSupportedByDriver to force the number of stages to 2 for the radeons
_NbNeLTextureStages = 2; _NbNeLTextureStages = 2;

View file

@ -1341,7 +1341,7 @@ void registerGlExtensions(CGlExtensions &ext)
// VBHard swap without flush of the VAR. // VBHard swap without flush of the VAR.
ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV; ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV;
else else
// VBHard with unuseful flush of the VAR. // VBHard with useless flush of the VAR.
ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_NV; ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_NV;
// Check NV_occlusion_query // Check NV_occlusion_query

View file

@ -751,7 +751,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
_WindowHeight = height; _WindowHeight = height;
/* The next step is to create a device context for the newly created pbuffer. To do this, /* The next step is to create a device context for the newly created pbuffer. To do this,
call the the function: */ call to the function: */
_hDC = nwglGetPbufferDCARB( _PBuffer ); _hDC = nwglGetPbufferDCARB( _PBuffer );
if (_hDC == NULL) if (_hDC == NULL)
{ {

View file

@ -16,13 +16,16 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
namespace NL3D namespace NL3D
{ {
class CDriverGL; class CDriverGL;
NSApplicationTerminateReply applicationShouldTerminate(CDriverGL*); NSApplicationTerminateReply applicationShouldTerminate(CDriverGL*);
} }
@interface CocoaApplicationDelegate : NSObject<NSApplicationDelegate> @interface CocoaApplicationDelegate : NSObject
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
<NSApplicationDelegate>
#endif
{ {
NL3D::CDriverGL* _driver; NL3D::CDriverGL* _driver;
} }

View file

@ -242,7 +242,7 @@ void CLandscapeVegetableBlock::createVegetableIGForDistType(uint i, CVegetable
// generate // generate
_Patch->generateTileVegetable(vegetIg, i, tms, tmt, vbCreateCtx); _Patch->generateTileVegetable(vegetIg, i, tms, tmt, vbCreateCtx);
// If the ig is empty, delete him. This optimize rendering because no unuseful ig are // If the ig is empty, delete him. This optimize rendering because no useless ig are
// tested for rendering. This speed up some 1/10 of ms... // tested for rendering. This speed up some 1/10 of ms...
if(vegetIg->isEmpty()) if(vegetIg->isEmpty())
{ {

View file

@ -1692,7 +1692,7 @@ void CMeshGeom::bkupOriginalSkinVertices()
// Copy VBuffer content into Original vertices normals. // Copy VBuffer content into Original vertices normals.
if(_VBuffer.getVertexFormat() & CVertexBuffer::PositionFlag) if(_VBuffer.getVertexFormat() & CVertexBuffer::PositionFlag)
{ {
// copy vertices from VBuffer. (NB: unuseful geomorphed vertices are still copied, but doesn't matter). // copy vertices from VBuffer. (NB: useless geomorphed vertices are still copied, but doesn't matter).
_OriginalSkinVertices.resize(numVertices); _OriginalSkinVertices.resize(numVertices);
for(uint i=0; i<numVertices;i++) for(uint i=0; i<numVertices;i++)
{ {
@ -1701,7 +1701,7 @@ void CMeshGeom::bkupOriginalSkinVertices()
} }
if(_VBuffer.getVertexFormat() & CVertexBuffer::NormalFlag) if(_VBuffer.getVertexFormat() & CVertexBuffer::NormalFlag)
{ {
// copy normals from VBuffer. (NB: unuseful geomorphed normals are still copied, but doesn't matter). // copy normals from VBuffer. (NB: useless geomorphed normals are still copied, but doesn't matter).
_OriginalSkinNormals.resize(numVertices); _OriginalSkinNormals.resize(numVertices);
for(uint i=0; i<numVertices;i++) for(uint i=0; i<numVertices;i++)
{ {
@ -1738,7 +1738,7 @@ void CMeshGeom::restoreOriginalSkinVertices()
// Copy VBuffer content into Original vertices normals. // Copy VBuffer content into Original vertices normals.
if(_VBuffer.getVertexFormat() & CVertexBuffer::PositionFlag) if(_VBuffer.getVertexFormat() & CVertexBuffer::PositionFlag)
{ {
// copy vertices from VBuffer. (NB: unuseful geomorphed vertices are still copied, but doesn't matter). // copy vertices from VBuffer. (NB: useless geomorphed vertices are still copied, but doesn't matter).
for(uint i=0; i<numVertices;i++) for(uint i=0; i<numVertices;i++)
{ {
*vba.getVertexCoordPointer(i)= _OriginalSkinVertices[i]; *vba.getVertexCoordPointer(i)= _OriginalSkinVertices[i];
@ -1746,7 +1746,7 @@ void CMeshGeom::restoreOriginalSkinVertices()
} }
if(_VBuffer.getVertexFormat() & CVertexBuffer::NormalFlag) if(_VBuffer.getVertexFormat() & CVertexBuffer::NormalFlag)
{ {
// copy normals from VBuffer. (NB: unuseful geomorphed normals are still copied, but doesn't matter). // copy normals from VBuffer. (NB: useless geomorphed normals are still copied, but doesn't matter).
for(uint i=0; i<numVertices;i++) for(uint i=0; i<numVertices;i++)
{ {
*vba.getNormalCoordPointer(i)= _OriginalSkinNormals[i]; *vba.getNormalCoordPointer(i)= _OriginalSkinNormals[i];

View file

@ -2040,7 +2040,7 @@ void CMeshMRMGeom::bkupOriginalSkinVerticesSubset(uint wedgeStart, uint wedgeEnd
// Copy VBuffer content into Original vertices normals. // Copy VBuffer content into Original vertices normals.
if(_VBufferFinal.getVertexFormat() & CVertexBuffer::PositionFlag) if(_VBufferFinal.getVertexFormat() & CVertexBuffer::PositionFlag)
{ {
// copy vertices from VBuffer. (NB: unuseful geomorphed vertices are still copied, but doesn't matter). // copy vertices from VBuffer. (NB: useless geomorphed vertices are still copied, but doesn't matter).
_OriginalSkinVertices.resize(_VBufferFinal.getNumVertices()); _OriginalSkinVertices.resize(_VBufferFinal.getNumVertices());
for(uint i=wedgeStart; i<wedgeEnd;i++) for(uint i=wedgeStart; i<wedgeEnd;i++)
{ {
@ -2049,7 +2049,7 @@ void CMeshMRMGeom::bkupOriginalSkinVerticesSubset(uint wedgeStart, uint wedgeEnd
} }
if(_VBufferFinal.getVertexFormat() & CVertexBuffer::NormalFlag) if(_VBufferFinal.getVertexFormat() & CVertexBuffer::NormalFlag)
{ {
// copy normals from VBuffer. (NB: unuseful geomorphed normals are still copied, but doesn't matter). // copy normals from VBuffer. (NB: useless geomorphed normals are still copied, but doesn't matter).
_OriginalSkinNormals.resize(_VBufferFinal.getNumVertices()); _OriginalSkinNormals.resize(_VBufferFinal.getNumVertices());
for(uint i=wedgeStart; i<wedgeEnd;i++) for(uint i=wedgeStart; i<wedgeEnd;i++)
{ {
@ -2083,7 +2083,7 @@ void CMeshMRMGeom::restoreOriginalSkinVertices()
// Copy VBuffer content into Original vertices normals. // Copy VBuffer content into Original vertices normals.
if(_VBufferFinal.getVertexFormat() & CVertexBuffer::PositionFlag) if(_VBufferFinal.getVertexFormat() & CVertexBuffer::PositionFlag)
{ {
// copy vertices from VBuffer. (NB: unuseful geomorphed vertices are still copied, but doesn't matter). // copy vertices from VBuffer. (NB: useless geomorphed vertices are still copied, but doesn't matter).
for(uint i=0; i<_VBufferFinal.getNumVertices();i++) for(uint i=0; i<_VBufferFinal.getNumVertices();i++)
{ {
*vba.getVertexCoordPointer(i)= _OriginalSkinVertices[i]; *vba.getVertexCoordPointer(i)= _OriginalSkinVertices[i];
@ -2091,7 +2091,7 @@ void CMeshMRMGeom::restoreOriginalSkinVertices()
} }
if(_VBufferFinal.getVertexFormat() & CVertexBuffer::NormalFlag) if(_VBufferFinal.getVertexFormat() & CVertexBuffer::NormalFlag)
{ {
// copy normals from VBuffer. (NB: unuseful geomorphed normals are still copied, but doesn't matter). // copy normals from VBuffer. (NB: useless geomorphed normals are still copied, but doesn't matter).
for(uint i=0; i<_VBufferFinal.getNumVertices();i++) for(uint i=0; i<_VBufferFinal.getNumVertices();i++)
{ {
*vba.getNormalCoordPointer(i)= _OriginalSkinNormals[i]; *vba.getNormalCoordPointer(i)= _OriginalSkinNormals[i];
@ -3312,7 +3312,7 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
skinLod.Geomorphs.resize( numGeoms ); skinLod.Geomorphs.resize( numGeoms );
for(i=0;i<numGeoms;i++) for(i=0;i<numGeoms;i++)
{ {
// NB: don't add "numGeoms" to the index because RawSkin look in a TempArray in RAM, wich start at 0... // NB: don't add "numGeoms" to the index because RawSkin look in a TempArray in RAM, which start at 0...
skinLod.Geomorphs[i].Start= vertexRemap[lod.Geomorphs[i].Start]; skinLod.Geomorphs[i].Start= vertexRemap[lod.Geomorphs[i].Start];
skinLod.Geomorphs[i].End= vertexRemap[lod.Geomorphs[i].End]; skinLod.Geomorphs[i].End= vertexRemap[lod.Geomorphs[i].End];
} }

View file

@ -316,7 +316,7 @@ uint CMeshMRMGeom::NumCacheVertexNormal4= NL_BlockByteL1 / sizeof(CRawVertexNorm
/* Old School template: include the same file with define switching, /* Old School template: include the same file with define switching,
Was used before to reuse same code for and without SSE. Was used before to reuse same code for and without SSE.
Unuseful now because SSE removed, but keep it for possible future work on it. useless now because SSE removed, but keep it for possible future work on it.
*/ */
#define ADD_MESH_MRM_SKIN_TEMPLATE #define ADD_MESH_MRM_SKIN_TEMPLATE
#include "mesh_mrm_skin_template.cpp" #include "mesh_mrm_skin_template.cpp"

View file

@ -1850,7 +1850,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
skinLod.Geomorphs.resize( numGeoms ); skinLod.Geomorphs.resize( numGeoms );
for(i=0;i<numGeoms;i++) for(i=0;i<numGeoms;i++)
{ {
// NB: don't add "numGeoms" to the index because RawSkin look in a TempArray in RAM, wich start at 0... // NB: don't add "numGeoms" to the index because RawSkin look in a TempArray in RAM, which start at 0...
skinLod.Geomorphs[i].Start= vertexRemap[lod.Geomorphs[i].Start]; skinLod.Geomorphs[i].Start= vertexRemap[lod.Geomorphs[i].Start];
skinLod.Geomorphs[i].End= vertexRemap[lod.Geomorphs[i].End]; skinLod.Geomorphs[i].End= vertexRemap[lod.Geomorphs[i].End];
} }
@ -2389,7 +2389,7 @@ uint CMeshMRMSkinnedGeom::NumCacheVertexNormal4= NL_BlockByteL1 / sizeof(CRawVer
/* Old School template: include the same file with define switching, /* Old School template: include the same file with define switching,
Was used before to reuse same code for and without SSE. Was used before to reuse same code for and without SSE.
Unuseful now because SSE removed, but keep it for possible future work on it. Useless now because SSE removed, but keep it for possible future work on it.
*/ */
#define ADD_MESH_MRM_SKINNED_TEMPLATE #define ADD_MESH_MRM_SKINNED_TEMPLATE
#include "mesh_mrm_skinned_template.cpp" #include "mesh_mrm_skinned_template.cpp"

View file

@ -1184,7 +1184,7 @@ void CScene::deleteModel(CTransform *model)
// add ot list of object to delete // add ot list of object to delete
_ToDelete.push_back (model); _ToDelete.push_back (model);
// remove this object from the RenderTrav, hence it won't be displayed // remove this object from the RenderTrav, hence it won't be displayed
// still animDetail/Light/LoadBalance it. This is unuseful, but very rare // still animDetail/Light/LoadBalance it. This is useless, but very rare
// and I prefer doing like this than to add a NULL ptr Test in each Traversal (which I then must do in CRenderTrav) // and I prefer doing like this than to add a NULL ptr Test in each Traversal (which I then must do in CRenderTrav)
RenderTrav.removeRenderModel(model); RenderTrav.removeRenderModel(model);
} }

View file

@ -535,7 +535,7 @@ void CShadowMapManager::renderProject(CScene *scene)
driver->setupFog(driver->getFogStart(), driver->getFogEnd(), CRGBA::Black); driver->setupFog(driver->getFogStart(), driver->getFogEnd(), CRGBA::Black);
/* Light case: CVisualCollisionManager use a fakeLight to avoid ShadowMapping on backFaces of meshs /* Light case: CVisualCollisionManager use a fakeLight to avoid ShadowMapping on backFaces of meshs
Hence must clean all lights, and enalbe only the Light0 in driver Hence must clean all lights, and enable only the Light0 in driver
*/ */
// Use CRenderTrav::resetLightSetup() to do so, to reset its Cache information // Use CRenderTrav::resetLightSetup() to do so, to reset its Cache information
scene->getRenderTrav().resetLightSetup(); scene->getRenderTrav().resetLightSetup();

View file

@ -677,7 +677,7 @@ void CShapeBank::removeShapeCache(const std::string &shapeCacheName)
void CShapeBank::reset() void CShapeBank::reset()
{ {
// Parse la map ShapeCacheNameToShapeCache pour supprimer tout les caches // Parse map ShapeCacheNameToShapeCache to delete all caches
TShapeCacheMap::iterator scmIt = ShapeCacheNameToShapeCache.begin(); TShapeCacheMap::iterator scmIt = ShapeCacheNameToShapeCache.begin();
while( scmIt != ShapeCacheNameToShapeCache.end() ) while( scmIt != ShapeCacheNameToShapeCache.end() )
{ {

View file

@ -1849,7 +1849,7 @@ void CSkeletonModel::getLightHotSpotInWorld(CVector &modelPos, float &modelRadi
} }
else else
{ {
/* Else return the skeleton pos. NB: this seems unuseful since bone 0 not computed means no Skins. /* Else return the skeleton pos. NB: this seems useless since bone 0 not computed means no Skins.
But lighting computation is still done and may use a VisualCollisionEntity. But lighting computation is still done and may use a VisualCollisionEntity.
This system cache some infos according to position. This is why we must return a position This system cache some infos according to position. This is why we must return a position
near the skeleton (else cache crash each frame => slowdown...) near the skeleton (else cache crash each frame => slowdown...)

View file

@ -217,7 +217,7 @@ void CTextureFont::doGenerate(bool async)
sint x = ite->left(); sint x = ite->left();
sint y = ite->bottom(); sint y = ite->bottom();
// Look in wich category is the rectangle // Look in which category is the rectangle
sint cat = 0; sint cat = 0;
sint catTopY = 0; sint catTopY = 0;
sint catBotY = NbLine[cat] * Categories[cat]; sint catBotY = NbLine[cat] * Categories[cat];

View file

@ -180,7 +180,7 @@ public:
* \param config is the current lingo config file * \param config is the current lingo config file
* \param errors is an error handler filled with error code and message if the method return false. * \param errors is an error handler filled with error code and message if the method return false.
* *
* \return true if check success false if problem detected. Errors are reported in the the error[0]. * \return true if check success false if problem detected. Errors are reported in the error[0].
*/ */
bool check (const CZoneTemplate &zoneTemplate, uint transitionNumber, const CLigoConfig &config, CLigoError &errors) const; bool check (const CZoneTemplate &zoneTemplate, uint transitionNumber, const CLigoConfig &config, CLigoError &errors) const;

View file

@ -279,14 +279,14 @@ void CLogicStateMachine::modifyVariable( string varName, string modifOperator, s
if( f.isReading() ) if( f.isReading() )
{ {
// set the the logic state machine addr in each state // set the logic state machine addr in each state
map<string,CLogicState>::iterator itStates; map<string,CLogicState>::iterator itStates;
for( itStates = _States.begin(); itStates != _States.end(); ++itStates ) for( itStates = _States.begin(); itStates != _States.end(); ++itStates )
{ {
(*itStates).second.setLogicStateMachine( this ); (*itStates).second.setLogicStateMachine( this );
} }
// set the the logic state machine addr in each conditions // set the logic state machine addr in each conditions
map<string,CLogicCondition>::iterator itCond; map<string,CLogicCondition>::iterator itCond;
for( itCond = _Conditions.begin(); itCond != _Conditions.end(); ++itCond ) for( itCond = _Conditions.begin(); itCond != _Conditions.end(); ++itCond )
{ {

View file

@ -172,7 +172,7 @@ namespace NLMISC
* safe to use with NeL DLL. * safe to use with NeL DLL.
* For windows platform, this singleton also hold the * For windows platform, this singleton also hold the
* fiber pointer of the current thread. This is needed because * fiber pointer of the current thread. This is needed because
* of the bad design the the fiber API before Windows XP. * of the bad design of the fiber API before Windows XP.
*/ */
class CCurrentCoTask class CCurrentCoTask
{ {

View file

@ -192,7 +192,7 @@ void CSheetId::loadSheetId ()
removednbfiles++; removednbfiles++;
} }
} }
nlinfo ("SHEETID: Removed %d files on %d from CSheetId because these files doesn't exists", removednbfiles, nbfiles); nlinfo ("SHEETID: Removed %d files on %d from CSheetId because these files don't exist", removednbfiles, nbfiles);
} }
// Convert the map to one big string and 1 static map (id to name) // Convert the map to one big string and 1 static map (id to name)

View file

@ -1608,7 +1608,7 @@ namespace NLNET
pluggedModule->getModuleName().c_str(), pluggedModule->getModuleName().c_str(),
pluggedModule->getModuleId()); pluggedModule->getModuleId());
// A module has just been plugged here, we need to disclose it the the // A module has just been plugged here, we need to disclose it to the
// other module, and disclose other module to it. // other module, and disclose other module to it.
// create a proxy for this module // create a proxy for this module

View file

@ -457,7 +457,7 @@ namespace NLNET
TRouteMap::iterator it(_Routes.find(sid)); TRouteMap::iterator it(_Routes.find(sid));
if (it == _Routes.end()) if (it == _Routes.end())
{ {
nlwarning("onRemoveTransport : can't find a route the the transport %hu on service %u", nlwarning("onRemoveTransport : can't find a route to the transport %hu on service %u",
desc.TransportId, desc.TransportId,
sid.get()); sid.get());
return; return;

View file

@ -380,7 +380,7 @@ namespace NLNET
void onModulePlugged(IModule *pluggedModule) void onModulePlugged(IModule *pluggedModule)
{ {
// A module has just been plugged here, we need to disclose it the the // A module has just been plugged here, we need to disclose it to the
// other module, and disclose other module to it. // other module, and disclose other module to it.
// create a proxy for this module // create a proxy for this module

View file

@ -64,7 +64,7 @@ public:
}; };
/** /**
* The global position in the the global retriever. * The global position in the global retriever.
* Contains an instance id and a local position within the instance. * Contains an instance id and a local position within the instance.
* \author Benjamin Legros * \author Benjamin Legros
* \author Nevrax France * \author Nevrax France

View file

@ -217,7 +217,7 @@ public:
* instances have been built. * instances have been built.
*/ */
void initEdgeQuad(CGlobalRetriever &gr); void initEdgeQuad(CGlobalRetriever &gr);
/// link the edge quad of the interior with the the landscape instances /// link the edge quad of the interior with the landscape instances
void linkEdgeQuad(CGlobalRetriever &gr); void linkEdgeQuad(CGlobalRetriever &gr);
/// Builds the instance. /// Builds the instance.

View file

@ -24,7 +24,7 @@ using namespace NL3D;
// *************************************************************************** // ***************************************************************************
// Quality factor. Usefull to get maximum of interseting values in the range 0..255. // Quality factor. Useful to get maximum of interseting values in the range 0..255.
#define NL_LTB_MAX_DISTANCE_QUALITY_FACTOR 0.05f #define NL_LTB_MAX_DISTANCE_QUALITY_FACTOR 0.05f
// The bigger, the lower the influence of the normal is. must be >=0 // The bigger, the lower the influence of the normal is. must be >=0
#define NL_LTB_NORMAL_BIAS 1.f #define NL_LTB_NORMAL_BIAS 1.f

View file

@ -71,7 +71,7 @@ private:
{ {
// Pos/Normal // Pos/Normal
CPixelInfo P; CPixelInfo P;
// From wich texture (materialId) does this sample come from? // From which texture (materialId) does this sample come from?
uint MaterialId; uint MaterialId;
// The UV of this sample // The UV of this sample
NLMISC::CUV UV; NLMISC::CUV UV;

View file

@ -319,7 +319,7 @@ int main(int nNbArg, char **ppArgs)
UVMax[i].U = (float)x+AllMaps[i]->getWidth(); UVMax[i].U = (float)x+AllMaps[i]->getWidth();
UVMax[i].V = (float)y+AllMaps[i]->getHeight(); UVMax[i].V = (float)y+AllMaps[i]->getHeight();
/* // Do not remove this is usefull for debugging /* // Do not remove this is useful for debugging
{ {
NLMISC::COFile outTga; NLMISC::COFile outTga;
string fmtName = ppArgs[1]; string fmtName = ppArgs[1];

View file

@ -106,7 +106,7 @@ public:
*/ */
void enableMemoryScheme(bool enabled = true) { _DisableMemoryScheme = !enabled; } void enableMemoryScheme(bool enabled = true) { _DisableMemoryScheme = !enabled; }
/** tells wether memory schemes are enables /** tells whether memory schemes are enables
* \see enableMemoryScheme() * \see enableMemoryScheme()
*/ */
bool isMemorySchemeEnabled() const { return !_DisableMemoryScheme; } bool isMemorySchemeEnabled() const { return !_DisableMemoryScheme; }
@ -177,14 +177,14 @@ protected:
virtual CEditAttribDlg *createConstantValueDlg() = 0; virtual CEditAttribDlg *createConstantValueDlg() = 0;
// tells wether the scheme supports custom input // tells whether the scheme supports custom input
virtual bool hasSchemeCustomInput(void) const = 0; virtual bool hasSchemeCustomInput(void) const = 0;
// retrieve the scheme input id // retrieve the scheme input id
virtual NL3D::CPSInputType getSchemeInput(void) const = 0; virtual NL3D::CPSInputType getSchemeInput(void) const = 0;
// set the scheme input id // set the scheme input id
virtual void setSchemeInput(const NL3D::CPSInputType &input) = 0; virtual void setSchemeInput(const NL3D::CPSInputType &input) = 0;
// tells wether the scheme input value is clamped or not // tells whether the scheme input value is clamped or not
virtual bool isSchemeClamped(void) const = 0; virtual bool isSchemeClamped(void) const = 0;
// clamp / unclamp the scheme // clamp / unclamp the scheme
virtual void clampScheme(bool clamped = true) = 0; virtual void clampScheme(bool clamped = true) = 0;

View file

@ -46,7 +46,7 @@ public:
// get the upper bound // get the upper bound
T getUpperBound(void) const { return _UpperBound; } T getUpperBound(void) const { return _UpperBound; }
// test wether the upper bound is excluded of the test // test whether the upper bound is excluded of the test
bool isUpperBoundExcluded(void) const bool isUpperBoundExcluded(void) const
{ {
return _UpperBoundExcluded; return _UpperBoundExcluded;
@ -68,7 +68,7 @@ public:
// get the lower bound // get the lower bound
T getLowerBound(void) const { return _LowerBound; } T getLowerBound(void) const { return _LowerBound; }
// test wether the lower bound is excluded of the test // test whether the lower bound is excluded of the test
bool isLowerBoundExcluded(void) const bool isLowerBoundExcluded(void) const
{ {
return _LowerBoundExcluded; return _LowerBoundExcluded;

View file

@ -104,7 +104,7 @@ protected:
void set(const uint32 &v) void set(const uint32 &v)
{ {
// if the max new size is lower than the current number of instance, we must suppress item // if the max new size is lower than the current number of instance, we must suppress item
// in the the CParticleTreeCtrl // in the CParticleTreeCtrl
if (v < Located->getSize()) if (v < Located->getSize())
{ {

View file

@ -59,7 +59,7 @@ public:
// Init the UI // Init the UI
virtual bool initUI (HWND parent=NULL) = 0; virtual bool initUI (HWND parent=NULL) = 0;
// Test wether an instance of the viewer is running // Test whether an instance of the viewer is running
virtual bool isInstanceRunning() = 0; virtual bool isInstanceRunning() = 0;
// Go. It shouldn't be called if there's an instance of the viewer that is running. // Go. It shouldn't be called if there's an instance of the viewer that is running.

View file

@ -426,7 +426,7 @@ void CParticleTreeCtrl::OnRButtonDown(UINT nFlags, CPoint point)
{ {
_LastClickedPS->setCurrentEditedElement(NULL); _LastClickedPS->setCurrentEditedElement(NULL);
} }
// test wether there is an item under that point // test whether there is an item under that point
UINT flags; UINT flags;
HTREEITEM item = this->HitTest(point, &flags); HTREEITEM item = this->HitTest(point, &flags);
if (item) if (item)

View file

@ -201,9 +201,9 @@ public:
* All nodes are in the 'unloaded" state, so it is to the caller to load them by calling load() on their node * All nodes are in the 'unloaded" state, so it is to the caller to load them by calling load() on their node
*/ */
void load() throw(NLMISC::EStream); void load() throw(NLMISC::EStream);
// Test wether the structure of the workspace has been modified (does not test if ps inside the workspace have been modified) // Test whether the structure of the workspace has been modified (does not test if ps inside the workspace have been modified)
bool isModified() const { return _Modified; } bool isModified() const { return _Modified; }
// Test wether the content of the workspace has ben modified // Test whether the content of the workspace has ben modified
bool isContentModified() const; bool isContentModified() const;
void touch() { setModifiedFlag(true); } void touch() { setModifiedFlag(true); }
void clearModifiedFlag() { setModifiedFlag(false); } void clearModifiedFlag() { setModifiedFlag(false); }

View file

@ -56,7 +56,7 @@ void CVegetableListBox::OnRButtonDown(UINT nFlags, CPoint point)
CMenu* subMenu; CMenu* subMenu;
menu.LoadMenu(IDR_VEGETABLE_MENU); menu.LoadMenu(IDR_VEGETABLE_MENU);
// test wether there is an item under that point // test whether there is an item under that point
BOOL bout; BOOL bout;
uint item = this->ItemFromPoint(point, bout); uint item = this->ItemFromPoint(point, bout);
if (!bout) if (!bout)

View file

@ -39,13 +39,7 @@ CBinOpDialog::CBinOpDialog(QWidget *widget1, QWidget *widget2, QWidget *parent)
setWindowTitle(tr("Bin operator")); setWindowTitle(tr("Bin operator"));
_comboBox->clear(); _comboBox->clear();
_comboBox->insertItems(0, QStringList()
<< tr("SelectArg1")
<< tr("SelectArg2")
<< tr("Modulate")
<< tr("Add")
<< tr("Subtract"));
qobject_cast<QGroupBox*>(widget1)->setTitle(tr("Arg1")); qobject_cast<QGroupBox*>(widget1)->setTitle(tr("Arg1"));
qobject_cast<QGroupBox*>(widget2)->setTitle(tr("Arg2")); qobject_cast<QGroupBox*>(widget2)->setTitle(tr("Arg2"));
connect(_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setNewOp(int))); connect(_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setNewOp(int)));

View file

@ -96,14 +96,28 @@ public:
_AttrbDlg[k]->setSchemeWrapper(&_SchemeWrapper[k]) ; _AttrbDlg[k]->setSchemeWrapper(&_SchemeWrapper[k]) ;
_AttrbDlg[k]->init(); _AttrbDlg[k]->init();
} }
static const char * const operators[] =
{
QT_TR_NOOP("Select Arg1"),
QT_TR_NOOP("Select Arg2"),
QT_TR_NOOP("Modulate"),
QT_TR_NOOP("Add"),
QT_TR_NOOP("Subtract"),
0
};
_comboBox->blockSignals(true);
for (k = 0 ; k < (uint) NL3D::CPSBinOp::last ; ++k) for (k = 0 ; k < (uint) NL3D::CPSBinOp::last ; ++k)
{ {
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k)) if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
{ {
_comboBox->insertItem(_comboBox->count(), operators[k]);
if ((uint) _EditedScheme->getOp() == k) if ((uint) _EditedScheme->getOp() == k)
_comboBox->setCurrentIndex(k); _comboBox->setCurrentIndex(k);
} }
} }
_comboBox->blockSignals(false);
} }
~CBinOpDialogT() ~CBinOpDialogT()

View file

@ -156,6 +156,8 @@ void CEmitterPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBind
_ui.radiusLabel->hide(); _ui.radiusLabel->hide();
} }
_ui.forceConsistentCheckBox->setChecked(_Emitter->isConsistentEmissionEnabled());
_ui.directionComboBox->blockSignals(true); _ui.directionComboBox->blockSignals(true);
if (_Emitter->isSpeedBasisEmissionEnabled()) if (_Emitter->isSpeedBasisEmissionEnabled())
{ {
@ -196,7 +198,7 @@ void CEmitterPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBind
_ui.bypassAutoLODCheckBox->setChecked(_Emitter->getBypassAutoLOD()); _ui.bypassAutoLODCheckBox->setChecked(_Emitter->getBypassAutoLOD());
} }
else else
_ui.bypassAutoLODCheckBox->setEnabled(true); _ui.bypassAutoLODCheckBox->setEnabled(false);
} }
void CEmitterPage::setEmittedType(int index) void CEmitterPage::setEmittedType(int index)
@ -245,7 +247,7 @@ void CEmitterPage::setTypeOfEmission(int index)
void CEmitterPage::setConsistentEmission(bool state) void CEmitterPage::setConsistentEmission(bool state)
{ {
if (_Emitter-> isConsistentEmissionEnabled() == state) return; if (_Emitter->isConsistentEmissionEnabled() == state) return;
_Emitter->enableConsistenEmission(state); _Emitter->enableConsistenEmission(state);
updateModifiedFlag(); updateModifiedFlag();
} }

View file

@ -241,7 +241,7 @@ void CLocatedPage::updateTriggerOnDeath(void)
void CLocatedPage::CMaxNbParticlesWrapper::set(const uint32 &v) void CLocatedPage::CMaxNbParticlesWrapper::set(const uint32 &v)
{ {
// if the max new size is lower than the current number of instance, we must suppress item // if the max new size is lower than the current number of instance, we must suppress item
// in the the CParticleTreeCtrl // in the CParticleTreeCtrl
if (v < Located->getSize()) if (v < Located->getSize())
{ {
nlassert(Node); nlassert(Node);

View file

@ -252,10 +252,10 @@ public:
/// All nodes are in the 'unloaded" state, so it is to the caller to load them by calling load() on their node /// All nodes are in the 'unloaded" state, so it is to the caller to load them by calling load() on their node
void load() throw(NLMISC::EStream); void load() throw(NLMISC::EStream);
/// Test wether the structure of the workspace has been modified (does not test if ps inside the workspace have been modified) /// Test whether the structure of the workspace has been modified (does not test if ps inside the workspace have been modified)
bool isModified() const { return _Modified; } bool isModified() const { return _Modified; }
/// Test wether the content of the workspace has ben modified /// Test whether the content of the workspace has ben modified
bool isContentModified() const; bool isContentModified() const;
void touch() { setModifiedFlag(true); } void touch() { setModifiedFlag(true); }
void clearModifiedFlag() { setModifiedFlag(false); } void clearModifiedFlag() { setModifiedFlag(false); }

View file

@ -1094,7 +1094,7 @@ void CTView::OnDropFiles(HDROP hDropInfo)
{ {
Browse *parent = (Browse*)this->GetParent(); Browse *parent = (Browse*)this->GetParent();
char FileName[256]; char FileName[256];
int count=DragQueryFile(hDropInfo,0xffffffff,FileName,256); //count = nombre de fichiers dans le drop int count=DragQueryFile(hDropInfo,0xffffffff,FileName,256); //count = files number in drop queue
POINT pos; POINT pos;
@ -1491,9 +1491,10 @@ LRESULT CTView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
_chdir (LastPath.c_str()); _chdir (LastPath.c_str());
CFileDialog load(true, NULL, LastPath.c_str(), OFN_ENABLESIZING | OFN_ALLOWMULTISELECT, CFileDialog load(true, NULL, LastPath.c_str(), OFN_ENABLESIZING | OFN_ALLOWMULTISELECT,
"Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); "Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL);
load.m_ofn.lpstrFile = new char[10000]; //le buffer contient la list de tous les noms de fichier load.m_ofn.lpstrFile = new char[10000]; // buffer contains filenames list
load.m_ofn.lpstrFile[0] = 0; load.m_ofn.lpstrFile[0] = 0;
//avec 10ko on devrait tranquille ... si l'ensemble des noms des fichiers depassent 10000 cara, l'insertion n'a pas lieu // with 10 KB we should be large enough...
// if all files are exceeding 10000 characters, insert would be skipped
load.m_ofn.nMaxFile = 10000-1; load.m_ofn.nMaxFile = 10000-1;
if (load.DoModal()==IDOK) if (load.DoModal()==IDOK)
{ {

View file

@ -96,7 +96,7 @@ unsigned long PIC_Load(char* FileName, unsigned char Quantize)
if ( !strcmp(ext,"JPG") ) if ( !strcmp(ext,"JPG") )
{ {
type=1; type=1;
} }
else if ( !strcmp(ext,"TGA") ) else if ( !strcmp(ext,"TGA") )
{ {
type=2; type=2;

View file

@ -109,7 +109,7 @@ static CZone *LoadZone(uint16 xPos, uint16 yPos, std::string zoneExt)
} }
//=========================================================================================================================== //===========================================================================================================================
/** Test wether 2 vertices could be welded /** Test whether 2 vertices could be welded
*/ */
static inline bool CanWeld(const CVector &v1, const CVector &v2, float weldThreshold) static inline bool CanWeld(const CVector &v1, const CVector &v2, float weldThreshold)
{ {
@ -241,9 +241,9 @@ static uint CheckZone(std::string middleZoneFile, float weldThreshold, float mid
} }
} }
//////////////////////////////////////////////// /////////////////////////////////////////////////
// check wether each patch is correctly bound // // check whether each patch is correctly bound //
//////////////////////////////////////////////// /////////////////////////////////////////////////
for (l = 0; l < zoneInfos[0].Patchs.size(); ++l) for (l = 0; l < zoneInfos[0].Patchs.size(); ++l)
{ {

View file

@ -151,7 +151,7 @@ void bind_1_4 (std::vector<CPatchInfo> &zoneInfos, uint patch, uint edge, uint p
// *************************************************************************** // ***************************************************************************
/** Test wether 2 vertices could be welded */ /** Test whether 2 vertices could be welded */
static inline bool CanWeld(const CVector &v1, const CVector &v2, float weldThreshold) static inline bool CanWeld(const CVector &v1, const CVector &v2, float weldThreshold)
{ {
@ -305,9 +305,9 @@ void CleanZone ( std::vector<CPatchInfo> &zoneInfos, uint zoneId, const CAABBoxE
} }
} }
//////////////////////////////////////////////// /////////////////////////////////////////////////
// check wether each patch is correctly bound // // check whether each patch is correctly bound //
//////////////////////////////////////////////// /////////////////////////////////////////////////
uint pass = 0; uint pass = 0;
while (1) while (1)
{ {

View file

@ -142,7 +142,7 @@ bool getPatchAndEdge(const std::vector<CPatchInfo>& patchs,
if(patchs[ptch].BaseVertices[i] == baseVertex1) if(patchs[ptch].BaseVertices[i] == baseVertex1)
{ {
#if WELD_LOG #if WELD_LOG
fprintf(fdbg,"patch %d contient bv %d : %d %d %d %d\n", fprintf(fdbg,"patch %d continent bv %d : %d %d %d %d\n",
ptch, ptch,
baseVertex1, baseVertex1,
patchs[ptch].BaseVertices[0], patchs[ptch].BaseVertices[0],

View file

@ -351,7 +351,8 @@ void CConditionsView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
break; break;
} }
} while (subPos == NULL); }
while (subPos == NULL);
if (pNode == NULL) if (pNode == NULL)
break; break;

View file

@ -238,7 +238,7 @@ void makeId( list<string>& dirs )
if( hFind == INVALID_HANDLE_VALUE ) if( hFind == INVALID_HANDLE_VALUE )
{ {
nlwarning ("Invalid File Handle"); nlwarning ("Invalid File Handle");
} }
else else
{ {
do do

View file

@ -31,7 +31,7 @@ extern CEventsListener EventsListener;
// GLOBAL // // GLOBAL //
//////////// ////////////
// Hierachical timer // Hierarchical timer
H_AUTO_DECL ( RZ_Client_Actions_Context_Mngr_Update ) H_AUTO_DECL ( RZ_Client_Actions_Context_Mngr_Update )
static bool getParam (CBaseAction::CParameter::TType type, ucstring &paramName, ucstring &paramValue, const std::string &argu, uint paramId); static bool getParam (CBaseAction::CParameter::TType type, ucstring &paramName, ucstring &paramValue, const std::string &argu, uint paramId);

View file

@ -41,9 +41,9 @@ public:
const CCreatureAttackSheet *Sheet; const CCreatureAttackSheet *Sheet;
// anim fx set for attack part // anim fx set for attack part
CAnimationFXSet AttackFXSet; CAnimationFXSet AttackFXSet;
// anim fx set for custom projectile part (wether custom projectile is used is told in 'Sheet'); // anim fx set for custom projectile part (whether custom projectile is used is told in 'Sheet');
CAnimationFXSet ProjectileFXSet; CAnimationFXSet ProjectileFXSet;
// anim fx set for custom impact part (wether custom impact is used is told in 'Sheet'); // anim fx set for custom impact part (whether custom impact is used is told in 'Sheet');
CAnimationFXSet ImpactFXSet; CAnimationFXSet ImpactFXSet;
public: public:
// ctor // ctor

View file

@ -956,7 +956,7 @@ void CCDBNodeBranch::removeBranchInfoIt(TObsList::iterator it)
//----------------------------------------------- //-----------------------------------------------
// Usefull for find // Useful for find
//----------------------------------------------- //-----------------------------------------------
class CCDBNodeBranchComp : public std::binary_function<ICDBNode *, ICDBNode *, bool> class CCDBNodeBranchComp : public std::binary_function<ICDBNode *, ICDBNode *, bool>
{ {

View file

@ -2075,13 +2075,13 @@ double CCharacterCL::computeSpeed()
// Compute and return the speed factor to apply to the animation. // Compute and return the speed factor to apply to the animation.
// \param speedToDest : evaluted speed to destination. // \param speedToDest : evaluted speed to destination.
// \return double : the speed factor to use for the current animation. // \return double : the speed factor to use for the current animation.
// \todo GUIGUI : revoir les histoire de scale, faire ca mieux. // \todo GUIGUI : review this scale problem and optimize it.
//----------------------------------------------- //-----------------------------------------------
double CCharacterCL::computeSpeedFactor(double speedToDest) double CCharacterCL::computeSpeedFactor(double speedToDest)
{ {
double speedFactor = 1.0; double speedFactor = 1.0;
// \todo GUIGUI : faire cette histoire de emote beaucoup mieux, C NULL. // \todo GUIGUI : optimize emotes, currently it's badly designed.
const CAnimationState *animStatePtr; const CAnimationState *animStatePtr;
// If the current animation is an emote, get the right animation state. // If the current animation is an emote, get the right animation state.
if(animState(MOVE) == CAnimationStateSheet::Emote) if(animState(MOVE) == CAnimationStateSheet::Emote)
@ -5493,7 +5493,7 @@ void CCharacterCL::updateStages()
if(it->second.isPresent(PROPERTY_POSITION)) if(it->second.isPresent(PROPERTY_POSITION))
{ {
somePosFoundEarly= true; somePosFoundEarly= true;
// then it's cool we can set the new accurate interval to the prec stage wich has a pos // then it's cool we can set the new accurate interval to the prec stage which has a pos
if(itPosPrec!=_Stages._StageSet.end()) if(itPosPrec!=_Stages._StageSet.end())
{ {
uint dgc= it->first - itPosPrec->first; uint dgc= it->first - itPosPrec->first;
@ -5713,7 +5713,7 @@ void CCharacterCL::updateStages()
float maxSpeed= (float)getMaxSpeed(); float maxSpeed= (float)getMaxSpeed();
if(maxSpeed>0) if(maxSpeed>0)
{ {
// compute at wich time the first move should begin so it doesn't have to accelerate // compute at which time the first move should begin so it doesn't have to accelerate
_RunStartTimeNoPop= fpTime - d2fp/maxSpeed; _RunStartTimeNoPop= fpTime - d2fp/maxSpeed;
} }
} }

View file

@ -1,4 +1,3 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
@ -114,9 +113,9 @@ void quitCrashReport ()
#ifndef NL_OS_WINDOWS #ifndef NL_OS_WINDOWS
static void sigHandler(int Sig) static void sigHandler(int Sig)
{ {
// redirect the signal for the next time // redirect the signal for the next time
signal(Sig, sigHandler); signal(Sig, sigHandler);
nlwarning("Ignoring signal SIGPIPE"); nlwarning("Ignoring signal SIGPIPE");
} }
#endif #endif

View file

@ -1561,7 +1561,7 @@ public:
static volatile bool isMainlandCharacter = false; // TMP until we can get this info static volatile bool isMainlandCharacter = false; // TMP until we can get this info
if (isMainlandCharacter) if (isMainlandCharacter)
{ {
nlassert(0); // utiliser id="message_box" !!! nlassert(0); // use id="message_box" !!!
if (AvailablePatchs != 0) if (AvailablePatchs != 0)
{ {
im->messageBoxWithHelp(CI18N::get("uiBGD_MainlandCharFullPatchNeeded"), "ui:outgame"); im->messageBoxWithHelp(CI18N::get("uiBGD_MainlandCharFullPatchNeeded"), "ui:outgame");

View file

@ -242,7 +242,7 @@ public:
/// This will remove extra rsc used by the continent (fog maps ..) /// This will remove extra rsc used by the continent (fog maps ..)
void unselect(); void unselect();
/** Test wether the next call to updateStreamable will be blocking. /** Test whether the next call to updateStreamable will be blocking.
* This happen for example when the player is too near of a village and when asynchronous loading is not sufficient. * This happen for example when the player is too near of a village and when asynchronous loading is not sufficient.
* \param pos player position * \param pos player position
*/ */

View file

@ -246,7 +246,7 @@ void CContinentManager::load ()
//----------------------------------------------- //-----------------------------------------------
// select : // select :
// Select continent from a name. // Select continent from a name.
// \param const string &name : name of the contient to select. // \param const string &name : name of the continent to select.
//----------------------------------------------- //-----------------------------------------------
void CContinentManager::select(const string &name, const CVectorD &pos, NLMISC::IProgressCallback &progress) void CContinentManager::select(const string &name, const CVectorD &pos, NLMISC::IProgressCallback &progress)
{ {

View file

@ -42,7 +42,7 @@ using namespace std;
// GLOBAL // // GLOBAL //
//////////// ////////////
// Hierachical timer // Hierarchical timer
H_AUTO_DECL ( RZ_Client_Update_Demo ) H_AUTO_DECL ( RZ_Client_Update_Demo )
/////////////// ///////////////

View file

@ -61,7 +61,7 @@ extern NL3D::UScene * Scene;
// GLOBAL // // GLOBAL //
//////////// ////////////
// Hierachical timer // Hierarchical timer
H_AUTO_DECL ( RZ_Client_Entity_Animation_Mngr ) H_AUTO_DECL ( RZ_Client_Entity_Animation_Mngr )
//////////////////// ////////////////////

View file

@ -3231,11 +3231,11 @@ void CEntityCL::updateCastShadowMap()
void CEntityCL::updateShadowMapProperties() void CEntityCL::updateShadowMapProperties()
{ {
/* /*
Choose the z clamp direction wether or not the player is on "interior" stuff. Choose the z clamp direction whether or not the player is on "interior" stuff.
In "interior" stuff, the ZClamp direction is lesser, to avoid some problems of In "interior" stuff, the ZClamp direction is lesser, to avoid some problems of
"cast shadow behind the walls" "cast shadow behind the walls"
Also choose the MaxDepth of shadow map wether or not the player is on "interior" stuff. Also choose the MaxDepth of shadow map whether or not the player is on "interior" stuff.
In "interior" stuff, the MaxDepth is lesser to, to avoid some problems with the "bud": In "interior" stuff, the MaxDepth is lesser to, to avoid some problems with the "bud":
when the player go up stairs and when in the "bud", the shadow still appears on landscape when the player go up stairs and when in the "bud", the shadow still appears on landscape
*/ */

View file

@ -359,7 +359,7 @@ NLMISC_VARIABLE( float, ForageSourceUP3, "" );
*/ */
void CForageSourceCL::updateVisualPropertyBars(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop) void CForageSourceCL::updateVisualPropertyBars(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
{ {
// NB: forage don't use CBarManager for 2 reasons: unusefull (forage bars exist only through VP), // NB: forage don't use CBarManager for 2 reasons: useless (forage bars exist only through VP),
// and complicated since updated at each frame on client (because of smooth transition code below) // and complicated since updated at each frame on client (because of smooth transition code below)
bool setBarsNow = (_BarDestValues[0] == BarNotInit); bool setBarsNow = (_BarDestValues[0] == BarNotInit);

View file

@ -521,7 +521,7 @@ public:
static CGatewayFEClientTransport *getCurrentTransport() static CGatewayFEClientTransport *getCurrentTransport()
{ {
#if defined(RZ_CLIENT_DRONE) #if defined(RZ_CLIENT_DRONE)
// the current transport is set the the current context of the client drone // the current transport is set to the current context of the client drone
if (CSimulatedClient::currentContext() == NULL) if (CSimulatedClient::currentContext() == NULL)
return NULL; return NULL;
if (CSimulatedClient::currentContext()->getGatewayTransport() == NULL) if (CSimulatedClient::currentContext()->getGatewayTransport() == NULL)

View file

@ -50,7 +50,7 @@ public:
*/ */
sint getHairItemId(EGSPD::CPeople::TPeople people, uint index) const; sint getHairItemId(EGSPD::CPeople::TPeople people, uint index) const;
// Tells wether this id in the sheet manager is the id of a hair item // Tells whether this id in the sheet manager is the id of a hair item
bool isHairItemId(uint id) const; bool isHairItemId(uint id) const;
// Gives the people for this hair id in the sheet manager, or unknown if not found // Gives the people for this hair id in the sheet manager, or unknown if not found

View file

@ -281,7 +281,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
// if an active window is not in KeepMode, get it. // if an active window is not in KeepMode, get it.
for(i=0;i<_ActiveWindows.size();i++) for(i=0;i<_ActiveWindows.size();i++)
{ {
// must also test forceKeep for special Action Help wich open Brick Help // must also test forceKeep for special Action Help which open Brick Help
if(!_InfoWindows[_ActiveWindows[i]].KeepMode && forceKeepWindow!=(sint)_ActiveWindows[i]) if(!_InfoWindows[_ActiveWindows[i]].KeepMode && forceKeepWindow!=(sint)_ActiveWindows[i])
{ {
newIndexWindow= _ActiveWindows[i]; newIndexWindow= _ActiveWindows[i];
@ -2056,7 +2056,7 @@ void getItemText (CDBCtrlSheet *item, ucstring &itemText, const CItemSheet*pIS)
// *************************************************************************** // ***************************************************************************
static void setupEnchantedItem(CSheetHelpSetup &setup, ucstring &itemText) static void setupEnchantedItem(CSheetHelpSetup &setup, ucstring &itemText)
{ {
// if don't find the tag in the text (eg: if not usefull), no-op // if don't find the tag in the text (eg: if not useful), no-op
static const ucstring enchantTag("%enchantment"); static const ucstring enchantTag("%enchantment");
if( itemText.find(enchantTag) == ucstring::npos ) if( itemText.find(enchantTag) == ucstring::npos )
return; return;
@ -2147,7 +2147,7 @@ static void setupRawMaterialStats(CSheetHelpSetup &setup)
} }
// force reset, but try to keep the precedent selection // force reset, but try to keep the precedent selection
// (usefull to test same item-part from different MPs) // (useful to test same item-part from different MPs)
sint32 precSel= pCB->getSelection(); sint32 precSel= pCB->getSelection();
pCB->setSelection(1); pCB->setSelection(1);
pCB->setSelection(0); pCB->setSelection(0);
@ -3126,7 +3126,7 @@ void setupSabrinaPhraseHelp(CSheetHelpSetup &setup, const CSPhraseCom &phrase, u
// get the phraseText // get the phraseText
ucstring phraseText; ucstring phraseText;
// if required, add the .sphrase requirements. // if required, add the .sphrase requirements.
// NB: don't add if from bot chat validation (unsusefull cause already filtered by server) // NB: don't add if from bot chat validation (useless cause already filtered by server)
pPM->buildPhraseDesc(phraseText, phrase, phraseSheetId, !setup.FromBotChat); pPM->buildPhraseDesc(phraseText, phrase, phraseSheetId, !setup.FromBotChat);

View file

@ -30,7 +30,7 @@ class CSheetHelpSetup
public: public:
CInterfaceGroup *HelpWindow; CInterfaceGroup *HelpWindow;
CDBCtrlSheet *SrcSheet; // the sheet for which info should be displayed (outside of the help window) CDBCtrlSheet *SrcSheet; // the sheet for which info should be displayed (outside of the help window)
CDBCtrlSheet *DestSheet; // copy of the the sheet for which info are asked (this sheet is in the help window, the source sheet is copied in it) CDBCtrlSheet *DestSheet; // copy of the sheet for which info are asked (this sheet is in the help window, the source sheet is copied in it)
std::string ViewText; // id of the text inside the help window that receive infos about the sheet std::string ViewText; // id of the text inside the help window that receive infos about the sheet
std::string ViewTextID; // id of the text_id inside the help window that receive infos about the sheet (for dynamic infos -> missions) std::string ViewTextID; // id of the text_id inside the help window that receive infos about the sheet (for dynamic infos -> missions)
std::string ScrollTextGroup; // name of the group that contains the description text std::string ScrollTextGroup; // name of the group that contains the description text

View file

@ -689,7 +689,7 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
} }
} }
// Filter the selection wether it is an itemPart or specificItem reqiurement // Filter the selection whether it is an itemPart or specificItem reqiurement
if(mpBuild.RequirementType==CMPBuild::ItemPartReq) if(mpBuild.RequirementType==CMPBuild::ItemPartReq)
{ {
CItemSheet *itemBuilt= dynamic_cast<CItemSheet*>(SheetMngr.get(_ExecuteFromItemPlanBrick->FaberPlan.ItemBuilt)); CItemSheet *itemBuilt= dynamic_cast<CItemSheet*>(SheetMngr.get(_ExecuteFromItemPlanBrick->FaberPlan.ItemBuilt));

View file

@ -48,7 +48,7 @@ public:
void setMissionClientType(MISSION_DESC::TClientMissionType mType) {_MType= mType;} void setMissionClientType(MISSION_DESC::TClientMissionType mType) {_MType= mType;}
private: private:
// an observer to update big mission list from littles pages in serveur database // an observer to update big mission list from littles pages in server database
CHugeListObs _MissionPagesObs; CHugeListObs _MissionPagesObs;
CDBCtrlSheet *_CurrSel; CDBCtrlSheet *_CurrSel;
MISSION_DESC::TClientMissionType _MType; MISSION_DESC::TClientMissionType _MType;

View file

@ -69,7 +69,7 @@ public:
bool isListeningPeopleList(CPeopleList *pl) const; bool isListeningPeopleList(CPeopleList *pl) const;
//@} //@}
// For ChatGroup, usefull to know for wich chat it is destinated // For ChatGroup, useful to know for which chat it is destinated
CChatGroup::TGroupType FilterType; CChatGroup::TGroupType FilterType;
// If FilterType==CChatGroup::dyn_chat, gives the index of dynchat // If FilterType==CChatGroup::dyn_chat, gives the index of dynchat
uint32 DynamicChatDbIndex; uint32 DynamicChatDbIndex;

View file

@ -51,7 +51,7 @@ public:
sint32 moveTrackY (sint32 dy); sint32 moveTrackY (sint32 dy);
/** Move the Target Ofs with a Delta, and recompute TrackPos from this Ofs. /** Move the Target Ofs with a Delta, and recompute TrackPos from this Ofs.
* Usefull for finer controled group scrolling when the list is very big (with mouseWheel or scroll buttons) * Useful for finer controled group scrolling when the list is very big (with mouseWheel or scroll buttons)
*/ */
void moveTargetX (sint32 dx); void moveTargetX (sint32 dx);
void moveTargetY (sint32 dy); void moveTargetY (sint32 dy);

View file

@ -667,7 +667,7 @@ protected:
uint32 _PackedArmourColor; uint32 _PackedArmourColor;
// For an Item only. Usefull for LeftHand Filtering: must have a pointer to the right hand // For an Item only. Useful for LeftHand Filtering: must have a pointer to the right hand
CDBCtrlSheet *_OtherHandItemFilter; CDBCtrlSheet *_OtherHandItemFilter;
// This String is optional and usage dependent for Item, Macro, or Sentence // This String is optional and usage dependent for Item, Macro, or Sentence

View file

@ -74,7 +74,7 @@ public:
virtual void sort() { } virtual void sort() { }
void needToSort() { _NeedToSort = true; invalidateCoords(); } void needToSort() { _NeedToSort = true; invalidateCoords(); }
/** (usefull for list only) Force the validity of an element, even if its sheetId==0 /** (useful for list only) Force the validity of an element, even if its sheetId==0
* (empty slot displayed instead) * (empty slot displayed instead)
* NB: invalidateCoords() called if state is changed * NB: invalidateCoords() called if state is changed
*/ */

View file

@ -585,7 +585,7 @@ protected:
IActionHandler *_AHOnBeginMove; IActionHandler *_AHOnBeginMove;
CStringShared _AHOnBeginMoveParams; CStringShared _AHOnBeginMoveParams;
// action handler to test wether the windows can be deactivated (when the close button is pressed) // action handler to test whether the windows can be deactivated (when the close button is pressed)
IActionHandler *_AHOnDeactiveCheck; IActionHandler *_AHOnDeactiveCheck;
CStringShared _AHOnDeactiveCheckParams; CStringShared _AHOnDeactiveCheckParams;

View file

@ -367,7 +367,8 @@ void dolibcurltest()
addImageDownload("http://www.ryzom.com/fr/"); addImageDownload("http://www.ryzom.com/fr/");
addImageDownload("http://www.ryzom.com/de/"); addImageDownload("http://www.ryzom.com/de/");
do { do
{
checkImageDownload(); checkImageDownload();
nlwarning("continue to sleep"); nlwarning("continue to sleep");
nlSleep(300); nlSleep(300);

View file

@ -50,7 +50,7 @@ public:
// Position of the group in world space // Position of the group in world space
NLMISC::CVector Position; NLMISC::CVector Position;
// usefull only if getUserScale()==true // useful only if getUserScale()==true
float Scale; float Scale;
void setUserScale(bool us); void setUserScale(bool us);

View file

@ -863,7 +863,7 @@ void CGroupInSceneBubbleManager::dynChatOpen (uint32 nBotUID, uint32 nBotName, c
nlassert( (DynStrs.size() >= 1) && (DynStrs.size() <= 9)); nlassert( (DynStrs.size() >= 1) && (DynStrs.size() <= 9));
CInterfaceManager *pIM = CInterfaceManager::getInstance(); CInterfaceManager *pIM = CInterfaceManager::getInstance();
// If the character doesn't exists in view field -> do not display the bubble // If the character doesn't exist in view field -> do not display the bubble
CEntityCL *pEntity = EntitiesMngr.getEntityByCompressedIndex(nBotUID); CEntityCL *pEntity = EntitiesMngr.getEntityByCompressedIndex(nBotUID);
if (ClientCfg.Local) pEntity = EntitiesMngr.entity(1); if (ClientCfg.Local) pEntity = EntitiesMngr.entity(1);

View file

@ -999,7 +999,7 @@ void CGroupInSceneUserInfo::updateDynamicData ()
// or directly from the forage source // or directly from the forage source
else else
{ {
// NB: forage don't use CBarManager for 2 reasons: unusefull (forage bars exist only through VP), // NB: forage don't use CBarManager for 2 reasons: useless (forage bars exist only through VP),
// and complicated since updated at each frame on client (because of smooth transition code) // and complicated since updated at each frame on client (because of smooth transition code)
CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(_Entity); CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(_Entity);
barInfo.Score[SCORES::hit_points]= forageSource->getTimeBar(); // Map TimeBar to HP barInfo.Score[SCORES::hit_points]= forageSource->getTimeBar(); // Map TimeBar to HP

View file

@ -907,7 +907,7 @@ class CAHGuildSheetMenuOpen : public IActionHandler
return; return;
} }
// *** Check with the grade of the local player wich types of actions we can do on the player selected // *** Check with the grade of the local player which types of actions we can do on the player selected
// enable or disable menu entries // enable or disable menu entries
if (pGM->isProxy()) if (pGM->isProxy())

View file

@ -49,7 +49,7 @@ using namespace NLMISC;
extern CActionsManager Actions; extern CActionsManager Actions;
extern CActionsManager EditActions; extern CActionsManager EditActions;
// Hierachical timer // Hierarchical timer
H_AUTO_DECL ( RZ_Client_Pump_Events ) H_AUTO_DECL ( RZ_Client_Pump_Events )
CInputHandlerManager* CInputHandlerManager::_Instance = NULL; CInputHandlerManager* CInputHandlerManager::_Instance = NULL;

View file

@ -469,7 +469,7 @@ public:
/** This is called before the config loading begins. This is the place to restore default state for config info. /** This is called before the config loading begins. This is the place to restore default state for config info.
*/ */
virtual void onLoadConfig() {} virtual void onLoadConfig() {}
/** Tells wether that element wants to save info in a config stream. If this returns true, then serialConfig /** Tells whether that element wants to save info in a config stream. If this returns true, then serialConfig
* is called. * is called.
*/ */
virtual bool wantSerialConfig() const { return false; } virtual bool wantSerialConfig() const { return false; }

View file

@ -444,7 +444,7 @@ public:
/** /**
* add an observer to a database entry * add an observer to a database entry
* \param observer : pointer on the observer * \param observer : pointer on the observer
* \param id : the thext id of the element to observe * \param id : the text id of the element to observe
* \return true if success * \return true if success
*/ */
bool addDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id); bool addDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id);
@ -452,7 +452,7 @@ public:
/** /**
* add an observer to a database entry * add an observer to a database entry
* \param observer : pointer on the observer * \param observer : pointer on the observer
* \param id : the thext id of the element to observe * \param id : the text id of the element to observe
* \return true if success * \return true if success
*/ */
bool addDBObserver (ICDBNode::IPropertyObserver* observer, const std::string& id) bool addDBObserver (ICDBNode::IPropertyObserver* observer, const std::string& id)

View file

@ -2678,7 +2678,7 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr)
case CInterfaceExprValue::String: case CInterfaceExprValue::String:
{ {
ucstring ucstr= value.getUCString(); ucstring ucstr= value.getUCString();
// Yoyo: dynamically decide wether must return a string or a ucstring // Yoyo: dynamically decide whether must return a string or a ucstring
bool mustUseUCString= false; bool mustUseUCString= false;
for (uint i = 0; i < ucstr.size (); i++) for (uint i = 0; i < ucstr.size (); i++)
{ {

View file

@ -217,7 +217,8 @@ void CMacroCmdManager::initInGame()
for (nOpt = 0; nOpt < 3; nOpt++) for (nOpt = 0; nOpt < 3; nOpt++)
{ {
i = 0; i = 0;
do { do
{
sTmp = pIO->getValStr(prefix[nOpt]+NLMISC::toString(i)); sTmp = pIO->getValStr(prefix[nOpt]+NLMISC::toString(i));
if (!sTmp.empty()) if (!sTmp.empty())
{ {
@ -225,7 +226,8 @@ void CMacroCmdManager::initInGame()
wheretostock[nOpt]->push_back(nTexId); wheretostock[nOpt]->push_back(nTexId);
} }
++i; ++i;
} while (!sTmp.empty()); }
while (!sTmp.empty());
} }
} }

View file

@ -104,7 +104,7 @@ public:
// Clean local db if botchat que the botchat session id // Clean local db if botchat que the botchat session id
void start(); void start();
// Check wether download has finished // Check whether download has finished
bool isDownloadComplete() const { return _DownloadComplete; } bool isDownloadComplete() const { return _DownloadComplete; }
uint16 getSessionID () { nlassert((uint) _Category < ListTypeCount); return _CurrentSessionNb; } uint16 getSessionID () { nlassert((uint) _Category < ListTypeCount); return _CurrentSessionNb; }

View file

@ -41,7 +41,7 @@ bool CSkillValue::andWith(const CSkillValue &sv)
// else if the skills are one same branch // else if the skills are one same branch
else if(pSM->areSkillOnSameBranch(Skill, sv.Skill)) else if(pSM->areSkillOnSameBranch(Skill, sv.Skill))
{ {
// The skillvalue are compatible if the the ancestor skill has a lesser value than the son // The skillvalue are compatible if the ancestor skill has a lesser value than the son
if(pSM->isSkillAncestor(Skill, sv.Skill)) if(pSM->isSkillAncestor(Skill, sv.Skill))
{ {
if(Value<=sv.Value) if(Value<=sv.Value)
@ -80,7 +80,7 @@ bool CSkillValue::orWith(const CSkillValue &sv)
// else if the skills are one same branch // else if the skills are one same branch
else if(pSM->areSkillOnSameBranch(Skill, sv.Skill)) else if(pSM->areSkillOnSameBranch(Skill, sv.Skill))
{ {
// The skillvalue are compatible if the the ancestor skill has a lesser value than the son // The skillvalue are compatible if the ancestor skill has a lesser value than the son
if(pSM->isSkillAncestor(Skill, sv.Skill)) if(pSM->isSkillAncestor(Skill, sv.Skill))
{ {
if(Value<=sv.Value) if(Value<=sv.Value)

View file

@ -1723,7 +1723,7 @@ sint CSPhraseManager::getPhraseSuccessRate(TSuccessTable st, const CSPhraseCom &
CSBrickSheet *rootBrick= pBM->getBrick(phrase.Bricks[0]); CSBrickSheet *rootBrick= pBM->getBrick(phrase.Bricks[0]);
if(rootBrick && rootBrick->isCombat()) if(rootBrick && rootBrick->isCombat())
{ {
// this to avoid problem with the default attack wich has a 0 cost... // this to avoid problem with the default attack which has a 0 cost...
costSum= max(costSum, getRightHandEffectiveLevel()); costSum= max(costSum, getRightHandEffectiveLevel());
} }

View file

@ -3636,7 +3636,8 @@ void CInstallThread::run()
pPM->renameFile(patchName, sourceName); pPM->renameFile(patchName, sourceName);
pPM->applyDate(sourceName, lastFileDate); pPM->applyDate(sourceName, lastFileDate);
} }
} catch ( const std::exception& e) }
catch ( const std::exception& e)
{ {
nlwarning("%s", e.what()); nlwarning("%s", e.what());
pPM->setState(true, ucstring(e.what()) ); pPM->setState(true, ucstring(e.what()) );
@ -3668,27 +3669,31 @@ void CInstallThread::run()
NLMISC::CFile::deleteFile(vFiles[i]); NLMISC::CFile::deleteFile(vFiles[i]);
} }
// Delete all directory from tmp directory // Delete all directory from tmp directory
do { do
{
vFiles.clear(); vFiles.clear();
CPath::getPathContent(install, true, true, false, vFiles); CPath::getPathContent(install, true, true, false, vFiles);
for (uint32 i = 0; i < vFiles.size(); ++i) for (uint32 i = 0; i < vFiles.size(); ++i)
{ {
NLMISC::CFile::deleteDirectory(vFiles[i]); NLMISC::CFile::deleteDirectory(vFiles[i]);
} }
} while ( !vFiles.empty() ); }
while ( !vFiles.empty() );
// delete tmp directory // delete tmp directory
NLMISC::CFile::deleteDirectory(install); NLMISC::CFile::deleteDirectory(install);
// delete libtorrent_logs directory if exist (not activate) // delete libtorrent_logs directory if exist (not activate)
if (NLMISC::CFile::fileExists("libtorrent_logs")) if (NLMISC::CFile::fileExists("libtorrent_logs"))
{ {
do { do
{
vFiles.clear(); vFiles.clear();
CPath::getPathContent("libtorrent_logs", true, true, false, vFiles); CPath::getPathContent("libtorrent_logs", true, true, false, vFiles);
for (uint32 i = 0; i < vFiles.size(); ++i) for (uint32 i = 0; i < vFiles.size(); ++i)
{ {
NLMISC::CFile::deleteDirectory(vFiles[i]); NLMISC::CFile::deleteDirectory(vFiles[i]);
} }
} while ( !vFiles.empty() ); }
while ( !vFiles.empty() );
NLMISC::CFile::deleteDirectory("libtorrent_logs"); NLMISC::CFile::deleteDirectory("libtorrent_logs");
} }

Some files were not shown because too many files have changed in this diff Show more