diff --git a/code/ryzom/client/src/attack_list.cpp b/code/ryzom/client/src/attack_list.cpp index 08c2f3581..6c974adf4 100644 --- a/code/ryzom/client/src/attack_list.cpp +++ b/code/ryzom/client/src/attack_list.cpp @@ -223,23 +223,3 @@ void CAttackListManager::buildLinkFXs() { _Links.init("links.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */); } - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/client/src/bg_downloader_access.cpp b/code/ryzom/client/src/bg_downloader_access.cpp index e321eb28e..15d98569b 100644 --- a/code/ryzom/client/src/bg_downloader_access.cpp +++ b/code/ryzom/client/src/bg_downloader_access.cpp @@ -486,7 +486,7 @@ void CBGDownloaderAccess::CDownloadCoTask::restartDownloader() uint tryCounter = 1; for (;;) { - nlwarning("Launching downloader: try number %d", (int) tryCounter++); + nlwarning("Launching downloader: try number %u", tryCounter++); // now we can create the message queue because we are sure that it will reach the good app Parent->_DownloaderMsgQueue.init(HInstance, BGDownloader::ClientWndID, BGDownloader::DownloaderWndID); sleep(200); diff --git a/code/ryzom/client/src/cdb.h b/code/ryzom/client/src/cdb.h index 97edfa2a5..24c2dd5eb 100644 --- a/code/ryzom/client/src/cdb.h +++ b/code/ryzom/client/src/cdb.h @@ -19,6 +19,11 @@ #ifndef CDB_H #define CDB_H +// misc +#include "nel/misc/types_nl.h" +#include "nel/misc/smart_ptr.h" +#include "nel/misc/string_mapper.h" + #include namespace NLMISC diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index dad8e8077..4289a1b0b 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -66,8 +66,8 @@ struct CClientConfig bool SaveConfig; /// Window position in windowed mode - sint32 PositionX; - sint32 PositionY; + sint32 PositionX; + sint32 PositionY; /// Window frequency uint Frequency; diff --git a/code/ryzom/client/src/color_slot_manager.cpp b/code/ryzom/client/src/color_slot_manager.cpp index 905eecef5..996d256a5 100644 --- a/code/ryzom/client/src/color_slot_manager.cpp +++ b/code/ryzom/client/src/color_slot_manager.cpp @@ -134,7 +134,7 @@ uint CColorSlotManager::addSlot(const TStringVect &slotDescs) _Slots.push_back(slotDescs); for(uint k = 0; k < slotDescs.size(); ++k) { - NLMISC::strupr(_Slots.back()[k]); + _Slots.back()[k] = NLMISC::toUpper(_Slots.back()[k]); } return (uint)_Slots.size() - 1; } @@ -327,10 +327,9 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st { return false; } + uint startSlot = (uint)_Slots.size(); - - _Slots.resize(_Slots.size() + mask_extensions->size()); /// For each kind of mask, build a slot for (uint k = 0; k < (uint) mask_extensions->size(); ++k) diff --git a/code/ryzom/client/src/debug_client.cpp b/code/ryzom/client/src/debug_client.cpp index bfed1c53a..9e42dffc8 100644 --- a/code/ryzom/client/src/debug_client.cpp +++ b/code/ryzom/client/src/debug_client.cpp @@ -22,14 +22,6 @@ ///////////// #include "stdpch.h" // First include for pre-compiled headers. -#include - -// OS. -#ifdef NL_OS_WINDOWS -# define NOMINMAX -# include -#endif - // Misc #include "nel/misc/file.h" #include "nel/misc/async_file_manager.h" @@ -689,6 +681,3 @@ bool verboseVPAdvanceTest(CEntityCL *en, uint32 form) return false; } } - - - diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index fd629a43c..16946a705 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -965,7 +965,7 @@ void CFarTP::requestReturnToPreviousSession(TSessionId rejectedSessionId) void CFarTP::requestReconnection() { _ReselectingChar = true; - requestFarTPToSession(TSessionId(~0u), ~0, CFarTP::JoinMainland, false); + requestFarTPToSession(TSessionId(std::numeric_limits::max()), std::numeric_limits::max(), CFarTP::JoinMainland, false); } @@ -1060,9 +1060,10 @@ void CFarTP::disconnectFromPreviousShard() // Play music and fade out the Game Sound if (SoundMngr) { - SoundMngr->playEventMusic(ClientCfg.SoundOutGameMusic, CSoundManager::LoadingMusicXFade, true); // Loading Music Loop.ogg - SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade); + // Loading Music Loop.ogg LoadingMusic = ClientCfg.SoundOutGameMusic; + SoundMngr->playEventMusic(LoadingMusic, CSoundManager::LoadingMusicXFade, true); + SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade); } // Change the tips diff --git a/code/ryzom/client/src/fx_manager.cpp b/code/ryzom/client/src/fx_manager.cpp index cc785197d..f1a4e6106 100644 --- a/code/ryzom/client/src/fx_manager.cpp +++ b/code/ryzom/client/src/fx_manager.cpp @@ -142,7 +142,7 @@ void CFXManager::update() while (!_DeferredFXByDate.empty()) { - if (T1 < (sint64)_DeferredFXByDate.begin()->first) break; + if (T1 < (uint)_DeferredFXByDate.begin()->first) break; const CDeferredFX &fx = _DeferredFXByDate.begin()->second; NL3D::UParticleSystemInstance fxInstance = instantFX(fx.FXName, fx.TimeOut); if (!fxInstance.empty()) @@ -231,7 +231,7 @@ void CFXManager::deferFX(const std::string &fxName, const NLMISC::CMatrix &matri fx.FXName = fxName; fx.Matrix = matrix; fx.TimeOut = timeOut; - _DeferredFXByDate.insert(std::make_pair(T1 + sint64(1000.f * delayInSeconds), fx)); + _DeferredFXByDate.insert(std::make_pair(T1 + uint64(1000.f * delayInSeconds), fx)); } diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index 84b31db53..b6e77dc20 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -847,7 +847,7 @@ void CGameContextMenu::updateContextMenuTalkEntries(uint options) { if (ClientCfg.Local) { - options = ~0; // in local mode, force all options to be shown (for debug) + options = std::numeric_limits::max(); // in local mode, force all options to be shown (for debug) } // news _OkTextNews= ((options & (1 << BOTCHATTYPE::NewsFlag))); diff --git a/code/ryzom/client/src/interface_v3/view_renderer.cpp b/code/ryzom/client/src/interface_v3/view_renderer.cpp index 17bfa99a3..ffe61b1cb 100644 --- a/code/ryzom/client/src/interface_v3/view_renderer.cpp +++ b/code/ryzom/client/src/interface_v3/view_renderer.cpp @@ -743,7 +743,7 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std: image.UVMax.U = uvMaxU; image.UVMax.V = uvMaxV; sTGAname = tgaName; - sTGAname = strlwr(sTGAname); + sTGAname = toLower(sTGAname); string::size_type stripPng = sTGAname.find(".png"); if (stripPng != string::npos) { diff --git a/code/ryzom/client/src/libwww.cpp b/code/ryzom/client/src/libwww.cpp index c66079cdb..dc5c151bd 100644 --- a/code/ryzom/client/src/libwww.cpp +++ b/code/ryzom/client/src/libwww.cpp @@ -531,9 +531,6 @@ void initLibWWW() static bool initialized = false; if (!initialized) { - // log all libwww - //WWW_TraceFlag = SHOW_ALL_TRACE; - //HTProfile_newNoCacheClient("Ryzom", "1.1"); /* Need our own trace and print functions */ diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index d37e05eae..fe1216b64 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -714,7 +714,7 @@ void CNetworkConnection::setMsPerTick(sint32 msPerTick) bool CNetworkConnection::update() { #ifdef ENABLE_INCOMING_MSG_RECORDER - if ( _NextClientTickToReplay == ~0 ) + if ( _NextClientTickToReplay == std::numeric_limits::max() ) { setReplayingMode( false ); return false; @@ -881,7 +881,7 @@ bool CNetworkConnection::buildStream( CBitMemStream &msgin ) if ( _RecordedMessagesIn.eof() ) { // Nothing more to load - _NextClientTickToReplay = ~0; + _NextClientTickToReplay = std::numeric_limits::max(); nlinfo( "Nothing more to replay, end of replaying" ); } else @@ -1147,10 +1147,10 @@ void CNetworkConnection::receiveSystemSync(CBitMemStream &msgin) //_MsPerTick = 100; // initial values #ifdef HALF_FREQUENCY_SENDING_TO_CLIENT -#pragma message ("HALF_FREQUENCY_SENDING_TO_CLIENT") +//#pragma message ("HALF_FREQUENCY_SENDING_TO_CLIENT") _CurrentServerTick = _Synchronize+_CurrentReceivedNumber*2; #else -#pragma message ("FULL_FREQUENCY_SENDING_TO_CLIENT") +//#pragma message ("FULL_FREQUENCY_SENDING_TO_CLIENT") _CurrentServerTick = _Synchronize+_CurrentReceivedNumber; #endif _CurrentClientTick = uint32(_CurrentServerTick - (_LCT+_MsPerTick)/_MsPerTick); diff --git a/code/ryzom/client/src/progress.cpp b/code/ryzom/client/src/progress.cpp index 0f487b747..dc164ef8e 100644 --- a/code/ryzom/client/src/progress.cpp +++ b/code/ryzom/client/src/progress.cpp @@ -121,7 +121,6 @@ void drawLoadingBitmap (float progress) CQuadUV quad; uint wh = Driver->getWindowHeight(); uint ww = Driver->getWindowWidth(); - //nlinfo("%d x %d", ww, wh); float x1 = 0; float y1 = 0; float x2 = 1; @@ -441,3 +440,4 @@ void CProgress::finish() // stop system dependent progress bar CSystemUtils::updateProgressBar(1, 0); } + diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index 72604df73..3e93c7957 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -1208,15 +1208,15 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode) // Get the women name index if possible. uint womenNameColIndex; if( !ws.findCol(womenNameColIdent, womenNameColIndex) ) - womenNameColIndex= ~0; + womenNameColIndex= std::numeric_limits::max(); // Get the description index if possible. uint descColIndex; if( !ws.findCol(descColIdent, descColIndex) ) - descColIndex= ~0; + descColIndex= std::numeric_limits::max(); uint descColIndex2; if( !ws.findCol(descColIdent2, descColIndex2) ) - descColIndex2= ~0; + descColIndex2= std::numeric_limits::max(); // For all rows minus the first header one. for(uint j=1;j::max()) { const ucstring &womenName= ws.getData(j, womenNameColIndex); _SpecItem_TempMap[keyStr].WomenName= womenName; @@ -1255,7 +1255,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode) } // insert in map of Description if OK. - if(descColIndex!=((uint)~0)) + if(descColIndex!=std::numeric_limits::max()) { const ucstring &desc= ws.getData(j, descColIndex); _SpecItem_TempMap[keyStr].Desc= desc; @@ -1264,7 +1264,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode) } // insert in map of Description2 if OK. - if(descColIndex2!=((uint)~0)) + if(descColIndex2!=std::numeric_limits::max()) { const ucstring &desc= ws.getData(j, descColIndex2); _SpecItem_TempMap[keyStr].Desc2= desc; diff --git a/code/ryzom/common/src/game_share/bnp_patch.cpp b/code/ryzom/common/src/game_share/bnp_patch.cpp index 071b03675..413e24a0b 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.cpp +++ b/code/ryzom/common/src/game_share/bnp_patch.cpp @@ -63,7 +63,7 @@ CBNPFileVersion::CBNPFileVersion() _FileSize= 0; _7ZFileSize=0; _PatchSize= 0; - _VersionNumber= ~0u; + _VersionNumber= std::numeric_limits::max(); } // setup record contents from a file name and version number diff --git a/code/ryzom/common/src/game_share/scores.h b/code/ryzom/common/src/game_share/scores.h index a718e426d..33b69c275 100644 --- a/code/ryzom/common/src/game_share/scores.h +++ b/code/ryzom/common/src/game_share/scores.h @@ -21,7 +21,7 @@ #include "nel/misc/types_nl.h" -#include +#include namespace SCORES {