Changed: #825 remove some warning

This commit is contained in:
vl 2010-05-15 18:47:21 +02:00
parent 7af5325c5b
commit bec9f0f252
40 changed files with 167 additions and 131 deletions

View file

@ -113,8 +113,8 @@ bool operator == (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
case CAttackIDSheet::Magic: return lhs.SpellInfo == rhs.SpellInfo; case CAttackIDSheet::Magic: return lhs.SpellInfo == rhs.SpellInfo;
case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex == rhs.CreatureAttackIndex; case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex == rhs.CreatureAttackIndex;
case CAttackIDSheet::DamageShield: return lhs.DamageShieldType == rhs.DamageShieldType; case CAttackIDSheet::DamageShield: return lhs.DamageShieldType == rhs.DamageShieldType;
default: return false;
} }
return false;
} }
//***************************************************************************************** //*****************************************************************************************
@ -128,8 +128,8 @@ bool operator < (const CAttackIDSheet &lhs, const CAttackIDSheet &rhs)
case CAttackIDSheet::Magic: return lhs.SpellInfo < rhs.SpellInfo; case CAttackIDSheet::Magic: return lhs.SpellInfo < rhs.SpellInfo;
case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex < rhs.CreatureAttackIndex; case CAttackIDSheet::Creature: return lhs.CreatureAttackIndex < rhs.CreatureAttackIndex;
case CAttackIDSheet::DamageShield: return lhs.DamageShieldType < rhs.DamageShieldType; case CAttackIDSheet::DamageShield: return lhs.DamageShieldType < rhs.DamageShieldType;
default: return false;
} }
return false;
} }
//***************************************************************************************** //*****************************************************************************************

View file

@ -86,6 +86,6 @@ const char *CBodyToBoneSheet::getBoneName(BODY::TBodyPart part, BODY::TSide side
case BODY::HHands: return ClientSheetsStrings.get(side == BODY::Left ? LeftHand : RightHand); case BODY::HHands: return ClientSheetsStrings.get(side == BODY::Left ? LeftHand : RightHand);
case BODY::HLegs: return ClientSheetsStrings.get(side == BODY::Left ? LeftLeg : RightLeg); case BODY::HLegs: return ClientSheetsStrings.get(side == BODY::Left ? LeftLeg : RightLeg);
case BODY::HFeet: return ClientSheetsStrings.get(side == BODY::Left ? LeftFoot : RightFoot); case BODY::HFeet: return ClientSheetsStrings.get(side == BODY::Left ? LeftFoot : RightFoot);
default: return NULL;
} }
return NULL;
} }

View file

@ -742,8 +742,8 @@ SKILLS::ESkills CItemSheet::getRequiredSkill() const
return Tool.Skill; return Tool.Skill;
case ITEMFAMILY::CRAFTING_TOOL: case ITEMFAMILY::CRAFTING_TOOL:
return SKILLS::SC; return SKILLS::SC;
default: return SKILLS::unknown;
} }
return SKILLS::unknown;
} }
// *************************************************************************** // ***************************************************************************
@ -936,4 +936,3 @@ void CItemSheet::getItemPartListAsText(ucstring &ipList) const
ipList= CI18N::get("uihelpItemMPAllCraft"); ipList= CI18N::get("uihelpItemMPAllCraft");
} }
} }

View file

@ -452,6 +452,10 @@ bool connection (const string &cookie, const string &fsaddr)
} }
InterfaceState = globalMenu(); InterfaceState = globalMenu();
break; break;
case GOGOGO_IN_THE_GAME:
break;
case QUIT_THE_GAME:
break;
} }
} }
@ -3408,4 +3412,3 @@ class CAHOpenRingSessions : public IActionHandler
} }
}; };
REGISTER_ACTION_HANDLER (CAHOpenRingSessions, "open_ring_sessions"); REGISTER_ACTION_HANDLER (CAHOpenRingSessions, "open_ring_sessions");

View file

@ -22,6 +22,8 @@
///////////// /////////////
#include "stdpch.h" // First include for pre-compiled headers. #include "stdpch.h" // First include for pre-compiled headers.
#include <limits>
// OS. // OS.
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# include <windows.h> # include <windows.h>
@ -249,6 +251,7 @@ double memoryUsedSinceLastCall()
nlwarning("There are %*lx free %sbytes of virtual memory.\n", WIDTH, stat.dwAvailVirtual/DIV, divisor); nlwarning("There are %*lx free %sbytes of virtual memory.\n", WIDTH, stat.dwAvailVirtual/DIV, divisor);
*/ */
#endif #endif
return std::numeric_limits<double>::quiet_NaN();
} }
@ -690,4 +693,3 @@ bool verboseVPAdvanceTest(CEntityCL *en, uint32 form)

View file

@ -636,6 +636,9 @@ void CLoginStateMachine::run()
SM_EVENT(ev_quit, st_end); SM_EVENT(ev_quit, st_end);
SM_END_EVENT_TABLE SM_END_EVENT_TABLE
break; break;
default:
nlwarning("Unhandeled state");
break;
} }
} }
} }
@ -747,7 +750,9 @@ retryJoinEdit:
throw "Protocol error"; throw "Protocol error";
if (sb._LastJoinSessionResult == 16) if (sb._LastJoinSessionResult == 16)
{ {
#ifdef NL_OS_WINDOWS
#pragma message (NL_LOC_WRN "inform the player that he is banned from the ring") #pragma message (NL_LOC_WRN "inform the player that he is banned from the ring")
#endif // NL_OS_WINDOWS
throw "User ban from the ring"; throw "User ban from the ring";
} }
if (sb._LastJoinSessionResult != 0) if (sb._LastJoinSessionResult != 0)
@ -1449,4 +1454,3 @@ void CFarTP::farTPmainLoop()
} }

View file

@ -47,13 +47,14 @@ CRGBA CForageSourceCL::SafeSourceColor(64, 192, 255);
* Constructor * Constructor
*/ */
CForageSourceCL::CForageSourceCL() : CForageSourceCL::CForageSourceCL() :
CFxCL(), _IsExtractionInProgress( false ), CFxCL(),
_InSceneUserInterface( NULL ),
_IconFilename( NULL ),
_IsExtractionInProgress( false ),
_SafeSource( false ), _SafeSource( false ),
_KnowledgeLevel( 0 ), _KnowledgeLevel( 0 ),
_InSceneUserInterface( NULL ),
_LastExplosionSwitch( 0 ), _LastExplosionSwitch( 0 ),
_ProspectorSlot( 255 ), _ProspectorSlot( 255 ),
_IconFilename( NULL ),
_ExtraTime(0), _ExtraTime(0),
_InclBonusExtraTime(0), _InclBonusExtraTime(0),
_InitialQuantity(BarNotInit), _InitialQuantity(BarNotInit),

View file

@ -955,7 +955,7 @@ bool testMenuOptionForPackAnimal( CEntityCL* selectedAnimalInVision, uint index,
} }
// Don't enable anything if index not found (e.g. the character is not the owner of the animal) // Don't enable anything if index not found (e.g. the character is not the owner of the animal)
if ( (index == -1) || (!UserEntity) ) if ( (index == (uint)-1) || (!UserEntity) )
return false; return false;
// Get animal status and type // Get animal status and type
@ -1055,4 +1055,3 @@ bool testMenuOptionForPackAnimal( CEntityCL* selectedAnimalInVision, uint index,
return true; return true;
} }

View file

@ -93,8 +93,8 @@ public:
NLMISC::TTime quantum, NLMISC::TTime quantum,
float maxValue, uint page, float maxValue, uint page,
bool lineMode = false) bool lineMode = false)
: Name(name), X(x), Y(y), Width(width), Height(height), BackColor(backColor), Quantum(quantum), : Name(name), X(x), Y(y), Width(width), Height(height), BackColor(backColor), MaxValue(maxValue),
CurrentQuantumStart(ryzomGetLocalTime ()), MaxValue(maxValue), Peak(0.0f), LineMode(lineMode), PrevY(y), Page(page) Peak(0.0f), LineMode(lineMode), PrevY(y), Page(page), Quantum(quantum), CurrentQuantumStart(ryzomGetLocalTime ())
{ {
if (_Graphs == NULL) if (_Graphs == NULL)
{ {

View file

@ -60,17 +60,18 @@ static const float MAX_DIST_TO_REUSE_OLD_FX = 1.5f;
using namespace NLMISC; using namespace NLMISC;
//***************************************************************************** //*****************************************************************************
CGroundFXManager::CGroundFXManager() : _MaxDist(50.f), CGroundFXManager::CGroundFXManager() :
_MinSpeed(1.5f),
_MaxSpeed(6.f),
_SpeedWaterWalkFast(3.f),
_SpeedWaterSwimFast(3.f),
_MaxDist(50.f),
_MaxNumFX(10), _MaxNumFX(10),
_NumFX(0), _NumFX(0),
_MaxNumCachedFX(10), _MaxNumCachedFX(10),
_NumCachedFX(0), _NumCachedFX(0),
_NumInstances(0), _NumInstances(0),
_Scene(NULL), _Scene(NULL)
_MinSpeed(1.5f),
_MaxSpeed(6.f),
_SpeedWaterWalkFast(3.f),
_SpeedWaterSwimFast(3.f)
{ {
H_AUTO_USE(RZ_GroundFXManager) H_AUTO_USE(RZ_GroundFXManager)
// Construct // Construct

View file

@ -116,8 +116,8 @@ CHairSet::EPeople CHairSet::convPeople(EGSPD::CPeople::TPeople people)
case EGSPD::CPeople::Matis: return Matis; case EGSPD::CPeople::Matis: return Matis;
case EGSPD::CPeople::Tryker: return Tryker; case EGSPD::CPeople::Tryker: return Tryker;
case EGSPD::CPeople::Zorai: return Zorai; case EGSPD::CPeople::Zorai: return Zorai;
default: return DontKnow;
} }
return DontKnow;
} }
//========================================================================= //=========================================================================
@ -158,4 +158,3 @@ EGSPD::CPeople::TPeople CHairSet::getPeopleFromHairItemID(uint id) const
return EGSPD::CPeople::EndPeople; return EGSPD::CPeople::EndPeople;
} }

View file

@ -452,7 +452,7 @@ private:
class CDBForageQQObs : public ICDBNode::IPropertyObserver class CDBForageQQObs : public ICDBNode::IPropertyObserver
{ {
public: public:
CDBForageQQObs() : WhichOne(~0), FullValue(0.0f), ICDBNode::IPropertyObserver() {} CDBForageQQObs() : ICDBNode::IPropertyObserver(), WhichOne(~0), FullValue(0.0f) {}
virtual void update(ICDBNode *node); virtual void update(ICDBNode *node);
uint WhichOne; uint WhichOne;
float FullValue; float FullValue;
@ -794,4 +794,3 @@ public:
#endif // RY_INVENTORY_MANAGER_H #endif // RY_INVENTORY_MANAGER_H
/* End of inventory_manager.h */ /* End of inventory_manager.h */

View file

@ -158,11 +158,11 @@ private:
SlotType(NULL), SlotType(NULL),
Quality(NULL), Quality(NULL),
SheetIDOrSkill(NULL), SheetIDOrSkill(NULL),
Price(NULL),
LogicTextID(NULL), LogicTextID(NULL),
DescTextID(NULL), DescTextID(NULL),
MissionDetailText(NULL), Price(NULL),
MissionText(NULL), MissionText(NULL),
MissionDetailText(NULL),
MissionIcon(NULL), MissionIcon(NULL),
MissionPreReqState(NULL), MissionPreReqState(NULL),
Weight(NULL), Weight(NULL),

View file

@ -136,7 +136,7 @@ public:
private: private:
struct CPeople struct CPeople
{ {
CPeople() : Online(ccs_offline), Blocked(false), Container(NULL), Chat(NULL), ContactId(0) {} CPeople() : Container(NULL), Chat(NULL), Online(ccs_offline), Blocked(false), ContactId(0) {}
NLMISC::CRefPtr<CGroupContainer> Container; // todo : replace this with a CChatWindow one day, for consistency NLMISC::CRefPtr<CGroupContainer> Container; // todo : replace this with a CChatWindow one day, for consistency
NLMISC::CRefPtr<CGroupContainer> Chat; NLMISC::CRefPtr<CGroupContainer> Chat;
uint GlobalID; uint GlobalID;

View file

@ -55,7 +55,7 @@ struct _HText
// Here, modify the DTD table to change the HTML parser (add new tags for examples) // Here, modify the DTD table to change the HTML parser (add new tags for examples)
#undef HTML_ATTR #undef HTML_ATTR
#define HTML_ATTR(a,b) { #b } #define HTML_ATTR(a,b) { (char*) #b }
HTAttr a_attr[] = HTAttr a_attr[] =
{ {
@ -551,7 +551,7 @@ void initLibWWW()
// HTCacheInit(NULL, 20); // HTCacheInit(NULL, 20);
/* Setup up transfer coders */ /* Setup up transfer coders */
HTFormat_addTransferCoding("chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0); HTFormat_addTransferCoding((char*)"chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0);
/* Setup MIME stream converters */ /* Setup MIME stream converters */
HTFormat_addConversion("message/rfc822", "*/*", HTMIMEConvert, 1.0, 0.0, 0.0); HTFormat_addConversion("message/rfc822", "*/*", HTMIMEConvert, 1.0, 0.0, 0.0);
@ -630,8 +630,8 @@ void initLibWWW()
{"authentication-info", &HTMIME_authenticationInfo}, {"authentication-info", &HTMIME_authenticationInfo},
{"proxy-authentication-info", &HTMIME_proxyAuthenticationInfo} {"proxy-authentication-info", &HTMIME_proxyAuthenticationInfo}
}; };
int i;
for (i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++) for (uint i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++)
HTHeader_addParser(fixedHandlers[i].string, NO, fixedHandlers[i].pHandler); HTHeader_addParser(fixedHandlers[i].string, NO, fixedHandlers[i].pHandler);
/* Set up default event loop */ /* Set up default event loop */
@ -689,4 +689,3 @@ void initLibWWW()
} }
// *************************************************************************** // ***************************************************************************

View file

@ -96,12 +96,13 @@ float CLightCycleDesc::getDawnTransitionLength() const
} }
//----------------------------------------------- //-----------------------------------------------
CLightCycleManager::CLightCycleManager() : _Touched(true), CLightCycleManager::CLightCycleManager() :
_Hour(0),
_Touched(true),
_ValidDesc(false), _ValidDesc(false),
_LightLevel(0), _LightLevel(0),
_WeatherLighting(0), _WeatherLighting(0),
_LastWeatherLighting(0), _LastWeatherLighting(0),
_Hour(0),
_UpdateFreq(0), _UpdateFreq(0),
_State(StateUnknown), _State(StateUnknown),
_PrevState(StateUnknown) _PrevState(StateUnknown)

View file

@ -64,7 +64,7 @@ class CInstallThreadEntry
public: public:
CInstallThreadEntry(){ Timestamp = 0; } CInstallThreadEntry(){ Timestamp = 0; }
CInstallThreadEntry(const char* patchName, const char* sourceName, uint32 timestamp, const char* extractPath, uint32 size, uint32 sZipFileSize) CInstallThreadEntry(const char* patchName, const char* sourceName, uint32 timestamp, const char* extractPath, uint32 size, uint32 sZipFileSize)
:PatchName(patchName), SourceName(sourceName), Timestamp(timestamp),ExtractPath(extractPath), Size(size),SZipFileSize(sZipFileSize){} :PatchName(patchName), SourceName(sourceName), Timestamp(timestamp),Size(size),SZipFileSize(sZipFileSize),ExtractPath(extractPath) {}
std::string PatchName; std::string PatchName;
std::string SourceName; std::string SourceName;
uint32 Timestamp; uint32 Timestamp;

View file

@ -2568,6 +2568,9 @@ bool mainLoop()
screenShotPNG(); screenShotPNG();
ScreenshotRequest = ScreenshotRequestNone; ScreenshotRequest = ScreenshotRequestNone;
break; break;
case ScreenshotRequestNone:
nlwarning("Screenshot of unspecified type requested.");
break;
} }
// TMP TMP // TMP TMP

View file

@ -656,8 +656,8 @@ bool isUserColorSupported(const CPlayerSheet &playerSheet, SLOTTYPE::EVisualSlot
case SLOTTYPE::FEET_SLOT: return isUserColorSupported(playerSheet.Feet); case SLOTTYPE::FEET_SLOT: return isUserColorSupported(playerSheet.Feet);
case SLOTTYPE::RIGHT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInRightHand); case SLOTTYPE::RIGHT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInRightHand);
case SLOTTYPE::LEFT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInLeftHand); case SLOTTYPE::LEFT_HAND_SLOT: return isUserColorSupported(playerSheet.ObjectInLeftHand);
default: return false;
} }
return false;
}// isUserColorSupported // }// isUserColorSupported //
@ -1081,6 +1081,10 @@ void setCase (ucstring &str, TCaseMode mode)
} }
} }
break; break;
case CaseNormal:
break;
case CaseCount:
break;
} }
} }
@ -1483,4 +1487,3 @@ uint getCurrentColorDepth()
return depth; return depth;
} }

View file

@ -41,7 +41,7 @@ extern CNetManager NetMngr;
// #pragma optimize ("", off) // #pragma optimize ("", off)
CNPCIconCache::CNPCIconCache() : _LastTimerUpdateTimestamp(0), _LastRequestTimestamp(0), _Enabled(true) CNPCIconCache::CNPCIconCache() : _LastRequestTimestamp(0), _LastTimerUpdateTimestamp(0), _Enabled(true)
{ {
_Icons[NPC_ICON::IconNone].init("", ""); _Icons[NPC_ICON::IconNone].init("", "");
_Icons[NPC_ICON::IconNotAMissionGiver].init("", ""); _Icons[NPC_ICON::IconNotAMissionGiver].init("", "");

View file

@ -35,7 +35,7 @@ static const float DEFAUT_PRECIPITATION_TIMEOUT = 10.f; // at most 10 second bef
//============================================================ //============================================================
CPrecipitation::CPrecipitation() : _Strenght(0), _XSize(0), _YSize(0), _ClipGrid(NULL), _Touched(false), _OldX(0), _OldY(0), _TimeOut(0.f) CPrecipitation::CPrecipitation() : _ClipGrid(NULL), _Strenght(0), _TimeOut(0.f), _XSize(0), _YSize(0), _OldX(0), _OldY(0), _Touched(false)
{ {
H_AUTO_USE(RZ_Precipitation) H_AUTO_USE(RZ_Precipitation)
} }

View file

@ -87,7 +87,7 @@ public:
uint16& associationBits( CLFECOMMON::TCLEntityId entity ) { return _Entities[entity].AssociationBits; } uint16& associationBits( CLFECOMMON::TCLEntityId entity ) { return _Entities[entity].AssociationBits; }
bool isUsed(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].EntryUsed; } bool isUsed(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].EntryUsed; }
const CLFECOMMON::TSheetId sheet(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].Sheet; } CLFECOMMON::TSheetId sheet(CLFECOMMON::TCLEntityId entity) const { return _Entities[entity].Sheet; }
/** Receives actions from the front end. Actually transmits actions received /** Receives actions from the front end. Actually transmits actions received

View file

@ -242,6 +242,9 @@ void CRosacePage::update(float x, float y, TMode mode)
case DirectMode: case DirectMode:
directMode(x, y); directMode(x, y);
break; break;
case NbRosaceMode:
nlwarning("Rosace Mode reached.");
break;
} }
}// update // }// update //

View file

@ -116,9 +116,9 @@ enum TFilterMapping
// constructor // constructor
//----------------------------------------------- //-----------------------------------------------
CSoundManager::CSoundManager(IProgressCallback * /* progressCallBack */) CSoundManager::CSoundManager(IProgressCallback * /* progressCallBack */)
: _UserEntitySoundLevel(1.0f), : _AudioMixer(NULL),
_AudioMixer(NULL), _EnvSoundRoot(NULL),
_EnvSoundRoot(NULL) _UserEntitySoundLevel(1.0f)
{ {
_EnableBackgroundMusicAtTime= 0; _EnableBackgroundMusicAtTime= 0;
_GameMusicVolume= 1.f; _GameMusicVolume= 1.f;
@ -1288,6 +1288,9 @@ void CSoundManager::update ()
_BackgroundFlags.Flags[MORNING] = false; _BackgroundFlags.Flags[MORNING] = false;
_BackgroundFlags.Flags[DUSK] = true; _BackgroundFlags.Flags[DUSK] = true;
break; break;
case CLightCycleManager::StateUnknown:
nlwarning("Unknown light cycle state reached.");
break;
} }
// update the filter for season. // update the filter for season.
@ -1318,6 +1321,8 @@ void CSoundManager::update ()
_BackgroundFlags.Flags[AUTUMN] = false; _BackgroundFlags.Flags[AUTUMN] = false;
_BackgroundFlags.Flags[WINTER] = true; _BackgroundFlags.Flags[WINTER] = true;
break; break;
default:
nlwarning("Updating unknown season.");
} }
// TODO : update the filter state for weather effet // TODO : update the filter state for weather effet
CWeatherState weatherState = WeatherManager.getCurrWeatherState(); CWeatherState weatherState = WeatherManager.getCurrWeatherState();
@ -1856,4 +1861,3 @@ bool CMaterialStepSounds::getSounds( TMoveType moveType, bool soft, vector<strin
} // getSounds //*/ } // getSounds //*/

View file

@ -787,6 +787,9 @@ restartLoop:
move = dynInfo.String.begin()+param.ReplacementPoint+2; move = dynInfo.String.begin()+param.ReplacementPoint+2;
} }
break; break;
default:
nlwarning("Unknown parameter type.");
break;
} }
} }
// append the rest of the string // append the rest of the string
@ -1245,7 +1248,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
while(strFindReplace(_SpecItem_TempMap[keyStr].Name, "\\n", "\n")); while(strFindReplace(_SpecItem_TempMap[keyStr].Name, "\\n", "\n"));
// insert in map of Women Name if OK. // insert in map of Women Name if OK.
if(womenNameColIndex!=(~0)) if(womenNameColIndex!=((uint)~0))
{ {
const ucstring &womenName= ws.getData(j, womenNameColIndex); const ucstring &womenName= ws.getData(j, womenNameColIndex);
_SpecItem_TempMap[keyStr].WomenName= womenName; _SpecItem_TempMap[keyStr].WomenName= womenName;
@ -1254,7 +1257,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
} }
// insert in map of Description if OK. // insert in map of Description if OK.
if(descColIndex!=(~0)) if(descColIndex!=((uint)~0))
{ {
const ucstring &desc= ws.getData(j, descColIndex); const ucstring &desc= ws.getData(j, descColIndex);
_SpecItem_TempMap[keyStr].Desc= desc; _SpecItem_TempMap[keyStr].Desc= desc;
@ -1263,7 +1266,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
} }
// insert in map of Description2 if OK. // insert in map of Description2 if OK.
if(descColIndex2!=(~0)) if(descColIndex2!=((uint)~0))
{ {
const ucstring &desc= ws.getData(j, descColIndex2); const ucstring &desc= ws.getData(j, descColIndex2);
_SpecItem_TempMap[keyStr].Desc2= desc; _SpecItem_TempMap[keyStr].Desc2= desc;

View file

@ -336,6 +336,7 @@ void CTimedFXManager::remove(TFXGroupHandle handle)
{ {
case CManagedFX::InAddList: _FXToAdd.erase(fi.SetHandle); break; case CManagedFX::InAddList: _FXToAdd.erase(fi.SetHandle); break;
case CManagedFX::InRemoveList: _FXToRemove.erase(fi.SetHandle); break; case CManagedFX::InRemoveList: _FXToRemove.erase(fi.SetHandle); break;
default: break;
} }
fi.unlinkFromCandidateFXList(); fi.unlinkFromCandidateFXList();
fi.unlinkFromInstanciatedFXList(); fi.unlinkFromInstanciatedFXList();
@ -848,6 +849,7 @@ void CTimedFXManager::displayFXBoxes(TDebugDisplayMode displayMode) const
case CManagedFX::Permanent: color = (!mf.Instance.empty()) ? CRGBA::Magenta : CRGBA::Cyan; break; case CManagedFX::Permanent: color = (!mf.Instance.empty()) ? CRGBA::Magenta : CRGBA::Cyan; break;
case CManagedFX::InAddList: color = CRGBA::Blue; break; case CManagedFX::InAddList: color = CRGBA::Blue; break;
case CManagedFX::InRemoveList: color = (!mf.Instance.empty()) ? CRGBA::Red : CRGBA::Yellow; break; case CManagedFX::InRemoveList: color = (!mf.Instance.empty()) ? CRGBA::Red : CRGBA::Yellow; break;
case CManagedFX::Unknown: break;
} }
drawBox(CVector(- size, - size, - size), drawBox(CVector(- size, - size, - size),
CVector(size, size, size), CVector(size, size, size),
@ -1171,6 +1173,5 @@ NLMISC_COMMAND(setMaxNumTimedFXs, "set the max number of timed fx that are visib

View file

@ -49,7 +49,7 @@ public:
bool FromIG; // true if the fx comes from an ig, or false if it was generated dynamically bool FromIG; // true if the fx comes from an ig, or false if it was generated dynamically
#endif #endif
public: public:
CTimedFX() : FXSheet(NULL), SpawnPosition(0.f, 0.f, 0.f) CTimedFX() : SpawnPosition(0.f, 0.f, 0.f), FXSheet(NULL)
{ {
#if !FINAL_VERSION #if !FINAL_VERSION
FromIG = true; FromIG = true;
@ -343,6 +343,5 @@ public:

View file

@ -745,6 +745,8 @@ bool CUserEntity::mode(MBEHAV::EMode m)
return true; return true;
} }
break; break;
default:
nlwarning("Invalid behaviour change.");
} }
// Reset Parent, unless we stay in mount mode // Reset Parent, unless we stay in mount mode
@ -1324,7 +1326,7 @@ void CUserEntity::resetAnyMoveTo()
if(_MoveToAction==CUserEntity::CombatPhrase || _MoveToAction==CUserEntity::ExtractRM) if(_MoveToAction==CUserEntity::CombatPhrase || _MoveToAction==CUserEntity::ExtractRM)
{ {
// the clientExecute has not been called in case of "ExtractRM autoFind" // the clientExecute has not been called in case of "ExtractRM autoFind"
bool autoFindExtractRM= _MoveToAction==CUserEntity::ExtractRM && _MoveToPhraseMemoryLine == ~0; bool autoFindExtractRM= _MoveToAction==CUserEntity::ExtractRM && _MoveToPhraseMemoryLine == (uint)~0;
if(!autoFindExtractRM) if(!autoFindExtractRM)
{ {
CSPhraseManager *pPM= CSPhraseManager::getInstance(); CSPhraseManager *pPM= CSPhraseManager::getInstance();
@ -1644,9 +1646,11 @@ void CUserEntity::moveToAction(CEntityCL *ent)
case CUserEntity::BuildTotem: case CUserEntity::BuildTotem:
buildTotem(); buildTotem();
break; break;
}
// Move To Done. // Move To Done.
default:
resetAnyMoveTo(); resetAnyMoveTo();
break;
}
}// moveToAction // }// moveToAction //
@ -3519,7 +3523,7 @@ bool CUserEntity::CMountHunger::canRun() const
if ( ((CLFECOMMON::TClientDataSetIndex)uidLeaf->getValue32()) == mountEntity->dataSetId() ) if ( ((CLFECOMMON::TClientDataSetIndex)uidLeaf->getValue32()) == mountEntity->dataSetId() )
{ {
CCDBNodeLeaf *hungerLeaf = safe_cast<CCDBNodeLeaf*>(beastNode->getNode( ICDBNode::CTextId( "HUNGER" ) )); CCDBNodeLeaf *hungerLeaf = safe_cast<CCDBNodeLeaf*>(beastNode->getNode( ICDBNode::CTextId( "HUNGER" ) ));
return (hungerLeaf->getValue32() != ANIMAL_TYPE::DbHungryValue); return (hungerLeaf->getValue32() != (sint)ANIMAL_TYPE::DbHungryValue);
} }
} }
return false; return false;
@ -3751,7 +3755,7 @@ void CUserEntity::extractRM()
CSPhraseManager *pm = CSPhraseManager::getInstance(); CSPhraseManager *pm = CSPhraseManager::getInstance();
uint index; uint index;
uint memoryLine; uint memoryLine;
bool autoFindPhrase = (_MoveToPhraseMemoryLine == ~0); bool autoFindPhrase = (_MoveToPhraseMemoryLine == (uint)~0);
if ( ! autoFindPhrase ) if ( ! autoFindPhrase )
{ {
// Use clicked phrase // Use clicked phrase
@ -3781,7 +3785,7 @@ void CUserEntity::extractRM()
} }
} }
if ( memoryLine != ~0 ) if ( memoryLine != (uint)~0 )
{ {
// Open the forage (but not for care actions). Necessary for the case of redoing an extraction after a Drop All on the same source. // Open the forage (but not for care actions). Necessary for the case of redoing an extraction after a Drop All on the same source.
uint32 phraseId = pm->getMemorizedPhrase( memoryLine, index ); uint32 phraseId = pm->getMemorizedPhrase( memoryLine, index );

View file

@ -47,7 +47,7 @@ public:
NL3D::TGlobalAnimationTime CurrTime; NL3D::TGlobalAnimationTime CurrTime;
CSky *Sky; CSky *Sky;
public: public:
CWaterEnvMapRdr() : _LastRenderStartTime(-1), CurrTime(-1) CWaterEnvMapRdr() : CurrTime(-1), _LastRenderStartTime(-1)
{ {
_CurrCanopyCamPos = CVector::Null; _CurrCanopyCamPos = CVector::Null;
} }

View file

@ -190,7 +190,9 @@ bool CBNPFileVersion::operator!=(const CBNPFileVersion& other) const
PROP(uint32,_PatchSize) \ PROP(uint32,_PatchSize) \
PROP_VECT(uint32,_HashKey) PROP_VECT(uint32,_HashKey)
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -340,7 +342,9 @@ bool CBNPFile::isIncremental()
PROP(std::string,_FileName)\ PROP(std::string,_FileName)\
STRUCT_VECT(_Versions) STRUCT_VECT(_Versions)
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -453,8 +457,9 @@ void CBNPFileSet::addFile(const std::string& fileName,bool isIncremental)
#define PERSISTENT_CLASS CBNPFileSet #define PERSISTENT_CLASS CBNPFileSet
#define PERSISTENT_DATA\ #define PERSISTENT_DATA\
STRUCT_VECT(_Files) STRUCT_VECT(_Files)
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -574,7 +579,9 @@ void CBNPCategory::addFile(const std::string& fileName)
LPROP(bool, _Hidden, if(_Hidden))\ LPROP(bool, _Hidden, if(_Hidden))\
PROP_VECT(std::string, _Files)\ PROP_VECT(std::string, _Files)\
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -724,8 +731,9 @@ bool CBNPCategorySet::isFileIncremental(const std::string& fileName) const
#define PERSISTENT_CLASS CBNPCategorySet #define PERSISTENT_CLASS CBNPCategorySet
#define PERSISTENT_DATA\ #define PERSISTENT_DATA\
STRUCT_VECT(_Category) STRUCT_VECT(_Category)
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -814,7 +822,9 @@ void CProductDescriptionForClient::serial(NLMISC::IStream &f)
STRUCT(_Files)\ STRUCT(_Files)\
STRUCT(_Categories) STRUCT(_Categories)
#ifdef NL_OS_WINDOWS
# pragma message( PERSISTENT_GENERATION_MESSAGE ) # pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif //NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"
#undef PERSISTENT_CLASS #undef PERSISTENT_CLASS
@ -1169,4 +1179,3 @@ void CProductDescriptionForClient::serial(NLMISC::IStream &f)
// //
// //
//#endif //#endif

View file

@ -26,11 +26,10 @@
//----------------------------------------------- //-----------------------------------------------
CDirLightSetup::CDirLightSetup() : Ambiant(0, 0, 0), CDirLightSetup::CDirLightSetup() : Ambiant(0, 0, 0),
Specular(0, 0, 0),
Diffuse(255, 255, 255), Diffuse(255, 255, 255),
Specular(0, 0, 0),
Direction(1.f, 0.f, 0.f) Direction(1.f, 0.f, 0.f)
{ {
//
} }
//----------------------------------------------- //-----------------------------------------------
@ -89,4 +88,3 @@ bool CDirLightSetup::build(const NLGEORGES::UFormElm &item)
return true; return true;
} }

View file

@ -177,7 +177,7 @@ void CGenericXmlMsgHeaderManager::popNameAndDescriptionFromStream(string &result
/* /*
* Constructor * Constructor
*/ */
CGenericXmlMsgHeaderManager::CNode::CNode(xmlNodePtr xmlNode, uint32 value) : Value(value), NbBits(0), Callback(NULL), UseCycle(false) CGenericXmlMsgHeaderManager::CNode::CNode(xmlNodePtr xmlNode, uint32 value) : Value(value), UseCycle(false), NbBits(0), Callback(NULL)
{ {
UserData[0] = 0; UserData[0] = 0;
UserData[1] = 0; UserData[1] = 0;

View file

@ -1296,7 +1296,7 @@ public:
protected: protected:
/// Default constructor /// Default constructor
CMirrorPropValueList() : _PtFront(NULL), _Container(NULL), _PropLocation() {} CMirrorPropValueList() : _Container(NULL), _PtFront(NULL), _PropLocation() {}
TSharedListRow allocateNewCell(); TSharedListRow allocateNewCell();

View file

@ -141,7 +141,7 @@ namespace R2
public: public:
CCurrentChar(TCharId charId, uint32 editSlotId, const R2::TUserRole& userRole = R2::TUserRole::ur_editor) CCurrentChar(TCharId charId, uint32 editSlotId, const R2::TUserRole& userRole = R2::TUserRole::ur_editor)
:_CharId(charId), _EditSlotId(editSlotId), _UserRole(userRole){} :_EditSlotId(editSlotId), _CharId(charId), _UserRole(userRole){}
void setUserRole(const R2::TUserRole& userRole) void setUserRole(const R2::TUserRole& userRole)
{ {
@ -256,7 +256,7 @@ namespace R2
{ {
public: public:
CTaskUpdateScenarioVision(NLMISC::TTime now, CServerEditionModule* module, TSessionId sessionId) CTaskUpdateScenarioVision(NLMISC::TTime now, CServerEditionModule* module, TSessionId sessionId)
:CTask<NLMISC::TTime>(now), _Module(module),_SessionId(sessionId){} :CTask<NLMISC::TTime>(now), _SessionId(sessionId), _Module(module){}
virtual void doOperation() virtual void doOperation()
{ {
_Module->updateScenarioVision(_SessionId); _Module->updateScenarioVision(_SessionId);
@ -340,7 +340,7 @@ namespace R2
public: public:
CKickPlayerIfStillConnected(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId) CKickPlayerIfStillConnected(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId)
: CTask<NLMISC::TTime>(taskDate),_ServerEditionModule(serverEditionModule), _SessionId(sessionId), _CharId(charId) : CTask<NLMISC::TTime>(taskDate),_ServerEditionModule(serverEditionModule), _CharId(charId), _SessionId(sessionId)
{ {
} }
@ -374,7 +374,7 @@ namespace R2
typedef uint32 TCharId; typedef uint32 TCharId;
public: public:
CVerifyRingAccess(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId) CVerifyRingAccess(NLMISC::TTime taskDate, CServerEditionModule* serverEditionModule, TSessionId sessionId, TCharId charId)
:CTask<NLMISC::TTime>(taskDate),_ServerEditionModule(serverEditionModule), _SessionId(sessionId), _CharId(charId) :CTask<NLMISC::TTime>(taskDate),_ServerEditionModule(serverEditionModule), _CharId(charId), _SessionId(sessionId)
{ {
} }
@ -764,7 +764,7 @@ _Scenario(scenario), SessionId(sessionId), _AiInstance(aiInstanceId),_EditSlotId
CEditionSession::CEditionSession(RSMGR::TSessionType sessionType, TSessionId sessionId, CEditionSession* edit) CEditionSession::CEditionSession(RSMGR::TSessionType sessionType, TSessionId sessionId, CEditionSession* edit)
:_EditSlotIdMaker(1), SessionId(sessionId) : SessionId(sessionId), _EditSlotIdMaker(1)
{ {
IsAnimationStopped = false; IsAnimationStopped = false;
DateSinceNoPlayer = 0; DateSinceNoPlayer = 0;
@ -6371,4 +6371,3 @@ void CServerEditionModule::forwardToDss(NLNET::IModuleProxy *senderModuleProxy,
onReceiveModuleMessage(senderModuleProxy, message); onReceiveModuleMessage(senderModuleProxy, message);
} }

View file

@ -21,7 +21,7 @@
namespace EGSPD namespace EGSPD
{ {
static const struct { char* Name; CSPType::TSPType Value; } TSPTypeConvert[] = static const struct { const char* Name; CSPType::TSPType Value; } TSPTypeConvert[] =
{ {
{ "Fight", CSPType::Fight }, { "Fight", CSPType::Fight },
{ "Magic", CSPType::Magic }, { "Magic", CSPType::Magic },

View file

@ -26,8 +26,9 @@
//======================================================================= //=======================================================================
CWeatherFunctionParamsSheetBase::CWeatherFunctionParamsSheetBase() : CycleLenght(25), CWeatherFunctionParamsSheetBase::CWeatherFunctionParamsSheetBase()
DayLenght(24), : DayLenght(24),
CycleLenght(25),
MinThunderPeriod(1.f), MinThunderPeriod(1.f),
ThunderLenght(0.5f), ThunderLenght(0.5f),
CloudWindSpeedFactor(1.f), CloudWindSpeedFactor(1.f),
@ -80,4 +81,3 @@ void CWeatherFunctionParamsSheetBase::build(const std::string &sheetName)
NLGEORGES::UFormLoader::releaseLoader(loader); NLGEORGES::UFormLoader::releaseLoader(loader);
} }

View file

@ -39,10 +39,10 @@ CWeatherStateSheet::CWeatherStateSheet() : FogRatio(0),
FogColorDay(NLMISC::CRGBA::Black), FogColorDay(NLMISC::CRGBA::Black),
FogColorDusk(NLMISC::CRGBA::Black), FogColorDusk(NLMISC::CRGBA::Black),
FogColorNight(NLMISC::CRGBA::Black), FogColorNight(NLMISC::CRGBA::Black),
FogGradientFactor(1.f),
Lighting(1.f), Lighting(1.f),
WindIntensity(0), WindIntensity(0),
ThunderIntensity(0), ThunderIntensity(0)
FogGradientFactor(1.f)
{ {
for(uint k = 0; k < NumFogType; ++k) for(uint k = 0; k < NumFogType; ++k)

View file

@ -43,5 +43,8 @@
PROP(sint32, Modifier)\ PROP(sint32, Modifier)\
PROP2(Type, std::string, EGSPD::CClassificationType::toString(Type), Type=EGSPD::CClassificationType::fromString(val))\ PROP2(Type, std::string, EGSPD::CClassificationType::toString(Type), Type=EGSPD::CClassificationType::fromString(val))\
#ifdef NL_OS_WINDOWS
#pragma message( PERSISTENT_GENERATION_MESSAGE ) #pragma message( PERSISTENT_GENERATION_MESSAGE )
#endif // NL_OS_WINDOWS
#include "persistent_data_template.h" #include "persistent_data_template.h"