From 7b3381b997a2ecb426f8fb01f0dbc8a6649f64ce Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Wed, 24 Jul 2013 20:53:33 +0000 Subject: [PATCH 1/9] Fix some probleme with spaces in path on windows PCHSupport.cmake edited online with Bitbucket --- code/CMakeModules/PCHSupport.cmake | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index d444bfa3d..0e33df4dc 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -33,9 +33,9 @@ ENDIF(MSVC) # Set PCH_FLAGS for common flags, PCH_ARCH_XXX_FLAGS for specific archs flags and PCH_ARCHS for archs MACRO(PCH_SET_COMPILE_FLAGS _target) SET(PCH_FLAGS) - SET(PCH_ARCHS) - + SET(PCH_ARCHS) SET(FLAGS) + LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS}) STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD) @@ -81,10 +81,15 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) LIST(APPEND _FLAGS " ${_directory_flags}") LIST(APPEND _FLAGS " ${_directory_definitions}") - STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS}) - # Format definitions - SEPARATE_ARGUMENTS(_FLAGS) + IF(MSVC) + # Fix path with space + SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}") + ELSE(MSVC) + STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS}) + SEPARATE_ARGUMENTS(_FLAGS) + ENDIF(MSVC) + IF(CLANG) # Determining all architectures and get common flags From 31ba0013a61f38494575808d47650277af859cbf Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Wed, 24 Jul 2013 21:57:52 +0000 Subject: [PATCH 2/9] PCHSupport.cmake edited online with Bitbucket --- code/CMakeModules/PCHSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 0e33df4dc..042f6b0cc 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -34,7 +34,7 @@ ENDIF(MSVC) MACRO(PCH_SET_COMPILE_FLAGS _target) SET(PCH_FLAGS) SET(PCH_ARCHS) - SET(FLAGS) + SET(_FLAGS) LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS}) From 0cbc4713419c7d24ac25a4e20e71e8d1930e727a Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Jul 2013 09:33:32 +0200 Subject: [PATCH 3/9] Fixed: prtab function not compiling with VC++ (define DEBUG_CRYPT if you want to debug crypt() method) --- code/ryzom/common/src/game_share/crypt.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/ryzom/common/src/game_share/crypt.cpp b/code/ryzom/common/src/game_share/crypt.cpp index fa0f1252f..0da908817 100644 --- a/code/ryzom/common/src/game_share/crypt.cpp +++ b/code/ryzom/common/src/game_share/crypt.cpp @@ -79,6 +79,10 @@ static char rz_sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93"; #include #define RZ__PASSWORD_EFMT1 '-' +#if DEBUG_CRYPT +void prtab(char *s, unsigned char *t, int num_rows); +#endif + /* * UNIX password, and DES, encryption. * By Tom Truscott, trt@rti.rti.org, @@ -785,7 +789,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) { } perm[i] = (unsigned char) k; } -#ifdef DEBUG +#ifdef DEBUG_CRYPT prtab("pc1tab", perm, 8); #endif rz_init_perm(PC1ROT, perm, 8, 8); @@ -809,7 +813,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) { if ((k%28) <= j) k -= 28; perm[i] = pc2inv[k]; } -#ifdef DEBUG +#ifdef DEBUG_CRYPT prtab("pc2tab", perm, 8); #endif rz_init_perm(PC2ROT[j], perm, 8, 8); @@ -833,7 +837,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) { perm[i*8+j] = (unsigned char) k; } } -#ifdef DEBUG +#ifdef DEBUG_CRYPT prtab("ietab", perm, 8); #endif rz_init_perm(IE3264, perm, 4, 8); @@ -850,7 +854,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) { } perm[k-1] = i+1; } -#ifdef DEBUG +#ifdef DEBUG_CRYPT prtab("cftab", perm, 8); #endif rz_init_perm(CF6464, perm, 8, 8); @@ -959,12 +963,8 @@ int rz_encrypt(register char *block, int flag) { return (0); } -#ifdef DEBUG -STATIC -prtab(s, t, num_rows) - char *s; - unsigned char *t; - int num_rows; +#ifdef DEBUG_CRYPT +void prtab(char *s, unsigned char *t, int num_rows) { register int i, j; From 34553ca2db05c75b2e9ddd6a03c7c33d32cde47c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 17:49:28 +0200 Subject: [PATCH 4/9] Fix a compile error --- code/ryzom/client/src/cdb_synchronised.cpp | 2 +- code/ryzom/client/src/cursor_functions.cpp | 2 +- code/ryzom/client/src/entity_cl.cpp | 2 +- .../interface_v3/group_in_scene_user_info.cpp | 32 +++++++++---------- .../src/interface_v3/interface_manager.cpp | 2 +- .../src/interface_v3/sphrase_manager.cpp | 2 +- code/ryzom/client/src/main_loop.cpp | 6 ++-- .../ryzom/client/src/motion/user_controls.cpp | 2 +- code/ryzom/client/src/net_manager.cpp | 12 +++---- code/ryzom/client/src/r2/tool.cpp | 2 +- code/ryzom/client/src/weather.cpp | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/code/ryzom/client/src/cdb_synchronised.cpp b/code/ryzom/client/src/cdb_synchronised.cpp index f733f6c67..45c57dd55 100644 --- a/code/ryzom/client/src/cdb_synchronised.cpp +++ b/code/ryzom/client/src/cdb_synchronised.cpp @@ -320,7 +320,7 @@ void CCDBSynchronised::writeInitInProgressIntoUIDB() if (pIM) { NLMISC::CCDBNodeLeaf *node = m_CDBInitInProgressDB ? (&*m_CDBInitInProgressDB) - : (m_CDBInitInProgressDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")); + : &*(m_CDBInitInProgressDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")); node->setValueBool(_InitInProgress); } else diff --git a/code/ryzom/client/src/cursor_functions.cpp b/code/ryzom/client/src/cursor_functions.cpp index 902e63875..8c3bc3a32 100644 --- a/code/ryzom/client/src/cursor_functions.cpp +++ b/code/ryzom/client/src/cursor_functions.cpp @@ -275,7 +275,7 @@ void checkUnderCursor() // If the mouse is over the player make the player transparent CCDBNodeLeaf *pNL = s_UserCharFade ? &*s_UserCharFade - : (s_UserCharFade = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false)); + : &*(s_UserCharFade = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false)); if ((pNL != NULL) && (pNL->getValue32() == 1) && UserEntity->selectable()) { // If the nearest entity is the player, hide! diff --git a/code/ryzom/client/src/entity_cl.cpp b/code/ryzom/client/src/entity_cl.cpp index 2cc491d91..0063c93f4 100644 --- a/code/ryzom/client/src/entity_cl.cpp +++ b/code/ryzom/client/src/entity_cl.cpp @@ -3043,7 +3043,7 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */, bool bShowReticle = true; CCDBNodeLeaf *node = (CCDBNodeLeaf *)_ShowReticleLeaf ? &*_ShowReticleLeaf - : (_ShowReticleLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE", false)); + : &*(_ShowReticleLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE", false)); if (node) { diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 449265f8a..0e8f5164e 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -54,22 +54,22 @@ class CConfigSaveInsceneDB { public: void setPrefix(const std::string &prefix) { _DBPrefix = prefix; } - inline NLMISC::CCDBNodeLeaf *getGuildSymbol() { return _GuildSymbol ? (&*_GuildSymbol) : (_GuildSymbol = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "GUILD_SYMBOL")); } - inline NLMISC::CCDBNodeLeaf *getName() { return _Name ? (&*_Name) : (_Name = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NAME")); } - inline NLMISC::CCDBNodeLeaf *getTitle() { return _Title ? (&*_Title) : (_Title = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "TITLE")); } - inline NLMISC::CCDBNodeLeaf *getRPTags() { return _RPTags ? (&*_RPTags) : (_RPTags = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "RPTAGS")); } - inline NLMISC::CCDBNodeLeaf *getGuildName() { return _GuildName ? (&*_GuildName) : (_GuildName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "GUILD_NAME")); } - inline NLMISC::CCDBNodeLeaf *getHP() { return _HP ? (&*_HP) : (_HP = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "HP")); } - inline NLMISC::CCDBNodeLeaf *getSta() { return _Sta ? (&*_Sta) : (_Sta = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "STA")); } - inline NLMISC::CCDBNodeLeaf *getSap() { return _Sap ? (&*_Sap) : (_Sap = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "SAP")); } - inline NLMISC::CCDBNodeLeaf *getFocus() { return _Focus ? (&*_Focus) : (_Focus = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "FOCUS")); } - inline NLMISC::CCDBNodeLeaf *getAction() { return _Action ? (&*_Action) : (_Action = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ACTION")); } - inline NLMISC::CCDBNodeLeaf *getMessages() { return _Messages ? (&*_Messages) : (_Messages = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MESSAGES")); } - inline NLMISC::CCDBNodeLeaf *getPvPLogo() { return _PvPLogo ? (&*_PvPLogo) : (_PvPLogo = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "PVP_LOGO")); } - inline NLMISC::CCDBNodeLeaf *getNPCName() { return _NPCName ? (&*_NPCName) : (_NPCName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCNAME")); } - inline NLMISC::CCDBNodeLeaf *getNPCTitle() { return _NPCTitle ? (&*_NPCTitle) : (_NPCTitle = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCTITLE")); } - inline NLMISC::CCDBNodeLeaf *getMissionIcon() { return _MissionIcon ? (&*_MissionIcon) : (_MissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MISSION_ICON")); } - inline NLMISC::CCDBNodeLeaf *getMiniMissionIcon() { return _MiniMissionIcon ? (&*_MiniMissionIcon) : (_MiniMissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MINI_MISSION_ICON")); } + inline NLMISC::CCDBNodeLeaf *getGuildSymbol() { return _GuildSymbol ? (&*_GuildSymbol) : &*(_GuildSymbol = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "GUILD_SYMBOL")); } + inline NLMISC::CCDBNodeLeaf *getName() { return _Name ? (&*_Name) : &*(_Name = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NAME")); } + inline NLMISC::CCDBNodeLeaf *getTitle() { return _Title ? (&*_Title) : &*(_Title = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "TITLE")); } + inline NLMISC::CCDBNodeLeaf *getRPTags() { return _RPTags ? (&*_RPTags) : &*(_RPTags = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "RPTAGS")); } + inline NLMISC::CCDBNodeLeaf *getGuildName() { return _GuildName ? (&*_GuildName) : &*(_GuildName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "GUILD_NAME")); } + inline NLMISC::CCDBNodeLeaf *getHP() { return _HP ? (&*_HP) : &*(_HP = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "HP")); } + inline NLMISC::CCDBNodeLeaf *getSta() { return _Sta ? (&*_Sta) : &*(_Sta = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "STA")); } + inline NLMISC::CCDBNodeLeaf *getSap() { return _Sap ? (&*_Sap) : &*(_Sap = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "SAP")); } + inline NLMISC::CCDBNodeLeaf *getFocus() { return _Focus ? (&*_Focus) : &*(_Focus = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "FOCUS")); } + inline NLMISC::CCDBNodeLeaf *getAction() { return _Action ? (&*_Action) : &*(_Action = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ACTION")); } + inline NLMISC::CCDBNodeLeaf *getMessages() { return _Messages ? (&*_Messages) : &*(_Messages = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MESSAGES")); } + inline NLMISC::CCDBNodeLeaf *getPvPLogo() { return _PvPLogo ? (&*_PvPLogo) : &*(_PvPLogo = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "PVP_LOGO")); } + inline NLMISC::CCDBNodeLeaf *getNPCName() { return _NPCName ? (&*_NPCName) : &*(_NPCName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCNAME")); } + inline NLMISC::CCDBNodeLeaf *getNPCTitle() { return _NPCTitle ? (&*_NPCTitle) : &*(_NPCTitle = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCTITLE")); } + inline NLMISC::CCDBNodeLeaf *getMissionIcon() { return _MissionIcon ? (&*_MissionIcon) : &*(_MissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MISSION_ICON")); } + inline NLMISC::CCDBNodeLeaf *getMiniMissionIcon() { return _MiniMissionIcon ? &*(&*_MiniMissionIcon) : (_MiniMissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MINI_MISSION_ICON")); } private: std::string _DBPrefix; NLMISC::CRefPtr _GuildSymbol; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index a9b389018..9d1cb364a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1983,7 +1983,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera) for (uint i=0; igetDbProp(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i), false)); + : &*(_CurrentPlayerCharacLeaf[i] = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i), false)); _CurrentPlayerCharac[i] = node ? node->getValue32() : 0; } diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 9598bedec..8b832d42b 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -1125,7 +1125,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase, // get the current action malus (0-100) uint32 totalActionMalus= 0; CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf - : (_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); + : &*(_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); // root brick must not be Power or aura, because Action malus don't apply to them // (ie leave 0 ActionMalus for Aura or Powers diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 74ac297df..59519fc69 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -2299,8 +2299,8 @@ bool mainLoop() deltaTime = smoothFPS.getSmoothValue (); if (deltaTime > 0.0) { - CCDBNodeLeaf *pNL = (CCDBNodeLeaf *)s_FpsLeaf ? &*s_FpsLeaf - : (s_FpsLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FPS")); + CCDBNodeLeaf *pNL = s_FpsLeaf ? &*s_FpsLeaf + : &*(s_FpsLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FPS")); pNL->setValue64((sint64)(1.f/deltaTime)); } } @@ -2806,7 +2806,7 @@ bool mainLoop() // Put here things you have to send to the server only once per tick like user position. // UPDATE COMPASS NLMISC::CCDBNodeLeaf *node = s_UiDirectionLeaf ? (&*s_UiDirectionLeaf) - : (s_UiDirectionLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DIRECTION")); + : &*(s_UiDirectionLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DIRECTION")); CInterfaceProperty prop; prop.setNodePtr(node); if(CompassMode == 1) diff --git a/code/ryzom/client/src/motion/user_controls.cpp b/code/ryzom/client/src/motion/user_controls.cpp index 794685981..527bfb5d4 100644 --- a/code/ryzom/client/src/motion/user_controls.cpp +++ b/code/ryzom/client/src/motion/user_controls.cpp @@ -295,7 +295,7 @@ void CUserControls::update() View.updateCameraCollision(); NLMISC::CCDBNodeLeaf *node = _UiVarMkMoveDB ? &*_UiVarMkMoveDB - : (_UiVarMkMoveDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE")); + : &*(_UiVarMkMoveDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE")); node->setValue32(autowalkState()); }// update // diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 6e45c4fb4..1eedc16c5 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3862,27 +3862,27 @@ bool CNetManager::update() if (im) { CCDBNodeLeaf *node = m_PingLeaf ? &*m_PingLeaf - : (m_PingLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PING", false)); + : &*(m_PingLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PING", false)); if (node) node->setValue32(getPing()); node = m_UploadLeaf ? &*m_UploadLeaf - : (m_UploadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UPLOAD", false)); + : &*(m_UploadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UPLOAD", false)); if (node) node->setValue32((sint32)(getMeanUpload()*1024.f/8.f)); node = m_DownloadLeaf ? &*m_DownloadLeaf - : (m_DownloadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DOWNLOAD", false)); + : &*(m_DownloadLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DOWNLOAD", false)); if (node) node->setValue32((sint32)(getMeanDownload()*1024.f/8.f)); node = m_PacketLostLeaf ? &* m_PacketLostLeaf - : (m_PacketLostLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PACKETLOST", false)); + : &*(m_PacketLostLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PACKETLOST", false)); if (node) node->setValue32((sint32)getMeanPacketLoss()); node = m_ServerStateLeaf ? &*m_ServerStateLeaf - : (m_ServerStateLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SERVERSTATE", false)); + : &*(m_ServerStateLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SERVERSTATE", false)); if (node) node->setValue32((sint32)getConnectionState()); node = m_ConnectionQualityLeaf ? &*m_ConnectionQualityLeaf - : (m_ConnectionQualityLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false)); + : &*(m_ConnectionQualityLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false)); if (node) node->setValue32((sint32)getConnectionQuality()); } diff --git a/code/ryzom/client/src/r2/tool.cpp b/code/ryzom/client/src/r2/tool.cpp index f11476930..995394b94 100644 --- a/code/ryzom/client/src/r2/tool.cpp +++ b/code/ryzom/client/src/r2/tool.cpp @@ -553,7 +553,7 @@ void CTool::handleMouseOverPlayer(bool over) //H_AUTO(R2_CTool_handleMouseOverPlayer) // If the mouse is over the player make the player transparent CCDBNodeLeaf *pNL = _UserCharFade ? &*_UserCharFade - : (_UserCharFade = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false)); + : &*(_UserCharFade = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false)); if ((pNL != NULL) && (pNL->getValue32() == 1) && UserEntity->selectable()) { // If the nearest entity is the player, hide! diff --git a/code/ryzom/client/src/weather.cpp b/code/ryzom/client/src/weather.cpp index 17288fbe9..91fad6f7c 100644 --- a/code/ryzom/client/src/weather.cpp +++ b/code/ryzom/client/src/weather.cpp @@ -200,7 +200,7 @@ static NLMISC::CRefPtr s_ServerWeatherValueDB; static uint16 getServerWeather() { CCDBNodeLeaf *node = s_ServerWeatherValueDB ? &*s_ServerWeatherValueDB - : (s_ServerWeatherValueDB = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:WEATHER:VALUE")); + : &*(s_ServerWeatherValueDB = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:WEATHER:VALUE")); if (!node) return 0; return (uint16) node->getValue16(); } From d9c15ede09c3581a9bc1cfba58eb24571fea17d7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 17:59:05 +0200 Subject: [PATCH 5/9] Can't include this here. A light header with all of these maximum constants might be handy --- code/ryzom/client/src/entities.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/entities.h b/code/ryzom/client/src/entities.h index 81399f451..ac9d61d97 100644 --- a/code/ryzom/client/src/entities.h +++ b/code/ryzom/client/src/entities.h @@ -31,7 +31,6 @@ #include "user_entity.h" // Some constants #include "game_share/mission_desc.h" -#include "interface_v3/people_interraction.h" #include "game_share/inventories.h" // Misc. #include "nel/misc/types_nl.h" @@ -155,8 +154,8 @@ private: // DB node pointers used to update some entity flags NLMISC::CRefPtr _MissionTargetTitleDB[MAX_NUM_MISSIONS][MAX_NUM_MISSION_TARGETS]; - NLMISC::CRefPtr _GroupMemberUidDB[MaxNumPeopleInTeam]; - NLMISC::CRefPtr _GroupMemberNameDB[MaxNumPeopleInTeam]; + NLMISC::CRefPtr _GroupMemberUidDB[8]; // MaxNumPeopleInTeam in people_interaction.h + NLMISC::CRefPtr _GroupMemberNameDB[8]; // MaxNumPeopleInTeam in people_interaction.h NLMISC::CRefPtr _BeastUidDB[MAX_INVENTORY_ANIMAL]; NLMISC::CRefPtr _BeastStatusDB[MAX_INVENTORY_ANIMAL]; NLMISC::CRefPtr _BeastTypeDB[MAX_INVENTORY_ANIMAL]; From 880e9dc08241c8657ed5323b912619a8f988c436 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 18:02:43 +0200 Subject: [PATCH 6/9] Fix another compile error --- code/ryzom/client/src/entities.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/client/src/entities.h b/code/ryzom/client/src/entities.h index ac9d61d97..f71240b63 100644 --- a/code/ryzom/client/src/entities.h +++ b/code/ryzom/client/src/entities.h @@ -39,6 +39,7 @@ #include "nel/misc/vector.h" #include "nel/misc/file.h" #include "nel/misc/aabbox.h" +#include "nel/misc/cdb_leaf.h" // 3D #include "nel/3d/u_instance.h" // Std. From bff229da69c0ebb2a2bddd271039f482fc6195c6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 18:19:51 +0200 Subject: [PATCH 7/9] Fix a typo --- code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 0e8f5164e..76d97c519 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -69,7 +69,7 @@ public: inline NLMISC::CCDBNodeLeaf *getNPCName() { return _NPCName ? (&*_NPCName) : &*(_NPCName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCNAME")); } inline NLMISC::CCDBNodeLeaf *getNPCTitle() { return _NPCTitle ? (&*_NPCTitle) : &*(_NPCTitle = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "NPCTITLE")); } inline NLMISC::CCDBNodeLeaf *getMissionIcon() { return _MissionIcon ? (&*_MissionIcon) : &*(_MissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MISSION_ICON")); } - inline NLMISC::CCDBNodeLeaf *getMiniMissionIcon() { return _MiniMissionIcon ? &*(&*_MiniMissionIcon) : (_MiniMissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MINI_MISSION_ICON")); } + inline NLMISC::CCDBNodeLeaf *getMiniMissionIcon() { return _MiniMissionIcon ? (&*_MiniMissionIcon) : &*(_MiniMissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MINI_MISSION_ICON")); } private: std::string _DBPrefix; NLMISC::CRefPtr _GuildSymbol; From 7a8db939adba2db7b17dc8390f447fcc46b11f80 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 18:22:35 +0200 Subject: [PATCH 8/9] Missed one --- code/ryzom/client/src/interface_v3/sphrase_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 8b832d42b..3d6155d23 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -1124,7 +1124,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase, // **** Compute Phrase Elements from phrase // get the current action malus (0-100) uint32 totalActionMalus= 0; - CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf + CCDBNodeLeaf *actMalus = _TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf : &*(_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); // root brick must not be Power or aura, because Action malus don't apply to them @@ -4506,8 +4506,8 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const CInterfaceManager *pIM = CInterfaceManager::getInstance(); CSBrickManager *pBM= CSBrickManager::getInstance(); uint32 totalActionMalus= 0; - CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf - : (_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); + CCDBNodeLeaf *actMalus = _TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf + : &*(_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); // root brick must not be Power or aura, because Action malus don't apply to them // (ie leave 0 ActionMalus for Aura or Powers if (!phrase.Bricks.empty()) From 7046b6f364e33c84f0cf5ccab24eb9d617735cff Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Jul 2013 21:39:54 +0200 Subject: [PATCH 9/9] NLGUI files dbgroup_combo_box.cpp and dbgroup_select_number.cpp were not linked --- code/nel/src/gui/dbgroup_combo_box.cpp | 6 ++++-- code/nel/src/gui/dbgroup_select_number.cpp | 2 ++ code/nel/src/gui/link_hack.cpp | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp index 83baa93b3..61b8ec3e6 100644 --- a/code/nel/src/gui/dbgroup_combo_box.cpp +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -28,10 +28,12 @@ using namespace std; using namespace NLMISC; -NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupComboBox, std::string, "combo_box"); - namespace NLGUI { + NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupComboBox, std::string, "combo_box"); + + void force_link_dbgroup_combo_box_cpp() { } + // Compare strings static inline bool lt_text(const std::pair &s1, const std::pair &s2) { diff --git a/code/nel/src/gui/dbgroup_select_number.cpp b/code/nel/src/gui/dbgroup_select_number.cpp index 409bf838f..b3dc2e8f1 100644 --- a/code/nel/src/gui/dbgroup_select_number.cpp +++ b/code/nel/src/gui/dbgroup_select_number.cpp @@ -31,6 +31,8 @@ namespace NLGUI { NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupSelectNumber, std::string, "select_number"); + void force_link_dbgroup_select_number_cpp() { } + // *************************************************************************** CDBGroupSelectNumber::CDBGroupSelectNumber(const TCtorParam ¶m) : CInterfaceGroup(param) diff --git a/code/nel/src/gui/link_hack.cpp b/code/nel/src/gui/link_hack.cpp index 7bc058891..1492012e1 100644 --- a/code/nel/src/gui/link_hack.cpp +++ b/code/nel/src/gui/link_hack.cpp @@ -24,6 +24,8 @@ namespace NLGUI { void ifexprufct_forcelink(); + void force_link_dbgroup_select_number_cpp(); + void force_link_dbgroup_combo_box_cpp(); /// Necessary so the linker doesn't drop the code of these classes from the library void LinkHack() @@ -33,5 +35,7 @@ namespace NLGUI CDBViewQuantity::forceLink(); CViewPointer::forceLink(); ifexprufct_forcelink(); + force_link_dbgroup_select_number_cpp(); + force_link_dbgroup_combo_box_cpp(); } } \ No newline at end of file