diff --git a/code/nel/src/pacs/build_indoor.cpp b/code/nel/src/pacs/build_indoor.cpp index 222c18311..5b4c870d7 100644 --- a/code/nel/src/pacs/build_indoor.cpp +++ b/code/nel/src/pacs/build_indoor.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2019 Jan BOON (Kaetemi) +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/src/pacs/local_retriever.cpp b/code/nel/src/pacs/local_retriever.cpp index 6ee2da559..9a73e8b28 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.cpp @@ -2,7 +2,7 @@ // Copyright (C) 2010 Winch Gate Property Limited // // This source file has been modified by the following contributors: -// Copyright (C) 2015 Jan BOON (Kaetemi) +// Copyright (C) 2015-2019 Jan BOON (Kaetemi) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,6 +19,8 @@ #include "stdpacs.h" +#include + #include "nel/misc/plane.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]; nlinfo("-- loop %d: %d chains length=%.2f", i, loop.size(), loop.Length); - static char wbuffer[256]; - static char buffer[10240]; - sprintf(buffer, " chains:"); + char wbuffer[256]; + stringstream ss; + sprintf(wbuffer, " chains:"); + ss << wbuffer; for (j=0; j // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2019 Jan BOON (Kaetemi) +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the @@ -18,6 +21,10 @@ #include "../zone_lib/zone_utility.h" #include +#include +#include +#include + #include "nel/misc/types_nl.h" #include "nel/misc/file.h" #include "nel/misc/common.h" @@ -27,8 +34,6 @@ #include "nel/3d/zone_smoother.h" #include "nel/3d/zone_tgt_smoother.h" #include "nel/3d/zone_corner_smoother.h" -#include -#include using namespace NL3D; @@ -579,7 +584,8 @@ void weldZones(const char *center) if (adjZonePatchs[patchIndex].BindEdges[edgeIndex].NPatchs!=0) { // Build an error message - char error[8000]; + char buf[2048]; + stringstream sserror; // Zone name string nameCenter, nameAdj; @@ -587,10 +593,11 @@ void weldZones(const char *center) getZoneNameByCoord (adjZonesId[i]&0xff, (adjZonesId[i]>>8)+1, nameAdj); // 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" "This patch is already binded with the following patches : ", ptch+1, nameAdj.c_str(), patchIndex+1, nameCenter.c_str() ); + sserror << buf; // Sub message for (uint i=0; i // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2019 Jan BOON (Kaetemi) +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_primitive.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_primitive.cpp index a7364a60e..c841a458c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_primitive.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_primitive.cpp @@ -1,6 +1,9 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2019 Jan BOON (Kaetemi) +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the @@ -16,6 +19,8 @@ #include "stdafx.h" +#include + #include "editor_primitive.h" #include "generate_primitive.h" #include "world_editor.h" @@ -361,18 +366,15 @@ bool CGeneratePrimitive::generate (std::vector< std::vector > &dest } // Error ? - if (!_FileNotFound.empty ()) + if (!_FileNotFound.empty()) { // Continue ? - char message[2048]; - message[0] = 0; - for (uint i=0; i<_FileNotFound.size (); i++) + stringstream ssmessage; + for (uint i = 0; i < _FileNotFound.size(); i++) { - strcat (message, _FileNotFound[i].c_str ()); - strcat (message, "\n"); + ssmessage << _FileNotFound[i] << "\n"; } - - if (!theApp.yesNoMessage ("Can't load some files:\n%s\nContinue ?", message)) + if (!theApp.yesNoMessage("Can't load some files:\n%s\nContinue ?", ssmessage.str())) { return false; }