mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-19 15:38:43 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
c8bc57d0a4
17 changed files with 291 additions and 240 deletions
|
@ -1,5 +1,3 @@
|
||||||
PROJECT(NeL CXX C)
|
|
||||||
|
|
||||||
IF(WITH_STATIC_DRIVERS)
|
IF(WITH_STATIC_DRIVERS)
|
||||||
ADD_DEFINITIONS(-DNL_STATIC)
|
ADD_DEFINITIONS(-DNL_STATIC)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -17,7 +15,6 @@ IF(WITH_3D)
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
FIND_PACKAGE(CEGUI)
|
FIND_PACKAGE(CEGUI)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
|
|
|
@ -289,7 +289,7 @@ bool CForm::insertParent (uint before, const std::string &filename, CForm *paren
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Output an error
|
// Output an error
|
||||||
warning (false, "insertParent", "Can't insert parent form (%s) that has not the same DFN.", filename);
|
warning (false, "insertParent", "Can't insert parent form (%s) that has not the same DFN.", filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -171,7 +171,7 @@ CFormDfn *CFormLoader::loadFormDfn (const std::string &filename, bool forceLoad)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Output error
|
// Output error
|
||||||
warning (false, "loadFormDfn", "Can't open the form file (%s).", filename);
|
warning (false, "loadFormDfn", "Can't open the form file (%s).", filename.c_str());
|
||||||
|
|
||||||
// Delete the formDfn
|
// Delete the formDfn
|
||||||
delete formDfn;
|
delete formDfn;
|
||||||
|
@ -182,7 +182,7 @@ CFormDfn *CFormLoader::loadFormDfn (const std::string &filename, bool forceLoad)
|
||||||
catch (const Exception &e)
|
catch (const Exception &e)
|
||||||
{
|
{
|
||||||
// Output error
|
// Output error
|
||||||
warning (false, "loadFormDfn", "Error while loading the form (%s): %s", filename, e.what());
|
warning (false, "loadFormDfn", "Error while loading the form (%s): %s", filename.c_str(), e.what());
|
||||||
|
|
||||||
// Delete the formDfn
|
// Delete the formDfn
|
||||||
delete formDfn;
|
delete formDfn;
|
||||||
|
@ -257,7 +257,7 @@ UForm *CFormLoader::loadForm (const std::string &filename)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Output error
|
// Output error
|
||||||
warning (false, "loadForm", "Can't open the form file (%s).", filename);
|
warning (false, "loadForm", "Can't open the form file (%s).", filename.c_str());
|
||||||
|
|
||||||
// Delete the form
|
// Delete the form
|
||||||
delete form;
|
delete form;
|
||||||
|
@ -279,7 +279,7 @@ UForm *CFormLoader::loadForm (const std::string &filename)
|
||||||
catch (const Exception &e)
|
catch (const Exception &e)
|
||||||
{
|
{
|
||||||
// Output error
|
// Output error
|
||||||
warning (false, "loadForm", "Error while loading the form (%s): %s", filename, e.what());
|
warning (false, "loadForm", "Error while loading the form (%s): %s", filename.c_str(), e.what());
|
||||||
|
|
||||||
// Delete the form
|
// Delete the form
|
||||||
delete form;
|
delete form;
|
||||||
|
@ -317,7 +317,7 @@ void CFormLoader::warning (bool exception, const std::string &function, const ch
|
||||||
va_end( args );
|
va_end( args );
|
||||||
|
|
||||||
// Set the warning
|
// Set the warning
|
||||||
NLGEORGES::warning (exception, "(CFormLoader::%s) : %s", function, buffer);
|
NLGEORGES::warning (exception, "(CFormLoader::%s) : %s", function.c_str(), buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -831,14 +831,15 @@ void CUnifiedNetwork::addService(const string &name, const vector<CInetAddress>
|
||||||
|
|
||||||
uint j = 0;
|
uint j = 0;
|
||||||
|
|
||||||
|
// it's loopback ip address, it's ok
|
||||||
if (!addr[i].isLoopbackIPAddress())
|
if (!addr[i].isLoopbackIPAddress())
|
||||||
{
|
{
|
||||||
// it's loopback ip address, it's ok
|
|
||||||
for (j = 0; j < laddr.size (); j++)
|
for (j = 0; j < laddr.size (); j++)
|
||||||
{
|
{
|
||||||
if (laddr[j].internalNetAddress () == addr[i].internalNetAddress ())
|
if (laddr[j].internalNetAddress () == addr[i].internalNetAddress ())
|
||||||
{
|
{
|
||||||
break; // it's ok, we can try
|
// it's ok, we can try
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1272,7 +1273,8 @@ uint8 CUnifiedNetwork::findConnectionId (TServiceId sid, uint8 nid)
|
||||||
uint8 connectionId = _IdCnx[sid.get()].DefaultNetwork;
|
uint8 connectionId = _IdCnx[sid.get()].DefaultNetwork;
|
||||||
|
|
||||||
if (nid == 0xFF)
|
if (nid == 0xFF)
|
||||||
{ // default network
|
{
|
||||||
|
// default network
|
||||||
//nldebug ("HNETL5: nid %hu, will use the default connection %hu", (uint16)nid, (uint16)connectionId);
|
//nldebug ("HNETL5: nid %hu, will use the default connection %hu", (uint16)nid, (uint16)connectionId);
|
||||||
}
|
}
|
||||||
else if (nid >= _IdCnx[sid.get()].NetworkConnectionAssociations.size())
|
else if (nid >= _IdCnx[sid.get()].NetworkConnectionAssociations.size())
|
||||||
|
@ -1293,7 +1295,6 @@ uint8 CUnifiedNetwork::findConnectionId (TServiceId sid, uint8 nid)
|
||||||
|
|
||||||
if (connectionId >= _IdCnx[sid.get()].Connections.size() || !_IdCnx[sid.get()].Connections[connectionId].valid() || !_IdCnx[sid.get()].Connections[connectionId].CbNetBase->connected())
|
if (connectionId >= _IdCnx[sid.get()].Connections.size() || !_IdCnx[sid.get()].Connections[connectionId].valid() || !_IdCnx[sid.get()].Connections[connectionId].CbNetBase->connected())
|
||||||
{
|
{
|
||||||
|
|
||||||
if (nid != 0xFF)
|
if (nid != 0xFF)
|
||||||
{
|
{
|
||||||
// not a default network. There's a problem with the selected connectionID, so try to find a valid one
|
// not a default network. There's a problem with the selected connectionID, so try to find a valid one
|
||||||
|
|
|
@ -732,9 +732,8 @@ bool CEntityManager::instancesRemoved()
|
||||||
return instRemoved;
|
return instRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const vector<string> &values)
|
||||||
|
{
|
||||||
bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const vector<string> &values) {
|
|
||||||
if (!Scene || idx >= _ShapeInstances.size() || _ShapeInstances[idx].Deleted)
|
if (!Scene || idx >= _ShapeInstances.size() || _ShapeInstances[idx].Deleted)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -881,6 +880,8 @@ bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const
|
||||||
primitive->setObstacle(active);
|
primitive->setObstacle(active);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2654,7 +2654,6 @@ class CAHAddShape : public IActionHandler
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER (CAHAddShape, "add_shape");
|
REGISTER_ACTION_HANDLER (CAHAddShape, "add_shape");
|
||||||
|
|
||||||
|
|
||||||
class CAHRemoveShapes : public IActionHandler
|
class CAHRemoveShapes : public IActionHandler
|
||||||
{
|
{
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -219,7 +219,7 @@ private:
|
||||||
static int getMouseRightDown(CLuaState &ls);
|
static int getMouseRightDown(CLuaState &ls);
|
||||||
static int getShapeIdAt(CLuaState &ls);
|
static int getShapeIdAt(CLuaState &ls);
|
||||||
static int setupShape(CLuaState &ls);
|
static int setupShape(CLuaState &ls);
|
||||||
static void setMouseCursor(const std::string texture);
|
static void setMouseCursor(const std::string &texture);
|
||||||
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
|
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
|
||||||
// else, current command of the chat window will be replaced with tell 'player'
|
// else, current command of the chat window will be replaced with tell 'player'
|
||||||
static void tell(const ucstring &player, const ucstring &msg);
|
static void tell(const ucstring &player, const ucstring &msg);
|
||||||
|
|
|
@ -797,7 +797,7 @@ bool CTool::isMouseCaptured()
|
||||||
}
|
}
|
||||||
|
|
||||||
// *********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CTool::setMouseCursor(const char *cursorTexture)
|
void CTool::setMouseCursor(const std::string &cursorTexture)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CTool_setMouseCursor)
|
//H_AUTO(R2_CTool_setMouseCursor)
|
||||||
CViewPointer *cursor = static_cast< CViewPointer* >( CWidgetManager::getInstance()->getPointer() );
|
CViewPointer *cursor = static_cast< CViewPointer* >( CWidgetManager::getInstance()->getPointer() );
|
||||||
|
|
|
@ -224,8 +224,7 @@ public:
|
||||||
// Get mouse y position
|
// Get mouse y position
|
||||||
static sint32 getMouseY();
|
static sint32 getMouseY();
|
||||||
// Set the current mouse cursor
|
// Set the current mouse cursor
|
||||||
static void setMouseCursor(const char *cursorTexture);
|
static void setMouseCursor(const std::string &cursorTexture);
|
||||||
static void setMouseCursor(const std::string &cursorTexture) { setMouseCursor(cursorTexture.c_str()); }
|
|
||||||
/** Compute a view vector (with its direction z set to 1) from coordinate of the mouse on screen
|
/** Compute a view vector (with its direction z set to 1) from coordinate of the mouse on screen
|
||||||
* If the mouse is on the island map, then a vector looking down from heights will be returned
|
* If the mouse is on the island map, then a vector looking down from heights will be returned
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -414,21 +414,21 @@ void CToolChoosePos::updateBeforeRender()
|
||||||
{
|
{
|
||||||
if (_MultiPos && isShiftDown() && !_MultiPosLocked)
|
if (_MultiPos && isShiftDown() && !_MultiPosLocked)
|
||||||
{
|
{
|
||||||
setMouseCursor(_CursValidMulti.c_str());
|
setMouseCursor(_CursValidMulti);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setMouseCursor(_CursValid.c_str());
|
setMouseCursor(_CursValid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setMouseCursor(_CursInvalid.c_str());
|
setMouseCursor(_CursInvalid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setMouseCursor(_CursValid.c_str());
|
setMouseCursor(_CursValid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ void CToolCreateEntity::updateBeforeRender()
|
||||||
}
|
}
|
||||||
CGroupMap *worldMap = getWorldMap();
|
CGroupMap *worldMap = getWorldMap();
|
||||||
if (worldMap) worldMap->setSelectionAxis(_ValidArray);
|
if (worldMap) worldMap->setSelectionAxis(_ValidArray);
|
||||||
setMouseCursor(_ValidArray ? _CursValid.c_str() : _CursInvalid.c_str());
|
setMouseCursor(_ValidArray ? _CursValid : _CursInvalid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************
|
// ***************************************************************
|
||||||
|
|
Loading…
Reference in a new issue