mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 08:16:16 +00:00
Merge with default
This commit is contained in:
commit
5ff1b42304
17 changed files with 70 additions and 57 deletions
|
@ -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(FLAGS)
|
||||
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
|
||||
|
|
|
@ -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<int,ucstring> &s1, const std::pair<int,ucstring> &s2)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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"
|
||||
|
@ -40,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.
|
||||
|
@ -155,8 +155,8 @@ private:
|
|||
|
||||
// DB node pointers used to update some entity flags
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _MissionTargetTitleDB[MAX_NUM_MISSIONS][MAX_NUM_MISSION_TARGETS];
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GroupMemberUidDB[MaxNumPeopleInTeam];
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GroupMemberNameDB[MaxNumPeopleInTeam];
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GroupMemberUidDB[8]; // MaxNumPeopleInTeam in people_interaction.h
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GroupMemberNameDB[8]; // MaxNumPeopleInTeam in people_interaction.h
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _BeastUidDB[MAX_INVENTORY_ANIMAL];
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _BeastStatusDB[MAX_INVENTORY_ANIMAL];
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _BeastTypeDB[MAX_INVENTORY_ANIMAL];
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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<NLMISC::CCDBNodeLeaf> _GuildSymbol;
|
||||
|
|
|
@ -1983,7 +1983,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
for (uint i=0; i<CHARACTERISTICS::NUM_CHARACTERISTICS; ++i)
|
||||
{
|
||||
NLMISC::CCDBNodeLeaf *node = _CurrentPlayerCharacLeaf[i] ? &*_CurrentPlayerCharacLeaf[i]
|
||||
: (_CurrentPlayerCharacLeaf[i] = NLGUI::CDBManager::getInstance()->getDbProp(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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1124,8 +1124,8 @@ 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
|
||||
: (_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
|
||||
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 //
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -200,7 +200,7 @@ static NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> 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();
|
||||
}
|
||||
|
|
|
@ -79,6 +79,10 @@ static char rz_sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93";
|
|||
#include <limits.h>
|
||||
#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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue