Merge branch 'develop' into ryzomclassic-develop

ryzomclassic-develop
Jan Boon 5 years ago
commit a94094f865

@ -27,7 +27,7 @@ namespace NLMISC
NLMISC_SAFE_SINGLETON_IMPL(CStreamedPackageManager); NLMISC_SAFE_SINGLETON_IMPL(CStreamedPackageManager);
CStreamedPackageManager::CStreamedPackageManager() CStreamedPackageManager::CStreamedPackageManager() : Provider(NULL)
{ {
// init // init
} }

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -17,6 +20,8 @@
#include "stdpacs.h" #include "stdpacs.h"
#include "nel/pacs/build_indoor.h" #include "nel/pacs/build_indoor.h"
#include <sstream>
#include "nel/pacs/collision_mesh_build.h" #include "nel/pacs/collision_mesh_build.h"
#include "nel/pacs/local_retriever.h" #include "nel/pacs/local_retriever.h"
#include "nel/pacs/exterior_mesh.h" #include "nel/pacs/exterior_mesh.h"
@ -518,24 +523,26 @@ void linkExteriorToInterior(CLocalRetriever &lr)
for (i=0; i<bchains.size(); ++i) for (i=0; i<bchains.size(); ++i)
{ {
static char buf[512], w[256]; char w[256];
std::stringstream ss;
const CChain &chain = chains[bchains[i]]; const CChain &chain = chains[bchains[i]];
sprintf(buf, "chain=%d ", bchains[i]); sprintf(w, "chain=%d ", bchains[i]);
ss << w;
uint och; uint och;
for (och=0; och<chain.getSubChains().size(); ++och) for (och=0; och<chain.getSubChains().size(); ++och)
{ {
const COrderedChain3f &ochain = ochains[chain.getSubChain(och)]; const COrderedChain3f &ochain = ochains[chain.getSubChain(och)];
sprintf(w, "subchain=%d", chain.getSubChain(och)); sprintf(w, "subchain=%d", chain.getSubChain(och));
strcat(buf, w); ss << w;
uint v; uint v;
for (v=0; v<ochain.getVertices().size(); ++v) for (v=0; v<ochain.getVertices().size(); ++v)
{ {
sprintf(w, " (%.2f,%.2f)", ochain[v].x, ochain[v].y); sprintf(w, " (%.2f,%.2f)", ochain[v].x, ochain[v].y);
strcat(buf, w); ss << w;
} }
} }
nlinfo("%s", buf); nlinfo("%s", ss.str().c_str());
} }
} }

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2015 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -19,6 +19,8 @@
#include "stdpacs.h" #include "stdpacs.h"
#include <sstream>
#include "nel/misc/plane.h" #include "nel/misc/plane.h"
#include "nel/pacs/local_retriever.h" #include "nel/pacs/local_retriever.h"
@ -269,15 +271,16 @@ void NLPACS::CLocalRetriever::dumpSurface(uint surf, const CVector &vect) const
{ {
const CRetrievableSurface::TLoop &loop = surface._Loops[i]; const CRetrievableSurface::TLoop &loop = surface._Loops[i];
nlinfo("-- loop %d: %d chains length=%.2f", i, loop.size(), loop.Length); nlinfo("-- loop %d: %d chains length=%.2f", i, loop.size(), loop.Length);
static char wbuffer[256]; char wbuffer[256];
static char buffer[10240]; stringstream ss;
sprintf(buffer, " chains:"); sprintf(wbuffer, " chains:");
ss << wbuffer;
for (j=0; j<loop.size(); ++j) for (j=0; j<loop.size(); ++j)
{ {
sprintf(wbuffer, " %d[%d]", loop[j], surface._Chains[loop[j]].Chain); sprintf(wbuffer, " %d[%d]", loop[j], surface._Chains[loop[j]].Chain);
strcat(buffer, wbuffer); ss << wbuffer;
} }
nlinfo("%s", buffer); nlinfo("%s", ss.str().c_str());
} }
} }

@ -27,10 +27,10 @@ BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", AUTHOR VALUE "CompanyName", AUTHOR
VALUE "FileDescription", "NeL Zone Heightmap" VALUE "FileDescription", "NeL Zone Elevation"
VALUE "FileVersion", NL_VERSION VALUE "FileVersion", NL_VERSION
VALUE "LegalCopyright", COPYRIGHT VALUE "LegalCopyright", COPYRIGHT
VALUE "OriginalFilename", "zone_heightmap" NL_FILEEXT ".exe" VALUE "OriginalFilename", "zone_elevation" NL_FILEEXT ".exe"
VALUE "ProductName", "NeL Tools" VALUE "ProductName", "NeL Tools"
VALUE "ProductVersion", NL_PRODUCT_VERSION VALUE "ProductVersion", NL_PRODUCT_VERSION
END END

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -18,6 +21,10 @@
#include "../zone_lib/zone_utility.h" #include "../zone_lib/zone_utility.h"
#include <iostream> #include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/common.h" #include "nel/misc/common.h"
@ -27,8 +34,6 @@
#include "nel/3d/zone_smoother.h" #include "nel/3d/zone_smoother.h"
#include "nel/3d/zone_tgt_smoother.h" #include "nel/3d/zone_tgt_smoother.h"
#include "nel/3d/zone_corner_smoother.h" #include "nel/3d/zone_corner_smoother.h"
#include <vector>
#include <set>
using namespace NL3D; using namespace NL3D;
@ -579,7 +584,8 @@ void weldZones(const char *center)
if (adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs!=0) if (adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs!=0)
{ {
// Build an error message // Build an error message
char error[8000]; char buf[2048];
stringstream sserror;
// Zone name // Zone name
string nameCenter, nameAdj; string nameCenter, nameAdj;
@ -587,10 +593,11 @@ void weldZones(const char *center)
getZoneNameByCoord (adjZonesId[i]&0xff, (adjZonesId[i]>>8)+1, nameAdj); getZoneNameByCoord (adjZonesId[i]&0xff, (adjZonesId[i]>>8)+1, nameAdj);
// Main message // Main message
smprintf (error, 2048, smprintf(buf, 2048,
"Bind Error: try to bind the patch n %d in zone n %s with patch n %d in zone %s\n" "Bind Error: try to bind the patch n %d in zone n %s with patch n %d in zone %s\n"
"This patch is already binded with the following patches : ", ptch+1, nameAdj.c_str(), "This patch is already binded with the following patches : ", ptch+1, nameAdj.c_str(),
patchIndex+1, nameCenter.c_str() ); patchIndex+1, nameCenter.c_str() );
sserror << buf;
// Sub message // Sub message
for (uint i=0; i<adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs; i++) for (uint i=0; i<adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs; i++)
@ -599,16 +606,15 @@ void weldZones(const char *center)
bool last=(i==(uint)(adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs-1)); bool last=(i==(uint)(adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs-1));
// Sub message // Sub message
char subMessage[512]; smprintf(buf, 2048,
smprintf ( subMessage, 512,
"patch n %d%s", adjZonePatchs[patchIndex].BindEdges[edgeIndex].Next[i]+1, last?"\n":","); "patch n %d%s", adjZonePatchs[patchIndex].BindEdges[edgeIndex].Next[i]+1, last?"\n":",");
// Concat the message // Concat the message
strcat (error, subMessage); sserror << buf;
} }
// Add an error message // Add an error message
errorMessage.push_back (error); errorMessage.push_back(sserror.str());
} }
else else
{ {

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -16,6 +19,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include <sstream>
#include "nel/pacs/collision_mesh_build.h" #include "nel/pacs/collision_mesh_build.h"
#include "nel/pacs/local_retriever.h" #include "nel/pacs/local_retriever.h"
@ -278,24 +282,26 @@ void linkExteriorToInterior(CLocalRetriever &lr)
for (i=0; i<bchains.size(); ++i) for (i=0; i<bchains.size(); ++i)
{ {
static char buf[512], w[256]; char w[256];
std::stringstream ss;
const CChain &chain = chains[bchains[i]]; const CChain &chain = chains[bchains[i]];
sprintf(buf, "Border chain %d: chain=%d ", i, bchains[i]); sprintf(w, "Border chain %d: chain=%d ", i, bchains[i]);
ss << w;
uint och; uint och;
for (och=0; och<chain.getSubChains().size(); ++och) for (och=0; och<chain.getSubChains().size(); ++och)
{ {
const COrderedChain3f &ochain = ochains[chain.getSubChain(och)]; const COrderedChain3f &ochain = ochains[chain.getSubChain(och)];
sprintf(w, "subchain=%d", chain.getSubChain(och)); sprintf(w, "subchain=%d", chain.getSubChain(och));
strcat(buf, w); ss << w;
uint v; uint v;
for (v=0; v<ochain.getVertices().size(); ++v) for (v=0; v<ochain.getVertices().size(); ++v)
{ {
sprintf(w, " (%.2f,%.2f)", ochain[v].x, ochain[v].y); sprintf(w, " (%.2f,%.2f)", ochain[v].x, ochain[v].y);
strcat(buf, w); ss << w;
} }
} }
nlinfo("%s", buf); nlinfo("%s", ss.str().c_str());
} }
} }

@ -883,7 +883,7 @@ void NLPACS::CZoneTessellation::checkSameLandscapeHmBinds(const NL3D::CLandscape
// or at least the welding of zones should just keep the same welding as the non heightmapped one // or at least the welding of zones should just keep the same welding as the non heightmapped one
nlwarning("ERROR: The zone %s has a different bind strucutre in the landscape and in the landscape_with_No_Heightmap", zoneName.c_str()); nlwarning("ERROR: The zone %s has a different bind strucutre in the landscape and in the landscape_with_No_Heightmap", zoneName.c_str());
nlwarning("ERROR: Hint: Check your heightmap: it may be too precise or has too much noise, causing the zonewelder to behav differently..."); nlwarning("ERROR: Hint: Check your heightmap: it may be too precise or has too much noise, causing the zonewelder to behav differently...");
nlwarning("ERROR: Use the 'zone_heightmap' tool to resolve this!"); nlwarning("TIP: Use the 'zone_elevation' tool on the welded no-heightmap zones to resolve this!");
nlwarning("More Details (information landscape / information landscape_with_No_Heightmap):"); nlwarning("More Details (information landscape / information landscape_with_No_Heightmap):");
for(uint j=0;j<errors.size();j++) for(uint j=0;j<errors.size();j++)
{ {

@ -1091,27 +1091,27 @@ bool CGeorgesEditApp::SerialIntoMemStream (const char *formName, CGeorgesEditDoc
{ {
if (array) if (array)
{ {
(safe_cast<const CFormElmArray*> (node))->write (nodeXml, doc->getFormPtr(), NULL); (safe_cast<const CFormElmArray*> (node))->write (nodeXml, doc->getFormPtr(), std::string());
} }
else else
{ {
if (type == UFormDfn::EntryDfn) if (type == UFormDfn::EntryDfn)
{ {
(safe_cast<const CFormElmStruct*> (node))->write (nodeXml, doc->getFormPtr(), NULL); (safe_cast<const CFormElmStruct*> (node))->write (nodeXml, doc->getFormPtr(), std::string());
} }
else if (type == UFormDfn::EntryVirtualDfn) else if (type == UFormDfn::EntryVirtualDfn)
{ {
(safe_cast<const CFormElmVirtualStruct*> (node))->write (nodeXml, doc->getFormPtr(), NULL); (safe_cast<const CFormElmVirtualStruct*> (node))->write (nodeXml, doc->getFormPtr(), std::string());
} }
else if (type == UFormDfn::EntryType) else if (type == UFormDfn::EntryType)
{ {
(safe_cast<const CFormElmAtom*> (node))->write (nodeXml, doc->getFormPtr(), NULL); (safe_cast<const CFormElmAtom*> (node))->write (nodeXml, doc->getFormPtr(), std::string());
} }
} }
} }
else else
{ {
(safe_cast<const CFormElmVirtualStruct*> (node))->write (nodeXml, doc->getFormPtr(), NULL); (safe_cast<const CFormElmVirtualStruct*> (node))->write (nodeXml, doc->getFormPtr(), std::string());
} }
} }

@ -1,6 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -16,6 +19,8 @@
#include "stdafx.h" #include "stdafx.h"
#include <sstream>
#include "editor_primitive.h" #include "editor_primitive.h"
#include "generate_primitive.h" #include "generate_primitive.h"
#include "world_editor.h" #include "world_editor.h"
@ -361,18 +366,15 @@ bool CGeneratePrimitive::generate (std::vector< std::vector<IPrimitive*> > &dest
} }
// Error ? // Error ?
if (!_FileNotFound.empty ()) if (!_FileNotFound.empty())
{ {
// Continue ? // Continue ?
char message[2048]; stringstream ssmessage;
message[0] = 0; for (uint i = 0; i < _FileNotFound.size(); i++)
for (uint i=0; i<_FileNotFound.size (); i++)
{ {
strcat (message, _FileNotFound[i].c_str ()); ssmessage << _FileNotFound[i] << "\n";
strcat (message, "\n");
} }
if (!theApp.yesNoMessage("Can't load some files:\n%s\nContinue ?", ssmessage.str()))
if (!theApp.yesNoMessage ("Can't load some files:\n%s\nContinue ?", message))
{ {
return false; return false;
} }

Loading…
Cancel
Save