Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2011-03-09 14:30:51 +01:00
parent eee29b5b23
commit d0f38dfc6e
18 changed files with 50 additions and 35 deletions

View file

@ -183,7 +183,7 @@ private:
); );
/** Compute the ribbon points using hermitte splines between each sampling point, /** Compute the ribbon points using hermitte splines between each sampling point,
* and make a rough approximation to get a constant lenght * and make a rough approximation to get a constant length
*/ */
void computeHermitteCstSizeRibbon( uint index, void computeHermitteCstSizeRibbon( uint index,
NLMISC::CVector *dest, NLMISC::CVector *dest,

View file

@ -49,7 +49,7 @@ public:
/** /**
* Set the blend shape factor for this instance * Set the blend shape factor for this instance
* blenShapeName is the name of the blendshape we want to set * blendShapeName is the name of the blendshape we want to set
* factor the blendshape percentage from -100.0 to 100.0 * factor the blendshape percentage from -100.0 to 100.0
* dynamic tells the optimizer if the blendshape have to change in real time * dynamic tells the optimizer if the blendshape have to change in real time
*/ */

View file

@ -55,7 +55,7 @@ public:
NLMISC::TStringId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:0;} NLMISC::TStringId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:0;}
const std::vector<NLMISC::TStringId> &getSounds() const { return _Sounds;} const std::vector<NLMISC::TStringId> &getSounds() const { return _Sounds;}
uint32 getFadeLenght() const { return _XFadeLenght;} uint32 getFadeLength() const { return _XFadeLength;}
/** Constructor */ /** Constructor */
CComplexSound(); CComplexSound();
@ -94,7 +94,7 @@ private:
std::vector<uint32> _DelaySeq; std::vector<uint32> _DelaySeq;
/// Duration of xfade in millisec. /// Duration of xfade in millisec.
uint32 _XFadeLenght; uint32 _XFadeLength;
/// Flag for fade in /// Flag for fade in
bool _DoFadeIn; bool _DoFadeIn;
/// Flag for fade out (only on normal termination, not explicit stop). /// Flag for fade out (only on normal termination, not explicit stop).

View file

@ -129,8 +129,8 @@ private:
*/ */
bool _Muted; bool _Muted;
// NLMISC::TTime _Lenght1; // NLMISC::TTime _Length1;
// NLMISC::TTime _Lenght2; // NLMISC::TTime _Length2;
NLMISC::TTime _StartTime1; NLMISC::TTime _StartTime1;
NLMISC::TTime _StartTime2; NLMISC::TTime _StartTime2;

View file

@ -298,7 +298,7 @@ private:
/// The base name, that is the constante part of the name (before the first joker). /// The base name, that is the constante part of the name (before the first joker).
std::string _BaseName; std::string _BaseName;
/// The random lenght (0 mean no random) /// The random length (0 mean no random)
uint32 _Random; uint32 _Random;

View file

@ -180,11 +180,11 @@ void CMeshBaseInstance::traverseHrc()
if (anim) if (anim)
{ {
// Animation offset are setuped before clipping, they will be used for detail too. // Animation offset are setuped before clipping, they will be used for detail too.
float animLenght = anim->getEndTime() - anim->getBeginTime(); float animLength = anim->getEndTime() - anim->getBeginTime();
if (animLenght > 0) if (animLength > 0)
{ {
float currTime = (TAnimationTime) getOwnerScene()->getCurrentTime(); float currTime = (TAnimationTime) getOwnerScene()->getCurrentTime();
float startTime = (uint) (currTime / animLenght) * animLenght; float startTime = (uint) (currTime / animLength) * animLength;
// Set the channel mixer date using the global date of the scene // Set the channel mixer date using the global date of the scene
chanMix->setSlotTime(0, anim->getBeginTime() + currTime - startTime); chanMix->setSlotTime(0, anim->getBeginTime() + currTime - startTime);
} }

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.
useless 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

@ -51,7 +51,7 @@ void CQuatPack::pack(const CQuat &quat)
- The same than above, but encode the axis as X/Y only, and deduce Z from - The same than above, but encode the axis as X/Y only, and deduce Z from
them, is possible but precision problems arise. them, is possible but precision problems arise.
You can see that the operation "deduce a 3/4 member from unit lenght rule" is definetly not precise. You can see that the operation "deduce a 3/4 member from unit length rule" is definetly not precise.
Hence this simpler but workable way. Hence this simpler but workable way.
*/ */

View file

@ -337,15 +337,15 @@ void CHTimer::display(CLog *log, TSortCriterion criterion, bool displayInline /*
rootStats.buildFromNode( &_RootNode, _MsPerTick); rootStats.buildFromNode( &_RootNode, _MsPerTick);
// 5 ) display statistics // 5 ) display statistics
uint maxNodeLenght = 0; uint maxNodeLength = 0;
std::string format; std::string format;
if (displayInline) if (displayInline)
{ {
for(TTimerStatPtrVect::iterator statIt = statsPtr.begin(); statIt != statsPtr.end(); ++statIt) for(TTimerStatPtrVect::iterator statIt = statsPtr.begin(); statIt != statsPtr.end(); ++statIt)
{ {
maxNodeLenght = std::max(maxNodeLenght, (uint)strlen((*statIt)->Timer->_Name)); maxNodeLength = std::max(maxNodeLength, (uint)strlen((*statIt)->Timer->_Name));
} }
format = "HTIMER: %-" + NLMISC::toString(maxNodeLenght + 1) + "s %s"; format = "HTIMER: %-" + NLMISC::toString(maxNodeLength + 1) + "s %s";
} }
std::string statsInline; std::string statsInline;

View file

@ -108,13 +108,13 @@ uint32 CComplexSound::getDuration()
if (first != _SoundSeq.begin() && !durations.empty()) if (first != _SoundSeq.begin() && !durations.empty())
{ {
// remove a xfade value // remove a xfade value
_Duration -= minof<uint32>(uint32(_XFadeLenght / _TicksPerSeconds), durations[*first % durations.size()] / 2, durations[*prev % durations.size()] /2); _Duration -= minof<uint32>(uint32(_XFadeLength / _TicksPerSeconds), durations[*first % durations.size()] / 2, durations[*prev % durations.size()] /2);
} }
if (!durations.empty()) if (!durations.empty())
_Duration += durations[*first % durations.size()]; _Duration += durations[*first % durations.size()];
prev = first; prev = first;
} }
// _Duration -= max(sint(0), sint(_XFadeLenght * (_SoundSeq.size()-2) )); // _Duration -= max(sint(0), sint(_XFadeLength * (_SoundSeq.size()-2) ));
} }
break; break;
case MODE_SPARSE: case MODE_SPARSE:
@ -140,7 +140,7 @@ uint32 CComplexSound::getDuration()
++first; ++first;
for (; first != last; ++first) for (; first != last; ++first)
{ {
// add the sound lenght // add the sound length
_Duration += durations[soundIndex++ % durations.size()]; _Duration += durations[soundIndex++ % durations.size()];
// add the delay // add the delay
_Duration += uint32(*first / _TicksPerSeconds); _Duration += uint32(*first / _TicksPerSeconds);
@ -170,7 +170,7 @@ uint32 CComplexSound::getDuration()
CComplexSound::CComplexSound() : CComplexSound::CComplexSound() :
_PatternMode(CComplexSound::MODE_UNDEFINED), _PatternMode(CComplexSound::MODE_UNDEFINED),
_TicksPerSeconds(1.0f), _TicksPerSeconds(1.0f),
_XFadeLenght(3000), // default to 3000 sec. _XFadeLength(3000), // default to 3000 sec.
_MaxDistValid(false), _MaxDistValid(false),
_Duration(0), _Duration(0),
_DurationValid(false) _DurationValid(false)
@ -252,7 +252,7 @@ void CComplexSound::serial(NLMISC::IStream &s)
s.serial(_TicksPerSeconds); s.serial(_TicksPerSeconds);
s.serialCont(_SoundSeq); s.serialCont(_SoundSeq);
s.serialCont(_DelaySeq); s.serialCont(_DelaySeq);
s.serial(_XFadeLenght); s.serial(_XFadeLength);
s.serial(_DoFadeIn); s.serial(_DoFadeIn);
s.serial(_DoFadeOut); s.serial(_DoFadeOut);
@ -313,14 +313,14 @@ void CComplexSound::importForm(const std::string& filename, NLGEORGES::UFormElm&
if (mode == "Chained" || mode == "Sparse") if (mode == "Chained" || mode == "Sparse")
{ {
// XFade lenght // XFade length
formRoot.getValueByName(_XFadeLenght, ".SoundType.XFadeLenght"); formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLength");
// Fade in/out flag. // Fade in/out flag.
formRoot.getValueByName(_DoFadeIn, ".SoundType.DoFadeIn"); formRoot.getValueByName(_DoFadeIn, ".SoundType.DoFadeIn");
formRoot.getValueByName(_DoFadeOut, ".SoundType.DoFadeOut"); formRoot.getValueByName(_DoFadeOut, ".SoundType.DoFadeOut");
// convert xfade to millisec. // convert xfade to millisec.
_XFadeLenght *= 1000; _XFadeLength *= 1000;
_PatternMode = MODE_CHAINED; _PatternMode = MODE_CHAINED;
// just read the sequence // just read the sequence
_SoundSeq.clear(); _SoundSeq.clear();

View file

@ -113,7 +113,7 @@ void CComplexSource::playStuf()
return; return;
if (_PatternSound->doFadeIn()) if (_PatternSound->doFadeIn())
_FadeLength = min(uint32(_PatternSound->getFadeLenght()/_TickPerSecond), sound->getDuration() /2); _FadeLength = min(uint32(_PatternSound->getFadeLength()/_TickPerSecond), sound->getDuration() /2);
else else
_FadeLength = 0; _FadeLength = 0;
@ -510,8 +510,8 @@ void CComplexSource::onUpdate()
//nldebug("CS : Chaining to sound %s", CStringMapper::unmap(sound2->getName()).c_str()); //nldebug("CS : Chaining to sound %s", CStringMapper::unmap(sound2->getName()).c_str());
CAudioMixerUser *mixer = CAudioMixerUser::instance(); CAudioMixerUser *mixer = CAudioMixerUser::instance();
// determine the XFade lenght (if next sound is too short. // determine the XFade length (if next sound is too short.
_FadeLength = minof<uint32>(uint32(_PatternSound->getFadeLenght()/_TickPerSecond), (sound2->getDuration()) / 2, (_Source1->getSound()->getDuration())/2); _FadeLength = minof<uint32>(uint32(_PatternSound->getFadeLength()/_TickPerSecond), (sound2->getDuration()) / 2, (_Source1->getSound()->getDuration())/2);
_Source2 = mixer->createSource(sound2, false, 0, 0, _Cluster); _Source2 = mixer->createSource(sound2, false, 0, 0, _Cluster);
if (_Source2) if (_Source2)
{ {
@ -528,7 +528,7 @@ void CComplexSource::onUpdate()
if (_PatternSound->doFadeOut()) if (_PatternSound->doFadeOut())
{ {
// set the event to begin fade out. // set the event to begin fade out.
mixer->addEvent(this, _StartTime1 + _Source1->getSound()->getDuration() - _PatternSound->getFadeLenght()); mixer->addEvent(this, _StartTime1 + _Source1->getSound()->getDuration() - _PatternSound->getFadeLength());
} }
else else
{ {

View file

@ -132,7 +132,7 @@ void CSimpleSource::play()
//|| (mixer->getListenPosVector() - _Position).sqrnorm() > _SimpleSound->getMaxDistance() * _SimpleSound->getMaxDistance()) //|| (mixer->getListenPosVector() - _Position).sqrnorm() > _SimpleSound->getMaxDistance() * _SimpleSound->getMaxDistance())
|| (_RelativeMode ? getPos().sqrnorm() : (mixer->getListenPosVector() - getPos()).sqrnorm()) > _SimpleSound->getMaxDistance() * _SimpleSound->getMaxDistance()) || (_RelativeMode ? getPos().sqrnorm() : (mixer->getListenPosVector() - getPos()).sqrnorm()) > _SimpleSound->getMaxDistance() * _SimpleSound->getMaxDistance())
{ {
// The sample buffer is not available, don't play (we don't know the lenght) // The sample buffer is not available, don't play (we don't know the length)
if (_Spawn) if (_Spawn)
{ {
if (_SpawnEndCb != 0) if (_SpawnEndCb != 0)

View file

@ -15,8 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
/* /*
$Id: thread_win32.h,v 1.1 2000/10/19 07:53:33 corvazier Exp $
------------------------------------------------------------------------ ------------------------------------------------------------------------
ClanLib, the platform independent game SDK. ClanLib, the platform independent game SDK.

View file

@ -59,7 +59,7 @@ afx_msg void CLAEdit::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags )
int start, end; int start, end;
GetSel( start, end ); GetSel( start, end );
str = str.Mid( start, end-start ); str = str.Mid( start, end-start );
int lineNum = atoi(str); int lineNum = atoi( str );
if ( ! ((lineNum != 0) || (str == "0")) ) if ( ! ((lineNum != 0) || (str == "0")) )
break; break;

View file

@ -1148,7 +1148,7 @@ void computeCurrentFovAspectRatio(float &fov, float &ar)
// get the screen aspect ratio from CFG // get the screen aspect ratio from CFG
ar = ClientCfg.ScreenAspectRatio; ar = ClientCfg.ScreenAspectRatio;
//nlinfo("AR: clientcfg ar %f", ar);
// if Driver is not created, we can't get current screen mode // if Driver is not created, we can't get current screen mode
if (!Driver) return; if (!Driver) return;
@ -1167,21 +1167,18 @@ void computeCurrentFovAspectRatio(float &fov, float &ar)
{ {
// auto mode, we are using window aspect ratio // auto mode, we are using window aspect ratio
ar = arWnd; ar = arWnd;
//nlinfo("AR: windowed auto => use window size %d %d => %f", wndW, wndH, arWnd);
} }
else if (mode.Width && mode.Height) else if (mode.Width && mode.Height)
{ {
// compute screen aspect ratio // compute screen aspect ratio
float arScreen= float(mode.Width) / float(mode.Height); float arScreen= float(mode.Width) / float(mode.Height);
ar *= arWnd / arScreen; ar *= arWnd / arScreen;
//nlinfo("AR: windowed not auto => monitor size %d %d window size %d %d => arsc %f arwnd %f, ar finale %f", mode.Width, mode.Height, wndW, wndH, arScreen, arWnd, ar);
} }
} }
} }
// if fullscreen, must modulate aspect ratio by ScreenResolution // if fullscreen, must modulate aspect ratio by ScreenResolution
else else
{ {
//nlinfo("AR: fullscreen ratio");
if (ar == 0.f) if (ar == 0.f)
{ {
UDriver::CMode mode; UDriver::CMode mode;

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it ! // WARNING : this is a generated file, don't change it !

View file

@ -16,6 +16,8 @@
#include "stdpch.h" #include "stdpch.h"
#include "player_manager/character.h" #include "player_manager/character.h"
#include "player_manager/player_manager.h"
#include "player_manager/player.h"
#include "guild_leader_module.h" #include "guild_leader_module.h"
#include "guild_member.h" #include "guild_member.h"
#include "guild.h" #include "guild.h"
@ -48,6 +50,7 @@ void CGuildLeaderModule::setLeader( uint16 index,uint8 session)
nlwarning("<GUILD>%s set invalid member idx %u as leader",proxy.getId().toString().c_str(),index ); nlwarning("<GUILD>%s set invalid member idx %u as leader",proxy.getId().toString().c_str(),index );
return; return;
} }
_GuildMemberCore->setMemberGrade(memberPD->getGrade()); _GuildMemberCore->setMemberGrade(memberPD->getGrade());
memberPD->setMemberGrade(EGSPD::CGuildGrade::Leader); memberPD->setMemberGrade(EGSPD::CGuildGrade::Leader);
@ -99,6 +102,7 @@ void CGuildLeaderModule::quitGuild()
// ignore current leader // ignore current leader
if ( member->getGrade() == EGSPD::CGuildGrade::Leader ) if ( member->getGrade() == EGSPD::CGuildGrade::Leader )
continue; continue;
// check if the current member is the successor // check if the current member is the successor
if ( successor == NULL || if ( successor == NULL ||
member->getGrade() < successor->getGrade() || member->getGrade() < successor->getGrade() ||

View file

@ -705,6 +705,7 @@ void CGuildManager::createGuild(CGuildCharProxy & proxy,const ucstring & guildNa
nlwarning("<GUILD>%s bot %s is not a guild creator",proxy.getId().toString().c_str(),bot->getId().toString().c_str()); nlwarning("<GUILD>%s bot %s is not a guild creator",proxy.getId().toString().c_str(),bot->getId().toString().c_str());
return; return;
} }
// player must not have a guild // player must not have a guild
CGuildMemberModule * module = NULL; CGuildMemberModule * module = NULL;
if ( proxy.getModule( module ) ) if ( proxy.getModule( module ) )