mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 01:48:44 +00:00
Merge with develop
This commit is contained in:
parent
f3147c7616
commit
861a9b399a
16 changed files with 40 additions and 42 deletions
|
@ -888,9 +888,11 @@ MACRO(NL_SETUP_BUILD)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# never display these warnings because they are minor
|
# never display these warnings because they are minor
|
||||||
ADD_PLATFORM_FLAGS("-Wno-unused-parameter -Wno-unused-variable -Wunused-function -Wunused-value")
|
ADD_PLATFORM_FLAGS("-Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-value")
|
||||||
|
|
||||||
IF(CLANG)
|
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.0.0")
|
||||||
|
ADD_PLATFORM_FLAGS("-Wno-unused-local-typedefs")
|
||||||
|
ELSEIF(CLANG)
|
||||||
ADD_PLATFORM_FLAGS("-Wno-unused-private-field -Wno-unused-local-typedef")
|
ADD_PLATFORM_FLAGS("-Wno-unused-private-field -Wno-unused-local-typedef")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
@ -228,15 +228,21 @@ namespace NLGUI
|
||||||
|
|
||||||
// path already has leading slash
|
// path already has leading slash
|
||||||
if (!path.empty())
|
if (!path.empty())
|
||||||
|
{
|
||||||
result += path;
|
result += path;
|
||||||
|
}
|
||||||
|
|
||||||
if (!query.empty())
|
if (!query.empty())
|
||||||
if (query.find_first_of("?") != 0)
|
{
|
||||||
result += "?";
|
if (query.find_first_of("?") != 0) result += "?";
|
||||||
|
|
||||||
result += query;
|
result += query;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hash.empty())
|
if (!hash.empty())
|
||||||
|
{
|
||||||
result += "#" + hash;
|
result += "#" + hash;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1395,7 +1395,7 @@ void CPrimitiveWorldImage::reaction (const CCollisionSurfaceDesc& surfaceDesc, c
|
||||||
void CPrimitiveWorldImage::setGlobalPosition (const UGlobalPosition& pos, CMoveContainer& container, CMovePrimitive &primitive, uint8 worldImage)
|
void CPrimitiveWorldImage::setGlobalPosition (const UGlobalPosition& pos, CMoveContainer& container, CMovePrimitive &primitive, uint8 worldImage)
|
||||||
{
|
{
|
||||||
// Cast type
|
// Cast type
|
||||||
nlassert (dynamic_cast<const CMoveContainer*>(&container));
|
nlassert (dynamic_cast<const CMoveContainer*>(&container) != NULL);
|
||||||
const CMoveContainer *cont=(const CMoveContainer*)&container;
|
const CMoveContainer *cont=(const CMoveContainer*)&container;
|
||||||
|
|
||||||
if (!cont->getGlobalRetriever()) return;
|
if (!cont->getGlobalRetriever()) return;
|
||||||
|
|
|
@ -62,7 +62,7 @@ CGroupController::~CGroupController()
|
||||||
|
|
||||||
void CGroupController::addSource(CSourceCommon *source)
|
void CGroupController::addSource(CSourceCommon *source)
|
||||||
{
|
{
|
||||||
nlassert(this);
|
nlassert(this != NULL);
|
||||||
|
|
||||||
m_Sources.insert(source);
|
m_Sources.insert(source);
|
||||||
increaseSources();
|
increaseSources();
|
||||||
|
|
|
@ -3204,17 +3204,20 @@ class CHandlerGameConfigMode : public IActionHandler
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
string tmp = toString(VideoModes[i].Frequency);
|
string tmp = toString(VideoModes[i].Frequency);
|
||||||
for (j = 0; j < (sint)stringFreqList.size(); ++j)
|
for (j = 0; j < (sint)stringFreqList.size(); ++j)
|
||||||
|
{
|
||||||
if (stringFreqList[j] == tmp)
|
if (stringFreqList[j] == tmp)
|
||||||
{
|
{
|
||||||
bFound = true;
|
bFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!bFound)
|
}
|
||||||
{
|
|
||||||
stringFreqList.push_back(tmp);
|
if (!bFound)
|
||||||
if (ClientCfg.Frequency == VideoModes[i].Frequency)
|
{
|
||||||
nFoundFreq = j;
|
stringFreqList.push_back(tmp);
|
||||||
}
|
if (ClientCfg.Frequency == VideoModes[i].Frequency)
|
||||||
|
nFoundFreq = j;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nFoundFreq == -1) nFoundFreq = 0;
|
if (nFoundFreq == -1) nFoundFreq = 0;
|
||||||
|
|
|
@ -284,7 +284,6 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
|
|
||||||
// If some free window possible, search which to take
|
// If some free window possible, search which to take
|
||||||
sint newIndexWindow= -1;
|
sint newIndexWindow= -1;
|
||||||
bool mustPlace= true;
|
|
||||||
bool mustAddToActiveWindows= true;
|
bool mustAddToActiveWindows= true;
|
||||||
// if an active window is not in KeepMode, get it.
|
// if an active window is not in KeepMode, get it.
|
||||||
for(i=0;i<_ActiveWindows.size();i++)
|
for(i=0;i<_ActiveWindows.size();i++)
|
||||||
|
@ -293,7 +292,6 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
if(!_InfoWindows[_ActiveWindows[i]].KeepMode && forceKeepWindow!=(sint)_ActiveWindows[i])
|
if(!_InfoWindows[_ActiveWindows[i]].KeepMode && forceKeepWindow!=(sint)_ActiveWindows[i])
|
||||||
{
|
{
|
||||||
newIndexWindow= _ActiveWindows[i];
|
newIndexWindow= _ActiveWindows[i];
|
||||||
mustPlace= false;
|
|
||||||
mustAddToActiveWindows= false;
|
mustAddToActiveWindows= false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1816,7 +1816,6 @@ void CDBCtrlSheet::draw()
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
CRGBA color = CRGBA(255,255,255,255);
|
|
||||||
|
|
||||||
if (_Type != SheetType_Macro)
|
if (_Type != SheetType_Macro)
|
||||||
{
|
{
|
||||||
|
|
|
@ -840,13 +840,13 @@ bool CGroupMap::getCtrlsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, s
|
||||||
(y < (clipY + clipH))))
|
(y < (clipY + clipH))))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool bFound = false;
|
// bool bFound = false;
|
||||||
for (uint32 i = 0; i < _PolyButtons.size(); ++i)
|
for (uint32 i = 0; i < _PolyButtons.size(); ++i)
|
||||||
{
|
{
|
||||||
if (_PolyButtons[i]->contains(CVector2f((float)x,(float)y)))
|
if (_PolyButtons[i]->contains(CVector2f((float)x,(float)y)))
|
||||||
{
|
{
|
||||||
vICL.push_back(_PolyButtons[i]);
|
vICL.push_back(_PolyButtons[i]);
|
||||||
bFound = true;
|
// bFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CInterfaceGroup::getCtrlsUnder(x, y, clipX, clipY, clipW, clipH, vICL);
|
return CInterfaceGroup::getCtrlsUnder(x, y, clipX, clipY, clipW, clipH, vICL);
|
||||||
|
|
|
@ -250,7 +250,6 @@ void CInterfaceDDX::CParam::backupDB()
|
||||||
|
|
||||||
if (Widget == ColorButton)
|
if (Widget == ColorButton)
|
||||||
{
|
{
|
||||||
CRGBA col = CRGBA::White;
|
|
||||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||||
if (pNL != NULL)
|
if (pNL != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -795,8 +795,8 @@ void CInterfaceManager::uninitOutGame()
|
||||||
|
|
||||||
CInterfaceItemEdition::getInstance()->setCurrWindow(NULL);
|
CInterfaceItemEdition::getInstance()->setCurrWindow(NULL);
|
||||||
|
|
||||||
NLMISC::TTime initStart;
|
// NLMISC::TTime initStart;
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
if (SoundMngr != NULL)
|
if (SoundMngr != NULL)
|
||||||
{
|
{
|
||||||
NLSOUND::UAudioMixer *pMixer = SoundMngr->getMixer();
|
NLSOUND::UAudioMixer *pMixer = SoundMngr->getMixer();
|
||||||
|
@ -804,23 +804,23 @@ void CInterfaceManager::uninitOutGame()
|
||||||
}
|
}
|
||||||
//nlinfo ("%d seconds for uninitOutGame", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for uninitOutGame", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
|
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", false);
|
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", false);
|
||||||
|
|
||||||
CInterfaceParser *parser = dynamic_cast< CInterfaceParser* >( CWidgetManager::getInstance()->getParser() );
|
CInterfaceParser *parser = dynamic_cast< CInterfaceParser* >( CWidgetManager::getInstance()->getParser() );
|
||||||
//nlinfo ("%d seconds for activateMasterGroup", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for activateMasterGroup", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
parser->removeAll();
|
parser->removeAll();
|
||||||
//nlinfo ("%d seconds for removeAll", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for removeAll", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
reset();
|
reset();
|
||||||
//nlinfo ("%d seconds for reset", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for reset", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
// reset the mouse pointer to avoid invalid pointer access
|
// reset the mouse pointer to avoid invalid pointer access
|
||||||
CWidgetManager::getInstance()->setPointer( NULL );
|
CWidgetManager::getInstance()->setPointer( NULL );
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
CInterfaceLink::removeAllLinks();
|
CInterfaceLink::removeAllLinks();
|
||||||
//nlinfo ("%d seconds for removeAllLinks", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for removeAllLinks", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
ICDBNode::CTextId textId("UI");
|
ICDBNode::CTextId textId("UI");
|
||||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||||
//nlinfo ("%d seconds for removeNode", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for removeNode", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
|
@ -828,7 +828,7 @@ void CInterfaceManager::uninitOutGame()
|
||||||
// Init the action manager
|
// Init the action manager
|
||||||
{
|
{
|
||||||
|
|
||||||
initStart = ryzomGetLocalTime ();
|
// initStart = ryzomGetLocalTime ();
|
||||||
uninitActions();
|
uninitActions();
|
||||||
// nlinfo ("%d seconds for uninitActions", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
// nlinfo ("%d seconds for uninitActions", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ void CMusicPlayer::play (sint index)
|
||||||
if(!SoundMngr)
|
if(!SoundMngr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (index >= 0 && index < _Songs.size())
|
if (index >= 0 && index < (sint)_Songs.size())
|
||||||
{
|
{
|
||||||
if (_State == Paused)
|
if (_State == Paused)
|
||||||
stop();
|
stop();
|
||||||
|
|
|
@ -525,7 +525,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch,
|
||||||
}
|
}
|
||||||
|
|
||||||
SXDeltaCtrl::SSourceInfo *pFromSource = NULL;
|
SXDeltaCtrl::SSourceInfo *pFromSource = NULL;
|
||||||
SXDeltaCtrl::SSourceInfo *pDataSource = NULL;
|
// SXDeltaCtrl::SSourceInfo *pDataSource = NULL;
|
||||||
|
|
||||||
if (_Ctrl.SourceInfo.size() > 0)
|
if (_Ctrl.SourceInfo.size() > 0)
|
||||||
{
|
{
|
||||||
|
@ -533,7 +533,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch,
|
||||||
|
|
||||||
if (rInfo.IsData)
|
if (rInfo.IsData)
|
||||||
{
|
{
|
||||||
pDataSource = &rInfo;
|
// pDataSource = &rInfo;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2030,7 +2030,7 @@ void CNetworkConnection::sendNormalMessage()
|
||||||
uint numPacked = 0;
|
uint numPacked = 0;
|
||||||
|
|
||||||
// pack each block
|
// pack each block
|
||||||
TGameCycle lastPackedCycle = 0;
|
// TGameCycle lastPackedCycle = 0;
|
||||||
list<CActionBlock>::iterator itblock;
|
list<CActionBlock>::iterator itblock;
|
||||||
|
|
||||||
//nldebug("CNET[%p]: sending message %d", this, _CurrentSendNumber);
|
//nldebug("CNET[%p]: sending message %d", this, _CurrentSendNumber);
|
||||||
|
@ -2052,7 +2052,7 @@ void CNetworkConnection::sendNormalMessage()
|
||||||
|
|
||||||
//nlassertex((*itblock).Cycle > lastPackedCycle, ("(*itblock).Cycle=%d lastPackedCycle=%d", (*itblock).Cycle, lastPackedCycle));
|
//nlassertex((*itblock).Cycle > lastPackedCycle, ("(*itblock).Cycle=%d lastPackedCycle=%d", (*itblock).Cycle, lastPackedCycle));
|
||||||
|
|
||||||
lastPackedCycle = block.Cycle;
|
// lastPackedCycle = block.Cycle;
|
||||||
|
|
||||||
block.serial(message);
|
block.serial(message);
|
||||||
++numPacked;
|
++numPacked;
|
||||||
|
|
|
@ -121,9 +121,6 @@ CPlayerR2CL::~CPlayerR2CL()
|
||||||
|
|
||||||
CGenderInfo * CPlayerR2CL::getGenderInfo()
|
CGenderInfo * CPlayerR2CL::getGenderInfo()
|
||||||
{
|
{
|
||||||
string propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPB);
|
|
||||||
sint64 vA = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
|
||||||
SPropVisualA visualA = *(SPropVisualA *)(&vA);
|
|
||||||
EGSPD::CPeople::TPeople ePeople = _Sheet->Race;
|
EGSPD::CPeople::TPeople ePeople = _Sheet->Race;
|
||||||
bool bMale = (_Sheet->Gender == GSGENDER::male);
|
bool bMale = (_Sheet->Gender == GSGENDER::male);
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,6 @@ void CInstanceMapDeco::onPreRender(CGroupMap &groupMap)
|
||||||
{
|
{
|
||||||
_Orient->setActive(true);
|
_Orient->setActive(true);
|
||||||
_Orient->setColorRGBA(CRGBA(255, 255, 255, (uint8) (255 * _OrientBlendFactor)));
|
_Orient->setColorRGBA(CRGBA(255, 255, 255, (uint8) (255 * _OrientBlendFactor)));
|
||||||
CVector2f worldPos = getWorldPos();
|
|
||||||
sint32 x;
|
sint32 x;
|
||||||
sint32 y;
|
sint32 y;
|
||||||
groupMap.worldToWindowSnapped(x, y, getWorldPos());
|
groupMap.worldToWindowSnapped(x, y, getWorldPos());
|
||||||
|
|
|
@ -231,13 +231,11 @@ void CToolChoosePos::updateBeforeRender()
|
||||||
if (entity)
|
if (entity)
|
||||||
{
|
{
|
||||||
CMatrix mat;
|
CMatrix mat;
|
||||||
bool shown = false;
|
|
||||||
if (worldViewRay.OnMiniMap && rayIntersectionType == NoIntersection)
|
if (worldViewRay.OnMiniMap && rayIntersectionType == NoIntersection)
|
||||||
{
|
{
|
||||||
entity->show(false);
|
entity->show(false);
|
||||||
}
|
}
|
||||||
else
|
else if (!entity->skeleton())
|
||||||
if (!entity->skeleton())
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
nlwarning("Selected entity for the 'create' tool has no skeleton");
|
nlwarning("Selected entity for the 'create' tool has no skeleton");
|
||||||
|
@ -266,7 +264,6 @@ void CToolChoosePos::updateBeforeRender()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entity->show(true);
|
entity->show(true);
|
||||||
shown = true;
|
|
||||||
//
|
//
|
||||||
CQuat frontQuat(CVector::K, _CreateAngle - (float) (NLMISC::Pi / 2));
|
CQuat frontQuat(CVector::K, _CreateAngle - (float) (NLMISC::Pi / 2));
|
||||||
inst.setRotQuat(frontQuat);
|
inst.setRotQuat(frontQuat);
|
||||||
|
@ -277,7 +274,6 @@ void CToolChoosePos::updateBeforeRender()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
entity->show(true);
|
entity->show(true);
|
||||||
shown = true;
|
|
||||||
//
|
//
|
||||||
entity->updateVisible(T1, NULL);
|
entity->updateVisible(T1, NULL);
|
||||||
entity->updatePos(T1, NULL);
|
entity->updatePos(T1, NULL);
|
||||||
|
@ -293,7 +289,6 @@ void CToolChoosePos::updateBeforeRender()
|
||||||
mat.setRot(frontQuat);
|
mat.setRot(frontQuat);
|
||||||
mat.setPos(entityPos);
|
mat.setPos(entityPos);
|
||||||
*/
|
*/
|
||||||
CMatrix skelMatrix = entity->skeleton()->getMatrix();
|
|
||||||
// relative position to skeleton root
|
// relative position to skeleton root
|
||||||
CVector skelRootRelativePos = entity->skeleton()->getMatrix().getPos() - entity->pos().asVector();
|
CVector skelRootRelativePos = entity->skeleton()->getMatrix().getPos() - entity->pos().asVector();
|
||||||
// combine quat for front face xform & anim quat
|
// combine quat for front face xform & anim quat
|
||||||
|
|
Loading…
Reference in a new issue